Class java.awt.event.InputEvent
All Packages Class Hierarchy This Package Previous Next Index
Class java.awt.event.InputEvent
Object
|
+----EventObject
|
+----AWTEvent
|
+----ComponentEvent
|
+----java.awt.event.InputEvent
- public abstract class InputEvent
- extends ComponentEvent
The root event class for all component-level input events.
Input events are delivered to listeners before they are
processed normally by the source where they originated.
This allows listeners and component subclasses to "consume"
the event so that the source will not process them in their
default manner. For example, consuming mousePressed events
on a Button component will prevent the Button from being
activated.
- Version:
- 1.12 07/01/98
- Author:
- Carl Quinn
-
ALT_MASK
-
The alt key modifier constant.
-
BUTTON1_MASK
- The mouse button1 modifier constant.
-
BUTTON2_MASK
- The mouse button2 modifier constant.
-
BUTTON3_MASK
-
The mouse button3 modifier constant.
-
CTRL_MASK
- The control key modifier constant.
-
META_MASK
-
The meta key modifier constant.
-
SHIFT_MASK
- The shift key modifier constant.
-
consume()
- Consumes this event so that it will not be processed
in the default manner by the source which originated it.
-
getModifiers()
- Returns the modifiers flag for this event.
-
getWhen()
- Returns the timestamp of when this event occurred.
-
isAltDown()
- Returns whether or not the Alt modifier is down on this event.
-
isConsumed()
- Returns whether or not this event has been consumed.
-
isControlDown()
- Returns whether or not the Control modifier is down on this event.
-
isMetaDown()
- Returns whether or not the Meta modifier is down on this event.
-
isShiftDown()
- Returns whether or not the Shift modifier is down on this event.
ALT_MASK
public static final int ALT_MASK
- The alt key modifier constant.
BUTTON1_MASK
public static final int BUTTON1_MASK
- The mouse button1 modifier constant.
BUTTON2_MASK
public static final int BUTTON2_MASK
- The mouse button2 modifier constant.
BUTTON3_MASK
public static final int BUTTON3_MASK
- The mouse button3 modifier constant.
CTRL_MASK
public static final int CTRL_MASK
- The control key modifier constant.
META_MASK
public static final int META_MASK
- The meta key modifier constant.
SHIFT_MASK
public static final int SHIFT_MASK
- The shift key modifier constant.
consume
public void consume()
- Consumes this event so that it will not be processed
in the default manner by the source which originated it.
- Overrides:
- consume in class AWTEvent
getModifiers
public int getModifiers()
- Returns the modifiers flag for this event.
getWhen
public long getWhen()
- Returns the timestamp of when this event occurred.
isAltDown
public boolean isAltDown()
- Returns whether or not the Alt modifier is down on this event.
isConsumed
public boolean isConsumed()
- Returns whether or not this event has been consumed.
- Overrides:
- isConsumed in class AWTEvent
- See Also:
- consume
isControlDown
public boolean isControlDown()
- Returns whether or not the Control modifier is down on this event.
isMetaDown
public boolean isMetaDown()
- Returns whether or not the Meta modifier is down on this event.
isShiftDown
public boolean isShiftDown()
- Returns whether or not the Shift modifier is down on this event.
All Packages Class Hierarchy This Package Previous Next Index