org.vizzini.ui.game
Class EnvironmentUISupport

java.lang.Object
  extended by org.vizzini.ui.game.EnvironmentUISupport
All Implemented Interfaces:
IScoreListener, IStateListener, IEnvironmentUI, IListener

public class EnvironmentUISupport
extends Object
implements IEnvironmentUI

Provides base functionality for environment user interfaces in the game framework.

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

Constructor Summary
EnvironmentUISupport()
           
 
Method Summary
 void assignAgentListeners(Iterator agentIterator)
          Assign listeners using the given agents.
 void configure(Properties properties)
          Configure this environment.
 IEnvironment getEnvironment()
          Return the environment this UI represents.
 Properties getProperties()
           
 boolean isAudioOn()
          Return true if audio is on.
 void removeAgentListeners(Iterator agentIterator)
          Remove the given agents as listeners.
 void reset()
          Reset.
 void scoreChange(ScoreEvent event)
          Respond to score change events.
 void setAudioOn(boolean isAudioOn)
          Set the audio on flag.
 void setEnvironment(IEnvironment environment)
          Set the environment this UI represents.
 void stateChange(StateEvent event)
          Respond to state change events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnvironmentUISupport

public EnvironmentUISupport()
Method Detail

assignAgentListeners

public void assignAgentListeners(Iterator agentIterator)
Assign listeners using the given agents.

Specified by:
assignAgentListeners in interface IEnvironmentUI
Parameters:
agentIterator - Agent iterator.
Since:
v0.1

configure

public void configure(Properties properties)
               throws InstantiationException,
                      IllegalAccessException
Configure this environment.

Specified by:
configure in interface IEnvironmentUI
Parameters:
properties - Source of configuration information.
Throws:
InstantiationException
IllegalAccessException
Since:
v0.3

getEnvironment

public IEnvironment getEnvironment()
Return the environment this UI represents.

Specified by:
getEnvironment in interface IEnvironmentUI
Since:
v0.1

getProperties

public Properties getProperties()
Returns:
Return properties.
Since:
v0.3

isAudioOn

public boolean isAudioOn()
Return true if audio is on.

Specified by:
isAudioOn in interface IEnvironmentUI
Since:
v0.1

removeAgentListeners

public void removeAgentListeners(Iterator agentIterator)
Remove the given agents as listeners.

Specified by:
removeAgentListeners in interface IEnvironmentUI
Parameters:
agentIterator - Agent iterator.
Since:
v0.1

reset

public void reset()
Reset.

Specified by:
reset in interface IEnvironmentUI
Since:
v0.1

scoreChange

public void scoreChange(ScoreEvent event)
Respond to score change events.

Specified by:
scoreChange in interface IScoreListener
Since:
v0.1

setAudioOn

public void setAudioOn(boolean isAudioOn)
Set the audio on flag.

Specified by:
setAudioOn in interface IEnvironmentUI
Since:
v0.1

setEnvironment

public void setEnvironment(IEnvironment environment)
Set the environment this UI represents.

Specified by:
setEnvironment in interface IEnvironmentUI
Parameters:
environment - Environment.
Since:
v0.1

stateChange

public void stateChange(StateEvent event)
Respond to state change events.

Specified by:
stateChange in interface IStateListener
Parameters:
event - State event.
Since:
v0.1


Copyright © 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02