Package ro.sync.ecss.extensions.api
Class AuthorInputEvent
java.lang.Object
ro.sync.ecss.extensions.api.AuthorInputEvent
- Direct Known Subclasses:
AuthorMouseEvent
Base class for Author input events.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
This flag indicates that the AltGraph key was down when the event occurred.static final int
This flag indicates that the Alt key was down when the event occurred.boolean
States whether or not the event has been consumed.static final int
This flag indicates that the Control key was down when the event occurred.static final int
This flag indicates that the Meta key was down when the event occurred.final int
The state of the modifier mask at the time the input event was fired.static final int
This flag indicates that the Shift key was down when the event occurred. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
consume()
Set the consumed flag for the event.int
final boolean
final boolean
final boolean
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.final boolean
final boolean
final boolean
boolean
-
Field Details
-
SHIFT_PRESSED
public static final int SHIFT_PRESSEDThis flag indicates that the Shift key was down when the event occurred. The value is 1 << 0.- See Also:
-
CTRL_PRESSED
public static final int CTRL_PRESSEDThis flag indicates that the Control key was down when the event occurred. The value is 1 << 1.- See Also:
-
META_PRESSED
public static final int META_PRESSEDThis flag indicates that the Meta key was down when the event occurred. The value is 1 << 2.- See Also:
-
ALT_PRESSED
public static final int ALT_PRESSEDThis flag indicates that the Alt key was down when the event occurred. The value is 1 << 3.- See Also:
-
ALT_GRAPH_PRESSED
public static final int ALT_GRAPH_PRESSEDThis flag indicates that the AltGraph key was down when the event occurred. The value is 1 << 5.- See Also:
-
modifiers
public final int modifiersThe state of the modifier mask at the time the input event was fired. -
consumed
public boolean consumedStates whether or not the event has been consumed.
-
-
Constructor Details
-
AuthorInputEvent
public AuthorInputEvent(int modifiers) Constructor for author input event.- Parameters:
modifiers
- The modifiers.
-
-
Method Details
-
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.
-