spellcast.client
Class Client

java.lang.Object
  extended by spellcast.client.Client
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener, SpellcastView

public class Client
extends java.lang.Object
implements SpellcastView, java.beans.PropertyChangeListener

The Client class for Spellcast. This is a Facade View. It accepts user input via property change events and forwards the corresponding network event to the ClientConnectionHandler. All network input is received by the ClientConnectionHandler and dispatched to this class via SpellcastView calls. If a gui has been installed then the gui is notified of all SpellcastView calls.

Author:
Barrie Treloar

Field Summary
static VersionDetails programVersionDetails
           
 
Constructor Summary
Client()
           
 
Method Summary
 void addMessage(java.lang.String message)
          Add a message to the view.
 void addQuery(Question query)
          Add a query to the view.
 void addWizard(IWizard w)
          Add a wizard to the view.
 void connected(boolean success)
          Indicate that the system has connected to a Spellcast server.
 void createGUI()
           
 void disconnected()
          Indicate that the system has disconnected from a Spellcast server.
 void propertyChange(java.beans.PropertyChangeEvent evt)
          Listen for property changes from the GUI
 void removeWizard(IWizard w)
          Remove a wizard from the view.
 void setGame(Game v)
          Set the value of the current Game.
 void setID(Id v)
          Set the value of id.
 void setVisible(boolean visible)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

programVersionDetails

public static final VersionDetails programVersionDetails
Constructor Detail

Client

public Client()
Method Detail

createGUI

public void createGUI()

setVisible

public void setVisible(boolean visible)

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Listen for property changes from the GUI

Specified by:
propertyChange in interface java.beans.PropertyChangeListener

addMessage

public void addMessage(java.lang.String message)
Add a message to the view.

Specified by:
addMessage in interface SpellcastView

addQuery

public void addQuery(Question query)
Add a query to the view.

Specified by:
addQuery in interface SpellcastView

addWizard

public void addWizard(IWizard w)
Add a wizard to the view.

Specified by:
addWizard in interface SpellcastView

removeWizard

public void removeWizard(IWizard w)
Remove a wizard from the view.

Specified by:
removeWizard in interface SpellcastView

connected

public void connected(boolean success)
Indicate that the system has connected to a Spellcast server. A successful connection will pass true, otherwise false is used.

Specified by:
connected in interface SpellcastView
Parameters:
success - indicates whether the connection was success (true), or unsuccessful (false)

disconnected

public void disconnected()
Indicate that the system has disconnected from a Spellcast server.

Specified by:
disconnected in interface SpellcastView

setID

public void setID(Id v)
Set the value of id.

Specified by:
setID in interface SpellcastView
Parameters:
v - Value to assign to id.

setGame

public void setGame(Game v)
Set the value of the current Game.

Specified by:
setGame in interface SpellcastView
Parameters:
v - Value to assign to game.


Copyright © 2001-2005 Spellcast. All Rights Reserved.