InputEvent

Name

InputEvent

[Graphic: Figure from the text]

Description

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.

Class Definition

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();
}

Constants

ALT_MASK

public final static int ALT_MASK

The ALT key mask. ORed with other masks to form modifiers setting of event.

BUTTON1_MASK

public final static int BUTTON1_MASK

The mouse button 1 key mask. ORed with other masks to form modifiers setting of event.

BUTTON2_MASK

public final static int BUTTON2_MASK

The mouse button 2 key mask. ORed with other masks to form modifiers setting of event. This constant is identical to ALT_MASK.

BUTTON3_MASK

public final static int BUTTON3_MASK

The mouse button 3 key mask. ORed with other masks to form modifiers setting of event. This constant is identical to ALT_MASK.

CTRL_MASK

public final static int CTRL_MASK

The Control key mask. ORed with other masks to form modifiers setting of event.

META_MASK

public final static int META_MASK

The Meta key mask. ORed with other masks to form modifiers setting of event.

SHIFT_MASK

public final static int SHIFT_MASK

The Shift key mask. ORed with other masks to form modifiers setting of event.

Instance Methods

consume

public void consume()

getModifiers

public int getModifiers()

getWhen

public long getWhen()

isAltDown

public boolean isAltDown()

isConsumed

public boolean isConsumed()

isControlDown

public boolean isControlDown()

isMetaDown

public boolean isMetaDown()

isShiftDown

public boolean isShiftDown()

See Also

ComponentEvent, KeyEvent, MouseEvent