APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.java.accessibility.util

public Class AccessibilityEventMonitor

Additional top-level class in compilation unit: _AccessibleState.

extends Object
Class Inheritance
Imports
java.beans.*, java.awt.*, javax.accessibility.*

AccessibilityEventMonitor implements a PropertyChange listener on every UI object that implements interface Accessible in the Java Virtual Machine. The events captured by these listeners are made available through listeners supported by AccessibilityEventMonitor. With this, all the individual events on each of the UI object instances are funneled into one set of PropertyChange listeners.

This class depends upon EventQueueMonitor, which provides the base level support for capturing the top-level containers as they are created.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
AccessibilityEventMonitor.AccessibilityEventListener

AccessibilityEventListener is the class that does all the work for AccessibilityEventMonitor.

Field Summary

Modifier and TypeField and Description
private static final AccessibilityEventMonitor.AccessibilityEventListener
accessibilityListener

The actual listener that is installed on the component instances.

protected static final AccessibilityListenerList
listenerList

The current list of registered PropertyChangeListener classes.

Constructor Summary

AccessConstructor and Description
public
AccessibilityEventMonitor()

Constructs an AccessibilityEventMonitor.

Method Summary

Modifier and TypeMethod and Description
public static void
addPropertyChangeListener(PropertyChangeListener
the listener to add
l
)

Adds the specified listener to receive all PropertyChange events on each UI object instance in the Java Virtual Machine as they occur.

public static void
removePropertyChangeListener(PropertyChangeListener
the listener to remove
l
)

Removes the specified listener so it no longer receives PropertyChange events when they occur.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

accessibilityListenerback to summary
private static final AccessibilityEventMonitor.AccessibilityEventListener accessibilityListener

The actual listener that is installed on the component instances. This listener calls the other registered listeners when an event occurs. By doing things this way, the actual number of listeners installed on a component instance is drastically reduced.

listenerListback to summary
protected static final AccessibilityListenerList listenerList

The current list of registered PropertyChangeListener classes.

See Also
addPropertyChangeListener, removePropertyChangeListener

Constructor Detail

AccessibilityEventMonitorback to summary
public AccessibilityEventMonitor()

Constructs an AccessibilityEventMonitor.

Method Detail

addPropertyChangeListenerback to summary
public static void addPropertyChangeListener(PropertyChangeListener l)

Adds the specified listener to receive all PropertyChange events on each UI object instance in the Java Virtual Machine as they occur.

Note

This listener is automatically added to all component instances created after this method is called. In addition, it is only added to UI object instances that support this listener type.

Parameters
l:PropertyChangeListener

the listener to add

See Also
removePropertyChangeListener
removePropertyChangeListenerback to summary
public static void removePropertyChangeListener(PropertyChangeListener l)

Removes the specified listener so it no longer receives PropertyChange events when they occur.

Parameters
l:PropertyChangeListener

the listener to remove

See Also
addPropertyChangeListener
com.sun.java.accessibility.util back to summary

pack-priv Class AccessibilityEventMonitor.AccessibilityEventListener

extends Object
implements TopLevelWindowListener, PropertyChangeListener
Class Inheritance
  • java.lang.Object
  • com.sun.java.accessibility.util.AccessibilityEventMonitor.AccessibilityEventListener
All Implemented Interfaces
java.beans.PropertyChangeListener, java.util.EventListener, com.sun.java.accessibility.util.TopLevelWindowListener

AccessibilityEventListener is the class that does all the work for AccessibilityEventMonitor. It is not intended for use by any other class except AccessibilityEventMonitor.

Constructor Summary

AccessConstructor and Description
public
AccessibilityEventListener()

Create a new instance of this class and install it on each component instance in the virtual machine that supports any of the currently registered listeners in AccessibilityEventMonitor.

Method Summary

Modifier and TypeMethod and Description
protected void
installListeners()

Installs PropertyChange listeners on all Accessible objects based upon the current topLevelWindows cached by EventQueueMonitor.

protected void
installListeners(Accessible
the Accessible object to add listeners to
a
)

Installs PropertyChange listeners to the Accessible object, and it's children (so long as the object isn't of TRANSIENT state).

private void
installListeners(AccessibleContext ac)

Installs PropertyChange listeners to the AccessibleContext object, and it's * children (so long as the object isn't of TRANSIENT state).

public void
propertyChange(PropertyChangeEvent e)

Implements java.beans.PropertyChangeListener.propertyChange.

This method gets called when a bound property is changed.

protected void
removeListeners()

Removes PropertyChange listeners on all Accessible objects based upon the topLevelWindows cached by EventQueueMonitor.

protected void
removeListeners(Accessible
the Accessible object to remove listeners from
a
)

Removes PropertyChange listeners for the given Accessible object, it's children (so long as the object isn't of TRANSIENT state).

private void
removeListeners(AccessibleContext ac)

Removes PropertyChange listeners for the given AccessibleContext object, it's children (so long as the object isn't of TRANSIENT state).

public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AccessibilityEventListenerback to summary
public AccessibilityEventListener()

Create a new instance of this class and install it on each component instance in the virtual machine that supports any of the currently registered listeners in AccessibilityEventMonitor. Also registers itself as a TopLevelWindowListener with EventQueueMonitor so it can automatically add new listeners to new components.

See Also
EventQueueMonitor, AccessibilityEventMonitor

Method Detail

installListenersback to summary
protected void installListeners()

Installs PropertyChange listeners on all Accessible objects based upon the current topLevelWindows cached by EventQueueMonitor.

See Also
EventQueueMonitor, AWTEventMonitor
installListenersback to summary
protected void installListeners(Accessible a)

Installs PropertyChange listeners to the Accessible object, and it's children (so long as the object isn't of TRANSIENT state).

Parameters
a:Accessible

the Accessible object to add listeners to

installListenersback to summary
private void installListeners(AccessibleContext ac)

Installs PropertyChange listeners to the AccessibleContext object, and it's * children (so long as the object isn't of TRANSIENT state).

propertyChangeback to summary
public void propertyChange(PropertyChangeEvent e)

Implements java.beans.PropertyChangeListener.propertyChange.

Doc from java.beans.PropertyChangeListener.propertyChange.

This method gets called when a bound property is changed.

removeListenersback to summary
protected void removeListeners()

Removes PropertyChange listeners on all Accessible objects based upon the topLevelWindows cached by EventQueueMonitor.

See Also
EventID
removeListenersback to summary
protected void removeListeners(Accessible a)

Removes PropertyChange listeners for the given Accessible object, it's children (so long as the object isn't of TRANSIENT state).

Parameters
a:Accessible

the Accessible object to remove listeners from

removeListenersback to summary
private void removeListeners(AccessibleContext ac)

Removes PropertyChange listeners for the given AccessibleContext object, it's children (so long as the object isn't of TRANSIENT state).

topLevelWindowCreatedback to summary
public void topLevelWindowCreated(Window w)

Implements com.sun.java.accessibility.util.TopLevelWindowListener.topLevelWindowCreated.

Called when top level window is created.

See Also
EventQueueMonitor, EventQueueMonitor#addTopLevelWindowListener
topLevelWindowDestroyedback to summary
public void topLevelWindowDestroyed(Window w)

Implements com.sun.java.accessibility.util.TopLevelWindowListener.topLevelWindowDestroyed.

Called when top level window is destroyed.

See Also
EventQueueMonitor, EventQueueMonitor#addTopLevelWindowListener