VASSAL.build.module
Class EventLog
java.lang.Object
|
+--VASSAL.build.AbstractBuildable
|
+--VASSAL.build.module.EventLog
- All Implemented Interfaces:
- Buildable, CommandEncoder, GameComponent, ValidityChecker
- public class EventLog
- extends AbstractBuildable
- implements CommandEncoder, GameComponent
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EVENT_LIST
public static final java.lang.String EVENT_LIST
EventLog
public EventLog()
addTo
public void addTo(Buildable b)
- Description copied from interface:
Buildable
- Adds this component to its parent.
In order to make Buildable objects extensible, the child
is reponsible for adding itself to the parent. That way,
Buildable subcomponents can be defined in an extension package
without needing to modify the containing class.
clearSaved
public void clearSaved()
store
public void store(EventLog.Event e)
log
public void log(EventLog.Event e)
decode
public Command decode(java.lang.String s)
- Description copied from interface:
CommandEncoder
- Translate a String into a
Command
- Specified by:
decode in interface CommandEncoder
encode
public java.lang.String encode(Command c)
- Description copied from interface:
CommandEncoder
- Translate a
Command into a String
- Specified by:
encode in interface CommandEncoder
setup
public void setup(boolean starting)
- Description copied from interface:
GameComponent
- Notify the GameComponent that a game has started/ended
- Specified by:
setup in interface GameComponent
- Following copied from interface:
VASSAL.build.module.GameComponent
- Parameters:
gameStarting - if true, a game is starting. If false, then a game is ending
getRestoreCommand
public Command getRestoreCommand()
- Description copied from interface:
GameComponent
- When saving a game, each GameComponent should return a
Command that, when executed, restores the GameComponent to its
state when the game was saved
If this component has no persistent state, return null
- Specified by:
getRestoreCommand in interface GameComponent
decodeEvents
public static java.util.Enumeration decodeEvents(java.lang.String s)
encodeEvents
public static java.lang.String encodeEvents(java.util.Enumeration e)
getAttributeNames
public java.lang.String[] getAttributeNames()
- Overrides:
getAttributeNames in class AbstractBuildable
- Following copied from class:
VASSAL.build.AbstractBuildable
- Returns:
- a list of all attribute names for this component
setAttribute
public void setAttribute(java.lang.String name,
java.lang.Object value)
- Description copied from class:
AbstractBuildable
- Sets an attribute value for this component. The
key
parameter will be one of those listed in AbstractBuildable.getAttributeNames().
If the value parameter is a String, it will be the
value returned by AbstractBuildable.getAttributeValueString(java.lang.String) for the same
key. If the implementing class extends
AbstractConfigurable, then value will be
an instance of the corresponding Class listed in
AbstractConfigurable.getAttributeTypes()
- Overrides:
setAttribute in class AbstractBuildable
- Following copied from class:
VASSAL.build.AbstractBuildable
- Parameters:
key - the name of the attribute. Will be one of those
listed in AbstractBuildable.getAttributeNames()
getAttributeValueString
public java.lang.String getAttributeValueString(java.lang.String name)
- Description copied from class:
AbstractBuildable
- Return a String representation of the attribute with the given name.
When initializing a module, this String value will be passed to
AbstractBuildable.setAttribute(java.lang.String, java.lang.Object).
- Overrides:
getAttributeValueString in class AbstractBuildable
- Following copied from class:
VASSAL.build.AbstractBuildable
- Parameters:
key - the name of the attribute. Will be one of those
listed in AbstractBuildable.getAttributeNames()