InputEvent is the root class for representing user input events. Input events are passed to listeners before the event source processes them. If one of the listeners consumes an event by using consume(), the event will not be processed by the event source peer.
public abstract class java.awt.event.InputEvent extends java.awt.event.ComponentEvent { // Constants public final static int ALT_MASK; public final static int BUTTON1_MASK; public final static int BUTTON2_MASK; public final static int BUTTON3_MASK; public final static int CTRL_MASK; public final static int META_MASK; public final static int SHIFT_MASK; // Instance Methods public void consume(); public int getModifiers(); public long getWhen(); public boolean isAltDown(); public boolean isConsumed(); public boolean isControlDown(); public boolean isMetaDown(); public boolean isShiftDown(); }
The ALT key mask. ORed with other masks to form modifiers setting of event.
The mouse button 1 key mask. ORed with other masks to form modifiers setting of event.
The mouse button 2 key mask. ORed with other masks to form modifiers setting of event. This constant is identical to ALT_MASK.
The mouse button 3 key mask. ORed with other masks to form modifiers setting of event. This constant is identical to ALT_MASK.
The Control key mask. ORed with other masks to form modifiers setting of event.
The Meta key mask. ORed with other masks to form modifiers setting of event.
The Shift key mask. ORed with other masks to form modifiers setting of event.
A consumed event will not be delivered to its source for default processing.
The modifier flags, a combination of the _MASK constants.
Use this method to find out what modifier keys were pressed when an input event occurred.
The time at which this event occurred.
The time of the event is returned as the number of milliseconds since the epoch (00:00:00 UTC, January 1, 1970). Conveniently, java.util.Date has a constructor that accepts such values.
true if the Alt key was pressed; false otherwise.
true if the event has been consumed; false otherwise.
true if the Control key was pressed; false otherwise.
true if the Meta key was pressed; false otherwise.
true if the Shift key was pressed; false otherwise.
ComponentEvent, KeyEvent, MouseEvent
This HTML Help has been published using the chm2web software. |