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
Modifier and TypeFieldDescriptionprotected static final EventListenerList
The master list of all listeners registered by other classes.Fields declared in class com.sun.java.accessibility.util.AWTEventMonitor
actionListener, adjustmentListener, componentListener, componentWithFocus, containerListener, focusListener, itemListener, keyListener, mouseListener, mouseMotionListener, textListener, windowListener
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Adds the specified listener to receive allANCESTOR
events on each component instance in the Java Virtual Machine as they occur.static void
Adds the specified listener to receive allCARET
events on each component instance in the Java Virtual Machine as they occur.static void
Adds the specified listener to receive allCELLEDITOR
events on each component instance in the Java Virtual Machine as they occur.static void
Adds the specified listener to receive allCHANGE
events on each component instance in the Java Virtual Machine as they occur.static void
Adds the specified listener to receive allCOLUMNMODEL
events on each component instance in the Java Virtual Machine as they occur.static void
Adds the specified listener to receive allDOCUMENT
events on each component instance in the Java Virtual Machine as they occur.static void
Adds the specified listener to receive allINTERNALFRAME
events on each component instance in the Java Virtual Machine as they occur.static void
Adds the specified listener to receive allLISTDATA
events on each component instance in the Java Virtual Machine as they occur.static void
Adds the specified listener to receive allLISTSELECTION
events on each component instance in the Java Virtual Machine as they occur.static void
Adds the specified listener to receive allMENU
events on each component instance in the Java Virtual Machine as they occur.static void
Adds the specified listener to receive allPOPUPMENU
events on each component instance in the Java Virtual Machine as they occur.static void
Adds the specified listener to receive allPROPERTYCHANGE
events on each component instance in the Java Virtual Machine as they occur.static void
Adds the specified listener to receive allTABLEMODEL
events on each component instance in the Java Virtual Machine as they occur.static void
Adds the specified listener to receive allTREEEXPANSION
events on each component instance in the Java Virtual Machine as they occur.static void
Adds the specified listener to receive allTREEMODEL
events on each component instance in the Java Virtual Machine as they occur.static void
Adds the specified listener to receive allTREESELECTION
events on each component instance in the Java Virtual Machine as they occur.static void
Adds the specified listener to receive allUNDOABLEEDIT
events on each component instance in the Java Virtual Machine as they occur.static void
Adds the specified listener to receive allVETOABLECHANGE
events on each component instance in the Java Virtual Machine as they occur.static void
Removes the specified listener so it no longer receivesANCESTOR
events when they occur.static void
Removes the specified listener so it no longer receivesCARET
events when they occur.static void
Removes the specified listener so it no longer receivesCELLEDITOR
events when they occur.static void
Removes the specified listener so it no longer receivesCHANGE
events when they occur.static void
Removes the specified listener so it no longer receivesCOLUMNMODEL
events when they occur.static void
Removes the specified listener so it no longer receivesDOCUMENT
events when they occur.static void
Removes the specified listener so it no longer receivesINTERNALFRAME
events when they occur.static void
Removes the specified listener so it no longer receivesLISTDATA
events when they occur.static void
Removes the specified listener so it no longer receivesLISTSELECTION
events when they occur.static void
Removes the specified listener so it no longer receivesMENU
events when they occur.static void
Removes the specified listener so it no longer receivesPOPUPMENU
events when they occur.static void
Removes the specified listener so it no longer receivesPROPERTYCHANGE
events when they occur.static void
Removes the specified listener so it no longer receivesTABLEMODEL
events when they occur.static void
Removes the specified listener so it no longer receivesTREEEXPANSION
events when they occur.static void
Removes the specified listener so it no longer receivesTREEMODEL
events when they occur.static void
Removes the specified listener so it no longer receivesTREESELECTION
events when they occur.static void
Removes the specified listener so it no longer receivesUNDOABLEEDIT
events when they occur.static void
Removes the specified listener so it no longer receivesVETOABLECHANGE
events 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 allANCESTOR
events 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 receivesANCESTOR
events when they occur.- Parameters:
l
- the listener to remove- See Also:
-
addCaretListener
Adds the specified listener to receive allCARET
events 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 receivesCARET
events when they occur.- Parameters:
l
- the listener to remove- See Also:
-
addCellEditorListener
Adds the specified listener to receive allCELLEDITOR
events 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 receivesCELLEDITOR
events when they occur.- Parameters:
l
- the listener to remove- See Also:
-
addChangeListener
Adds the specified listener to receive allCHANGE
events 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 receivesCHANGE
events when they occur.- Parameters:
l
- the listener to remove- See Also:
-
addColumnModelListener
Adds the specified listener to receive allCOLUMNMODEL
events 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 receivesCOLUMNMODEL
events when they occur.- Parameters:
l
- the listener to remove- See Also:
-
addDocumentListener
Adds the specified listener to receive allDOCUMENT
events 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 receivesDOCUMENT
events when they occur.- Parameters:
l
- the listener to remove- See Also:
-
addListDataListener
Adds the specified listener to receive allLISTDATA
events 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 receivesLISTDATA
events when they occur.- Parameters:
l
- the listener to remove- See Also:
-
addListSelectionListener
Adds the specified listener to receive allLISTSELECTION
events 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 receivesLISTSELECTION
events when they occur.- Parameters:
l
- the listener to remove- See Also:
-
addMenuListener
Adds the specified listener to receive allMENU
events 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 receivesMENU
events when they occur.- Parameters:
l
- the listener to remove- See Also:
-
addPopupMenuListener
Adds the specified listener to receive allPOPUPMENU
events 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 receivesPOPUPMENU
events when they occur.- Parameters:
l
- the listener to remove- See Also:
-
addTableModelListener
Adds the specified listener to receive allTABLEMODEL
events 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 receivesTABLEMODEL
events when they occur.- Parameters:
l
- the listener to remove- See Also:
-
addTreeExpansionListener
Adds the specified listener to receive allTREEEXPANSION
events 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 receivesTREEEXPANSION
events when they occur.- Parameters:
l
- the listener to remove- See Also:
-
addTreeModelListener
Adds the specified listener to receive allTREEMODEL
events 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 receivesTREEMODEL
events when they occur.- Parameters:
l
- the listener to remove- See Also:
-
addTreeSelectionListener
Adds the specified listener to receive allTREESELECTION
events 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 receivesTREESELECTION
events when they occur.- Parameters:
l
- the listener to remove- See Also:
-
addUndoableEditListener
Adds the specified listener to receive allUNDOABLEEDIT
events 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 receivesUNDOABLEEDIT
events when they occur.- Parameters:
l
- the listener to remove- See Also:
-
addInternalFrameListener
Adds the specified listener to receive allINTERNALFRAME
events 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 receivesINTERNALFRAME
events when they occur.- Parameters:
l
- the listener to remove- See Also:
-
addPropertyChangeListener
Adds the specified listener to receive allPROPERTYCHANGE
events 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 receivesPROPERTYCHANGE
events when they occur.- Parameters:
l
- the listener to remove- See Also:
-
addVetoableChangeListener
Adds the specified listener to receive allVETOABLECHANGE
events 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 receivesVETOABLECHANGE
events when they occur.- Parameters:
l
- the listener to remove- See Also:
-