java.lang.Object
com.flexstor.common.awt.ActionMulticaster
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.util.EventListener
- public class ActionMulticaster
- extends java.lang.Object
- implements java.awt.event.ActionListener
Acts as an ActionListener and propagates action events to its own
registered listeners.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
listeners
private java.awt.event.ActionListener[] listeners
ActionMulticaster
public ActionMulticaster()
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Description copied from interface:
java.awt.event.ActionListener
- This method is invoked when an action occurs.
- Specified by:
actionPerformed in interface java.awt.event.ActionListener
hasListeners
public final boolean hasListeners()
- High speed test to see if any listeners present.
dispatch
public final void dispatch(java.awt.event.ActionEvent e)
- High speed dispatcher that does not need to be synchronized.
find
public int find(java.awt.event.ActionListener listener)
- Simple list management that avoids synchronized/functional interface of Vector. Key to this
implementation is that all changes are made to a "copy" of the original list. This allows
for non-synchronized access of listners when event dispatch is called.
add
public final void add(java.awt.event.ActionListener listener)
remove
public final void remove(java.awt.event.ActionListener listener)
removeAll
public final void removeAll()