InputEvent defines several integer constants that represent any modifiers ,such as the control key pressed ,that might be associated with the event .originally the InputEvent class defined the following modifiers
| ACTION_EVENT_MASK | INPUT_METHOD_EVENT_MASK |
| ADJUSTMENT_EVENT_MASK, | INVOCATION_EVENT_MASK |
| MOUSE_MOTION_EVENT_MASK | MOUSE_EVENT_MASK |
| COMPONENT_EVENT_MASK | ITEM_EVENT_MASK |
| CONTAINER_EVENT_MASK | WINDOW_FOCUS_EVENT_MASK |
| FOCUS_EVENT_MASK | WINDOW_STATE_EVENT_MASK |
| HIERARCHY_BOUNDS_EVENT_MASK | WINDOW_EVENT_MASK |
| PAINT_EVENT_MASK, RESERVED_ID_MAX | MOUSE_WHEEL_EVENT_MASK |
| KEY_EVENT_MASK | TEXT_EVENT_MASK |
| HIERARCHY_EVENT_MASK |
| Method Summary | |
void |
consume()
Consumes this event so that it will not be processed in the default manner by the source which originated it. |
int |
getModifiers()
Returns the modifier mask for this event. |
int |
getModifiersEx()
Returns the extended modifier mask for this event. |
static String |
getModifiersExText(int modifiers)
Returns a String describing the extended modifier keys and mouse buttons, such as "Shift", "Button1", or "Ctrl+Shift". |
long |
getWhen()
Returns the timestamp of when this event occurred. |
boolean |
isAltDown()
Returns whether or not the Alt modifier is down on this event. |
boolean |
isAltGraphDown()
Returns whether or not the AltGraph modifier is down on this event. |
boolean |
isConsumed()
Returns whether or not this event has been consumed. |
boolean |
isControlDown()
Returns whether or not the Control modifier is down on this event. |
boolean |
isMetaDown()
Returns whether or not the Meta modifier is down on this event. |
boolean |
isShiftDown()
Returns whether or not the Shift modifier is down on this event. |
0 comments:
Post a Comment