- java.lang.Object
-
- java.lang.Enum<MouseCaptureMode>
-
- com.googlecode.lanterna.terminal.MouseCaptureMode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MouseCaptureMode>
public enum MouseCaptureMode extends java.lang.Enum<MouseCaptureMode>
Constant describing different modes for capturing mouse input. By default, no mouse capturing is enabled (unless previously enabled before starting the Lanterna application. These are the different modes of input capturing supported. Please note that terminal emulators vary widely in how these are implemented! Also, some terminals such as Konsole, appear to unfortunately round up and down the column which is in the generated MouseEvent The column actually starts about halfway prior of the left border of the character and goes to about halfway past that edge. This makes them rather unsuitable for precision clicking on specific characters on the screen. The XTerm terminal appears to properly generate with the input stream with location along the boundaries of the characters as needed for clicks within the bounds of the characters to properly map to that column. Created by martin on 26/07/15.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CLICK
Mouse clicks are captured on the down-motion but not the up-motion.CLICK_RELEASE
Mouse clicks are captured both on down and up, this is the normal mode for capturing mouse input.CLICK_RELEASE_DRAG
Mouse clicks are captured both on down and up and if the mouse if moved while holding down one of the button, a drag event is generated.CLICK_RELEASE_DRAG_MOVE
Mouse clicks are captured both on down and up and also all mouse movements, no matter if any button is held down or not.
-
Constructor Summary
Constructors Modifier Constructor Description private
MouseCaptureMode()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MouseCaptureMode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MouseCaptureMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CLICK
public static final MouseCaptureMode CLICK
Mouse clicks are captured on the down-motion but not the up-motion. This corresponds to the X10 xterm protocol. KDE's Konsole (tested with 15.04) does not implement this extension, but xfce4-terminal, gnome-terminal and xterm does.
-
CLICK_RELEASE
public static final MouseCaptureMode CLICK_RELEASE
Mouse clicks are captured both on down and up, this is the normal mode for capturing mouse input. KDE's konsole interprets this as CLICK_RELEASE_DRAG.
-
CLICK_RELEASE_DRAG
public static final MouseCaptureMode CLICK_RELEASE_DRAG
Mouse clicks are captured both on down and up and if the mouse if moved while holding down one of the button, a drag event is generated.
-
CLICK_RELEASE_DRAG_MOVE
public static final MouseCaptureMode CLICK_RELEASE_DRAG_MOVE
Mouse clicks are captured both on down and up and also all mouse movements, no matter if any button is held down or not.
-
-
Method Detail
-
values
public static MouseCaptureMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MouseCaptureMode c : MouseCaptureMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MouseCaptureMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-