ks.client.interfaces
Interface ITableGUI


public interface ITableGUI

Interface for a graphical representation of a Kombat Solitaire table on the client. Note the addition of processMessage enables messages to be properly processed within the solitaire plugin that have originated from the server.


Method Summary
 void activate(boolean status)
          Activate/Deactivate this game.
 void addUserToTable(java.lang.String newUser)
          Add user to the table.
 void initialize(Solitaire game)
          Initialize game canvas using specific solitaire game.
 void processChat(java.lang.String msg)
          Send chat output to the output Field.
 void processMessage(Message msg)
          Message has arrived from Server that may require processing.
 void processStatusTick(java.lang.String player, int numWon, int numPoints)
          Update information for this user on the player rankings panel.
 void removeUserFromTable(java.lang.String exitingUser)
          Removes user from this table.
 void setRequester(ITableRequests requester)
          Determine the entity to whom Table GUI objects communicate.
 void setTable(Table newTable)
          Keep track of the table to be able to answer useful questions later.
 void setUser(java.lang.String user)
          Sets the name of the user for this Game.
 void setVisible(boolean b)
          Determine visibility of the Table GUI.
 void terminateGame()
          Terminate the game (possibly prematurely).
 

Method Detail

addUserToTable

public void addUserToTable(java.lang.String newUser)
Add user to the table.

Parameters:
newUser -

activate

public void activate(boolean status)
Activate/Deactivate this game. Note: To set this to false means the timer has run out (from within) and we must contact the server To set this to true means we are starting a new game.

Parameters:
status - boolean

processChat

public void processChat(java.lang.String msg)
Send chat output to the output Field.

Parameters:
msg - java.lang.String

setUser

public void setUser(java.lang.String user)
Sets the name of the user for this Game.

Parameters:
user - java.lang.String

setTable

public void setTable(Table newTable)
Keep track of the table to be able to answer useful questions later.

Parameters:
newTable - ks.common.Table

initialize

public void initialize(Solitaire game)
Initialize game canvas using specific solitaire game. Called by the entity that creates the GameWindow. Must be called before setting GameWindow to Visible.

since v1.6.2 this enables a button "Solve" if the solitaire game is an instance of SolvableSolitaire.

Parameters:
game - Solitaire

processMessage

public void processMessage(Message msg)
Message has arrived from Server that may require processing.

Parameters:
msg - Message object from Server.
Since:
V2.2

processStatusTick

public void processStatusTick(java.lang.String player,
                              int numWon,
                              int numPoints)
Update information for this user on the player rankings panel.

Parameters:
player - java.lang.String
numWon - int
numPoints - int

removeUserFromTable

public void removeUserFromTable(java.lang.String exitingUser)
Removes user from this table.

Parameters:
exitingUser - Status

terminateGame

public void terminateGame()
Terminate the game (possibly prematurely).

Since:
V2.2.1

setRequester

public void setRequester(ITableRequests requester)
Determine the entity to whom Table GUI objects communicate.

Parameters:
requester - Entity to whom requests can be directed.

setVisible

public void setVisible(boolean b)
Determine visibility of the Table GUI.

Parameters:
b -