Package VASSAL.build.module.noteswindow
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
Fields Modifier and Type Field Description static intCOL_DTMstatic intCOL_HANDLEstatic intCOL_NAMEstatic intCOL_REVEALEDstatic StringCOMMAND_PREFIXstatic DateFormatINTERNAL_DATE_FORMATTERstatic DateFormatLOCAL_DATE_FORMATTER -
Constructor Summary
Constructors Constructor Description SecretNotesController() -
Method Summary
Modifier and Type Method Description voidaddSecretNote(SecretNote note)voidcaptureState()Commanddecode(String command)Translate a String into aCommandStringencode(Command c)Translate aCommandinto a StringJComponentgetControls()SecretNotegetNoteForName(String s)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
-
COL_HANDLE
public static final int COL_HANDLE- See Also:
- Constant Field Values
-
COL_DTM
public static final int COL_DTM- See Also:
- Constant Field Values
-
COL_NAME
public static final int COL_NAME- See Also:
- Constant Field Values
-
COL_REVEALED
public static final int COL_REVEALED- See Also:
- Constant Field Values
-
INTERNAL_DATE_FORMATTER
-
LOCAL_DATE_FORMATTER
-
-
Constructor Details
-
SecretNotesController
public SecretNotesController()
-
-
Method Details
-
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
-
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
-
addSecretNote
- Specified by:
addSecretNotein interfaceAddSecretNoteCommand.Interface
-
getControls
-
save
-
captureState
public void captureState() -
restoreState
public void restoreState() -
getNoteForName
-