SwingEventMonitor extends AWTEventMonitor by adding a suite of
listeners conditionally installed on every Swing component instance
in the Java Virtual Machine. The events captured by these listeners
are made available through a unified set of listeners supported by
SwingEventMonitor. With this, all the individual events on each of the
AWT and Swing 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.
Because this class extends AWTEventMonitor, it is not
necessary to use this class and AWTEventMonitor at the same time.
If you want to monitor both AWT and Swing components, you should
use just this class.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final EventListenerListThe master list of all listeners registered by other classes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidAdds the specified listener to receive allANCESTORevents on each component instance in the Java Virtual Machine as they occur.static voidAdds the specified listener to receive allCARETevents on each component instance in the Java Virtual Machine as they occur.static voidAdds the specified listener to receive allCELLEDITORevents on each component instance in the Java Virtual Machine as they occur.static voidAdds the specified listener to receive allCHANGEevents on each component instance in the Java Virtual Machine as they occur.static voidAdds the specified listener to receive allCOLUMNMODELevents on each component instance in the Java Virtual Machine as they occur.static voidAdds the specified listener to receive allDOCUMENTevents on each component instance in the Java Virtual Machine as they occur.static voidAdds the specified listener to receive allINTERNALFRAMEevents on each component instance in the Java Virtual Machine as they occur.static voidAdds the specified listener to receive allLISTDATAevents on each component instance in the Java Virtual Machine as they occur.static voidAdds the specified listener to receive allLISTSELECTIONevents on each component instance in the Java Virtual Machine as they occur.static voidAdds the specified listener to receive allMENUevents on each component instance in the Java Virtual Machine as they occur.static voidAdds the specified listener to receive allPOPUPMENUevents on each component instance in the Java Virtual Machine as they occur.static voidAdds the specified listener to receive allPROPERTYCHANGEevents on each component instance in the Java Virtual Machine as they occur.static voidAdds the specified listener to receive allTABLEMODELevents on each component instance in the Java Virtual Machine as they occur.static voidAdds the specified listener to receive allTREEEXPANSIONevents on each component instance in the Java Virtual Machine as they occur.static voidAdds the specified listener to receive allTREEMODELevents on each component instance in the Java Virtual Machine as they occur.static voidAdds the specified listener to receive allTREESELECTIONevents on each component instance in the Java Virtual Machine as they occur.static voidAdds the specified listener to receive allUNDOABLEEDITevents on each component instance in the Java Virtual Machine as they occur.static voidAdds the specified listener to receive allVETOABLECHANGEevents on each component instance in the Java Virtual Machine as they occur.static voidRemoves the specified listener so it no longer receivesANCESTORevents when they occur.static voidRemoves the specified listener so it no longer receivesCARETevents when they occur.static voidRemoves the specified listener so it no longer receivesCELLEDITORevents when they occur.static voidRemoves the specified listener so it no longer receivesCHANGEevents when they occur.static voidRemoves the specified listener so it no longer receivesCOLUMNMODELevents when they occur.static voidRemoves the specified listener so it no longer receivesDOCUMENTevents when they occur.static voidRemoves the specified listener so it no longer receivesINTERNALFRAMEevents when they occur.static voidRemoves the specified listener so it no longer receivesLISTDATAevents when they occur.static voidRemoves the specified listener so it no longer receivesLISTSELECTIONevents when they occur.static voidRemoves the specified listener so it no longer receivesMENUevents when they occur.static voidRemoves the specified listener so it no longer receivesPOPUPMENUevents when they occur.static voidRemoves the specified listener so it no longer receivesPROPERTYCHANGEevents when they occur.static voidRemoves the specified listener so it no longer receivesTABLEMODELevents when they occur.static voidRemoves the specified listener so it no longer receivesTREEEXPANSIONevents when they occur.static voidRemoves the specified listener so it no longer receivesTREEMODELevents when they occur.static voidRemoves the specified listener so it no longer receivesTREESELECTIONevents when they occur.static voidRemoves the specified listener so it no longer receivesUNDOABLEEDITevents when they occur.static voidRemoves the specified listener so it no longer receivesVETOABLECHANGEevents when they occur.Methods declared in class com.sun.java.accessibility.util.AWTEventMonitor
addActionListener, addAdjustmentListener, addComponentListener, addContainerListener, addFocusListener, addItemListener, addKeyListener, addMouseListener, addMouseMotionListener, addTextListener, addWindowListener, getComponentWithFocus, removeActionListener, removeAdjustmentListener, removeComponentListener, removeContainerListener, removeFocusListener, removeItemListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeTextListener, removeWindowListener
-
Field Details
-
listenerList
The master list of all listeners registered by other classes. This can only be publicly modified by calling the add or remove listener methods in this class.
-
-
Constructor Details
-
SwingEventMonitor
public SwingEventMonitor()Constructs aSwingEventMonitor.
-
-
Method Details
-
addAncestorListener
Adds the specified listener to receive allANCESTORevents 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:
-
removeAncestorListener
Removes the specified listener so it no longer receivesANCESTORevents when they occur.- Parameters:
l- the listener to remove- See Also:
-
addCaretListener
Adds the specified listener to receive allCARETevents 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:
-
removeCaretListener
Removes the specified listener so it no longer receivesCARETevents when they occur.- Parameters:
l- the listener to remove- See Also:
-
addCellEditorListener
Adds the specified listener to receive allCELLEDITORevents 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:
-
removeCellEditorListener
Removes the specified listener so it no longer receivesCELLEDITORevents when they occur.- Parameters:
l- the listener to remove- See Also:
-
addChangeListener
Adds the specified listener to receive allCHANGEevents 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:
-
removeChangeListener
Removes the specified listener so it no longer receivesCHANGEevents when they occur.- Parameters:
l- the listener to remove- See Also:
-
addColumnModelListener
Adds the specified listener to receive allCOLUMNMODELevents 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:
-
removeColumnModelListener
Removes the specified listener so it no longer receivesCOLUMNMODELevents when they occur.- Parameters:
l- the listener to remove- See Also:
-
addDocumentListener
Adds the specified listener to receive allDOCUMENTevents 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:
-
removeDocumentListener
Removes the specified listener so it no longer receivesDOCUMENTevents when they occur.- Parameters:
l- the listener to remove- See Also:
-
addListDataListener
Adds the specified listener to receive allLISTDATAevents 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:
-
removeListDataListener
Removes the specified listener so it no longer receivesLISTDATAevents when they occur.- Parameters:
l- the listener to remove- See Also:
-
addListSelectionListener
Adds the specified listener to receive allLISTSELECTIONevents 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:
-
removeListSelectionListener
Removes the specified listener so it no longer receivesLISTSELECTIONevents when they occur.- Parameters:
l- the listener to remove- See Also:
-
addMenuListener
Adds the specified listener to receive allMENUevents 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:
-
removeMenuListener
Removes the specified listener so it no longer receivesMENUevents when they occur.- Parameters:
l- the listener to remove- See Also:
-
addPopupMenuListener
Adds the specified listener to receive allPOPUPMENUevents 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:
-
removePopupMenuListener
Removes the specified listener so it no longer receivesPOPUPMENUevents when they occur.- Parameters:
l- the listener to remove- See Also:
-
addTableModelListener
Adds the specified listener to receive allTABLEMODELevents 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:
-
removeTableModelListener
Removes the specified listener so it no longer receivesTABLEMODELevents when they occur.- Parameters:
l- the listener to remove- See Also:
-
addTreeExpansionListener
Adds the specified listener to receive allTREEEXPANSIONevents 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:
-
removeTreeExpansionListener
Removes the specified listener so it no longer receivesTREEEXPANSIONevents when they occur.- Parameters:
l- the listener to remove- See Also:
-
addTreeModelListener
Adds the specified listener to receive allTREEMODELevents 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:
-
removeTreeModelListener
Removes the specified listener so it no longer receivesTREEMODELevents when they occur.- Parameters:
l- the listener to remove- See Also:
-
addTreeSelectionListener
Adds the specified listener to receive allTREESELECTIONevents 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:
-
removeTreeSelectionListener
Removes the specified listener so it no longer receivesTREESELECTIONevents when they occur.- Parameters:
l- the listener to remove- See Also:
-
addUndoableEditListener
Adds the specified listener to receive allUNDOABLEEDITevents 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:
-
removeUndoableEditListener
Removes the specified listener so it no longer receivesUNDOABLEEDITevents when they occur.- Parameters:
l- the listener to remove- See Also:
-
addInternalFrameListener
Adds the specified listener to receive allINTERNALFRAMEevents 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:
-
removeInternalFrameListener
Removes the specified listener so it no longer receivesINTERNALFRAMEevents when they occur.- Parameters:
l- the listener to remove- See Also:
-
addPropertyChangeListener
Adds the specified listener to receive allPROPERTYCHANGEevents 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:
-
removePropertyChangeListener
Removes the specified listener so it no longer receivesPROPERTYCHANGEevents when they occur.- Parameters:
l- the listener to remove- See Also:
-
addVetoableChangeListener
Adds the specified listener to receive allVETOABLECHANGEevents 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:
-
removeVetoableChangeListener
Removes the specified listener so it no longer receivesVETOABLECHANGEevents when they occur.- Parameters:
l- the listener to remove- See Also:
-