org.vizzini.game.event
Class StateManager

java.lang.Object
  extended by org.vizzini.util.event.AbstractManager
      extended by org.vizzini.game.event.StateManager

public class StateManager
extends AbstractManager

Provides a manager of state listeners and convenience methods for creating state events.

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

Constructor Summary
StateManager()
           
 
Method Summary
 void addStateListener(IStateListener listener)
          Add the given listener.
protected  void fireChange(IListener listener0, IEvent event0)
          Fire the given event to the given listener.
 void fireStateChange(IEnvironment source)
          Fire a state event.
 void fireStateChange(IEnvironment source, IAction action)
          Fire a state event with the given parameter.
 void fireStateChange(StateEvent event)
          Fire the given state event to all registered listeners.
 void removeStateListener(IStateListener listener)
          Remove the given listener.
 
Methods inherited from class org.vizzini.util.event.AbstractManager
addListener, fireChange, isFiringChanges, removeListener, setFiringChanges
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateManager

public StateManager()
Method Detail

addStateListener

public void addStateListener(IStateListener listener)
Add the given listener.

Since:
v0.1

fireStateChange

public void fireStateChange(IEnvironment source)
Fire a state event.

Since:
v0.1

fireStateChange

public void fireStateChange(IEnvironment source,
                            IAction action)
Fire a state event with the given parameter.

Parameters:
action - Action which caused this state change.
Since:
v0.1

fireStateChange

public void fireStateChange(StateEvent event)
Fire the given state event to all registered listeners.

Since:
v0.1

removeStateListener

public void removeStateListener(IStateListener listener)
Remove the given listener.

Since:
v0.1

fireChange

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

Specified by:
fireChange in class AbstractManager
Since:
v0.2


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02