org.vizzini.ui.game
Class GameUISupport

java.lang.Object
  extended by org.vizzini.ui.game.GameUISupport
All Implemented Interfaces:
IConcedeListener, IGameListener, IStateListener, IGameUI, IBusyListener, IListener

public class GameUISupport
extends Object
implements IGameUI

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

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

Constructor Summary
GameUISupport(IGameUI owner, String propertiesFilename)
          Construct this object.
 
Method Summary
 void busy(BusyEvent event)
          Respond to busy events.
 void concede(ConcedeEvent event)
          Respond to concede events.
protected  IEnvironmentUI createEnvironmentUI(Properties properties)
          Create the environment UI.
protected  IGame createGame(Properties properties)
          Create the game.
 void gameChange(GameEvent event)
          Respond to game events.
 IEnvironmentUI getEnvironmentUI()
          Return the environment user interface component.
 IGame getGame()
          Return the game component.
 Properties getProperties()
          Return the configuration properties.
 void init()
          Initialize this applet.
 void start()
          Start this applet.
 void stateChange(StateEvent event)
          Respond to state events.
 void stop()
          Stop this applet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GameUISupport

public GameUISupport(IGameUI owner,
                     String propertiesFilename)
Construct this object.

Since:
v0.1
Method Detail

busy

public void busy(BusyEvent event)
Respond to busy events.

Specified by:
busy in interface IBusyListener
Since:
v0.1

concede

public void concede(ConcedeEvent event)
Respond to concede events.

Specified by:
concede in interface IConcedeListener
Since:
v0.1

gameChange

public void gameChange(GameEvent event)
Respond to game events.

Specified by:
gameChange in interface IGameListener
Since:
v0.1

getEnvironmentUI

public IEnvironmentUI getEnvironmentUI()
Return the environment user interface component.

Specified by:
getEnvironmentUI in interface IGameUI
Since:
v0.1

getGame

public IGame getGame()
Return the game component.

Specified by:
getGame in interface IGameUI
Since:
v0.1

getProperties

public Properties getProperties()
Return the configuration properties.

Since:
v0.1

init

public void init()
Initialize this applet.

Specified by:
init in interface IGameUI
Since:
v0.1

start

public void start()
Start this applet.

Specified by:
start in interface IGameUI
Since:
v0.1

stateChange

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

Specified by:
stateChange in interface IStateListener
Since:
v0.2

stop

public void stop()
Stop this applet.

Since:
v0.1

createEnvironmentUI

protected IEnvironmentUI createEnvironmentUI(Properties properties)
                                      throws InstantiationException,
                                             IllegalAccessException
Create the environment UI.

Parameters:
properties - Source of environment UI information.
Throws:
InstantiationException
IllegalAccessException
Since:
v0.1

createGame

protected IGame createGame(Properties properties)
                    throws InstantiationException,
                           IllegalAccessException
Create the game.

Parameters:
properties - Source of game information.
Throws:
InstantiationException
IllegalAccessException
Since:
v0.1


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02