Liking cljdoc? Tell your friends :D

jdk.awt.event.ActionEvent

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. The listener is therefore spared the details of processing individual mouse movements and mouse clicks, and can instead process a "meaningful" (semantic) event like "button pressed".

An unspecified behavior will be caused if the id parameter of any particular ActionEvent instance is not in the range from ACTION_FIRST to ACTION_LAST.

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. The listener
is therefore spared the details of processing individual mouse movements
and mouse clicks, and can instead process a "meaningful" (semantic)
event like "button pressed".

An unspecified behavior will be caused if the id parameter
of any particular ActionEvent instance is not
in the range from ACTION_FIRST to ACTION_LAST.
raw docstring

jdk.awt.event.ActionListener

The listener interface for receiving action events. The class that is interested in processing an action event implements this interface, and the object created with that class is registered with a component, using the component's addActionListener method. When the action event occurs, that object's actionPerformed method is invoked.

The listener interface for receiving action events.
The class that is interested in processing an action event
implements this interface, and the object created with that
class is registered with a component, using the component's
addActionListener method. When the action event
occurs, that object's actionPerformed method is
invoked.
raw docstring

jdk.awt.event.AdjustmentEvent

The adjustment event emitted by Adjustable objects like Scrollbar and ScrollPane. When the user changes the value of the scrolling component, it receives an instance of AdjustmentEvent.

An unspecified behavior will be caused if the id parameter of any particular AdjustmentEvent instance is not in the range from ADJUSTMENT_FIRST to ADJUSTMENT_LAST.

The type of any AdjustmentEvent instance takes one of the following values:

                 UNIT_INCREMENT
                 UNIT_DECREMENT
                 BLOCK_INCREMENT
                 BLOCK_DECREMENT
                 TRACK

Assigning the value different from listed above will cause an unspecified behavior.

The adjustment event emitted by Adjustable objects like
Scrollbar and ScrollPane.
When the user changes the value of the scrolling component,
it receives an instance of AdjustmentEvent.

An unspecified behavior will be caused if the id parameter
of any particular AdjustmentEvent instance is not
in the range from ADJUSTMENT_FIRST to ADJUSTMENT_LAST.

The type of any AdjustmentEvent instance takes one of the following
values:

                     UNIT_INCREMENT
                     UNIT_DECREMENT
                     BLOCK_INCREMENT
                     BLOCK_DECREMENT
                     TRACK

Assigning the value different from listed above will cause an unspecified behavior.
raw docstring

jdk.awt.event.AdjustmentListener

The listener interface for receiving adjustment events.

The listener interface for receiving adjustment events.
raw docstring

jdk.awt.event.AWTEventListener

The listener interface for receiving notification of events dispatched to objects that are instances of Component or MenuComponent or their subclasses. Unlike the other EventListeners in this package, AWTEventListeners passively observe events being dispatched in the AWT, system-wide. Most applications should never use this class; applications which might use AWTEventListeners include event recorders for automated testing, and facilities such as the Java Accessibility package.

The class that is interested in monitoring AWT events implements this interface, and the object created with that class is registered with the Toolkit, using the Toolkit's addAWTEventListener method. When an event is dispatched anywhere in the AWT, that object's eventDispatched method is invoked.

The listener interface for receiving notification of events
dispatched to objects that are instances of Component or
MenuComponent or their subclasses.  Unlike the other EventListeners
in this package, AWTEventListeners passively observe events
being dispatched in the AWT, system-wide.  Most applications
should never use this class; applications which might use
AWTEventListeners include event recorders for automated testing,
and facilities such as the Java Accessibility package.

The class that is interested in monitoring AWT events
implements this interface, and the object created with that
class is registered with the Toolkit, using the Toolkit's
addAWTEventListener method.  When an event is
dispatched anywhere in the AWT, that object's
eventDispatched method is invoked.
raw docstring

jdk.awt.event.AWTEventListenerProxy

A class which extends the EventListenerProxy specifically for adding an AWTEventListener for a specific event mask. Instances of this class can be added as AWTEventListeners to a Toolkit object.

The getAWTEventListeners method of Toolkit can return a mixture of AWTEventListener and AWTEventListenerProxy objects.

A class which extends the EventListenerProxy
specifically for adding an AWTEventListener
for a specific event mask.
Instances of this class can be added as AWTEventListeners
to a Toolkit object.

The getAWTEventListeners method of Toolkit
can return a mixture of AWTEventListener
and AWTEventListenerProxy objects.
raw docstring

jdk.awt.event.ComponentAdapter

An abstract adapter class for receiving component events. The methods in this class are empty. This class exists as convenience for creating listener objects.

Extend this class to create a ComponentEvent listener and override the methods for the events of interest. (If you implement the ComponentListener interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you can only have to define methods for events you care about.)

Create a listener object using your class and then register it with a component using the component's addComponentListener method. When the component's size, location, or visibility changes, the relevant method in the listener object is invoked, and the ComponentEvent is passed to it.

An abstract adapter class for receiving component events.
The methods in this class are empty. This class exists as
convenience for creating listener objects.

Extend this class to create a ComponentEvent listener
and override the methods for the events of interest. (If you implement the
ComponentListener interface, you have to define all of
the methods in it. This abstract class defines null methods for them
all, so you can only have to define methods for events you care about.)

Create a listener object using your class and then register it with a
component using the component's addComponentListener
method. When the component's size, location, or visibility
changes, the relevant method in the listener object is invoked,
and the ComponentEvent is passed to it.
raw docstring

jdk.awt.event.ComponentEvent

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.

This low-level event is generated by a component object (such as a List) when the component is moved, resized, rendered invisible, or made visible again. The event is passed to every ComponentListener or ComponentAdapter object which registered to receive such events using the component's addComponentListener method. (ComponentAdapter objects implement the ComponentListener interface.) Each such listener object gets this ComponentEvent when the event occurs.

An unspecified behavior will be caused if the id parameter of any particular ComponentEvent instance is not in the range from COMPONENT_FIRST to COMPONENT_LAST.

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.

This low-level event is generated by a component object (such as a
List) when the component is moved, resized, rendered invisible, or made
visible again. The event is passed to every ComponentListener
or ComponentAdapter object which registered to receive such
events using the component's addComponentListener method.
(ComponentAdapter objects implement the
ComponentListener interface.) Each such listener object
gets this ComponentEvent when the event occurs.

An unspecified behavior will be caused if the id parameter
of any particular ComponentEvent instance is not
in the range from COMPONENT_FIRST to COMPONENT_LAST.
raw docstring

jdk.awt.event.ComponentListener

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. When the component's size, location, or visibility changes, the relevant method in the listener object is invoked, and the ComponentEvent is passed to it.

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 registers a ComponentListener or not.

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. When the component's size, location, or visibility
changes, the relevant method in the listener object is invoked,
and the ComponentEvent is passed to it.

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 registers a ComponentListener or not.
raw docstring

jdk.awt.event.ContainerAdapter

An abstract adapter class for receiving container events. The methods in this class are empty. This class exists as convenience for creating listener objects.

