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:
AWTEventMonitor
-
Field Summary
Modifier and TypeFieldDescriptionprotected static 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(javax.swing.event.AncestorListener)
-
removeAncestorListener
Removes the specified listener so it no longer receivesANCESTOR
events when they occur.- Parameters:
l
- the listener to remove- See Also:
addAncestorListener(javax.swing.event.AncestorListener)
-
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(javax.swing.event.CaretListener)
-
removeCaretListener
Removes the specified listener so it no longer receivesCARET
events when they occur.- Parameters:
l
- the listener to remove- See Also:
addCaretListener(javax.swing.event.CaretListener)
-
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(javax.swing.event.CellEditorListener)
-
removeCellEditorListener
Removes the specified listener so it no longer receivesCELLEDITOR
events when they occur.- Parameters:
l
- the listener to remove- See Also:
addCellEditorListener(javax.swing.event.CellEditorListener)
-
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(javax.swing.event.ChangeListener)
-
removeChangeListener
Removes the specified listener so it no longer receivesCHANGE
events when they occur.- Parameters:
l
- the listener to remove- See Also:
addChangeListener(javax.swing.event.ChangeListener)
-
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(javax.swing.event.TableColumnModelListener)
-
removeColumnModelListener
Removes the specified listener so it no longer receivesCOLUMNMODEL
events when they occur.- Parameters:
l
- the listener to remove- See Also:
addColumnModelListener(javax.swing.event.TableColumnModelListener)
-
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(javax.swing.event.DocumentListener)
-
removeDocumentListener
Removes the specified listener so it no longer receivesDOCUMENT
events when they occur.- Parameters:
l
- the listener to remove- See Also:
addDocumentListener(javax.swing.event.DocumentListener)
-
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(javax.swing.event.ListDataListener)
-
removeListDataListener
Removes the specified listener so it no longer receivesLISTDATA
events when they occur.- Parameters:
l
- the listener to remove- See Also:
addListDataListener(javax.swing.event.ListDataListener)
-
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(javax.swing.event.ListSelectionListener)
-
removeListSelectionListener
Removes the specified listener so it no longer receivesLISTSELECTION
events when they occur.- Parameters:
l
- the listener to remove- See Also:
addListSelectionListener(javax.swing.event.ListSelectionListener)
-
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(javax.swing.event.MenuListener)
-
removeMenuListener
Removes the specified listener so it no longer receivesMENU
events when they occur.- Parameters:
l
- the listener to remove- See Also:
addMenuListener(javax.swing.event.MenuListener)
-
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(javax.swing.event.PopupMenuListener)
-
removePopupMenuListener
Removes the specified listener so it no longer receivesPOPUPMENU
events when they occur.- Parameters:
l
- the listener to remove- See Also:
addPopupMenuListener(javax.swing.event.PopupMenuListener)
-
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(javax.swing.event.TableModelListener)
-
removeTableModelListener
Removes the specified listener so it no longer receivesTABLEMODEL
events when they occur.- Parameters:
l
- the listener to remove- See Also:
addTableModelListener(javax.swing.event.TableModelListener)
-
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(javax.swing.event.TreeExpansionListener)
-
removeTreeExpansionListener
Removes the specified listener so it no longer receivesTREEEXPANSION
events when they occur.- Parameters:
l
- the listener to remove- See Also:
addTreeExpansionListener(javax.swing.event.TreeExpansionListener)
-
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(javax.swing.event.TreeModelListener)
-
removeTreeModelListener
Removes the specified listener so it no longer receivesTREEMODEL
events when they occur.- Parameters:
l
- the listener to remove- See Also:
addTreeModelListener(javax.swing.event.TreeModelListener)
-
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(javax.swing.event.TreeSelectionListener)
-
removeTreeSelectionListener
Removes the specified listener so it no longer receivesTREESELECTION
events when they occur.- Parameters:
l
- the listener to remove- See Also:
addTreeSelectionListener(javax.swing.event.TreeSelectionListener)
-
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(javax.swing.event.UndoableEditListener)
-
removeUndoableEditListener
Removes the specified listener so it no longer receivesUNDOABLEEDIT
events when they occur.- Parameters:
l
- the listener to remove- See Also:
addUndoableEditListener(javax.swing.event.UndoableEditListener)
-
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(javax.swing.event.InternalFrameListener)
-
removeInternalFrameListener
Removes the specified listener so it no longer receivesINTERNALFRAME
events when they occur.- Parameters:
l
- the listener to remove- See Also:
addInternalFrameListener(javax.swing.event.InternalFrameListener)
-
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(java.beans.PropertyChangeListener)
-
removePropertyChangeListener
Removes the specified listener so it no longer receivesPROPERTYCHANGE
events when they occur.- Parameters:
l
- the listener to remove- See Also:
addPropertyChangeListener(java.beans.PropertyChangeListener)
-
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(java.beans.VetoableChangeListener)
-
removeVetoableChangeListener
Removes the specified listener so it no longer receivesVETOABLECHANGE
events when they occur.- Parameters:
l
- the listener to remove- See Also:
addVetoableChangeListener(java.beans.VetoableChangeListener)
-