Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.flexstor.common.awt
Class ActionMulticaster  view ActionMulticaster download ActionMulticaster.java

java.lang.Object
  extended bycom.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.


Field Summary
private  java.awt.event.ActionListener[] listeners
           
 
Constructor Summary
ActionMulticaster()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          This method is invoked when an action occurs.
 void add(java.awt.event.ActionListener listener)
           
 void dispatch(java.awt.event.ActionEvent e)
          High speed dispatcher that does not need to be synchronized.
 int find(java.awt.event.ActionListener listener)
          Simple list management that avoids synchronized/functional interface of Vector.
 boolean hasListeners()
          High speed test to see if any listeners present.
 void remove(java.awt.event.ActionListener listener)
           
 void removeAll()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listeners

private java.awt.event.ActionListener[] listeners
Constructor Detail

ActionMulticaster

public ActionMulticaster()
Method Detail

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()