AWTEvent

Name

AWTEvent

[Graphic: Figure from the text]

Description

The root class of all AWT events. Subclasses of this class are the replacement for java.awt.Event, which is only used for the Java 1.0.2 event model. In Java 1.1, event objects are passed from event source components to objects implementing a corresponding listener interface. Some event sources have a corresponding interface, too. For example, AdjustmentEvents are passed from Adjustable objects to AdjustmentListeners. Some event types do not have corresponding interfaces; for example, ActionEvents are passed from Buttons to ActionListeners, but there is no "Actionable" interface that Button implements.

Class Definition

public abstract class java.awt.AWTEvent extends java.util.EventObject {
 // Constants public final static long ACTION_EVENT_MASK;
public final static long ADJUSTMENT_EVENT_MASK;
public final static long COMPONENT_EVENT_MASK;
public final static long CONTAINER_EVENT_MASK;
public final static long FOCUS_EVENT_MASK;
public final static long ITEM_EVENT_MASK;
public final static long KEY_EVENT_MASK;
public final static long MOUSE_EVENT_MASK;
public final static long MOUSE_MOTION_EVENT_MASK;
public final static long RESERVED_ID_MAX;
public final static long TEXT_EVENT_MASK;
public final static long WINDOW_EVENT_MASK; // Variables protected boolean consumed; protected int id; // Constructors public AWTEvent (Event event);
public AWTEvent (Object source, int id); // Instance Methods public int getID();
public String paramString();
public String toString(); // Protected Instance Methods protected void consume(); protected boolean isConsumed();
}

Constants

ACTION_EVENT_MASK

public static final long ACTION_EVENT_MASK

The mask for action events.

ADJUSTMENT_EVENT_MASK

public static final long ADJUSTMENT_EVENT_MASK

The mask for adjustment events.

COMPONENT_EVENT_MASK

public static final long COMPONENT_EVENT_MASK

The mask for component events.

CONTAINER_EVENT_MASK

public static final long CONTAINER_EVENT_MASK

The mask for container events.

FOCUS_EVENT_MASK

public static final long FOCUS_EVENT_MASK

The mask for focus events.

ITEM_EVENT_MASK

public static final long ITEM_EVENT_MASK

The mask for item events.

KEY_EVENT_MASK

public static final long KEY_EVENT_MASK

The mask for key events.

MOUSE_EVENT_MASK

public static final long MOUSE_EVENT_MASK

The mask for mouse events.

MOUSE_MOTION_EVENT_MASK

public static final long MOUSE_MOTION_EVENT_MASK

The mask for mouse motion events.

RESERVED_ID_MAX

public static final int

The maximum reserved event id.

TEXT_EVENT_MASK

public static final long TEXT_EVENT_MASK

The mask for text events.

WINDOW_EVENT_MASK

public static final long WINDOW_EVENT_MASK

The mask for window events.

Variables

consumed

protected boolean consumed

If consumed is true, the event will not be sent back to the peer. Semantic events will never be sent back to a peer; thus consumed is always true for semantic events.

id

protected int id

The type ID of this event.

Constructors

AWTEvent

public AWTEvent (Event event)

public AWTEvent (Object source, int id)

Instance Methods

getID

public int getID()

paramString

public String paramString()

toString

public String toString()

Protected Instance Methods

consume

protected void consume()

isConsumed

public boolean isConsumed()

See Also

ActionEvent, AdjustmentEvent, ComponentEvent, Event, EventObject, FocusEvent, ItemEvent, KeyEvent, MouseEvent, WindowEvent