- java.lang.Object
- 
- com.sun.java.accessibility.util.AWTEventMonitor
 
- 
- Direct Known Subclasses:
- SwingEventMonitor
 
 public class AWTEventMonitor extends Object The AWTEventMonitorimplements a suite of listeners that are conditionally installed on every AWT component instance in the Java Virtual Machine. The events captured by these listeners are made available through a unified set of listeners supported byAWTEventMonitor. With this, all the individual events on each of the AWT component instances are funneled into one set of listeners broken down by category (seeEventIDfor the categories).This class depends upon EventQueueMonitor, which provides the base level support for capturing the top-level containers as they are created.
- 
- 
Field SummaryFields Modifier and Type Field Description protected static ActionListeneractionListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.protected static AdjustmentListeneradjustmentListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.protected static ComponentListenercomponentListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.protected static ComponentcomponentWithFocusDeprecated, for removal: This API element is subject to removal in a future version.This field is unused; to get the component with focus use the getComponentWithFocus method.protected static ContainerListenercontainerListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.protected static FocusListenerfocusListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.protected static ItemListeneritemListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.protected static KeyListenerkeyListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.protected static MouseListenermouseListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.protected static MouseMotionListenermouseMotionListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.protected static TextListenertextListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.protected static WindowListenerwindowListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.
 - 
Constructor SummaryConstructors Constructor Description AWTEventMonitor()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddActionListener(ActionListener l)Adds the specified listener to receive allACTIONevents on each component instance in the Java Virtual Machine when they occur.static voidaddAdjustmentListener(AdjustmentListener l)Adds the specified listener to receive allADJUSTMENTevents on each component instance in the Java Virtual Machine when they occur.static voidaddComponentListener(ComponentListener l)Adds the specified listener to receive allCOMPONENTevents on each component instance in the Java Virtual Machine as they occur.static voidaddContainerListener(ContainerListener l)Adds the specified listener to receive allCONTAINERevents on each component instance in the Java Virtual Machine as they occur.static voidaddFocusListener(FocusListener l)Adds the specified listener to receive allFOCUSevents on each component instance in the Java Virtual Machine when they occur.static voidaddItemListener(ItemListener l)Adds the specified listener to receive allITEMevents on each component instance in the Java Virtual Machine when they occur.static voidaddKeyListener(KeyListener l)Adds the specified listener to receive allKEYevents on each component instance in the Java Virtual Machine when they occur.static voidaddMouseListener(MouseListener l)Adds the specified listener to receive allMOUSEevents on each component instance in the Java Virtual Machine when they occur.static voidaddMouseMotionListener(MouseMotionListener l)Adds the specified listener to receive all mouseMOTIONevents on each component instance in the Java Virtual Machine when they occur.static voidaddTextListener(TextListener l)Adds the specified listener to receive allTEXTevents on each component instance in the Java Virtual Machine when they occur.static voidaddWindowListener(WindowListener l)Adds the specified listener to receive allWINDOWevents on each component instance in the Java Virtual Machine when they occur.static ComponentgetComponentWithFocus()Returns the component that currently has keyboard focus.static voidremoveActionListener(ActionListener l)Removes the specified listener so it no longer receivesACTIONevents when they occur.static voidremoveAdjustmentListener(AdjustmentListener l)Removes the specified listener so it no longer receivesADJUSTMENTevents when they occur.static voidremoveComponentListener(ComponentListener l)Removes the specified listener so it no longer receivesCOMPONENTevents when they occur.static voidremoveContainerListener(ContainerListener l)Removes the specified listener so it no longer receivesCONTAINERevents when they occur.static voidremoveFocusListener(FocusListener l)Removes the specified listener so it no longer receivesFOCUSevents when they occur.static voidremoveItemListener(ItemListener l)Removes the specified listener so it no longer receivesITEMevents when they occur.static voidremoveKeyListener(KeyListener l)Removes the specified listener so it no longer receivesKEYevents when they occur.static voidremoveMouseListener(MouseListener l)Removes the specified listener so it no longer receivesMOUSEevents when they occur.static voidremoveMouseMotionListener(MouseMotionListener l)Removes the specified listener so it no longer receivesMOTIONevents when they occur.static voidremoveTextListener(TextListener l)Removes the specified listener so it no longer receivesTEXTevents when they occur.static voidremoveWindowListener(WindowListener l)Removes the specified listener so it no longer receivesWINDOWevents when they occur.
 
- 
- 
- 
Field Detail- 
componentWithFocus@Deprecated(since="8", forRemoval=true) protected static Component componentWithFocus Deprecated, for removal: This API element is subject to removal in a future version.This field is unused; to get the component with focus use the getComponentWithFocus method.The current component with keyboard focus.- See Also:
- getComponentWithFocus()
 
 - 
