Awt event class in java

Package java.awt.event

Provides interfaces and classes for dealing with different types of events fired by AWT components. See the java.awt.AWTEvent class for details on the AWT event model. Events are fired by event sources. An event listener registers with an event source to receive notifications about the events of a particular type. This package defines events and event listeners, as well as event listener adapters, which are convenience classes to make easier the process of writing event listeners.

The listener interface for receiving notification of events dispatched to objects that are instances of Component or MenuComponent or their subclasses.

The listener interface for receiving «interesting» mouse events (press, release, click, enter, and exit) on a component.

The listener interface for receiving WindowEvents , including WINDOW_GAINED_FOCUS and WINDOW_LOST_FOCUS events.

A class which extends the EventListenerProxy specifically for adding an AWTEventListener for a specific event mask.

A low-level event which indicates that a component moved, changed size, or changed visibility (also, the root class for the other component-level events).

A low-level event which indicates that a container’s contents changed because a component was added or removed.

An event which executes the run() method on a Runnable when dispatched by the AWT event dispatcher thread.

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2023, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

Источник

Читайте также:  Конвертер в webp php

Awt event class in java

The root event class for all AWT events. This class and its subclasses supersede the original java.awt.Event class. Subclasses of this root AWTEvent class defined outside of the java.awt.event package should define event ID values greater than the value defined by RESERVED_ID_MAX. The event masks defined in this class are needed by Component subclasses which are using Component.enableEvents() to select for event types not selected by registered listeners. If a listener is registered on a component, the appropriate event mask is already set internally by the component. The masks are also used to specify to which types of events an AWTEventListener should listen. The masks are bitwise-ORed together and passed to Toolkit.addAWTEventListener.

Field Summary

Controls whether or not the event is sent back down to the peer once the source has processed it — false means it’s sent to the peer; true means it’s not.

Fields declared in class java.util.EventObject

Constructor Summary

Method Summary

Methods declared in class java.util.EventObject

Methods declared in class java.lang.Object

Field Detail

id

consumed

protected boolean consumed

Controls whether or not the event is sent back down to the peer once the source has processed it — false means it’s sent to the peer; true means it’s not. Semantic events always have a ‘true’ value since they were generated by the peer in response to a low-level event.

COMPONENT_EVENT_MASK

public static final long COMPONENT_EVENT_MASK

CONTAINER_EVENT_MASK

public static final long CONTAINER_EVENT_MASK

FOCUS_EVENT_MASK

public static final long FOCUS_EVENT_MASK

KEY_EVENT_MASK

public static final long KEY_EVENT_MASK

MOUSE_EVENT_MASK

public static final long MOUSE_EVENT_MASK

MOUSE_MOTION_EVENT_MASK

public static final long MOUSE_MOTION_EVENT_MASK

WINDOW_EVENT_MASK

public static final long WINDOW_EVENT_MASK

ACTION_EVENT_MASK

public static final long ACTION_EVENT_MASK

ADJUSTMENT_EVENT_MASK

public static final long ADJUSTMENT_EVENT_MASK

ITEM_EVENT_MASK

public static final long ITEM_EVENT_MASK

TEXT_EVENT_MASK

public static final long TEXT_EVENT_MASK

INPUT_METHOD_EVENT_MASK

public static final long INPUT_METHOD_EVENT_MASK

PAINT_EVENT_MASK

public static final long PAINT_EVENT_MASK

INVOCATION_EVENT_MASK

public static final long INVOCATION_EVENT_MASK

HIERARCHY_EVENT_MASK

public static final long HIERARCHY_EVENT_MASK

HIERARCHY_BOUNDS_EVENT_MASK

public static final long HIERARCHY_BOUNDS_EVENT_MASK

MOUSE_WHEEL_EVENT_MASK

public static final long MOUSE_WHEEL_EVENT_MASK

WINDOW_STATE_EVENT_MASK

public static final long WINDOW_STATE_EVENT_MASK

WINDOW_FOCUS_EVENT_MASK

public static final long WINDOW_FOCUS_EVENT_MASK

RESERVED_ID_MAX

public static final int RESERVED_ID_MAX

The maximum value for reserved AWT event IDs. Programs defining their own event IDs should use IDs greater than this value.

Constructor Detail

AWTEvent

@Deprecated(since="9") public AWTEvent​(Event event)

AWTEvent

Method Detail

setSource

Retargets an event to a new source. This method is typically used to retarget an event to a lightweight child Component of the original heavyweight source. This method is intended to be used only by event targeting subsystems, such as client-defined KeyboardFocusManagers. It is not for general client use.

