au.edu.jcu.hermes.util
Class ListenerContainer

java.lang.Object
  extended by au.edu.jcu.hermes.util.ListenerContainer
All Implemented Interfaces:
IEventDispatcher
Direct Known Subclasses:
ProgressModel

public class ListenerContainer
extends java.lang.Object
implements IEventDispatcher

Author: Mathew Wyatt Organisation: James Cook University Date: Jul 31, 2007 Time: 3:12:39 AM


Constructor Summary
ListenerContainer()
           
 
Method Summary
 void addListener(java.lang.String listenerString, java.awt.event.ActionListener actionListener)
          Adds a listener to the listener group based on a supplied group name
 void invoke(java.awt.event.ActionEvent event, java.lang.String listenerString)
          Invokes a group of listeners based on a supplied group name, and the event
 void invoke(java.lang.String listenerString)
          Invokes a group of listeners based on a supplied group name
 void removeListener(java.lang.String listenerString, java.awt.event.ActionListener actionListener)
          Removes a listener from a listener group based on a supplied group name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListenerContainer

public ListenerContainer()
Method Detail

addListener

public void addListener(java.lang.String listenerString,
                        java.awt.event.ActionListener actionListener)
Adds a listener to the listener group based on a supplied group name

Specified by:
addListener in interface IEventDispatcher
Parameters:
listenerString -
actionListener -

removeListener

public void removeListener(java.lang.String listenerString,
                           java.awt.event.ActionListener actionListener)
                    throws InvalidListenerGroupException,
                           InvalidListenerException
Removes a listener from a listener group based on a supplied group name

Specified by:
removeListener in interface IEventDispatcher
Parameters:
listenerString -
actionListener -
Throws:
InvalidListenerGroupException
InvalidListenerException

invoke

public void invoke(java.lang.String listenerString)
            throws InvalidListenerGroupException
Invokes a group of listeners based on a supplied group name

Specified by:
invoke in interface IEventDispatcher
Parameters:
listenerString -
Throws:
InvalidListenerGroupException

invoke

public void invoke(java.awt.event.ActionEvent event,
                   java.lang.String listenerString)
            throws InvalidListenerGroupException
Invokes a group of listeners based on a supplied group name, and the event

Specified by:
invoke in interface IEventDispatcher
Parameters:
listenerString -
Throws:
InvalidListenerGroupException