componentListener@Deprecated(since="8", forRemoval=true) protected static ComponentListener componentListener Deprecated, for removal: This API element is subject to removal in a future version.This field is unused.The current list of registered ComponentListener classes.
 - 
containerListener@Deprecated(since="8", forRemoval=true) protected static ContainerListener containerListener Deprecated, for removal: This API element is subject to removal in a future version.This field is unused.The current list of registered ContainerListener classes.
 - 
focusListener@Deprecated(since="8", forRemoval=true) protected static FocusListener focusListener Deprecated, for removal: This API element is subject to removal in a future version.This field is unused.The current list of registered FocusListener classes.
 - 
keyListener@Deprecated(since="8", forRemoval=true) protected static KeyListener keyListener Deprecated, for removal: This API element is subject to removal in a future version.This field is unused.The current list of registered KeyListener classes.
 - 
mouseListener@Deprecated(since="8", forRemoval=true) protected static MouseListener mouseListener Deprecated, for removal: This API element is subject to removal in a future version.This field is unused.The current list of registered MouseListener classes.
 - 
mouseMotionListener@Deprecated(since="8", forRemoval=true) protected static MouseMotionListener mouseMotionListener Deprecated, for removal: This API element is subject to removal in a future version.This field is unused.The current list of registered MouseMotionListener classes.
 - 
windowListener@Deprecated(since="8", forRemoval=true) protected static WindowListener windowListener Deprecated, for removal: This API element is subject to removal in a future version.This field is unused.The current list of registered WindowListener classes.
 - 
actionListener@Deprecated(since="8", forRemoval=true) protected static ActionListener actionListener Deprecated, for removal: This API element is subject to removal in a future version.This field is unused.The current list of registered ActionListener classes.
 - 
adjustmentListener@Deprecated(since="8", forRemoval=true) protected static AdjustmentListener adjustmentListener Deprecated, for removal: This API element is subject to removal in a future version.This field is unused.The current list of registered AdjustmentListener classes.
 - 
itemListener@Deprecated(since="8", forRemoval=true) protected static ItemListener itemListener Deprecated, for removal: This API element is subject to removal in a future version.This field is unused.The current list of registered ItemListener classes.
 - 
textListener@Deprecated(since="8", forRemoval=true) protected static TextListener textListener Deprecated, for removal: This API element is subject to removal in a future version.This field is unused.The current list of registered TextListener classes.
 
- 
 - 
Method Detail- 
getComponentWithFocuspublic static Component getComponentWithFocus() Returns the component that currently has keyboard focus. The return value can be null.- Returns:
- the component that has keyboard focus
 
 - 
addComponentListenerpublic static void addComponentListener(ComponentListener l) Adds the specified listener to receive allCOMPONENTevents on each component 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 component instances that support this listener type. - Parameters:
- l- the listener to add
- See Also:
- removeComponentListener(java.awt.event.ComponentListener)
 
 - 
removeComponentListenerpublic static void removeComponentListener(ComponentListener l) Removes the specified listener so it no longer receivesCOMPONENTevents when they occur.- Parameters:
- l- the listener to remove
- See Also:
- addComponentListener(java.awt.event.ComponentListener)
 
 - 
addContainerListenerpublic static void addContainerListener(ContainerListener l) Adds the specified listener to receive allCONTAINERevents on each component 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 component instances that support this listener type. - Parameters:
- l- the listener to add
- See Also:
- removeContainerListener(java.awt.event.ContainerListener)
 
 - 
removeContainerListenerpublic static void removeContainerListener(ContainerListener l) Removes the specified listener so it no longer receivesCONTAINERevents when they occur.- Parameters:
- l- the listener to remove
- See Also:
- addContainerListener(java.awt.event.ContainerListener)
 
 - 
addFocusListenerpublic static void addFocusListener(FocusListener l) Adds the specified listener to receive allFOCUSevents on each component instance in the Java Virtual Machine when 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 component instances that support this listener type. - Parameters:
- l- the listener to add
- See Also:
- removeFocusListener(java.awt.event.FocusListener)
 
 - 
removeFocusListenerpublic static void removeFocusListener(FocusListener l) Removes the specified listener so it no longer receivesFOCUSevents when they occur.- Parameters:
- l- the listener to remove
- See Also:
- addFocusListener(java.awt.event.FocusListener)
 
 - 
