Package VASSAL.build.module.noteswindow
Class PrivateNotesController
java.lang.Object
VASSAL.build.module.noteswindow.PrivateNotesController
- All Implemented Interfaces:
GameComponent
,SetPrivateTextCommand.Interface
,CommandEncoder
public class PrivateNotesController extends Object implements GameComponent, CommandEncoder, SetPrivateTextCommand.Interface
Holds
PrivateText
objects, only displaying the one owned by the current user-
Field Summary
Fields Modifier and Type Field Description static String
COMMAND_PREFIX
-
Constructor Summary
Constructors Constructor Description PrivateNotesController()
-
Method Summary
Modifier and Type Method Description void
addPrivateText(PrivateText p)
void
captureState()
Command
decode(String command)
Translate a String into aCommand
String
encode(Command c)
Translate aCommand
into a StringComponent
getControls()
Command
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 nullvoid
restoreState()
Command
save()
void
setup(boolean gameStarting)
Notify the GameComponent that a game has started/ended
-
Field Details
-
COMMAND_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Details
-
PrivateNotesController
public PrivateNotesController()
-
-
Method Details
-
getControls
-
addPrivateText
- Specified by:
addPrivateText
in interfaceSetPrivateTextCommand.Interface
-
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
-
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
-
setup
public void setup(boolean gameStarting)Description copied from interface:GameComponent
Notify the GameComponent that a game has started/ended- Specified by:
setup
in interfaceGameComponent
- Parameters:
gameStarting
- if true, a game is starting. If false, then a game is ending
-
save
-
captureState
public void captureState() -
restoreState
public void restoreState()
-