Class SecretNotesController
java.lang.Object
VASSAL.build.module.noteswindow.SecretNotesController
- All Implemented Interfaces:
GameComponent
,AddSecretNoteCommand.Interface
,CommandEncoder
public class SecretNotesController
extends Object
implements GameComponent, CommandEncoder, AddSecretNoteCommand.Interface
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final String
static final DateFormat
Deprecated, for removal: This API element is subject to removal in a future version.static final DateFormat
Deprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSecretNote
(SecretNote note) void
Translate a String into aCommand
Translate aCommand
into a StringWhen 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
save()
void
setup
(boolean gameStarting) Notify the GameComponent that a game has started/ended
-
Field Details
-
COMMAND_PREFIX
- See Also:
-
COL_HANDLE
public static final int COL_HANDLE- See Also:
-
COL_DTM
public static final int COL_DTM- See Also:
-
COL_NAME
public static final int COL_NAME- See Also:
-
COL_REVEALED
public static final int COL_REVEALED- See Also:
-
INTERNAL_DATE_FORMATTER
@Deprecated(since="2023-02-27", forRemoval=true) public static final DateFormat INTERNAL_DATE_FORMATTERDeprecated, for removal: This API element is subject to removal in a future version.Date formatter to save and restore date/times in the save file. Not thread-safe! -
LOCAL_DATE_FORMATTER
@Deprecated(since="2023-02-27", forRemoval=true) public static final DateFormat LOCAL_DATE_FORMATTERDeprecated, for removal: This API element is subject to removal in a future version.Date formatter to display date/time to the player. Not thread-safe!
-
-
Constructor Details
-
SecretNotesController
public SecretNotesController()
-
-
Method Details
-
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
-
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
-
addSecretNote
- Specified by:
addSecretNote
in interfaceAddSecretNoteCommand.Interface
-
getControls
-
save
-
captureState
public void captureState() -
restoreState
public void restoreState() -
getNoteForName
-