public class SwingEventMonitor extends AWTEventMonitor
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.
| Modifier and Type | Field | Description |
|---|---|---|
protected static final EventListenerList |
listenerList |
The master list of all listeners registered by other classes. |
| Constructor | Description |
|---|---|
SwingEventMonitor() |
Constructs a SwingEventMonitor. |
| Modifier and Type | Method | Description |
|---|---|---|
static void |
addAncestorListener |
Adds the specified listener to receive all ANCESTOR events on each component instance in the Java Virtual Machine as they occur. |
static void |
addCaretListener |
Adds the specified listener to receive all CARET events on each component instance in the Java Virtual Machine as they occur. |
static void |
addCellEditorListener |
Adds the specified listener to receive all CELLEDITOR events on each component instance in the Java Virtual Machine as they occur. |
static void |
addChangeListener |
Adds the specified listener to receive all CHANGE events on each component instance in the Java Virtual Machine as they occur. |
static void |
addColumnModelListener |
Adds the specified listener to receive all COLUMNMODEL events on each component instance in the Java Virtual Machine as they occur. |
static void |
addDocumentListener |
Adds the specified listener to receive all DOCUMENT events on each component instance in the Java Virtual Machine as they occur. |
static void |
addInternalFrameListener |
Adds the specified listener to receive all INTERNALFRAME events on each component instance in the Java Virtual Machine as they occur. |
static void |
addListDataListener |
Adds the specified listener to receive all LISTDATA events on each component instance in the Java Virtual Machine as they occur. |
static void |
addListSelectionListener |
Adds the specified listener to receive all LISTSELECTION events on each component instance in the Java Virtual Machine as they occur. |
static void |
addMenuListener |
Adds the specified listener to receive all MENU events on each component instance in the Java Virtual Machine as they occur. |
static void |
addPopupMenuListener |
Adds the specified listener to receive all POPUPMENU events on each component instance in the Java Virtual Machine as they occur. |
static void |
addPropertyChangeListener |
Adds the specified listener to receive all PROPERTYCHANGE events on each component instance in the Java Virtual Machine as they occur. |
static void |
addTableModelListener |
Adds the specified listener to receive all TABLEMODEL events on each component instance in the Java Virtual Machine as they occur. |
static void |
addTreeExpansionListener |
Adds the specified listener to receive all TREEEXPANSION events on each component instance in the Java Virtual Machine as they occur. |
static void |
addTreeModelListener |
Adds the specified listener to receive all TREEMODEL events on each component instance in the Java Virtual Machine as they occur. |
static void |
addTreeSelectionListener |
Adds the specified listener to receive all TREESELECTION events on each component instance in the Java Virtual Machine as they occur. |
static void |
addUndoableEditListener |
Adds the specified listener to receive all UNDOABLEEDIT events on each component instance in the Java Virtual Machine as they occur. |
static void |
addVetoableChangeListener |
Adds the specified listener to receive all VETOABLECHANGE events on each component instance in the Java Virtual Machine as they occur. |
static void |
removeAncestorListener |
Removes the specified listener so it no longer receives ANCESTOR events when they occur. |
static void |
removeCaretListener |
Removes the specified listener so it no longer receives CARET events when they occur. |
static void |
removeCellEditorListener |
Removes the specified listener so it no longer receives CELLEDITOR events when they occur. |
static void |
removeChangeListener |
Removes the specified listener so it no longer receives CHANGE events when they occur. |
static void |
removeColumnModelListener |
Removes the specified listener so it no longer receives COLUMNMODEL events when they occur. |
static void |
removeDocumentListener |
Removes the specified listener so it no longer receives DOCUMENT events when they occur. |
static void |
removeInternalFrameListener |
Removes the specified listener so it no longer receives INTERNALFRAME events when they occur. |
static void |
removeListDataListener |
Removes the specified listener so it no longer receives LISTDATA events when they occur. |
static void |
removeListSelectionListener |
Removes the specified listener so it no longer receives LISTSELECTION events when they occur. |
static void |
removeMenuListener |
Removes the specified listener so it no longer receives MENU events when they occur. |
static void |
removePopupMenuListener |
Removes the specified listener so it no longer receives POPUPMENU events when they occur. |
static void |
removePropertyChangeListener |
Removes the specified listener so it no longer receives PROPERTYCHANGE events when they occur. |
static void |
removeTableModelListener |
Removes the specified listener so it no longer receives TABLEMODEL events when they occur. |
static void |
removeTreeExpansionListener |
Removes the specified listener so it no longer receives TREEEXPANSION events when they occur. |
static void |
removeTreeModelListener |
Removes the specified listener so it no longer receives TREEMODEL events when they occur. |
static void |
removeTreeSelectionListener |
Removes the specified listener so it no longer receives TREESELECTION events when they occur. |
static void |
removeUndoableEditListener |
Removes the specified listener so it no longer receives UNDOABLEEDIT events when they occur. |
static void |
removeVetoableChangeListener |
Removes the specified listener so it no longer receives VETOABLECHANGE events when they occur. |
addActionListener, addAdjustmentListener, addComponentListener, addContainerListener, addFocusListener, addItemListener, addKeyListener, addMouseListener, addMouseMotionListener, addTextListener, addWindowListener, getComponentWithFocus, removeActionListener, removeAdjustmentListener, removeComponentListener, removeContainerListener, removeFocusListener, removeItemListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeTextListener, removeWindowListener
protected static final EventListenerList listenerList
public SwingEventMonitor()
SwingEventMonitor.public static void addAncestorListener(AncestorListener l)
ANCESTOR 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.
l - the listener to addpublic static void removeAncestorListener(AncestorListener l)
ANCESTOR events when they occur.l - the listener to removepublic static void addCaretListener(CaretListener l)
CARET 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.
l - the listener to addpublic static void removeCaretListener(CaretListener l)
CARET events when they occur.l - the listener to removepublic static void addCellEditorListener(CellEditorListener l)
CELLEDITOR 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.
l - the listener to addpublic static void removeCellEditorListener(CellEditorListener l)
CELLEDITOR events when they occur.l - the listener to removepublic static void addChangeListener(ChangeListener l)
CHANGE 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.
l - the listener to addpublic static void removeChangeListener(ChangeListener l)
CHANGE events when they occur.l - the listener to removepublic static void addColumnModelListener(TableColumnModelListener l)
COLUMNMODEL 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.
l - the listener to addpublic static void removeColumnModelListener(TableColumnModelListener l)
COLUMNMODEL events when they occur.l - the listener to removepublic static void addDocumentListener(DocumentListener l)
DOCUMENT 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.
l - the listener to addpublic static void removeDocumentListener(DocumentListener l)
DOCUMENT events when they occur.l - the listener to removepublic static void addListDataListener(ListDataListener l)
LISTDATA 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.
l - the listener to addpublic static void removeListDataListener(ListDataListener l)
LISTDATA events when they occur.l - the listener to removepublic static void addListSelectionListener(ListSelectionListener l)
LISTSELECTION 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.
l - the listener to addpublic static void removeListSelectionListener(ListSelectionListener l)
LISTSELECTION events when they occur.l - the listener to removepublic static void addMenuListener(MenuListener l)
MENU 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.
l - the listener to addpublic static void removeMenuListener(MenuListener l)
MENU events when they occur.l - the listener to removepublic static void addPopupMenuListener(PopupMenuListener l)
POPUPMENU 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.
l - the listener to addpublic static void removePopupMenuListener(PopupMenuListener l)
POPUPMENU events when they occur.l - the listener to removepublic static void addTableModelListener(TableModelListener l)
TABLEMODEL 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.
l - the listener to addpublic static void removeTableModelListener(TableModelListener l)
TABLEMODEL events when they occur.l - the listener to removepublic static void addTreeExpansionListener(TreeExpansionListener l)
TREEEXPANSION 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.
l - the listener to addpublic static void removeTreeExpansionListener(TreeExpansionListener l)
TREEEXPANSION events when they occur.l - the listener to removepublic static void addTreeModelListener(TreeModelListener l)
TREEMODEL 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.
l - the listener to addpublic static void removeTreeModelListener(TreeModelListener l)
TREEMODEL events when they occur.l - the listener to removepublic static void addTreeSelectionListener(TreeSelectionListener l)
TREESELECTION 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.
l - the listener to addpublic static void removeTreeSelectionListener(TreeSelectionListener l)
TREESELECTION events when they occur.l - the listener to removepublic static void addUndoableEditListener(UndoableEditListener l)
UNDOABLEEDIT 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.
l - the listener to addpublic static void removeUndoableEditListener(UndoableEditListener l)
UNDOABLEEDIT events when they occur.l - the listener to removepublic static void addInternalFrameListener(InternalFrameListener l)
INTERNALFRAME 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.
l - the listener to addpublic static void removeInternalFrameListener(InternalFrameListener l)
INTERNALFRAME events when they occur.l - the listener to removepublic static void addPropertyChangeListener(PropertyChangeListener l)
PROPERTYCHANGE 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.
l - the listener to addpublic static void removePropertyChangeListener(PropertyChangeListener l)
PROPERTYCHANGE events when they occur.l - the listener to removepublic static void addVetoableChangeListener(VetoableChangeListener l)
VETOABLECHANGE 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.
l - the listener to addpublic static void removeVetoableChangeListener(VetoableChangeListener l)
VETOABLECHANGE events when they occur.l - the listener to remove
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/jdk.accessibility/com/sun/java/accessibility/util/SwingEventMonitor.html