org.vizzini.game.boardgame.chess.event
Class CheckManager

java.lang.Object
  extended by org.vizzini.game.boardgame.chess.event.CheckManager

public class CheckManager
extends Object

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

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

Constructor Summary
CheckManager()
           
 
Method Summary
 void addCheckListener(ICheckListener listener)
          Add the given listener.
 void fireCheck()
          Fire a check event.
 void fireCheck(CheckEvent event)
          Fire the given state event to all registered listeners.
 void fireCheck(IAgent agent)
          Fire a check event with the given parameter.
 boolean hasListeners()
          Return true if this has registed listeners.
 boolean isFiringChecks()
          Return true if this is set to fire check events.
 void removeCheckListener(ICheckListener listener)
          Remove the given listener.
 void setFiringChecks(boolean fire)
          Set the flag which indicates whether to fire check events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckManager

public CheckManager()
Method Detail

addCheckListener

public void addCheckListener(ICheckListener listener)
Add the given listener.

Since:
v0.3

fireCheck

public void fireCheck()
Fire a check event.

Since:
v0.3

fireCheck

public void fireCheck(IAgent agent)
Fire a check event with the given parameter.

Parameters:
agent - Agent who is in check.
Since:
v0.3

fireCheck

public void fireCheck(CheckEvent event)
Fire the given state event to all registered listeners.

Since:
v0.3

hasListeners

public boolean hasListeners()
Return true if this has registed listeners.

Since:
v0.3

isFiringChecks

public boolean isFiringChecks()
Return true if this is set to fire check events.

Since:
v0.3

removeCheckListener

public void removeCheckListener(ICheckListener listener)
Remove the given listener.

Since:
v0.3

setFiringChecks

public void setFiringChecks(boolean fire)
Set the flag which indicates whether to fire check events.

Since:
v0.3


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02