org.vizzini.util.event
Class AbstractManager

java.lang.Object
  extended by org.vizzini.util.event.AbstractManager
Direct Known Subclasses:
ActionReceivedManager, BusyManager, ConcedeManager, GameManager, ScoreManager, StateManager, StatusManager

public abstract class AbstractManager
extends Object

Provides base functionality for a manager of listeners.

Since:
v0.2
Version:
v0.2
Author:
Jeffrey M. Thompson

Constructor Summary
AbstractManager()
           
 
Method Summary
protected  void addListener(IListener listener)
          Add the given listener.
protected  void fireChange(IEvent event)
          Fire the given event to all registered listeners.
protected abstract  void fireChange(IListener listener, IEvent event)
          Fire the given event to the given listener.
 boolean isFiringChanges()
          Return true if this is set to fire change events.
protected  void removeListener(IListener listener)
          Remove the given listener.
 void setFiringChanges(boolean fire)
          Set the flag which indicates whether to fire change events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractManager

public AbstractManager()
Method Detail

setFiringChanges

public void setFiringChanges(boolean fire)
Set the flag which indicates whether to fire change events.

Since:
v0.2

isFiringChanges

public boolean isFiringChanges()
Return true if this is set to fire change events.

Since:
v0.2

fireChange

protected void fireChange(IEvent event)
Fire the given event to all registered listeners.

Since:
v0.2

fireChange

protected abstract void fireChange(IListener listener,
                                   IEvent event)
Fire the given event to the given listener.

Since:
v0.2

addListener

protected void addListener(IListener listener)
Add the given listener.

Since:
v0.2

removeListener

protected void removeListener(IListener listener)
Remove the given listener.

Since:
v0.2


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02