addKeyListenerpublic static void addKeyListener(KeyListener l) Adds the specified listener to receive allKEYevents on each component instance in the Java Virtual Machine when 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 component instances that support this listener type. - Parameters:
- l- the listener to add
- See Also:
- removeKeyListener(java.awt.event.KeyListener)
 
 - 
removeKeyListenerpublic static void removeKeyListener(KeyListener l) Removes the specified listener so it no longer receivesKEYevents when they occur.- Parameters:
- l- the listener to remove
- See Also:
- addKeyListener(java.awt.event.KeyListener)
 
 - 
addMouseListenerpublic static void addMouseListener(MouseListener l) Adds the specified listener to receive allMOUSEevents on each component instance in the Java Virtual Machine when 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 component instances that support this listener type. - Parameters:
- l- the listener to add
- See Also:
- removeMouseListener(java.awt.event.MouseListener)
 
 - 
removeMouseListenerpublic static void removeMouseListener(MouseListener l) Removes the specified listener so it no longer receivesMOUSEevents when they occur.- Parameters:
- l- the listener to remove
- See Also:
- addMouseListener(java.awt.event.MouseListener)
 
 - 
addMouseMotionListenerpublic static void addMouseMotionListener(MouseMotionListener l) Adds the specified listener to receive all mouseMOTIONevents on each component instance in the Java Virtual Machine when 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 component instances that support this listener type. - Parameters:
- l- the listener to add
- See Also:
- removeMouseMotionListener(java.awt.event.MouseMotionListener)
 
 - 
removeMouseMotionListenerpublic static void removeMouseMotionListener(MouseMotionListener l) Removes the specified listener so it no longer receivesMOTIONevents when they occur.- Parameters:
- l- the listener to remove
- See Also:
- addMouseMotionListener(java.awt.event.MouseMotionListener)
 
 - 
addWindowListenerpublic static void addWindowListener(WindowListener l) Adds the specified listener to receive allWINDOWevents on each component instance in the Java Virtual Machine when 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 component instances that support this listener type. - Parameters:
- l- the listener to add
- See Also:
- removeWindowListener(java.awt.event.WindowListener)
 
 - 
removeWindowListenerpublic static void removeWindowListener(WindowListener l) Removes the specified listener so it no longer receivesWINDOWevents when they occur.- Parameters:
- l- the listener to remove
- See Also:
- addWindowListener(java.awt.event.WindowListener)
 
 - 
addActionListenerpublic static void addActionListener(ActionListener l) Adds the specified listener to receive allACTIONevents on each component instance in the Java Virtual Machine when 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 component instances that support this listener type. - Parameters:
- l- the listener to add
- See Also:
- removeActionListener(java.awt.event.ActionListener)
 
 - 
removeActionListenerpublic static void removeActionListener(ActionListener l) Removes the specified listener so it no longer receivesACTIONevents when they occur.- Parameters:
- l- the listener to remove
- See Also:
- addActionListener(java.awt.event.ActionListener)
 
 - 
addAdjustmentListenerpublic static void addAdjustmentListener(AdjustmentListener l) Adds the specified listener to receive allADJUSTMENTevents on each component instance in the Java Virtual Machine when 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 component instances that support this listener type. - Parameters:
- l- the listener to add
- See Also:
- removeAdjustmentListener(java.awt.event.AdjustmentListener)
 
 - 
removeAdjustmentListenerpublic static void removeAdjustmentListener(AdjustmentListener l) Removes the specified listener so it no longer receivesADJUSTMENTevents when they occur.- Parameters:
- l- the listener to remove
- See Also:
- addAdjustmentListener(java.awt.event.AdjustmentListener)
 
 - 
addItemListenerpublic static void addItemListener(ItemListener l) Adds the specified listener to receive allITEMevents on each component instance in the Java Virtual Machine when 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 component instances that support this listener type. - Parameters:
- l- the listener to add
- See Also:
- removeItemListener(java.awt.event.ItemListener)
 
 - 
removeItemListenerpublic static void removeItemListener(ItemListener l) Removes the specified listener so it no longer receivesITEMevents when they occur.- Parameters:
- l- the listener to remove
- See Also:
- addItemListener(java.awt.event.ItemListener)
 
 - 
addTextListenerpublic static void addTextListener(TextListener l) Adds the specified listener to receive allTEXTevents on each component instance in the Java Virtual Machine when 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 component instances that support this listener type. - Parameters:
- l- the listener to add
- See Also:
- removeTextListener(java.awt.event.TextListener)
 
 - 
removeTextListenerpublic static void removeTextListener(TextListener l) Removes the specified listener so it no longer receivesTEXTevents when they occur.- Parameters:
- l- the listener to remove
- See Also:
- addTextListener(java.awt.event.TextListener)
 
 
- 
 
-