|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--VASSAL.build.module.PlayerRoster
Maintains a list of players involved in the current game
| Nested Class Summary | |
static class |
PlayerRoster.Add
|
static class |
PlayerRoster.Entry
|
| Field Summary | |
static java.lang.String |
COMMAND_PREFIX
|
| Fields inherited from interface VASSAL.build.Configurable |
NAME_PROPERTY |
| Constructor Summary | |
PlayerRoster()
|
|
| Method Summary | |
void |
add(Buildable child)
Adds a child component. |
void |
add(java.lang.String playerId,
java.lang.String playerName,
java.lang.String side)
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Add a PropertyChangeListener. |
void |
addTo(Buildable b)
Adds this component to its parent. |
void |
build(org.w3c.dom.Element e)
Build the object |
Command |
decode(java.lang.String command)
Translate a String into a Command |
java.lang.String |
encode(Command c)
Translate a Command into a String |
java.lang.Class[] |
getAllowableConfigureComponents()
Return a list of valid sub-component Classes. |
org.w3c.dom.Element |
getBuildElement(org.w3c.dom.Document doc)
|
Configurable[] |
getConfigureComponents()
|
java.lang.String |
getConfigureName()
The name of this Configurable Object |
Configurer |
getConfigurer()
Return a Configurer object which can be used to set the
attributes of this object |
static java.lang.String |
getConfigureTypeName()
|
HelpFile |
getHelpFile()
|
static java.lang.String |
getMySide()
|
PlayerRoster.Entry[] |
getPlayers()
|
Command |
getRestoreCommand()
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 |
static boolean |
isActive()
|
void |
remove(Buildable child)
Remove a child component |
void |
remove(java.lang.String playerId)
|
void |
removeFrom(Buildable parent)
Remove this component from its parent |
void |
setup(boolean gameStarting)
Notify the GameComponent that a game has started/ended |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String COMMAND_PREFIX
| Constructor Detail |
public PlayerRoster()
| Method Detail |
public void removeFrom(Buildable parent)
Configurable
removeFrom in interface Configurablepublic void remove(Buildable child)
Configurable
remove in interface Configurablepublic void build(org.w3c.dom.Element e)
Buildable
build in interface Buildablee - the XML element containing the object datapublic java.lang.String getConfigureName()
Configurable
getConfigureName in interface Configurablepublic static java.lang.String getConfigureTypeName()
public void add(Buildable child)
BuildableBuildable.addTo(VASSAL.build.Buildable) are
invoked when adding a child to a parent
add in interface Buildablepublic Configurable[] getConfigureComponents()
getConfigureComponents in interface Configurablepublic org.w3c.dom.Element getBuildElement(org.w3c.dom.Document doc)
getBuildElement in interface Buildablepublic Configurer getConfigurer()
ConfigurableConfigurer object which can be used to set the
attributes of this object
getConfigurer in interface Configurablepublic void addPropertyChangeListener(java.beans.PropertyChangeListener l)
ConfigurableConfigurable.NAME_PROPERTY when the value returned from
Configurable.getConfigureName() has changed
addPropertyChangeListener in interface Configurablepublic HelpFile getHelpFile()
getHelpFile in interface Configurablepublic java.lang.Class[] getAllowableConfigureComponents()
Configurable
getAllowableConfigureComponents in interface Configurablepublic void addTo(Buildable b)
Buildable
addTo in interface Buildablepublic static boolean isActive()
public static java.lang.String getMySide()
public PlayerRoster.Entry[] getPlayers()
public void add(java.lang.String playerId,
java.lang.String playerName,
java.lang.String side)
public void remove(java.lang.String playerId)
public Command decode(java.lang.String command)
CommandEncoderCommand
decode in interface CommandEncoderpublic java.lang.String encode(Command c)
CommandEncoderCommand into a String
encode in interface CommandEncoderpublic Command getRestoreCommand()
GameComponentCommand that, when executed, restores the GameComponent to its
state when the game was saved
If this component has no persistent state, return null
getRestoreCommand in interface GameComponentpublic void setup(boolean gameStarting)
GameComponent
setup in interface GameComponentgameStarting - if true, a game is starting. If false, then a game is ending
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||