Class EventLog
java.lang.Object
VASSAL.search.AbstractImageFinder
VASSAL.build.AbstractBuildable
VASSAL.build.module.EventLog
- All Implemented Interfaces:
Buildable
,GameComponent
,PropertyNameSource
,CommandEncoder
,ValidityChecker
,Auditable
,ImageSearchTarget
-
Nested Class Summary
-
Field Summary
Fields inherited from class VASSAL.build.AbstractBuildable
buildComponents, validator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds this component to its parent.void
Translate a String into aCommand
static Iterable
<EventLog.Event> Decodes aString
into a sequence ofEvent
s.Translate aCommand
into a Stringstatic String
encodedEvents
(Iterable<EventLog.Event> events) Encodes a sequence ofEvent
s into aString
.String[]
Lists all the buildFile (XML) attribute names for this component.When saving a game, each GameComponent should return aCommand
that, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return nullvoid
void
setAttribute
(String name, Object value) Sets a buildFile (XML) attribute value for this component.void
setup
(boolean starting) Notify the GameComponent that a game has started/endedvoid
Methods inherited from class VASSAL.build.AbstractBuildable
add, addImageNamesRecursively, build, buildString, getAllDescendantComponentsOf, getAncestor, getBuildables, getBuildComponents, getBuildElement, getComponents, getComponentsOf, getNonFolderAncestor, getPropertyNames, setAncestor, validate
Methods inherited from class VASSAL.search.AbstractImageFinder
addLocalImageNames, getAllImageNames, getLocalImageNames
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface VASSAL.script.expression.Auditable
getComponentName, getComponentTypeName
Methods inherited from interface VASSAL.build.Buildable
isMandatory, isMovable, isUnique
-
Field Details
-
EVENT_LIST
- See Also:
-
-
Constructor Details
-
EventLog
public EventLog()
-
-
Method Details
-
addTo
Description copied from interface:Buildable
Adds this component to its parent. In order to make Buildable objects extensible, the child is responsible 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
-
log
-
decode
Description copied from interface:CommandEncoder
Translate a String into aCommand
- Specified by:
decode
in interfaceCommandEncoder
-
encode
Description copied from interface:CommandEncoder
Translate aCommand
into a String- Specified by:
encode
in interfaceCommandEncoder
-
setup
public void setup(boolean starting) Description copied from interface:GameComponent
Notify the GameComponent that a game has started/ended- Specified by:
setup
in interfaceGameComponent
- Parameters:
starting
- if true, a game is starting. If false, then a game is ending
-
getRestoreCommand
Description copied from interface:GameComponent
When saving a game, each GameComponent should return aCommand
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 interfaceGameComponent
-
decodedEvents
Decodes aString
into a sequence ofEvent
s.- Parameters:
s
- the event string- Returns:
- the events represented by the string
-
encodedEvents
Encodes a sequence ofEvent
s into aString
.- Parameters:
events
- the sequence of events- Returns:
- the string representing the events
-
getAttributeNames
Description copied from class:AbstractBuildable
Lists all the buildFile (XML) attribute names for this component. If this component is ALSO anAbstractConfigurable
, then this list of attributes determines the appropriate attribute order forAbstractConfigurable.getAttributeDescriptions()
andAbstractConfigurable.getAttributeTypes()
.- Specified by:
getAttributeNames
in classAbstractBuildable
- Returns:
- a list of all buildFile (XML) attribute names for this component
-
setAttribute
Description copied from class:AbstractBuildable
Sets a buildFile (XML) attribute value for this component. Thekey
parameter will be one of those listed inAbstractBuildable.getAttributeNames()
. If thevalue
parameter is a String, it will be the value returned byAbstractBuildable.getAttributeValueString(java.lang.String)
for the samekey
. If the implementing class extendsAbstractConfigurable
, thenvalue
will be an instance of the corresponding Class listed inAbstractConfigurable.getAttributeTypes()
- Specified by:
setAttribute
in classAbstractBuildable
- Parameters:
name
- the name of the attribute. Will be one of those listed inAbstractBuildable.getAttributeNames()
value
- If thevalue
parameter is a String, it will be the value returned byAbstractBuildable.getAttributeValueString(java.lang.String)
for the samekey
. If the implementing class extendsAbstractConfigurable
, thenvalue
can also be an instance of the corresponding Class listed inAbstractConfigurable.getAttributeTypes()
-
getAttributeValueString
- Specified by:
getAttributeValueString
in classAbstractBuildable
- Parameters:
name
- the name of the attribute. Will be one of those listed inAbstractBuildable.getAttributeNames()
- Returns:
- a String representation of the XML buildFile attribute with the given name. When initializing a module,
this String value will loaded from the XML and passed to
AbstractBuildable.setAttribute(java.lang.String, java.lang.Object)
. It is also frequently used for checking the current value of an attribute.
-