Uses of Class
VASSAL.command.Command
Package
Description
Provides classes for building Java instances automatically from XML
files.
Contains classes that may be added to a
GameModule
.Contains classes that may be added to a
Documentation
.Contains classes that may be added to a
Map
.Contains classes that may be added to a
BoardPicker
.Contains classes that may be added to a
MapGrid
.Contains classes that may be added to a
NotesWindow
.Contains classes for specifying a VASSAL server implementation that follows a chat-room paradigm.
Provides classes that implement the "Command" design pattern.
Provides classes that define game pieces.
-
Uses of Command in VASSAL.build
Modifier and TypeMethodDescriptionDecodes our inboundCommand
traffic -- incoming player commands ready to be executed.GameModule.resumeLogging()
Restart logging and return any outstanding commandsModifier and TypeMethodDescriptionEncodes our outboundCommand
traffic -- outgoing player commands to be sent to other players' clients via either online (server) or logfile (PBEM).void
GameModule.sendAndLog(Command c)
When the local player has taken any action that would change the game state (or otherwise needs to be sent to any other players' clients), the action should be encapsulated into aCommand
and sent here. -
Uses of Command in VASSAL.build.module
Modifier and TypeClassDescriptionstatic class
static class
This is aCommand
object that, when executed, displays a text message in the Chatter's text areastatic class
static class
static class
A command that verifies that a certain extension has been loadedstatic class
static class
protected class
protected class
static class
static class
static class
Command for displaying the results of a roll of the diceModifier and TypeFieldDescriptionprotected Command
BasicLogger.beginningState
protected Command
BasicLogger.LogCommand.logged
Modifier and TypeFieldDescriptionBasicLogger.LogCommand.logInput
BasicLogger.logInput
BasicLogger.logOutput
Modifier and TypeMethodDescriptionMap.apply(PieceVisitorDispatcher commandFactory)
Attempts to apply the providedPieceVisitorDispatcher
to all pieces on this map, until it finds one that returns a non-null Command.protected Command
BasicLogger.LogCommand.assembleCommand()
Deserializes a string into a Basic Piece command (Add, Remove, Change, Move, and...Deserializes our command from a string version, if the command belongs to us.Deserializes string command info into a Deck Reposition Command.A GameState recognizes instances ofGameState.SetupCommand
GameState.decodeSavedGame(File saveFile)
Read a saved game and translate it into a Command.GameState.decodeSavedGame(InputStream in)
protected Command
Inventory.HotKeySender.getCommand(Inventory.CounterNode node, KeyStroke stroke)
BasicLogger.LogCommand.getLoggedCommand()
BasicLogger.getRestoreCommand()
ChessClockControl.getRestoreCommand()
EventLog.getRestoreCommand()
GameComponent.getRestoreCommand()
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 nullGameRefresher.getRestoreCommand()
GameState.getRestoreCommand()
InternetDiceButton.getRestoreCommand()
Inventory.getRestoreCommand()
Map.getRestoreCommand()
As aGameComponent
, Map does not have any action inherently needing to be taken for "restoring" itself for load/save and network play purposes (the locations of pieces, etc, are stored in the pieces, and are restored fromGameState
in itsGameState.getRestorePiecesCommand()
method, which creates an AddPiece command for each piece).ModuleExtension.getRestoreCommand()
ModulePlugin.getRestoreCommand()
NewGameIndicator.getRestoreCommand()
NotesWindow.getRestoreCommand()
ObscurableOptions.getRestoreCommand()
PlayerRoster.getRestoreCommand()
PredefinedSetup.getRestoreCommand()
StartupGlobalKeyCommand.getRestoreCommand()
ToolbarMenu.getRestoreCommand()
GameState.getRestorePiecesCommand()
protected Command
WizardSupport.SavedGameLoader.loadSavedGame()
protected Command
WizardSupport.TutorialLoader.loadSavedGame()
protected Command
BasicLogger.LogCommand.myUndoCommand()
Chatter.DisplayText.myUndoCommand()
EventLog.StoreEvents.myUndoCommand()
protected Command
GameState.SetupCommand.myUndoCommand()
protected Command
Inventory.myUndoCommand()
protected Command
ModuleExtension.RegCmd.myUndoCommand()
protected Command
NewGameIndicator.MarkGameNotNew.myUndoCommand()
protected Command
NotesWindow.SetPublicNote.myUndoCommand()
protected Command
NotesWindow.SetScenarioNote.myUndoCommand()
protected Command
ObscurableOptions.SetAllowed.myUndoCommand()
protected Command
PlayerRoster.Add.myUndoCommand()
protected Command
SpecialDiceButton.ShowResults.myUndoCommand()
Place a piece at the destination point.Map.placeOrMerge(GamePiece p, Point pt)
Move a piece to the destination point.protected Command
Inventory.sendHotKeyToPieces(KeyStroke keyStroke)
ChessClockControl.startNextClock()
ChessClockControl.stopAllClocks()
Modifier and TypeMethodDescriptionprotected void
DoActionButton.doHotKey(Command c, NamedKeyStroke key)
Serializes a Basic Piece command (Add, Remove, Change, Move, and ...Recognizes a logging command.Serializes our command into a string, if it belongs to usA GameState recognizes instances ofGameState.SetupCommand
void
This method is used by PredefinedSetup.refresh() to update a PredefinedSetup in a GameModule The default execute() method calls: GameModule.getGameModule().getGameState().getAllPieces() to set the pieces list, this method provides an alternative way to specify which pieces should be refreshed.protected void
DoActionButton.executeActions(Command command)
Execute the set of actions that make up this button and return the set of Commands generated.void
Logs a Command to outputvoid
ServerConnection.sendToOthers(Command c)
Send a command to other players on the server -
Uses of Command in VASSAL.build.module.chessclockcontrol
Modifier and TypeMethodDescriptionDeserializes our command from a string version, if the command belongs to us.ChessClock.getRestoreCommand()
ChessClock.resetState()
Creates a command to reset the clock and turn it offChessClock.updateState(boolean ticking)
Creates a command to update the clock and/or turn it on/off. -
Uses of Command in VASSAL.build.module.documentation
-
Uses of Command in VASSAL.build.module.map
Modifier and TypeClassDescriptionstatic class
static class
Modifier and TypeMethodDescriptionDrawPile.addToContents(GamePiece p)
DeckGlobalKeyCommand.DeckGlobalCommand.apply(Deck d, PieceFilter filter)
protected Command
PieceMover.applyKeyAfterMove(List<GamePiece> pieces, KeyStroke key)
Applies a key command to each of a list of pieces.Deserializes string command info into a Flare Command.MovementReporter.getReportCommand()
BoardPicker.getRestoreCommand()
The restore command of a BoardPicker, when executed, sets the boards of itsMap
toBoardPicker.getSelectedBoards()
Flare.getRestoreCommand()
GlobalMap.getRestoreCommand()
HidePiecesButton.getRestoreCommand()
HighlightLastMoved.getRestoreCommand()
MapShader.getRestoreCommand()
PieceMover.getRestoreCommand()
PieceMover has nothing to save/restore in a save file.SetupStack.getRestoreCommand()
Zoomer.getRestoreCommand()
Handles marking pieces as "moved" or "not moved", based on Global Options settings.MovementReporter.markMovedPieces()
Mark all pieces with theMovementMarkable
traitPlace a GamePiece on top of another GamePiece Create/remove stacks as necessary, even if stacking is disabled for this instanceprotected Command
PieceMover.movedPiece(GamePiece p, Point loc)
Invoked just BEFORE a piece is moved.PieceMover.movePieces(Map map, Point p)
This is the key method for handling the "Drop" part of Drag and Drop.protected Command
BoardPicker.SetBoards.myUndoCommand()
protected Command
LOS_Thread.LOSCommand.myUndoCommand()
StackMetrics.placeOrMerge(GamePiece fixed, GamePiece moving)
Merge the two pieces if stacking is enabled.Returns a Command that moves all pieces so that their centroid is centered on the map.protected Command
PieceMover.setOldLocations(GamePiece p)
Populates the "OldLocations" properties (e.g.Modifier and TypeMethodDescriptionprotected void
PieceMover.applyKeyAfterMove(List<GamePiece> pieces, Command comm, KeyStroke key)
Deprecated, for removal: This API element is subject to removal in a future version.protected MovementReporter
PieceMover.createMovementReporter(Command c)
Creates aMovementReporter
for a collection of commands containing AddPiece and MovePiece commands, which will supply auto-report messages corresponding to those commandsSerializes Flare commands into string form.protected void
MovementReporter.extractMoveCommands(Command c)
ModifierConstructorDescriptionHiddenMovementReporter(Command moveCommand)
MovementReporter(Command moveCommand)
-
Uses of Command in VASSAL.build.module.map.boardPicker
Modifier and TypeMethodDescriptionBoard.Cleanup.getRestoreCommand()
Deprecated, for removal: This API element is subject to removal in a future version. -
Uses of Command in VASSAL.build.module.map.boardPicker.board.mapgrid
-
Uses of Command in VASSAL.build.module.noteswindow
Modifier and TypeClassDescriptionclass
When executed, adds aSecretNote
to a specified List.class
When executed, adds aPrivateText
to a specified set.Modifier and TypeMethodDescriptionPrivateNotesController.getRestoreCommand()
SecretNotesController.getRestoreCommand()
protected Command
AddSecretNoteCommand.myUndoCommand()
protected Command
SetPrivateTextCommand.myUndoCommand()
PrivateNotesController.save()
SecretNotesController.save()
-
Uses of Command in VASSAL.build.module.properties
Modifier and TypeClassDescriptionclass
Command to change the value of aMutableProperty
static class
Command to pass a new Global property value to other players or into the logfile.Modifier and TypeMethodDescriptionprotected Command
MutableProperty.Impl.getChangeCommand(String oldValue, String newValue)
GlobalProperty.getRestoreCommand()
GlobalTranslatableMessage.getRestoreCommand()
protected Command
ChangePropertyCommand.myUndoCommand()
protected Command
GlobalProperty.SetGlobalProperty.myUndoCommand()
GlobalProperty.setPropertyValue(String newValue)
MutableProperty.Impl.setPropertyValue(String newValue)
MutableProperty.setPropertyValue(String newValue)
-
Uses of Command in VASSAL.build.module.turn
Modifier and TypeMethodDescriptionTurnTracker.getRestoreCommand()
protected Command
TurnTracker.SetTurn.myUndoCommand()
-
Uses of Command in VASSAL.chat
Modifier and TypeClassDescriptionclass
ACommand
that, when executed, sends game synchronization information to a givenSimplePlayer
class
A Command that encapsulates a private chat message from anotherSimplePlayer
static class
class
ACommand
that, when executed, sends game synchronization information to a givenSimplePlayer
Modifier and TypeMethodDescriptionDummyMessageServer.getWelcomeMessage()
HttpMessageServer.getWelcomeMessage()
WelcomeMessageServer.getWelcomeMessage()
protected Command
InviteCommand.myUndoCommand()
PrivMsgCommand.myUndoCommand()
protected Command
SoundEncoder.Cmd.myUndoCommand()
protected Command
SynchCommand.myUndoCommand()
Modifier and TypeMethodDescriptionprotected boolean
void
Send a Command to a particular playervoid
void
void
DummyClient.sendToOthers(Command c)
void
HybridClient.sendToOthers(Command c)
-
Uses of Command in VASSAL.chat.node
-
Uses of Command in VASSAL.chat.peer2peer
-
Uses of Command in VASSAL.command
Modifier and TypeClassDescriptionclass
This Command adds aGamePiece
to a game.class
This command, when executed, displays a Dialog box with a messageclass
This Command changes the state of aGamePiece
.class
Evaluates properties of the GameModule and conditionally executes another Command if all values are satisfied.class
class
Command that moves a piece to a new location and position within a stack.class
class
class
This Command removed aGamePiece
from a game.class
This Command sets a Persistent Property in a PersistentPropertyContainer.Modifier and TypeMethodDescriptionAppend a subcommand to this Command.Apply the filterTranslate a String into aCommand
ChangeTracker.getChangeCommand()
ConditionalCommand.getDelegate()
MoveTracker.getMoveCommand()
Command[]
Command.getSubCommands()
Command.getUndoCommand()
protected Command
AddPiece.myUndoCommand()
protected Command
AlertCommand.myUndoCommand()
protected Command
ChangePiece.myUndoCommand()
protected abstract Command
Command.myUndoCommand()
If the action can be undone, return a Command that performs the inverse action.protected Command
ConditionalCommand.myUndoCommand()
protected Command
FlareCommand.myUndoCommand()
protected Command
MovePiece.myUndoCommand()
protected Command
NullCommand.myUndoCommand()
protected Command
PlayAudioClipCommand.myUndoCommand()
protected Command
RemovePiece.myUndoCommand()
protected Command
SetPersistentPropertyCommand.myUndoCommand()
Modifier and TypeMethodDescriptionprotected abstract boolean
Append a subcommand to this Command.Apply the filterTranslate aCommand
into a Stringvoid
ModifierConstructorDescriptionConditionalCommand(ConditionalCommand.Condition[] conditions, Command delegate)
-
Uses of Command in VASSAL.counters
Modifier and TypeClassDescriptionprotected static class
Command to set the contents of this deck from a saved file.Modifier and TypeMethodDescriptionCounterGlobalKeyCommand.apply()
GlobalCommand.apply(Map[] maps, PieceFilter filter)
(Legacy - applies GKC without Fast Match)GlobalCommand.apply(Map[] maps, PieceFilter filter, GlobalCommandTarget fastMatch)
Apply the key command to all pieces that pass the given filter & our Fast MatchGlobalCommandTarget
parameters on all the given mapsGlobalCommand.apply(Map map, PieceFilter filter)
(Legacy - applies GKC without Fast Match)GlobalCommand.apply(Map map, PieceFilter filter, GlobalCommandTarget fastMatch)
Apply the key command on ONE SPECIFIC MAP to all pieces that pass the given filter and our Fast Match parameters.protected Command
Translate.classicTranslate(KeyStroke stroke)
Classic Translate code.protected Command
TriggerAction.doLoopOnce()
protected Command
TriggerAction.executeKey(NamedKeyStroke key)
Translate.MoveExecuter.getAdditionalCommand()
GlobalCommand.Visitor.getCommand()
KeyBuffer.keyCommand(KeyStroke stroke)
Applies a key command to every selected piece (i.e.The primary way for the piece or trait to receive events.The primary way for the piece or trait to receive events.The primary way for the piece or trait to receive events.Processes a key command for this stack, by sending it to the top visible piece in the stack.Apply key commands to inner pieces firstprotected Command
protected Command
Translate.moveTarget(GamePiece target)
ActionButton.myKeyEvent(KeyStroke stroke)
AreaOfEffect.myKeyEvent(KeyStroke stroke)
CalculatedProperty.myKeyEvent(KeyStroke stroke)
Clone.myKeyEvent(KeyStroke stroke)
CounterGlobalKeyCommand.myKeyEvent(KeyStroke stroke)
abstract Command
Decorator.myKeyEvent(KeyStroke stroke)
The response of this trait alone to the given KeyStroke or the virtual keystroke of aNamedKeyStroke
.Delete.myKeyEvent(KeyStroke stroke)
Deselect.myKeyEvent(KeyStroke stroke)
DynamicProperty.myKeyEvent(KeyStroke stroke)
Embellishment.myKeyEvent(KeyStroke stroke)
Embellishment0.myKeyEvent(KeyStroke stroke)
Footprint.myKeyEvent(KeyStroke stroke)
FreeRotator.myKeyEvent(KeyStroke stroke)
GlobalHotKey.myKeyEvent(KeyStroke stroke)
Hideable.myKeyEvent(KeyStroke stroke)
Immobilized.myKeyEvent(KeyStroke e)
Labeler.myKeyEvent(KeyStroke stroke)
Marker.myKeyEvent(KeyStroke stroke)
MenuSeparator.myKeyEvent(KeyStroke stroke)
MovementMarkable.myKeyEvent(KeyStroke stroke)
NonRectangular.myKeyEvent(KeyStroke stroke)
Obscurable.myKeyEvent(KeyStroke stroke)
Pivot.myKeyEvent(KeyStroke stroke)
PlaceMarker.myKeyEvent(KeyStroke stroke)
PlaySound.myKeyEvent(KeyStroke stroke)
PropertySheet.myKeyEvent(KeyStroke stroke)
Replace.myKeyEvent(KeyStroke stroke)
ReportState.myKeyEvent(KeyStroke stroke)
RestrictCommands.myKeyEvent(KeyStroke stroke)
Restricted.myKeyEvent(KeyStroke stroke)
ReturnToDeck.myKeyEvent(KeyStroke stroke)
SendToLocation.myKeyEvent(KeyStroke stroke)
SetGlobalProperty.myKeyEvent(KeyStroke stroke)
SubMenu.myKeyEvent(KeyStroke stroke)
TableInfo.myKeyEvent(KeyStroke stroke)
TranslatableMessage.myKeyEvent(KeyStroke stroke)
Translate.myKeyEvent(KeyStroke stroke)
TriggerAction.myKeyEvent(KeyStroke stroke)
UsePrototype.myKeyEvent(KeyStroke stroke)
protected Command
Deck.LoadDeckCommand.myUndoCommand()
protected Command
Translate.newTranslate(KeyStroke stroke)
Deck.pieceAdded(GamePiece p)
Stack.pieceAdded(GamePiece p)
Perform some action on a GamePiece that has just been added to this StackDeck.pieceRemoved(GamePiece p)
Stack.pieceRemoved(GamePiece p)
Perform some action on a GamePiece that has just been removed this Stackprotected Command
PlaceMarker.placeMarker()
static Command
Decorator.putOldProperties(GamePiece p)
* Set the Oldxxxx properties related to movement (e.g.protected Command
Replace.replacePiece()
protected Command
Deck.reportCommand(String format, String commandName)
Deck.reverse()
Reverse the order of the contents of the DeckDeck.sendToDeck()
Combine the contents of this Deck with the contents of the deck specified byDeck.reshuffleTarget
protected Command
Deck.setContents(Collection<GamePiece> c)
Set the contents of this Deck to a Collection of GamePiecesprotected Command
Deck.setContents(Iterator<GamePiece> it)
Deprecated, for removal: This API element is subject to removal in a future version.UseDeck.setContents(Collection)
instead.Deck.setContentsFaceDown(boolean value)
BasicPiece.setPersistentProperty(Object key, Object newValue)
Setting a persistent property writes a property value into the piece (creating a new entry in the piece's persistent property table if the specified key does not yet exist in it).Decorator.setPersistentProperty(Object key, Object val)
Default behavior for a Trait/Decorator is to pass requests to set persistent properties inward to the next member of the piece.Deck.shuffle()
Shuffle the contents of the Deck -
Uses of Command in VASSAL.property
Modifier and TypeMethodDescriptionPersistentPropertyContainer.setPersistentProperty(Object key, Object val)
Setting a persistent property writes a property value into the piece (creating a new entry in the piece's persistent property table if the specified key does not yet exist in it).
PieceMover.applyKeyAfterMove(List, KeyStroke)
to return Commands