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 Object
Base class for Author input events.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static 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
    Constructor
    Description
    AuthorInputEvent(int modifiers)
    Constructor for author input event.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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.
  • 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.