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 StringCOMMAND_PREFIX -
Constructor Summary
Constructors Constructor Description PrivateNotesController() -
Method Summary
Modifier and Type Method Description voidaddPrivateText(PrivateText p)voidcaptureState()Commanddecode(String command)Translate a String into aCommandStringencode(Command c)Translate aCommandinto a StringComponentgetControls()CommandgetRestoreCommand()When saving a game, each GameComponent should return aCommandthat, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return nullvoidrestoreState()Commandsave()voidsetup(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:
addPrivateTextin interfaceSetPrivateTextCommand.Interface
-
decode
Description copied from interface:CommandEncoderTranslate a String into aCommand- Specified by:
decodein interfaceCommandEncoder
-
encode
Description copied from interface:CommandEncoderTranslate aCommandinto a String- Specified by:
encodein interfaceCommandEncoder
-
getRestoreCommand
Description copied from interface:GameComponentWhen saving a game, each GameComponent should return aCommandthat, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return null- Specified by:
getRestoreCommandin interfaceGameComponent
-
setup
public void setup(boolean gameStarting)Description copied from interface:GameComponentNotify the GameComponent that a game has started/ended- Specified by:
setupin 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()
-