hades.symbols
Class SymbolManager

java.lang.Object
  extended byhades.symbols.SymbolManager
All Implemented Interfaces:
java.io.Serializable

public class SymbolManager
extends java.lang.Object
implements java.io.Serializable

SymbolManager: a singleton class to manage the loading and caching of HADES SimObject's Symbols.

See Also:
Serialized Form

Method Summary
 java.util.Enumeration elements()
          elements(): return an Enumeration of all FigObjects in this SymbolManager
 void flushSymbolCache()
          flush the current Symbol's Cache.
 Symbol getSymbol(SimObject simObject)
          the default method to construct a Symbol for SimObject simObject located at the origin (0,0).
static SymbolManager getSymbolManager()
          accessor method to the singleton SymbolManager
 java.util.Enumeration keys()
           
 void message(java.lang.String msg)
           
 void setDebug(boolean _debug)
          set debug on/off
 java.lang.String toString()
          toString() - the usual info method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getSymbolManager

public static SymbolManager getSymbolManager()
accessor method to the singleton SymbolManager


getSymbol

public Symbol getSymbol(SimObject simObject)
the default method to construct a Symbol for SimObject simObject located at the origin (0,0). This method will put the constructed Symbol into an internal Hashtable, to avoid reparsing the Symbol description for subsequent calls to the same Symbol.

Currently, also unique Symbols, i.e. Symbols whose SimObjects return 'needsDynamicObject()' true, are entered into the Hashtable. It could be argued to construct and return those Symbols directly.


elements

public java.util.Enumeration elements()
elements(): return an Enumeration of all FigObjects in this SymbolManager


keys

public java.util.Enumeration keys()

flushSymbolCache

public void flushSymbolCache()
flush the current Symbol's Cache. You may have to call this method after you changed the graphical representation of some SimObjects and want new instances of that class to be displayed with their new Symbol.

Note, however, that this method won't change the appearance of instances already created!


setDebug

public void setDebug(boolean _debug)
set debug on/off


message

public void message(java.lang.String msg)

toString

public java.lang.String toString()
toString() - the usual info method