consume
consume: (AwtInputEvent) -> ()Consumes the event: no listener after this one sees it, and the game does not either.
| Method | Returns | Description |
|---|---|---|
consume() | () | Consumes the event: no listener after this one sees it, and the game does not either. |
isConsumed() | boolean | Whether a listener consumed the event. |
getModifiersEx() | number | The extended modifier mask: InputEvent.SHIFT_DOWN_MASK, CTRL_DOWN_MASK, ALT_DOWN_MASK, META_DOWN_MASK and the BUTTONn_DOWN_MASKs… |
getModifiers() | number | The old-style modifier mask (InputEvent.SHIFT_MASK, ..., BUTTON1_MASK): for an event the client made, what AWT's constructor derives fr… |
isShiftDown() | boolean | Whether Shift was down. |
isControlDown() | boolean | Whether Control was down. |
isAltDown() | boolean | Whether Alt was down. |
isMetaDown() | boolean | Whether Meta was down. On Windows no key is Meta (AWT reports the Windows key as KeyEvent.VK_WINDOWS with no modifier), so this is `false… |
isAltGraphDown() | boolean | Whether AltGraph was down. The client reports AltGr as Control and Alt, so this is always false. |
getWhen() | number | When the event happened, in milliseconds since the Unix epoch. |
getID() | number | The event id: KeyEvent.KEY_PRESSED, MouseEvent.MOUSE_CLICKED, MouseEvent.MOUSE_WHEEL, ... |
getSource() | Component? | The component the event is about, for an event a Swing listener is handed (a panel's mouse, wheel or key listener): the component the liste… |
getComponent() | Component? | The component, as getSource(). |
consumeconsume: (AwtInputEvent) -> ()Consumes the event: no listener after this one sees it, and the game does not either.
isConsumedisConsumed: (AwtInputEvent) -> booleanWhether a listener consumed the event.
getModifiersExgetModifiersEx: (AwtInputEvent) -> numberThe extended modifier mask: InputEvent.SHIFT_DOWN_MASK, CTRL_DOWN_MASK, ALT_DOWN_MASK, META_DOWN_MASK and the BUTTONn_DOWN_MASKs of the buttons held.
getModifiersgetModifiers: (AwtInputEvent) -> numberThe old-style modifier mask (InputEvent.SHIFT_MASK, ..., BUTTON1_MASK): for an event the client made, what AWT's constructor derives from the extended one; for one made with AwtMouseEvent.create, what that constructor kept.
isShiftDownisShiftDown: (AwtInputEvent) -> booleanWhether Shift was down.
isControlDownisControlDown: (AwtInputEvent) -> booleanWhether Control was down.
isAltDownisAltDown: (AwtInputEvent) -> booleanWhether Alt was down.
isMetaDownisMetaDown: (AwtInputEvent) -> booleanWhether Meta was down. On Windows no key is Meta (AWT reports the Windows key as KeyEvent.VK_WINDOWS with no modifier), so this is false for an event the client made.
isAltGraphDownisAltGraphDown: (AwtInputEvent) -> booleanWhether AltGraph was down. The client reports AltGr as Control and Alt, so this is always false.
getWhengetWhen: (AwtInputEvent) -> numberWhen the event happened, in milliseconds since the Unix epoch.
getIDgetID: (AwtInputEvent) -> numberThe event id: KeyEvent.KEY_PRESSED, MouseEvent.MOUSE_CLICKED, MouseEvent.MOUSE_WHEEL, ...
getSourcegetSource: (AwtInputEvent) -> Component?The component the event is about, for an event a Swing listener is handed (a panel's mouse, wheel or key listener): the component the listener was added to, or, for an event passed on with dispatchEvent, the one it first went to. nil for an event of the game canvas (a keyManager or mouseManager listener's: the canvas has no object here), and for a kept event whose component was collected since.
getComponentgetComponent: (AwtInputEvent) -> Component?The component, as getSource().