All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.java.accessibility.util.EventQueueMonitor
java.lang.Object
|
+----java.awt.EventQueue
|
+----com.sun.java.accessibility.util.EventQueueMonitor
- public class EventQueueMonitor
- extends EventQueue
The EventQueueMonitor is an EventQueue subclass that provides key
core functionality for Assistive Technologies (and other system-level
technologies that need some of the same things that Assistive Technology
needs).
This class is meant to be automatically loaded by the
Toolkit when it starts up. In order for this to happen, this class
needs to be in the CLASSPATH environment variable and the following
line needs to be in the awt.properties file:
AWT.EventQueueClass=com.sun.java.accessibility.util.EventQueueMonitor
This class also looks for the AWT.assistive_technologies property in the
awt.properties file. This is a comma-separated list of classes that
represent assistive technologies that should run in the same Java
Virtual Machine as the application. If this property exists, this
class will load each class in the list and create a single instance
of it in the current thread.
This class is commonly used with one or two other classes,
AWTEventMonitor and SwingEventMonitor, that track all events generated
by AWT obects and Swing objects respectively.
- See Also:
- AWTEventMonitor, SwingEventMonitor
-
EventQueueMonitor()
- Create a new EventQueueMonitor instance.
-
addTopLevelWindowListener(TopLevelWindowListener)
- Adds the specified listener to be notified when a top level window
is created or destroyed.
-
getAccessibleAt(Point)
- Obtain the Accessible object at the given point on the Screen.
-
getCurrentMousePosition()
- Return the last recorded position of the mouse in screen coordinates.
-
getTopLevelWindows()
- Return the list of top level Windows in use in the Java Virtual Machine.
-
getTopLevelWindowWithFocus()
- Return the top level Window that currently has keyboard focus.
-
maybeLoadAssistiveTechnologies()
- Loads additional classes into the Java Virtual Machine using the
AWT.assistive_technologies property in the awt.properties file.
-
postEvent(AWTEvent)
- Post a 1.1-style event to the EventQueue.
-
queueWindowEvent(WindowEvent)
- Queue up a WindowEvent for later processing by the
WindowEventDispatch thread.
-
removeTopLevelWindowListener(TopLevelWindowListener)
- Removed the specified listener to be notified when a top level window
is created or destroyed.
EventQueueMonitor
public EventQueueMonitor()
- Create a new EventQueueMonitor instance. Normally, this will
be called only by the AWT Toolkit during initialization time.
Assistive technologies should not create instances of
EventQueueMonitor by themselves. Instead, they should either
refer to it directly via the static methods in this class
(e.g., EventQueueMonitor.getCurrentMousePosition) or obtain
the instance by asking the Toolkit (e.g., Toolkit.getSystemEventQueue).
queueWindowEvent
protected static void queueWindowEvent(WindowEvent e)
- Queue up a WindowEvent for later processing by the
WindowEventDispatch thread.
getAccessibleAt
public static Accessible getAccessibleAt(Point p)
- Obtain the Accessible object at the given point on the Screen.
The return value may be null if an Accessible object cannot be
found at the particular point.
addTopLevelWindowListener
public static void addTopLevelWindowListener(TopLevelWindowListener l)
- Adds the specified listener to be notified when a top level window
is created or destroyed.
- Parameters:
- l - the listener to add
- See Also:
- removeTopLevelWindowListener
removeTopLevelWindowListener
public static void removeTopLevelWindowListener(TopLevelWindowListener l)
- Removed the specified listener to be notified when a top level window
is created or destroyed.
- Parameters:
- l - the listener to remove
- See Also:
- addTopLevelWindowListener
getCurrentMousePosition
public static Point getCurrentMousePosition()
- Return the last recorded position of the mouse in screen coordinates.
- Returns:
- the last recorded position of the mouse in screen coordinates
getTopLevelWindows
public static Window[] getTopLevelWindows()
- Return the list of top level Windows in use in the Java Virtual Machine.
- Returns:
- an array of top level Windows in use in the Java Virtual Machine
getTopLevelWindowWithFocus
public static Window getTopLevelWindowWithFocus()
- Return the top level Window that currently has keyboard focus.
- Returns:
- the top level Window that currently has keyboard focus
postEvent
public void postEvent(AWTEvent theEvent)
- Post a 1.1-style event to the EventQueue.
- Parameters:
- theEvent - the AWTEvent
- Overrides:
- postEvent in class EventQueue
maybeLoadAssistiveTechnologies
protected static void maybeLoadAssistiveTechnologies()
- Loads additional classes into the Java Virtual Machine using the
AWT.assistive_technologies property in the awt.properties file.
The property specifies a comma-separated list of assistive technology
classes this class will load just before the first event is posted
to the event queue. The classes will be loaded in the order specified
in the property, and a single instance of each will be created.
This will only be done if the JDK version is less than 1.2
because Toolkit.java executes this same code as of JDK1.2.
All Packages Class Hierarchy This Package Previous Next Index