Читайте также:  Pip install smtplib python 3

getID

toString

paramString

Returns a string representing the state of this Event . This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null .

consume

isConsumed

protected boolean isConsumed()

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2023, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

Источник

Awt event class in java

The root event class for all AWT events. This class and its subclasses supercede the original java.awt.Event class. Subclasses of this root AWTEvent class defined outside of the java.awt.event package should define event ID values greater than the value defined by RESERVED_ID_MAX. The event masks defined in this class are needed by Component subclasses which are using Component.enableEvents() to select for event types not selected by registered listeners. If a listener is registered on a component, the appropriate event mask is already set internally by the component. The masks are also used to specify to which types of events an AWTEventListener should listen. The masks are bitwise-ORed together and passed to Toolkit.addAWTEventListener.

Field Summary

Controls whether or not the event is sent back down to the peer once the source has processed it — false means it’s sent to the peer; true means it’s not.

Fields inherited from class java.util.EventObject

Constructor Summary

Method Summary

Methods inherited from class java.util.EventObject

Methods inherited from class java.lang.Object

Field Detail

id

consumed

protected boolean consumed

Controls whether or not the event is sent back down to the peer once the source has processed it — false means it’s sent to the peer; true means it’s not. Semantic events always have a ‘true’ value since they were generated by the peer in response to a low-level event.

COMPONENT_EVENT_MASK

public static final long COMPONENT_EVENT_MASK

CONTAINER_EVENT_MASK

public static final long CONTAINER_EVENT_MASK

FOCUS_EVENT_MASK

public static final long FOCUS_EVENT_MASK

KEY_EVENT_MASK

public static final long KEY_EVENT_MASK

MOUSE_EVENT_MASK

public static final long MOUSE_EVENT_MASK

MOUSE_MOTION_EVENT_MASK

public static final long MOUSE_MOTION_EVENT_MASK

WINDOW_EVENT_MASK

public static final long WINDOW_EVENT_MASK

ACTION_EVENT_MASK

public static final long ACTION_EVENT_MASK

ADJUSTMENT_EVENT_MASK

public static final long ADJUSTMENT_EVENT_MASK

ITEM_EVENT_MASK

public static final long ITEM_EVENT_MASK

TEXT_EVENT_MASK

public static final long TEXT_EVENT_MASK

INPUT_METHOD_EVENT_MASK

public static final long INPUT_METHOD_EVENT_MASK

PAINT_EVENT_MASK

public static final long PAINT_EVENT_MASK

INVOCATION_EVENT_MASK

public static final long INVOCATION_EVENT_MASK

HIERARCHY_EVENT_MASK

public static final long HIERARCHY_EVENT_MASK

HIERARCHY_BOUNDS_EVENT_MASK

public static final long HIERARCHY_BOUNDS_EVENT_MASK

MOUSE_WHEEL_EVENT_MASK

public static final long MOUSE_WHEEL_EVENT_MASK

WINDOW_STATE_EVENT_MASK

public static final long WINDOW_STATE_EVENT_MASK

WINDOW_FOCUS_EVENT_MASK

public static final long WINDOW_FOCUS_EVENT_MASK

RESERVED_ID_MAX

public static final int RESERVED_ID_MAX

The maximum value for reserved AWT event IDs. Programs defining their own event IDs should use IDs greater than this value.

Читайте также:  Javascript function class html

Constructor Detail

AWTEvent

AWTEvent

Источник

Package java.awt.event

The listener interface for receiving notification of events dispatched to objects that are instances of Component or MenuComponent or their subclasses.

The listener interface for receiving «interesting» mouse events (press, release, click, enter, and exit) on a component.

The listener interface for receiving WindowEvents , including WINDOW_GAINED_FOCUS and WINDOW_LOST_FOCUS events.

A class which extends the EventListenerProxy specifically for adding an AWTEventListener for a specific event mask.

A low-level event which indicates that a component moved, changed size, or changed visibility (also, the root class for the other component-level events).

A low-level event which indicates that a container’s contents changed because a component was added or removed.

An event which executes the run() method on a Runnable when dispatched by the AWT event dispatcher thread.

Package java.awt.event Description

Provides interfaces and classes for dealing with different types of events fired by AWT components. See the java.awt.AWTEvent class for details on the AWT event model. Events are fired by event sources. An event listener registers with an event source to receive notifications about the events of a particular type. This package defines events and event listeners, as well as event listener adapters, which are convenience classes to make easier the process of writing event listeners.

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2023, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.

Источник

Оцените статью