- All Implemented Interfaces:
Serializable
,Comparable<MouseCaptureMode>
,java.lang.constant.Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMouse clicks are captured on the down-motion but not the up-motion.Mouse clicks are captured both on down and up, this is the normal mode for capturing mouse input.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.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 -
Method Summary
Modifier and TypeMethodDescriptionstatic MouseCaptureMode
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 Details
-
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
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
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 Details
-
MouseCaptureMode
private MouseCaptureMode()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-