Class SInputEvent

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SKeyEvent, SMouseEvent

public abstract class SInputEvent extends SComponentEvent
Surrogate-side port of InputEvent. Abstract parent of SKeyEvent and SMouseEvent. Source retyped from Component to Component for the same SD_event_port_stance reason SComponentEvent needs porting — surrogates are Vaadin components, not AWT components.

Every modifier constant below is AWT's, by delegation rather than by value, so bit arithmetic carries across unchanged and stays correct however AWT evolves; the deprecated *_MASK set is republished for user code that hasn't migrated. Static utilities delegate for the same reason. The block is emitted by DelegatedConstantsTest from InputEvent's public runtime API — see that test before editing it by hand.

See Also:
  • Field Details

  • Constructor Details

    • SInputEvent

      protected SInputEvent(com.vaadin.flow.component.Component source, int id, long when, int modifiers)
  • Method Details

    • getWhen

      public long getWhen()
    • getModifiers

      @Deprecated public int getModifiers()
      Deprecated.
      Legacy-modifier accessor; deprecated in AWT. We store only the extended set and return it verbatim — user code checking specific bits should use getModifiersEx() with the *_DOWN_MASK constants.
    • getModifiersEx

      public int getModifiersEx()
    • isShiftDown

      public boolean isShiftDown()
    • isControlDown

      public boolean isControlDown()
    • isMetaDown

      public boolean isMetaDown()
    • isAltDown

      public boolean isAltDown()
    • isAltGraphDown

      public boolean isAltGraphDown()
    • getMaskForButton

      public static int getMaskForButton(int button)
      Delegates to AWT — constants match.
    • getModifiersExText

      public static String getModifiersExText(int modifiers)
      Delegates to AWT — constants match and formatting is locale-aware.