Extend this class to create a ContainerEvent listener and override the methods for the events of interest. (If you implement the ContainerListener interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you can only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with a component using the component's addContainerListener method. When the container's contents change because a component has been added or removed, the relevant method in the listener object is invoked, and the ContainerEvent is passed to it.

An abstract adapter class for receiving container events.
The methods in this class are empty. This class exists as
convenience for creating listener objects.

Extend this class to create a ContainerEvent listener
and override the methods for the events of interest. (If you implement the
ContainerListener interface, you have to define all of
the methods in it. This abstract class defines null methods for them
all, so you can only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with
a component using the component's addContainerListener
method. When the container's contents change because a component has
been added or removed, the relevant method in the listener object is invoked,
and the ContainerEvent is passed to it.
raw docstring

jdk.awt.event.ContainerEvent

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. The event is passed to every ContainerListener or ContainerAdapter object which registered to receive such events using the component's addContainerListener method. (ContainerAdapter objects implement the ContainerListener interface.) Each such listener object gets this ContainerEvent when the event occurs.

An unspecified behavior will be caused if the id parameter of any particular ContainerEvent instance is not in the range from CONTAINER_FIRST to CONTAINER_LAST.

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.
The event is passed to every ContainerListener
or ContainerAdapter object which registered to receive such
events using the component's addContainerListener method.
(ContainerAdapter objects implement the
ContainerListener interface.) Each such listener object
gets this ContainerEvent when the event occurs.

An unspecified behavior will be caused if the id parameter
of any particular ContainerEvent instance is not
in the range from CONTAINER_FIRST to CONTAINER_LAST.
raw docstring

jdk.awt.event.ContainerListener

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. When the container's contents change because a component has been added or removed, the relevant method in the listener object is invoked, and the ContainerEvent is passed to it.

Container events are provided for notification purposes ONLY; The AWT will automatically handle add and remove operations internally so the program works properly regardless of whether the program registers a ContainerListener or not.

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. When the container's contents change because a component
has been added or removed, the relevant method in the listener object
is invoked, and the ContainerEvent is passed to it.

Container events are provided for notification purposes ONLY;
The AWT will automatically handle add and remove operations
internally so the program works properly regardless of
whether the program registers a ContainerListener or not.
raw docstring

jdk.awt.event.core

No vars found in this namespace.

jdk.awt.event.FocusAdapter

An abstract adapter class for receiving keyboard focus events. The methods in this class are empty. This class exists as convenience for creating listener objects.

Extend this class to create a FocusEvent listener and override the methods for the events of interest. (If you implement the FocusListener interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you can only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with a component using the component's addFocusListener method. When the component gains or loses the keyboard focus, the relevant method in the listener object is invoked, and the FocusEvent is passed to it.

An abstract adapter class for receiving keyboard focus events.
The methods in this class are empty. This class exists as
convenience for creating listener objects.

Extend this class to create a FocusEvent listener
and override the methods for the events of interest. (If you implement the
FocusListener interface, you have to define all of
the methods in it. This abstract class defines null methods for them
all, so you can only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with
a component using the component's addFocusListener
method. When the component gains or loses the keyboard focus,
the relevant method in the listener object is invoked,
and the FocusEvent is passed to it.
raw docstring

jdk.awt.event.FocusEvent

A low-level event which indicates that a Component has gained or lost the input focus. This low-level event is generated by a Component (such as a TextField). The event is passed to every FocusListener or FocusAdapter object which registered to receive such events using the Component's addFocusListener method. ( FocusAdapter objects implement the FocusListener interface.) Each such listener object gets this FocusEvent when the event occurs.

There are two levels of focus events: permanent and temporary. Permanent focus change events occur when focus is directly moved from one Component to another, such as through a call to requestFocus() or as the user uses the TAB key to traverse Components. Temporary focus change events occur when focus is temporarily lost for a Component as the indirect result of another operation, such as Window deactivation or a Scrollbar drag. In this case, the original focus state will automatically be restored once that operation is finished, or, for the case of Window deactivation, when the Window is reactivated. Both permanent and temporary focus events are delivered using the FOCUS_GAINED and FOCUS_LOST event ids; the level may be distinguished in the event using the isTemporary() method.

An unspecified behavior will be caused if the id parameter of any particular FocusEvent instance is not in the range from FOCUS_FIRST to FOCUS_LAST.

A low-level event which indicates that a Component has gained or lost the
input focus. This low-level event is generated by a Component (such as a
TextField). The event is passed to every FocusListener or
FocusAdapter object which registered to receive such events
using the Component's addFocusListener method. (
FocusAdapter objects implement the FocusListener
interface.) Each such listener object gets this FocusEvent when
the event occurs.

There are two levels of focus events: permanent and temporary. Permanent
focus change events occur when focus is directly moved from one Component to
another, such as through a call to requestFocus() or as the user uses the
TAB key to traverse Components. Temporary focus change events occur when
focus is temporarily lost for a Component as the indirect result of another
operation, such as Window deactivation or a Scrollbar drag. In this case,
the original focus state will automatically be restored once that operation
is finished, or, for the case of Window deactivation, when the Window is
reactivated. Both permanent and temporary focus events are delivered using
the FOCUS_GAINED and FOCUS_LOST event ids; the level may be distinguished in
the event using the isTemporary() method.

An unspecified behavior will be caused if the id parameter
of any particular FocusEvent instance is not
in the range from FOCUS_FIRST to FOCUS_LAST.
raw docstring

jdk.awt.event.FocusListener

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. When the component gains or loses the keyboard focus, the relevant method in the listener object is invoked, and the FocusEvent is passed to it.

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. When the component gains or loses the keyboard focus,
the relevant method in the listener object
is invoked, and the FocusEvent is passed to it.
raw docstring

jdk.awt.event.HierarchyBoundsAdapter

An abstract adapter class for receiving ancestor moved and resized events. The methods in this class are empty. This class exists as a convenience for creating listener objects.

Extend this class and override the method for the event of interest. (If you implement the HierarchyBoundsListener interface, you have to define both methods in it. This abstract class defines null methods for them both, so you only have to define the method for the event you care about.)

Create a listener object using your class and then register it with a Component using the Component's addHierarchyBoundsListener method. When the hierarchy to which the Component belongs changes by resize or movement of an ancestor, the relevant method in the listener object is invoked, and the HierarchyEvent is passed to it.

An abstract adapter class for receiving ancestor moved and resized events.
The methods in this class are empty. This class exists as a
convenience for creating listener objects.

Extend this class and override the method for the event of interest. (If
you implement the HierarchyBoundsListener interface, you have
to define both methods in it. This abstract class defines null methods for
them both, so you only have to define the method for the event you care
about.)

Create a listener object using your class and then register it with a
Component using the Component's addHierarchyBoundsListener
method. When the hierarchy to which the Component belongs changes by
resize or movement of an ancestor, the relevant method in the listener
object is invoked, and the HierarchyEvent is passed to it.
raw docstring

jdk.awt.event.HierarchyBoundsListener

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. When the hierarchy to which the Component belongs changes by the resizing or movement of an ancestor, the relevant method in the listener object is invoked, and the HierarchyEvent is passed to it.

Hierarchy events are provided for notification purposes ONLY; The AWT will automatically handle changes to the hierarchy internally so that GUI layout works properly regardless of whether a program registers an HierarchyBoundsListener or not.

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. When the hierarchy to which the Component belongs changes by
the resizing or movement of an ancestor, the relevant method in the listener
object is invoked, and the HierarchyEvent is passed to it.

Hierarchy events are provided for notification purposes ONLY;
The AWT will automatically handle changes to the hierarchy internally so
that GUI layout works properly regardless of whether a
program registers an HierarchyBoundsListener or not.
raw docstring

jdk.awt.event.HierarchyEvent

An event which indicates a change to the Component hierarchy to which 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. It is also generated by a Component object when that object's addNotify, removeNotify, show, or hide method is called. The ANCESTOR_MOVED and ANCESTOR_RESIZED events are dispatched to every HierarchyBoundsListener or HierarchyBoundsAdapter object which registered to receive such events using the Component's addHierarchyBoundsListener method. (HierarchyBoundsAdapter objects implement the HierarchyBoundsListener interface.) The HIERARCHY_CHANGED events are dispatched to every HierarchyListener object which registered to receive such events using the Component's addHierarchyListener method. Each such listener object gets this HierarchyEvent when the event occurs.

An unspecified behavior will be caused if the id parameter of any particular HierarchyEvent instance is not in the range from HIERARCHY_FIRST to HIERARCHY_LAST.

The changeFlags parameter of any HierarchyEvent instance takes one of the following values:

HierarchyEvent.PARENT_CHANGED HierarchyEvent.DISPLAYABILITY_CHANGED HierarchyEvent.SHOWING_CHANGED

Assigning the value different from listed above will cause unspecified behavior.

An event which indicates a change to the Component
hierarchy to which 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. It is also generated by a Component object when that object's
addNotify, removeNotify, show, or
hide method is called. The ANCESTOR_MOVED and
ANCESTOR_RESIZED
events are dispatched to every HierarchyBoundsListener or
HierarchyBoundsAdapter object which registered to receive
such events using the Component's addHierarchyBoundsListener
method. (HierarchyBoundsAdapter objects implement the
HierarchyBoundsListener interface.) The HIERARCHY_CHANGED events are
dispatched to every HierarchyListener object which registered
to receive such events using the Component's addHierarchyListener
 method. Each such listener object gets this HierarchyEvent
 when the event occurs.

An unspecified behavior will be caused if the id parameter
of any particular HierarchyEvent instance is not
in the range from HIERARCHY_FIRST to HIERARCHY_LAST.

The changeFlags parameter of any HierarchyEvent instance takes one of the following
values:

 HierarchyEvent.PARENT_CHANGED
 HierarchyEvent.DISPLAYABILITY_CHANGED
 HierarchyEvent.SHOWING_CHANGED

Assigning the value different from listed above will cause unspecified behavior.
raw docstring

jdk.awt.event.HierarchyListener

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. When the hierarchy to which the Component belongs changes, the hierarchyChanged method in the listener object is invoked, and the HierarchyEvent is passed to it.

Hierarchy events are provided for notification purposes ONLY; The AWT will automatically handle changes to the hierarchy internally so that GUI layout, displayability, and visibility work properly regardless of whether a program registers a HierarchyListener or not.

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. When the hierarchy to which the Component belongs changes, the
hierarchyChanged method in the listener object is invoked,
and the HierarchyEvent is passed to it.

Hierarchy events are provided for notification purposes ONLY;
The AWT will automatically handle changes to the hierarchy internally so
that GUI layout, displayability, and visibility work properly regardless
of whether a program registers a HierarchyListener or not.
raw docstring

jdk.awt.event.InputEvent

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. For example, consuming mousePressed events on a Button component will prevent the Button from being activated.

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.  For example, consuming mousePressed events
on a Button component will prevent the Button from being
activated.
raw docstring

jdk.awt.event.InputMethodEvent

Input method events contain information about text that is being composed using an input method. Whenever the text changes, the input method sends an event. If the text component that's currently using the input method is an active client, the event is dispatched to that component. Otherwise, it is dispatched to a separate composition window.

The text included with the input method event consists of two parts: committed text and composed text. Either part may be empty. The two parts together replace any uncommitted composed text sent in previous events, or the currently selected committed text. Committed text should be integrated into the text component's persistent data, it will not be sent again. Composed text may be sent repeatedly, with changes to reflect the user's editing operations. Committed text always precedes composed text.

Input method events contain information about text that is being
composed using an input method. Whenever the text changes, the
input method sends an event. If the text component that's currently
using the input method is an active client, the event is dispatched
to that component. Otherwise, it is dispatched to a separate
composition window.


The text included with the input method event consists of two parts:
committed text and composed text. Either part may be empty. The two
parts together replace any uncommitted composed text sent in previous events,
or the currently selected committed text.
Committed text should be integrated into the text component's persistent
data, it will not be sent again. Composed text may be sent repeatedly,
with changes to reflect the user's editing operations. Committed text
always precedes composed text.
raw docstring

jdk.awt.event.InputMethodListener

The listener interface for receiving input method events. A text editing component has to install an input method event listener in order to work with input methods.

The text editing component also has to provide an instance of InputMethodRequests.

The listener interface for receiving input method events. A text editing
component has to install an input method event listener in order to work
with input methods.


The text editing component also has to provide an instance of InputMethodRequests.
raw docstring

jdk.awt.event.InvocationEvent

An event which executes the run() method on a Runnable when dispatched by the AWT event dispatcher thread. This class can be used as a reference implementation of ActiveEvent rather than declaring a new class and defining dispatch().

Instances of this class are placed on the EventQueue by calls to invokeLater and invokeAndWait. Client code can use this fact to write replacement functions for invokeLater and invokeAndWait without writing special-case code in any AWTEventListener objects.

An unspecified behavior will be caused if the id parameter of any particular InvocationEvent instance is not in the range from INVOCATION_FIRST to INVOCATION_LAST.

An event which executes the run() method on a Runnable
 when dispatched by the AWT event dispatcher thread. This class can
be used as a reference implementation of ActiveEvent rather
than declaring a new class and defining dispatch().

Instances of this class are placed on the EventQueue by calls
to invokeLater and invokeAndWait. Client code
can use this fact to write replacement functions for invokeLater
 and invokeAndWait without writing special-case code
in any AWTEventListener objects.

An unspecified behavior will be caused if the id parameter
of any particular InvocationEvent instance is not
in the range from INVOCATION_FIRST to INVOCATION_LAST.
raw docstring

jdk.awt.event.ItemEvent

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.

The object that implements the ItemListener interface gets this ItemEvent when the event occurs. The listener is spared the details of processing individual mouse movements and mouse clicks, and can instead process a "meaningful" (semantic) event like "item selected" or "item deselected".

An unspecified behavior will be caused if the id parameter of any particular ItemEvent instance is not in the range from ITEM_FIRST to ITEM_LAST.

The stateChange of any ItemEvent instance takes one of the following values:

                 ItemEvent.SELECTED
                 ItemEvent.DESELECTED

Assigning the value different from listed above will cause an unspecified behavior.

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.

The object that implements the ItemListener interface gets
this ItemEvent when the event occurs. The listener is
spared the details of processing individual mouse movements and mouse
clicks, and can instead process a "meaningful" (semantic) event like
"item selected" or "item deselected".

An unspecified behavior will be caused if the id parameter
of any particular ItemEvent instance is not
in the range from ITEM_FIRST to ITEM_LAST.

The stateChange of any ItemEvent instance takes one of the following
values:

                     ItemEvent.SELECTED
                     ItemEvent.DESELECTED

Assigning the value different from listed above will cause an unspecified behavior.
raw docstring

jdk.awt.event.ItemListener

The listener interface for receiving item events. The class that is interested in processing an item event implements this interface. The object created with that class is then registered with a component using the component's addItemListener method. When an item-selection event occurs, the listener object's itemStateChanged method is invoked.

The listener interface for receiving item events.
The class that is interested in processing an item event
implements this interface. The object created with that
class is then registered with a component using the
component's addItemListener method. When an
item-selection event occurs, the listener object's
itemStateChanged method is invoked.
raw docstring

jdk.awt.event.KeyAdapter

An abstract adapter class for receiving keyboard events. The methods in this class are empty. This class exists as convenience for creating listener objects.

Extend this class to create a KeyEvent listener and override the methods for the events of interest. (If you implement the KeyListener interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you can only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with a component using the component's addKeyListener method. When a key is pressed, released, or typed, the relevant method in the listener object is invoked, and the KeyEvent is passed to it.

An abstract adapter class for receiving keyboard events.
The methods in this class are empty. This class exists as
convenience for creating listener objects.

Extend this class to create a KeyEvent listener
and override the methods for the events of interest. (If you implement the
KeyListener interface, you have to define all of
the methods in it. This abstract class defines null methods for them
all, so you can only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with
a component using the component's addKeyListener
method. When a key is pressed, released, or typed,
the relevant method in the listener object is invoked,
and the KeyEvent is passed to it.
raw docstring

jdk.awt.event.KeyEvent

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. The event is passed to every KeyListener or KeyAdapter object which registered to receive such events using the component's addKeyListener method. (KeyAdapter objects implement the KeyListener interface.) Each such listener object gets this KeyEvent when the event occurs.

"Key typed" events are higher-level and generally do not depend on the platform or keyboard layout. They are generated when a Unicode character is entered, and are the preferred way to find out about character input. In the simplest case, a key typed event is produced by a single key press (e.g., 'a'). Often, however, characters are produced by series of key presses (e.g., 'shift' 'a'), and the mapping from key pressed events to key typed events may be many-to-one or many-to-many. Key releases are not usually necessary to generate a key typed event, but there are some cases where the key typed event is not generated until a key is released (e.g., entering ASCII sequences via the Alt-Numpad method in Windows). No key typed events are generated for keys that don't generate Unicode characters (e.g., action keys, modifier keys, etc.).

The getKeyChar method always returns a valid Unicode character or CHAR_UNDEFINED. Character input is reported by KEY_TYPED events: KEY_PRESSED and KEY_RELEASED events are not necessarily associated with character input. Therefore, the result of the getKeyChar method is guaranteed to be meaningful only for KEY_TYPED events.

For key pressed and key released events, the getKeyCode method returns the event's keyCode. For key typed events, the getKeyCode method always returns VK_UNDEFINED. The getExtendedKeyCode method may also be used with many international keyboard layouts.

"Key pressed" and "key released" events are lower-level and depend on the platform and keyboard layout. They are generated whenever a key is pressed or released, and are the only way to find out about keys that don't generate character input (e.g., action keys, modifier keys, etc.). The key being pressed or released is indicated by the getKeyCode and getExtendedKeyCode methods, which return a virtual key code.

Virtual key codes are used to report which keyboard key has been pressed, rather than a character generated by the combination of one or more keystrokes (such as "A", which comes from shift and "a").

For example, pressing the Shift key will cause a KEY_PRESSED event with a VK_SHIFT keyCode, while pressing the 'a' key will result in a VK_A keyCode. After the 'a' key is released, a KEY_RELEASED event will be fired with VK_A. Separately, a KEY_TYPED event with a keyChar value of 'A' is generated.

Pressing and releasing a key on the keyboard results in the generating the following key events (in order):

KEY_PRESSED
KEY_TYPED (is only generated if a valid Unicode character could be generated.)
KEY_RELEASED

But in some cases (e.g. auto-repeat or input method is activated) the order could be different (and platform dependent).

Notes:

Key combinations which do not result in Unicode characters, such as action keys like F1 and the HELP key, do not generate KEY_TYPED events. Not all keyboards or systems are capable of generating all virtual key codes. No attempt is made in Java to generate these keys artificially. Virtual key codes do not identify a physical key: they depend on the platform and keyboard layout. For example, the key that generates VK_Q when using a U.S. keyboard layout will generate VK_A when using a French keyboard layout. The key that generates VK_Q when using a U.S. keyboard layout also generates a unique code for Russian or Hebrew layout. There is no a VK_ constant for these and many other codes in various layouts. These codes may be obtained by using getExtendedKeyCode and are used whenever a VK_ constant is used. Not all characters have a keycode associated with them. For example, there is no keycode for the question mark because there is no keyboard for which it appears on the primary layer. In order to support the platform-independent handling of action keys, the Java platform uses a few additional virtual key constants for functions that would otherwise have to be recognized by interpreting virtual key codes and modifiers. For example, for Japanese Windows keyboards, VK_ALL_CANDIDATES is returned instead of VK_CONVERT with the ALT modifier. As specified in Focus Specification key events are dispatched to the focus owner by default.

WARNING: Aside from those keys that are defined by the Java language (VK_ENTER, VK_BACK_SPACE, and VK_TAB), do not rely on the values of the VK_ constants. Sun reserves the right to change these values as needed to accommodate a wider range of keyboards in the future.

An unspecified behavior will be caused if the id parameter of any particular KeyEvent instance is not in the range from KEY_FIRST to KEY_LAST.

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.
The event is passed to every KeyListener
or KeyAdapter object which registered to receive such
events using the component's addKeyListener method.
(KeyAdapter objects implement the
KeyListener interface.)  Each such listener object
gets this KeyEvent when the event occurs.

"Key typed" events are higher-level and generally do not depend on
the platform or keyboard layout.  They are generated when a Unicode character
is entered, and are the preferred way to find out about character input.
In the simplest case, a key typed event is produced by a single key press
(e.g., 'a').  Often, however, characters are produced by series of key
presses (e.g., 'shift'  'a'), and the mapping from key pressed events to
key typed events may be many-to-one or many-to-many.  Key releases are not
usually necessary to generate a key typed event, but there are some cases
where the key typed event is not generated until a key is released (e.g.,
entering ASCII sequences via the Alt-Numpad method in Windows).
No key typed events are generated for keys that don't generate Unicode
characters (e.g., action keys, modifier keys, etc.).

The getKeyChar method always returns a valid Unicode character or
CHAR_UNDEFINED.  Character input is reported by KEY_TYPED events:
KEY_PRESSED and KEY_RELEASED events are not necessarily associated
with character input.  Therefore, the result of the getKeyChar method
is guaranteed to be meaningful only for KEY_TYPED events.

For key pressed and key released events, the getKeyCode method returns
the event's keyCode.  For key typed events, the getKeyCode method
always returns VK_UNDEFINED. The getExtendedKeyCode method
may also be used with many international keyboard layouts.


"Key pressed" and "key released" events are lower-level and depend
on the platform and keyboard layout. They are generated whenever a key is
pressed or released, and are the only way to find out about keys that don't
generate character input (e.g., action keys, modifier keys, etc.). The key
being pressed or released is indicated by the getKeyCode and getExtendedKeyCode
methods, which return a virtual key code.


Virtual key codes are used to report which keyboard key has
been pressed, rather than a character generated by the combination
of one or more keystrokes (such as "A", which comes from shift and "a").


For example, pressing the Shift key will cause a KEY_PRESSED event
with a VK_SHIFT keyCode, while pressing the 'a' key will result in
a VK_A keyCode.  After the 'a' key is released, a KEY_RELEASED event
will be fired with VK_A. Separately, a KEY_TYPED event with a keyChar
value of 'A' is generated.


Pressing and releasing a key on the keyboard results in the generating
the following key events (in order):


    KEY_PRESSED
    KEY_TYPED (is only generated if a valid Unicode character could be generated.)
    KEY_RELEASED

But in some cases (e.g. auto-repeat or input method is activated) the order
could be different (and platform dependent).


Notes:

Key combinations which do not result in Unicode characters, such as action
keys like F1 and the HELP key, do not generate KEY_TYPED events.
Not all keyboards or systems are capable of generating all
virtual key codes.  No attempt is made in Java to generate these keys
artificially.
Virtual key codes do not identify a physical key: they depend on the
platform and keyboard layout. For example, the key that generates VK_Q
when using a U.S. keyboard layout will generate VK_A when using a French
keyboard layout.
The key that generates VK_Q when using a U.S. keyboard layout also
generates a unique code for Russian or Hebrew layout. There is no a
VK_ constant for these and many other codes in various layouts. These codes
may be obtained by using getExtendedKeyCode and are used whenever
a VK_ constant is used.
Not all characters have a keycode associated with them.  For example,
there is no keycode for the question mark because there is no keyboard
for which it appears on the primary layer.
In order to support the platform-independent handling of action keys,
the Java platform uses a few additional virtual key constants for functions
that would otherwise have to be recognized by interpreting virtual key codes
and modifiers. For example, for Japanese Windows keyboards, VK_ALL_CANDIDATES
is returned instead of VK_CONVERT with the ALT modifier.
As specified in Focus Specification
key events are dispatched to the focus owner by default.



WARNING: Aside from those keys that are defined by the Java language
(VK_ENTER, VK_BACK_SPACE, and VK_TAB), do not rely on the values of the VK_
constants.  Sun reserves the right to change these values as needed
to accommodate a wider range of keyboards in the future.

An unspecified behavior will be caused if the id parameter
of any particular KeyEvent instance is not
in the range from KEY_FIRST to KEY_LAST.
raw docstring

jdk.awt.event.KeyListener

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. A keyboard event is generated when a key is pressed, released, or typed. The relevant method in the listener object is then invoked, and the KeyEvent is passed to it.

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. A keyboard event is generated when a key is pressed, released,
or typed. The relevant method in the listener
object is then invoked, and the KeyEvent is passed to it.
raw docstring

jdk.awt.event.MouseAdapter

An abstract adapter class for receiving mouse events. The methods in this class are empty. This class exists as convenience for creating listener objects.

Mouse events let you track when a mouse is pressed, released, clicked, moved, dragged, when it enters a component, when it exits and when a mouse wheel is moved.

Extend this class to create a MouseEvent (including drag and motion events) or/and MouseWheelEvent listener and override the methods for the events of interest. (If you implement the MouseListener, MouseMotionListener interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you can only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with a component using the component's addMouseListener addMouseMotionListener, addMouseWheelListener methods. The relevant method in the listener object is invoked and the MouseEvent or MouseWheelEvent is passed to it in following cases:

when a mouse button is pressed, released, or clicked (pressed and released) when the mouse cursor enters or exits the component when the mouse wheel rotated, or mouse moved or dragged

An abstract adapter class for receiving mouse events.
The methods in this class are empty. This class exists as
convenience for creating listener objects.

Mouse events let you track when a mouse is pressed, released, clicked,
moved, dragged, when it enters a component, when it exits and
when a mouse wheel is moved.

Extend this class to create a MouseEvent
(including drag and motion events) or/and MouseWheelEvent
listener and override the methods for the events of interest. (If you implement the
MouseListener,
MouseMotionListener
interface, you have to define all of
the methods in it. This abstract class defines null methods for them
all, so you can only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with
a component using the component's addMouseListener
addMouseMotionListener, addMouseWheelListener
methods.
The relevant method in the listener object is invoked  and the MouseEvent
or MouseWheelEvent  is passed to it in following cases:

when a mouse button is pressed, released, or clicked (pressed and  released)
when the mouse cursor enters or exits the component
when the mouse wheel rotated, or mouse moved or dragged
raw docstring

jdk.awt.event.MouseEvent

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. A mouse event type is enabled by adding the appropriate mouse-based EventListener to the component (MouseListener or MouseMotionListener), or by invoking Component.enableEvents(long) with the appropriate mask parameter (AWTEvent.MOUSE_EVENT_MASK or AWTEvent.MOUSE_MOTION_EVENT_MASK). If the mouse event type has not been enabled on the component, the corresponding mouse events are dispatched to the first ancestor that has enabled the mouse event type.

For example, if a MouseListener has been added to a component, or enableEvents(AWTEvent.MOUSE_EVENT_MASK) has been invoked, then all the events defined by MouseListener are dispatched to the component. On the other hand, if a MouseMotionListener has not been added and enableEvents has not been invoked with AWTEvent.MOUSE_MOTION_EVENT_MASK, then mouse motion events are not dispatched to the component. Instead the mouse motion events are dispatched to the first ancestors that has enabled mouse motion events.

This low-level event is generated by a component object for:

Mouse Events

a mouse button is pressed
a mouse button is released
a mouse button is clicked (pressed and released)
the mouse cursor enters the unobscured part of component's geometry
the mouse cursor exits the unobscured part of component's geometry

Mouse Motion Events

the mouse is moved
the mouse is dragged

A MouseEvent object is passed to every MouseListener or MouseAdapter object which is registered to receive the "interesting" mouse events using the component's addMouseListener method. (MouseAdapter objects implement the MouseListener interface.) Each such listener object gets a MouseEvent containing the mouse event.

A MouseEvent object is also passed to every MouseMotionListener or MouseMotionAdapter object which is registered to receive mouse motion events using the component's addMouseMotionListener method. (MouseMotionAdapter objects implement the MouseMotionListener interface.) Each such listener object gets a MouseEvent containing the mouse motion event.

When a mouse button is clicked, events are generated and sent to the registered MouseListeners. The state of modal keys can be retrieved using InputEvent.getModifiers() and InputEvent.getModifiersEx(). The button mask returned by InputEvent.getModifiers() reflects only the button that changed state, not the current state of all buttons. (Note: Due to overlap in the values of ALT_MASK/BUTTON2_MASK and META_MASK/BUTTON3_MASK, this is not always true for mouse events involving modifier keys). To get the state of all buttons and modifier keys, use InputEvent.getModifiersEx(). The button which has changed state is returned by getButton()

For example, if the first mouse button is pressed, events are sent in the following order:

id modifiers button MOUSE_PRESSED: BUTTON1_MASK BUTTON1 MOUSE_RELEASED: BUTTON1_MASK BUTTON1 MOUSE_CLICKED: BUTTON1_MASK BUTTON1 When multiple mouse buttons are pressed, each press, release, and click results in a separate event.

For example, if the user presses button 1 followed by button 2, and then releases them in the same order, the following sequence of events is generated:

id modifiers button MOUSE_PRESSED: BUTTON1_MASK BUTTON1 MOUSE_PRESSED: BUTTON2_MASK BUTTON2 MOUSE_RELEASED: BUTTON1_MASK BUTTON1 MOUSE_CLICKED: BUTTON1_MASK BUTTON1 MOUSE_RELEASED: BUTTON2_MASK BUTTON2 MOUSE_CLICKED: BUTTON2_MASK BUTTON2 If button 2 is released first, the MOUSE_RELEASED/MOUSE_CLICKED pair for BUTTON2_MASK arrives first, followed by the pair for BUTTON1_MASK.

Some extra mouse buttons are added to extend the standard set of buttons represented by the following constants:BUTTON1, BUTTON2, and BUTTON3. Extra buttons have no assigned BUTTONx constants as well as their button masks have no assigned BUTTONx_DOWN_MASK constants. Nevertheless, ordinal numbers starting from 4 may be used as button numbers (button ids). Values obtained by the getMaskForButton(button) method may be used as button masks.

MOUSE_DRAGGED events are delivered to the Component in which the mouse button was pressed until the mouse button is released (regardless of whether the mouse position is within the bounds of the Component). Due to platform-dependent Drag&Drop implementations, MOUSE_DRAGGED events may not be delivered during a native Drag&Drop operation.

In a multi-screen environment mouse drag events are delivered to the Component even if the mouse position is outside the bounds of the GraphicsConfiguration associated with that Component. However, the reported position for mouse drag events in this case may differ from the actual mouse position:

In a multi-screen environment without a virtual device:

The reported coordinates for mouse drag events are clipped to fit within the bounds of the GraphicsConfiguration associated with the Component. In a multi-screen environment with a virtual device:

The reported coordinates for mouse drag events are clipped to fit within the bounds of the virtual device associated with the Component.

An unspecified behavior will be caused if the id parameter of any particular MouseEvent instance is not in the range from MOUSE_FIRST to MOUSE_LAST-1 (MOUSE_WHEEL is not acceptable).

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. A mouse event type is enabled by adding the
appropriate mouse-based EventListener to the component
(MouseListener or MouseMotionListener), or by invoking
Component.enableEvents(long) with the appropriate mask parameter
(AWTEvent.MOUSE_EVENT_MASK or AWTEvent.MOUSE_MOTION_EVENT_MASK).
If the mouse event type has not been enabled on the component, the
corresponding mouse events are dispatched to the first ancestor that
has enabled the mouse event type.

For example, if a MouseListener has been added to a component, or
enableEvents(AWTEvent.MOUSE_EVENT_MASK) has been invoked, then all
the events defined by MouseListener are dispatched to the component.
On the other hand, if a MouseMotionListener has not been added and
enableEvents has not been invoked with
AWTEvent.MOUSE_MOTION_EVENT_MASK, then mouse motion events are not
dispatched to the component. Instead the mouse motion events are
dispatched to the first ancestors that has enabled mouse motion
events.

This low-level event is generated by a component object for:

Mouse Events

    a mouse button is pressed
    a mouse button is released
    a mouse button is clicked (pressed and released)
    the mouse cursor enters the unobscured part of component's geometry
    the mouse cursor exits the unobscured part of component's geometry

 Mouse Motion Events

    the mouse is moved
    the mouse is dragged



A MouseEvent object is passed to every
MouseListener
or MouseAdapter object which is registered to receive
the "interesting" mouse events using the component's
addMouseListener method.
(MouseAdapter objects implement the
MouseListener interface.) Each such listener object
gets a MouseEvent containing the mouse event.

A MouseEvent object is also passed to every
MouseMotionListener or
MouseMotionAdapter object which is registered to receive
mouse motion events using the component's
addMouseMotionListener
method. (MouseMotionAdapter objects implement the
MouseMotionListener interface.) Each such listener object
gets a MouseEvent containing the mouse motion event.

When a mouse button is clicked, events are generated and sent to the
registered MouseListeners.
The state of modal keys can be retrieved using InputEvent.getModifiers()
and InputEvent.getModifiersEx().
The button mask returned by InputEvent.getModifiers() reflects
only the button that changed state, not the current state of all buttons.
(Note: Due to overlap in the values of ALT_MASK/BUTTON2_MASK and
META_MASK/BUTTON3_MASK, this is not always true for mouse events involving
modifier keys).
To get the state of all buttons and modifier keys, use
InputEvent.getModifiersEx().
The button which has changed state is returned by getButton()

For example, if the first mouse button is pressed, events are sent in the
following order:


   id              modifiers    button
   MOUSE_PRESSED:  BUTTON1_MASK BUTTON1
   MOUSE_RELEASED: BUTTON1_MASK BUTTON1
   MOUSE_CLICKED:  BUTTON1_MASK BUTTON1
When multiple mouse buttons are pressed, each press, release, and click
results in a separate event.

For example, if the user presses button 1 followed by
button 2, and then releases them in the same order,
the following sequence of events is generated:


   id              modifiers    button
   MOUSE_PRESSED:  BUTTON1_MASK BUTTON1
   MOUSE_PRESSED:  BUTTON2_MASK BUTTON2
   MOUSE_RELEASED: BUTTON1_MASK BUTTON1
   MOUSE_CLICKED:  BUTTON1_MASK BUTTON1
   MOUSE_RELEASED: BUTTON2_MASK BUTTON2
   MOUSE_CLICKED:  BUTTON2_MASK BUTTON2
If button 2 is released first, the
MOUSE_RELEASED/MOUSE_CLICKED pair
for BUTTON2_MASK arrives first,
followed by the pair for BUTTON1_MASK.

Some extra mouse buttons are added to extend the standard set of buttons
represented by the following constants:BUTTON1, BUTTON2, and BUTTON3.
Extra buttons have no assigned BUTTONx
constants as well as their button masks have no assigned BUTTONx_DOWN_MASK
constants. Nevertheless, ordinal numbers starting from 4 may be
used as button numbers (button ids). Values obtained by the
getMaskForButton(button) method may be used
as button masks.

MOUSE_DRAGGED events are delivered to the Component
in which the mouse button was pressed until the mouse button is released
(regardless of whether the mouse position is within the bounds of the
Component).  Due to platform-dependent Drag&Drop implementations,
MOUSE_DRAGGED events may not be delivered during a native
Drag&Drop operation.

In a multi-screen environment mouse drag events are delivered to the
Component even if the mouse position is outside the bounds of the
GraphicsConfiguration associated with that
Component. However, the reported position for mouse drag events
in this case may differ from the actual mouse position:

In a multi-screen environment without a virtual device:

The reported coordinates for mouse drag events are clipped to fit within the
bounds of the GraphicsConfiguration associated with
the Component.
In a multi-screen environment with a virtual device:

The reported coordinates for mouse drag events are clipped to fit within the
bounds of the virtual device associated with the Component.


An unspecified behavior will be caused if the id parameter
of any particular MouseEvent instance is not
in the range from MOUSE_FIRST to MOUSE_LAST-1
(MOUSE_WHEEL is not acceptable).
raw docstring

jdk.awt.event.MouseListener

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. A mouse event is generated when the mouse is pressed, released clicked (pressed and released). A mouse event is also generated when the mouse cursor enters or leaves a component. When a mouse event occurs, the relevant method in the listener object is invoked, and the MouseEvent is passed to it.

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. A mouse event is generated when the mouse is pressed, released
clicked (pressed and released). A mouse event is also generated when
the mouse cursor enters or leaves a component. When a mouse event
occurs, the relevant method in the listener object is invoked, and
the MouseEvent is passed to it.
raw docstring

jdk.awt.event.MouseMotionAdapter

An abstract adapter class for receiving mouse motion events. The methods in this class are empty. This class exists as convenience for creating listener objects.

Mouse motion events occur when a mouse is moved or dragged. (Many such events will be generated in a normal program. To track clicks and other mouse events, use the MouseAdapter.)

Extend this class to create a MouseEvent listener and override the methods for the events of interest. (If you implement the MouseMotionListener interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you can only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with a component using the component's addMouseMotionListener method. When the mouse is moved or dragged, the relevant method in the listener object is invoked and the MouseEvent is passed to it.

An abstract adapter class for receiving mouse motion events.
The methods in this class are empty. This class exists as
convenience for creating listener objects.

Mouse motion events occur when a mouse is moved or dragged.
(Many such events will be generated in a normal program.
To track clicks and other mouse events, use the MouseAdapter.)

Extend this class to create a MouseEvent listener
and override the methods for the events of interest. (If you implement the
MouseMotionListener interface, you have to define all of
the methods in it. This abstract class defines null methods for them
all, so you can only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with
a component using the component's addMouseMotionListener
method. When the mouse is moved or dragged, the relevant method in the
listener object is invoked and the MouseEvent is passed to it.
raw docstring

jdk.awt.event.MouseMotionListener

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. A mouse motion event is generated when the mouse is moved or dragged. (Many such events will be generated). When a mouse motion event occurs, the relevant method in the listener object is invoked, and the MouseEvent is passed to it.

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. A mouse motion event is generated when the mouse is moved
or dragged. (Many such events will be generated). When a mouse motion event
occurs, the relevant method in the listener object is invoked, and
the MouseEvent is passed to it.
raw docstring

jdk.awt.event.MouseWheelEvent

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. Mouse wheels are most often used for scrolling, though other uses are possible.

A MouseWheelEvent object is passed to every MouseWheelListener object which registered to receive the "interesting" mouse events using the component's addMouseWheelListener method. Each such listener object gets a MouseEvent containing the mouse event.

Due to the mouse wheel's special relationship to scrolling Components, MouseWheelEvents are delivered somewhat differently than other MouseEvents. This is because while other MouseEvents usually affect a change on the Component directly under the mouse cursor (for instance, when clicking a button), MouseWheelEvents often have an effect away from the mouse cursor (moving the wheel while over a Component inside a ScrollPane should scroll one of the Scrollbars on the ScrollPane).

MouseWheelEvents start delivery from the Component underneath the mouse cursor. If MouseWheelEvents are not enabled on the Component, the event is delivered to the first ancestor Container with MouseWheelEvents enabled. This will usually be a ScrollPane with wheel scrolling enabled. The source Component and x,y coordinates will be relative to the event's final destination (the ScrollPane). This allows a complex GUI to be installed without modification into a ScrollPane, and for all MouseWheelEvents to be delivered to the ScrollPane for scrolling.

Some AWT Components are implemented using native widgets which display their own scrollbars and handle their own scrolling. The particular Components for which this is true will vary from platform to platform. When the mouse wheel is moved over one of these Components, the event is delivered straight to the native widget, and not propagated to ancestors.

Platforms offer customization of the amount of scrolling that should take place when the mouse wheel is moved. The two most common settings are to scroll a certain number of "units" (commonly lines of text in a text-based component) or an entire "block" (similar to page-up/page-down). The MouseWheelEvent offers methods for conforming to the underlying platform settings. These platform settings can be changed at any time by the user. MouseWheelEvents reflect the most recent settings.

The MouseWheelEvent class includes methods for getting the number of "clicks" by which the mouse wheel is rotated. The getWheelRotation() method returns the integer number of "clicks" corresponding to the number of notches by which the wheel was rotated. In addition to this method, the MouseWheelEvent class provides the getPreciseWheelRotation() method which returns a double number of "clicks" in case a partial rotation occurred. The getPreciseWheelRotation() method is useful if a mouse supports a high-resolution wheel, such as a freely rotating wheel with no notches. Applications can benefit by using this method to process mouse wheel events more precisely, and thus, making visual perception smoother.

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.  Mouse wheels are
most often used for scrolling, though other uses are possible.

A MouseWheelEvent object is passed to every MouseWheelListener
object which registered to receive the "interesting" mouse events using the
component's addMouseWheelListener method.  Each such listener
object gets a MouseEvent containing the mouse event.

Due to the mouse wheel's special relationship to scrolling Components,
MouseWheelEvents are delivered somewhat differently than other MouseEvents.
This is because while other MouseEvents usually affect a change on
the Component directly under the mouse
cursor (for instance, when clicking a button), MouseWheelEvents often have
an effect away from the mouse cursor (moving the wheel while
over a Component inside a ScrollPane should scroll one of the
Scrollbars on the ScrollPane).

MouseWheelEvents start delivery from the Component underneath the
mouse cursor.  If MouseWheelEvents are not enabled on the
Component, the event is delivered to the first ancestor
Container with MouseWheelEvents enabled.  This will usually be
a ScrollPane with wheel scrolling enabled.  The source
Component and x,y coordinates will be relative to the event's
final destination (the ScrollPane).  This allows a complex
GUI to be installed without modification into a ScrollPane, and
for all MouseWheelEvents to be delivered to the ScrollPane for
scrolling.

Some AWT Components are implemented using native widgets which
display their own scrollbars and handle their own scrolling.
The particular Components for which this is true will vary from
platform to platform.  When the mouse wheel is
moved over one of these Components, the event is delivered straight to
the native widget, and not propagated to ancestors.

Platforms offer customization of the amount of scrolling that
should take place when the mouse wheel is moved.  The two most
common settings are to scroll a certain number of "units"
(commonly lines of text in a text-based component) or an entire "block"
(similar to page-up/page-down).  The MouseWheelEvent offers
methods for conforming to the underlying platform settings.  These
platform settings can be changed at any time by the user.  MouseWheelEvents
reflect the most recent settings.

The MouseWheelEvent class includes methods for
getting the number of "clicks" by which the mouse wheel is rotated.
The getWheelRotation() method returns the integer number
of "clicks" corresponding to the number of notches by which the wheel was
rotated. In addition to this method, the MouseWheelEvent
class provides the getPreciseWheelRotation() method which returns
a double number of "clicks" in case a partial rotation occurred.
The getPreciseWheelRotation() method is useful if a mouse supports
a high-resolution wheel, such as a freely rotating wheel with no
notches. Applications can benefit by using this method to process
mouse wheel events more precisely, and thus, making visual perception
smoother.
raw docstring

jdk.awt.event.MouseWheelListener

The listener interface for receiving mouse wheel events on a component. (For clicks and other mouse events, use the MouseListener. For mouse movement and drags, use the MouseMotionListener.)

The class that is interested in processing a mouse wheel event implements this interface (and all the methods it contains).

The listener object created from that class is then registered with a component using the component's addMouseWheelListener method. A mouse wheel event is generated when the mouse wheel is rotated. When a mouse wheel event occurs, that object's mouseWheelMoved method is invoked.

For information on how mouse wheel events are dispatched, see the class description for MouseWheelEvent.

The listener interface for receiving mouse wheel events on a component.
(For clicks and other mouse events, use the MouseListener.
For mouse movement and drags, use the MouseMotionListener.)

The class that is interested in processing a mouse wheel event
implements this interface (and all the methods it contains).

The listener object created from that class is then registered with a
component using the component's addMouseWheelListener
method. A mouse wheel event is generated when the mouse wheel is rotated.
When a mouse wheel event occurs, that object's mouseWheelMoved
method is invoked.

For information on how mouse wheel events are dispatched, see
the class description for MouseWheelEvent.
raw docstring

jdk.awt.event.PaintEvent

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. This event is not designed to be used with the Event Listener model; programs should continue to override paint/update methods in order render themselves properly.

An unspecified behavior will be caused if the id parameter of any particular PaintEvent instance is not in the range from PAINT_FIRST to PAINT_LAST.

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.  This event is not
designed to be used with the Event Listener model; programs
should continue to override paint/update methods in order
render themselves properly.

An unspecified behavior will be caused if the id parameter
of any particular PaintEvent instance is not
in the range from PAINT_FIRST to PAINT_LAST.
raw docstring

jdk.awt.event.TextEvent

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. The event is passed to every TextListener object which registered to receive such events using the component's addTextListener method.

The object that implements the TextListener interface gets this TextEvent when the event occurs. The listener is spared the details of processing individual mouse movements and key strokes Instead, it can process a "meaningful" (semantic) event like "text changed".

An unspecified behavior will be caused if the id parameter of any particular TextEvent instance is not in the range from TEXT_FIRST to TEXT_LAST.

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. The event is passed to
every TextListener object which registered to receive such
events using the component's addTextListener method.

The object that implements the TextListener interface gets
this TextEvent when the event occurs. The listener is
spared the details of processing individual mouse movements and key strokes
Instead, it can process a "meaningful" (semantic) event like "text changed".

An unspecified behavior will be caused if the id parameter
of any particular TextEvent instance is not
in the range from TEXT_FIRST to TEXT_LAST.
raw docstring

jdk.awt.event.TextListener

The listener interface for receiving text events.

The class that is interested in processing a text event implements this interface. The object created with that class is then registered with a component using the component's addTextListener method. When the component's text changes, the listener object's textValueChanged method is invoked.

The listener interface for receiving text events.

The class that is interested in processing a text event
implements this interface. The object created with that
class is then registered with a component using the
component's addTextListener method. When the
component's text changes, the listener object's
textValueChanged method is invoked.
raw docstring

jdk.awt.event.WindowAdapter

An abstract adapter class for receiving window events. The methods in this class are empty. This class exists as convenience for creating listener objects.

Extend this class to create a WindowEvent listener and override the methods for the events of interest. (If you implement the WindowListener interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you can only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with a Window using the window's addWindowListener method. When the window's status changes by virtue of being opened, closed, activated or deactivated, iconified or deiconified, the relevant method in the listener object is invoked, and the WindowEvent is passed to it.

An abstract adapter class for receiving window events.
The methods in this class are empty. This class exists as
convenience for creating listener objects.

Extend this class to create a WindowEvent listener
and override the methods for the events of interest. (If you implement the
WindowListener interface, you have to define all of
the methods in it. This abstract class defines null methods for them
all, so you can only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with
a Window using the window's addWindowListener
method. When the window's status changes by virtue of being opened,
closed, activated or deactivated, iconified or deiconified,
the relevant method in the listener
object is invoked, and the WindowEvent is passed to it.
raw docstring

jdk.awt.event.WindowEvent

A low-level event that indicates that a window has changed its status. This low-level event is generated by a Window object when it is opened, closed, activated, deactivated, iconified, or deiconified, or when focus is transfered into or out of the Window.

The event is passed to every WindowListener or WindowAdapter object which registered to receive such events using the window's addWindowListener method. (WindowAdapter objects implement the WindowListener interface.) Each such listener object gets this WindowEvent when the event occurs.

An unspecified behavior will be caused if the id parameter of any particular WindowEvent instance is not in the range from WINDOW_FIRST to WINDOW_LAST.

A low-level event that indicates that a window has changed its status. This
low-level event is generated by a Window object when it is opened, closed,
activated, deactivated, iconified, or deiconified, or when focus is
transfered into or out of the Window.

The event is passed to every WindowListener
or WindowAdapter object which registered to receive such
events using the window's addWindowListener method.
(WindowAdapter objects implement the
WindowListener interface.) Each such listener object
gets this WindowEvent when the event occurs.

An unspecified behavior will be caused if the id parameter
of any particular WindowEvent instance is not
in the range from WINDOW_FIRST to WINDOW_LAST.
raw docstring

jdk.awt.event.WindowFocusListener

The listener interface for receiving WindowEvents, including WINDOW_GAINED_FOCUS and WINDOW_LOST_FOCUS events. The class that is interested in processing a WindowEvent 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 addWindowFocusListener method. When the Window's status changes by virtue of it being opened, closed, activated, deactivated, iconified, or deiconified, or by focus being transfered into or out of the Window, the relevant method in the listener object is invoked, and the WindowEvent is passed to it.

The listener interface for receiving WindowEvents, including
WINDOW_GAINED_FOCUS and WINDOW_LOST_FOCUS events.
The class that is interested in processing a WindowEvent
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 addWindowFocusListener method.
When the Window's
status changes by virtue of it being opened, closed, activated, deactivated,
iconified, or deiconified, or by focus being transfered into or out of the
Window, the relevant method in the listener object is invoked,
and the WindowEvent is passed to it.
raw docstring

jdk.awt.event.WindowListener

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. When the window's status changes by virtue of being opened, closed, activated or deactivated, iconified or deiconified, the relevant method in the listener object is invoked, and the WindowEvent is passed to it.

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. When the window's status changes by virtue of being opened,
closed, activated or deactivated, iconified or deiconified,
the relevant method in the listener object is invoked, and the
WindowEvent is passed to it.
raw docstring

jdk.awt.event.WindowStateListener

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. When the window's state changes by virtue of being iconified, maximized etc., the windowStateChanged method in the listener object is invoked, and the WindowEvent is passed to it.

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.  When the window's
state changes by virtue of being iconified, maximized etc., the
windowStateChanged method in the listener object is
invoked, and the WindowEvent is passed to it.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close