gecco.client
Class Symbols

java.lang.Object
  |
  +--gecco.client.Symbols

public class Symbols
extends Object

This class contains the symbols (Images) of the game. Every piece type should have a symbol. For every symbol added to the collection, a semi-transparent variant of the same symbol is created, used for ghost pieces.

Author:
Andreas Enblom

Field Summary
(package private) static Hashtable ghostSymbols
          The ghost symbols, hashed on type.
(package private) static Hashtable pieceSymbols
          The symbols, hashed on type.
 
Constructor Summary
Symbols()
           
 
Method Summary
static void addPieceSymbol(String type, Image image)
          Adds a symbol for the given piece type.
static Enumeration getAllPieceTypes()
          Gets the AllPieceTypes attribute of the Symbols class
static Image getGhostSymbol(String type)
          Return the ghost symbol of the given type, or NULL if there is no symbol for that type.
static Image getPieceSymbol(String type)
          Returns the symbol (Image) of the given type, or NULL if there is no symbol for that type.
static void removePieceSymbol(String type)
          Removes the symbol assigned to the given piece type (if any)..
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

pieceSymbols

static Hashtable pieceSymbols
The symbols, hashed on type.

ghostSymbols

static Hashtable ghostSymbols
The ghost symbols, hashed on type.
Constructor Detail

Symbols

public Symbols()
Method Detail

getPieceSymbol

public static Image getPieceSymbol(String type)
Returns the symbol (Image) of the given type, or NULL if there is no symbol for that type.
Parameters:
type - Description of Parameter
Returns:
The PieceSymbol value

getAllPieceTypes

public static Enumeration getAllPieceTypes()
Gets the AllPieceTypes attribute of the Symbols class
Returns:
The AllPieceTypes value

getGhostSymbol

public static Image getGhostSymbol(String type)
Return the ghost symbol of the given type, or NULL if there is no symbol for that type.
Parameters:
type - Description of Parameter
Returns:
The GhostSymbol value

addPieceSymbol

public static void addPieceSymbol(String type,
                                  Image image)
Adds a symbol for the given piece type. A semi-transparent (ghost) version of the image is produced.
Parameters:
type - The piece type.
image - The symbol of the piece type.

removePieceSymbol

public static void removePieceSymbol(String type)
Removes the symbol assigned to the given piece type (if any)..
Parameters:
type - Description of Parameter