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.
@since JDK1.1
|
Java Source File Name | Type | Comment |
ActionEvent.java | Class | A semantic event which indicates that a component-defined action occurred.
This high-level event is generated by a component (such as a
Button ) when
the component-specific action occurs (such as being pressed).
The event is passed to every ActionListener object
that registered to receive such events using the component's
addActionListener method.
Note: To invoke an ActionEvent on a
Button using the keyboard, use the Space bar.
The object that implements the ActionListener interface
gets this ActionEvent when the event occurs. |
ActionListener.java | Interface | The listener interface for receiving action events. |
AdjustmentEvent.java | Class | The adjustment event emitted by Adjustable objects. |
AdjustmentListener.java | Interface | The listener interface for receiving adjustment events. |
AWTEventListener.java | Interface | The listener interface for receiving notification of events
dispatched to objects that are instances of Component or
MenuComponent or their subclasses. |
AWTEventListenerProxy.java | Class | A class which extends the EventListenerProxy , specifically
for adding an AWTEventListener for a specific event mask.
Instances of this class can be added as AWTEventListener s to
a Toolkit object. |
ComponentAdapter.java | Class | An abstract adapter class for receiving component events.
The methods in this class are empty. |
ComponentEvent.java | Class | 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).
Component events are provided for notification purposes ONLY;
The AWT will automatically handle component moves and resizes
internally so that GUI layout works properly regardless of
whether a program is receiving these events or not.
In addition to serving as the base class for other component-related
events (InputEvent, FocusEvent, WindowEvent, ContainerEvent),
this class defines the events that indicate changes in
a component's size, position, or visibility. |
ComponentListener.java | Interface | The listener interface for receiving component events.
The class that is interested in processing a component event
either implements this interface (and all the methods it
contains) or extends the abstract ComponentAdapter class
(overriding only the methods of interest).
The listener object created from that class is then registered with a
component using the component's addComponentListener
method. |
ContainerAdapter.java | Class | An abstract adapter class for receiving container events.
The methods in this class are empty. |
ContainerEvent.java | Class | A low-level event which indicates that a container's contents
changed because a component was added or removed.
Container events are provided for notification purposes ONLY;
The AWT will automatically handle changes to the containers
contents internally so that the program works properly regardless of
whether the program is receiving these events or not.
This low-level event is generated by a container object (such as a
Panel) when a component is added to it or removed from it. |
ContainerListener.java | Interface | The listener interface for receiving container events.
The class that is interested in processing a container event
either implements this interface (and all the methods it
contains) or extends the abstract ContainerAdapter class
(overriding only the methods of interest).
The listener object created from that class is then registered with a
component using the component's addContainerListener
method. |
FocusAdapter.java | Class | An abstract adapter class for receiving keyboard focus events.
The methods in this class are empty. |
FocusEvent.java | Class | A low-level event which indicates that a Component has gained or lost the
input focus. |
FocusListener.java | Interface | The listener interface for receiving keyboard focus events on
a component.
The class that is interested in processing a focus event
either implements this interface (and all the methods it
contains) or extends the abstract FocusAdapter class
(overriding only the methods of interest).
The listener object created from that class is then registered with a
component using the component's addFocusListener
method. |
HierarchyBoundsAdapter.java | Class | An abstract adapter class for receiving ancestor moved and resized events.
The methods in this class are empty. |
HierarchyBoundsListener.java | Interface | The listener interface for receiving ancestor moved and resized events.
The class that is interested in processing these events either implements
this interface (and all the methods it contains) or extends the abstract
HierarchyBoundsAdapter class (overriding only the method of
interest).
The listener object created from that class is then registered with a
Component using the Component's addHierarchyBoundsListener
method. |
HierarchyEvent.java | Class | An event which indicates a change to the Component
hierarchy to which a Component belongs.
- Hierarchy Change Events (HierarchyListener)
- addition of an ancestor
- removal of an ancestor
- hierarchy made displayable
- hierarchy made undisplayable
- hierarchy shown on the screen (both visible and displayable)
- hierarchy hidden on the screen (either invisible or undisplayable)
- Ancestor Reshape Events (HierarchyBoundsListener)
- an ancestor was resized
- an ancestor was moved
Hierarchy events are provided for notification purposes ONLY.
The AWT will automatically handle changes to the hierarchy internally so
that GUI layout and displayability works properly regardless of whether a
program is receiving these events or not.
This event is generated by a Container object (such as a Panel) when the
Container is added, removed, moved, or resized, and passed down the
hierarchy. |
HierarchyListener.java | Interface | The listener interface for receiving hierarchy changed events.
The class that is interested in processing a hierarchy changed event
should implement this interface.
The listener object created from that class is then registered with a
Component using the Component's addHierarchyListener
method. |
InputEvent.java | Class | 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. |
InputMethodEvent.java | Class | Input method events contain information about text that is being
composed using an input method. |
InputMethodListener.java | Interface | The listener interface for receiving input method events. |
InvocationEvent.java | Class | An event which executes the run() method on a Runnable
when dispatched by the AWT event dispatcher thread. |
ItemEvent.java | Class | A semantic event which indicates that an item was selected or deselected.
This high-level event is generated by an ItemSelectable object (such as a
List) when an item is selected or deselected by the user.
The event is passed to every ItemListener object which
registered to receive such events using the component's
addItemListener method. |
ItemListener.java | Interface | The listener interface for receiving item events.
The class that is interested in processing an item event
implements this interface. |
KeyAdapter.java | Class | An abstract adapter class for receiving keyboard events.
The methods in this class are empty. |
KeyEvent.java | Class | An event which indicates that a keystroke occurred in a component.
This low-level event is generated by a component object (such as a text
field) when a key is pressed, released, or typed. |
KeyListener.java | Interface | The listener interface for receiving keyboard events (keystrokes).
The class that is interested in processing a keyboard event
either implements this interface (and all the methods it
contains) or extends the abstract KeyAdapter class
(overriding only the methods of interest).
The listener object created from that class is then registered with a
component using the component's addKeyListener
method. |
MouseAdapter.java | Class | An abstract adapter class for receiving mouse events.
The methods in this class are empty. |
MouseEvent.java | Class | An event which indicates that a mouse action occurred in a component.
A mouse action is considered to occur in a particular component if and only
if the mouse cursor is over the unobscured part of the component's bounds
when the action happens.
For lightweight components, such as Swing's components, mouse events
are only dispatched to the component if the mouse event type has been
enabled on the component. |
MouseListener.java | Interface | The listener interface for receiving "interesting" mouse events
(press, release, click, enter, and exit) on a component.
(To track mouse moves and mouse drags, use the
MouseMotionListener .)
The class that is interested in processing a mouse event
either implements this interface (and all the methods it
contains) or extends the abstract MouseAdapter class
(overriding only the methods of interest).
The listener object created from that class is then registered with a
component using the component's addMouseListener
method. |
MouseMotionAdapter.java | Class | An abstract adapter class for receiving mouse motion events.
The methods in this class are empty. |
MouseMotionListener.java | Interface | The listener interface for receiving mouse motion events on a component.
(For clicks and other mouse events, use the MouseListener .)
The class that is interested in processing a mouse motion event
either implements this interface (and all the methods it
contains) or extends the abstract MouseMotionAdapter class
(overriding only the methods of interest).
The listener object created from that class is then registered with a
component using the component's addMouseMotionListener
method. |
MouseWheelEvent.java | Class | An event which indicates that the mouse wheel was rotated in a component.
A wheel mouse is a mouse which has a wheel in place of the middle button.
This wheel can be rotated towards or away from the user. |
MouseWheelListener.java | Interface | The listener interface for receiving mouse wheel events on a component.
(For clicks and other mouse events, use the MouseListener . |
NativeLibLoader.java | Class | |
PaintEvent.java | Class | The component-level paint event.
This event is a special type which is used to ensure that
paint/update method calls are serialized along with the other
events delivered from the event queue. |
TextEvent.java | Class | A semantic event which indicates that an object's text changed.
This high-level event is generated by an object (such as a TextComponent)
when its text changes. |
TextListener.java | Interface | The listener interface for receiving text events. |
WindowAdapter.java | Class | An abstract adapter class for receiving window events.
The methods in this class are empty. |
WindowEvent.java | Class | A low-level event that indicates that a window has changed its status. |
WindowFocusListener.java | Interface | The listener interface for receiving WindowEvents , including
WINDOW_GAINED_FOCUS and WINDOW_LOST_FOCUS events. |
WindowListener.java | Interface | The listener interface for receiving window events.
The class that is interested in processing a window event
either implements this interface (and all the methods it
contains) or extends the abstract WindowAdapter class
(overriding only the methods of interest).
The listener object created from that class is then registered with a
Window using the window's addWindowListener
method. |
WindowStateListener.java | Interface | The listener interface for receiving window state events.
The class that is interested in processing a window state event
either implements this interface (and all the methods it contains)
or extends the abstract WindowAdapter class
(overriding only the methods of interest).
The listener object created from that class is then registered with
a window using the Window 's
addWindowStateListener method. |