VASSAL.build.module.noteswindow
Class SecretNotesController

java.lang.Object
  |
  +--VASSAL.build.module.noteswindow.SecretNotesController
All Implemented Interfaces:
AddSecretNoteCommand.Interface, CommandEncoder, GameComponent

public class SecretNotesController
extends java.lang.Object
implements GameComponent, CommandEncoder, AddSecretNoteCommand.Interface


Field Summary
static int COL_DTM
           
static int COL_HANDLE
           
static int COL_NAME
           
static int COL_REVEALED
           
static java.lang.String COMMAND_PREFIX
           
static java.text.DateFormat INTERNAL_DATE_FORMATTER
           
static java.text.DateFormat LOCAL_DATE_FORMATTER
           
 
Constructor Summary
SecretNotesController()
           
 
Method Summary
 void addSecretNote(SecretNote note)
           
 void captureState()
           
 Command decode(java.lang.String command)
          Translate a String into a Command
 java.lang.String encode(Command c)
          Translate a Command into a String
 javax.swing.JComponent getControls()
           
 SecretNote getNoteForName(java.lang.String s)
           
 Command getRestoreCommand()
          When saving a game, each GameComponent should return a Command that, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return null
 void restoreState()
           
 Command save()
           
 void setup(boolean gameStarting)
          Notify the GameComponent that a game has started/ended
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMMAND_PREFIX

public static final java.lang.String COMMAND_PREFIX

COL_HANDLE

public static final int COL_HANDLE

COL_DTM

public static final int COL_DTM

COL_NAME

public static final int COL_NAME

COL_REVEALED

public static final int COL_REVEALED

INTERNAL_DATE_FORMATTER

public static final java.text.DateFormat INTERNAL_DATE_FORMATTER

LOCAL_DATE_FORMATTER

public static final java.text.DateFormat LOCAL_DATE_FORMATTER
Constructor Detail

SecretNotesController

public SecretNotesController()
Method Detail

getRestoreCommand

public Command getRestoreCommand()
Description copied from interface: GameComponent
When saving a game, each GameComponent should return a Command 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 interface GameComponent

setup

public void setup(boolean gameStarting)
Description copied from interface: GameComponent
Notify the GameComponent that a game has started/ended
Specified by:
setup in interface GameComponent
Following copied from interface: VASSAL.build.module.GameComponent
Parameters:
gameStarting - if true, a game is starting. If false, then a game is ending

decode

public Command decode(java.lang.String command)
Description copied from interface: CommandEncoder
Translate a String into a Command
Specified by:
decode in interface CommandEncoder

encode

public java.lang.String encode(Command c)
Description copied from interface: CommandEncoder
Translate a Command into a String
Specified by:
encode in interface CommandEncoder

addSecretNote

public void addSecretNote(SecretNote note)
Specified by:
addSecretNote in interface AddSecretNoteCommand.Interface

getControls

public javax.swing.JComponent getControls()

save

public Command save()

captureState

public void captureState()

restoreState

public void restoreState()

getNoteForName

public SecretNote getNoteForName(java.lang.String s)