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 intThis flag indicates that the AltGraph key was down when the event occurred.static final intThis flag indicates that the Alt key was down when the event occurred.booleanStates whether or not the event has been consumed.static final intThis flag indicates that the Control key was down when the event occurred.static final intThis flag indicates that the Meta key was down when the event occurred.final intThe state of the modifier mask at the time the input event was fired.static final intThis flag indicates that the Shift key was down when the event occurred. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconsume()Set the consumed flag for the event.intfinal booleanfinal booleanfinal booleanCheck if META is pressed on Mac or CTRL is pressed on Windows.static booleanisCommandPressed(int modifiers) Check if META is pressed on Mac or CTRL is pressed on Windows.final booleanfinal booleanfinal booleanboolean
-
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:
trueif the event was consumed.
-
isShiftPressed
public boolean isShiftPressed()- Returns:
trueif SHIFT key was pressed.
-
isCtrlPressed
public final boolean isCtrlPressed()- Returns:
trueif CTRL key was pressed.
-
isAltPressed
public final boolean isAltPressed()- Returns:
trueif ALT key was pressed.
-
isAltGraphPressed
public final boolean isAltGraphPressed()- Returns:
trueif ALT GR key was pressed.
-
isMetaPressed
public final boolean isMetaPressed()- Returns:
trueif 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:
trueif 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:
trueif META is pressed on Mac or CTRL is pressed on Windows.
-