Package ro.sync.ecss.extensions.api
Class AuthorInputEvent
- java.lang.Object
-
- ro.sync.ecss.extensions.api.AuthorInputEvent
-
- Direct Known Subclasses:
AuthorMouseEvent
@API(type=NOT_EXTENDABLE, src=PUBLIC) public abstract class AuthorInputEvent extends java.lang.Object
Base class for Author input events.
-
-
Field Summary
Fields Modifier and Type Field Description static int
ALT_GRAPH_PRESSED
This flag indicates that the AltGraph key was down when the event occurred.static int
ALT_PRESSED
This flag indicates that the Alt key was down when the event occurred.boolean
consumed
States whether or not the event has been consumed.static int
CTRL_PRESSED
This flag indicates that the Control key was down when the event occurred.static int
META_PRESSED
This flag indicates that the Meta key was down when the event occurred.int
modifiers
The state of the modifier mask at the time the input event was fired.static int
SHIFT_PRESSED
This flag indicates that the Shift key was down when the event occurred.
-
Constructor Summary
Constructors Constructor Description AuthorInputEvent(int modifiers)
Constructor for author input event.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
consume()
Set the consumed flag for the event.int
getModifiers()
boolean
isAltGraphPressed()
boolean
isAltPressed()
boolean
isCommandPressed()
Check if META is pressed on Mac or CTRL is pressed on Windows.static boolean
isCommandPressed(int modifiers)
Check if META is pressed on Mac or CTRL is pressed on Windows.boolean
isConsumed()
boolean
isCtrlPressed()
boolean
isMetaPressed()
boolean
isShiftPressed()
-
-
-
Field Detail
-
SHIFT_PRESSED
public static final int SHIFT_PRESSED
This flag indicates that the Shift key was down when the event occurred. The value is 1 << 0.- See Also:
- Constant Field Values
-
CTRL_PRESSED
public static final int CTRL_PRESSED
This flag indicates that the Control key was down when the event occurred. The value is 1 << 1.- See Also:
- Constant Field Values
-
META_PRESSED
public static final int META_PRESSED
This flag indicates that the Meta key was down when the event occurred. The value is 1 << 2.- See Also:
- Constant Field Values
-
ALT_PRESSED
public static final int ALT_PRESSED
This flag indicates that the Alt key was down when the event occurred. The value is 1 << 3.- See Also:
- Constant Field Values
-
ALT_GRAPH_PRESSED
public static final int ALT_GRAPH_PRESSED
This flag indicates that the AltGraph key was down when the event occurred. The value is 1 << 5.- See Also:
- Constant Field Values
-
modifiers
public final int modifiers
The state of the modifier mask at the time the input event was fired.
-
consumed
public boolean consumed
States whether or not the event has been consumed.
-
-
Method Detail
-
consume
public void consume()
Set the consumed flag for the event.
-
isConsumed
public final boolean isConsumed()
- Returns:
true
if the event was consumed.
-
isShiftPressed
public boolean isShiftPressed()
- Returns:
true
if SHIFT key was pressed.
-
isCtrlPressed
public final boolean isCtrlPressed()
- Returns:
true
if CTRL key was pressed.
-
isAltPressed
public final boolean isAltPressed()
- Returns:
true
if ALT key was pressed.
-
isAltGraphPressed
public final boolean isAltGraphPressed()
- Returns:
true
if ALT GR key was pressed.
-
isMetaPressed
public final boolean isMetaPressed()
- Returns:
true
if META key was pressed.
-
getModifiers
public int getModifiers()
- Returns:
- Returns the keyboard modifiers associated with the event.
-
isCommandPressed
public final boolean isCommandPressed()
Check if META is pressed on Mac or CTRL is pressed on Windows.- Returns:
true
if META is pressed on Mac or CTRL is pressed on Windows.
-
isCommandPressed
public static boolean isCommandPressed(int modifiers)
Check if META is pressed on Mac or CTRL is pressed on Windows.- Parameters:
modifiers
- The modifiers- Returns:
true
if META is pressed on Mac or CTRL is pressed on Windows.
-
-