- Direct Known Subclasses:
- SwingEventMonitor
The AWTEventMonitor implements 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 by AWTEventMonitor.
 With this, all the individual events on each of the AWT component
 instances are funneled into one set of listeners broken down by category
 (see EventID for the categories).
 
This class depends upon EventQueueMonitor, which provides the base
 level support for capturing the top-level containers as they are created.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected static ActionListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.protected static AdjustmentListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.protected static ComponentListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.protected static ComponentDeprecated, 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 ContainerListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.protected static FocusListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.protected static ItemListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.protected static KeyListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.protected static MouseListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.protected static MouseMotionListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.protected static TextListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.protected static WindowListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidAdds the specified listener to receive allACTIONevents on each component instance in the Java Virtual Machine when they occur.static voidAdds the specified listener to receive allADJUSTMENTevents on each component instance in the Java Virtual Machine when they occur.static voidAdds the specified listener to receive allCOMPONENTevents on each component instance in the Java Virtual Machine as they occur.static voidAdds the specified listener to receive allCONTAINERevents on each component instance in the Java Virtual Machine as they occur.static voidAdds the specified listener to receive allFOCUSevents on each component instance in the Java Virtual Machine when they occur.static voidAdds the specified listener to receive allITEMevents on each component instance in the Java Virtual Machine when they occur.static voidAdds the specified listener to receive allKEYevents on each component instance in the Java Virtual Machine when they occur.static voidAdds the specified listener to receive allMOUSEevents on each component instance in the Java Virtual Machine when they occur.static voidAdds the specified listener to receive all mouseMOTIONevents on each component instance in the Java Virtual Machine when they occur.static voidAdds the specified listener to receive allTEXTevents on each component instance in the Java Virtual Machine when they occur.static voidAdds the specified listener to receive allWINDOWevents on each component instance in the Java Virtual Machine when they occur.static ComponentReturns the component that currently has keyboard focus.static voidRemoves the specified listener so it no longer receivesACTIONevents when they occur.static voidRemoves the specified listener so it no longer receivesADJUSTMENTevents when they occur.static voidRemoves the specified listener so it no longer receivesCOMPONENTevents when they occur.static voidRemoves the specified listener so it no longer receivesCONTAINERevents when they occur.static voidRemoves the specified listener so it no longer receivesFOCUSevents when they occur.static voidRemoves the specified listener so it no longer receivesITEMevents when they occur.static voidRemoves the specified listener so it no longer receivesKEYevents when they occur.static voidRemoves the specified listener so it no longer receivesMOUSEevents when they occur.static voidRemoves the specified listener so it no longer receivesMOTIONevents when they occur.static voidRemoves the specified listener so it no longer receivesTEXTevents when they occur.static voidRemoves the specified listener so it no longer receivesWINDOWevents when they occur.
- 
Field Details- 
componentWithFocusDeprecated, 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:
 
- 
componentListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.The current list of registered ComponentListener classes.
- 
containerListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.The current list of registered ContainerListener classes.
- 
focusListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.The current list of registered FocusListener classes.
- 
keyListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.The current list of registered KeyListener classes.
- 
mouseListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.The current list of registered MouseListener classes.
- 
mouseMotionListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.The current list of registered MouseMotionListener classes.
- 
windowListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.The current list of registered WindowListener classes.
- 
actionListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.The current list of registered ActionListener classes.
- 
adjustmentListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.The current list of registered AdjustmentListener classes.
- 
itemListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.The current list of registered ItemListener classes.
- 
textListenerDeprecated, for removal: This API element is subject to removal in a future version.This field is unused.The current list of registered TextListener classes.
 
- 
- 
Constructor Details- 
AWTEventMonitorpublic AWTEventMonitor()Constructs anAWTEventMonitor.
 
- 
- 
Method Details- 
getComponentWithFocusReturns the component that currently has keyboard focus. The return value can be null.- Returns:
- the component that has keyboard focus
 
- 
addComponentListenerAdds 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:
 
- 
removeComponentListenerRemoves the specified listener so it no longer receivesCOMPONENTevents when they occur.- Parameters:
- l- the listener to remove
- See Also:
 
- 
addContainerListenerAdds 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:
 
- 
removeContainerListenerRemoves the specified listener so it no longer receivesCONTAINERevents when they occur.- Parameters:
- l- the listener to remove
- See Also:
 
- 
addFocusListenerAdds 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:
 
- 
removeFocusListenerRemoves the specified listener so it no longer receivesFOCUSevents when they occur.- Parameters:
- l- the listener to remove
- See Also:
 
- 
addKeyListenerAdds 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:
 
- 
removeKeyListenerRemoves the specified listener so it no longer receivesKEYevents when they occur.- Parameters:
- l- the listener to remove
- See Also:
 
- 
addMouseListenerAdds 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:
 
- 
removeMouseListenerRemoves the specified listener so it no longer receivesMOUSEevents when they occur.- Parameters:
- l- the listener to remove
- See Also:
 
- 
addMouseMotionListenerAdds 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:
 
- 
removeMouseMotionListenerRemoves the specified listener so it no longer receivesMOTIONevents when they occur.- Parameters:
- l- the listener to remove
- See Also:
 
- 
addWindowListenerAdds 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:
 
- 
removeWindowListenerRemoves the specified listener so it no longer receivesWINDOWevents when they occur.- Parameters:
- l- the listener to remove
- See Also:
 
- 
addActionListenerAdds 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:
 
- 
removeActionListenerRemoves the specified listener so it no longer receivesACTIONevents when they occur.- Parameters:
- l- the listener to remove
- See Also:
 
- 
addAdjustmentListenerAdds 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:
 
- 
removeAdjustmentListenerRemoves the specified listener so it no longer receivesADJUSTMENTevents when they occur.- Parameters:
- l- the listener to remove
- See Also:
 
- 
addItemListenerAdds 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:
 
- 
removeItemListenerRemoves the specified listener so it no longer receivesITEMevents when they occur.- Parameters:
- l- the listener to remove
- See Also:
 
- 
addTextListenerAdds 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:
 
- 
removeTextListenerRemoves the specified listener so it no longer receivesTEXTevents when they occur.- Parameters:
- l- the listener to remove
- See Also:
 
 
-