VASSAL.preferences
Class Prefs

java.lang.Object
  |
  +--VASSAL.preferences.Prefs

public class Prefs
extends java.lang.Object


Constructor Summary
Prefs(Prefs parent, java.lang.String fileName)
           
Prefs(java.lang.String fileName)
           
 
Method Summary
 void addOption(Configurer o)
           
 void addOption(java.lang.String category, Configurer o)
           
 void addOption(java.lang.String category, Configurer o, java.lang.String prompt)
          Add a configurable property to the preferences in the given category
 void addTo(GameModule theModule)
           
 PrefsEditor getEditor()
           
 Configurer getOption(java.lang.String s)
           
 java.lang.String getStoredValue(java.lang.String key)
           
 java.lang.Object getValue(java.lang.String s)
           
 void write()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Prefs

public Prefs(java.lang.String fileName)

Prefs

public Prefs(Prefs parent,
             java.lang.String fileName)
Method Detail

addTo

public void addTo(GameModule theModule)

getEditor

public PrefsEditor getEditor()

addOption

public void addOption(Configurer o)

addOption

public void addOption(java.lang.String category,
                      Configurer o)

addOption

public void addOption(java.lang.String category,
                      Configurer o,
                      java.lang.String prompt)
Add a configurable property to the preferences in the given category
Parameters:
category - the tab under which to add the Configurer's controls in the editor window. If null, do not add controls
prompt - If non-null and the value was not read from the preferences file on initialization (i.e. first-time setup), prompt the user for an initial value

getOption

public Configurer getOption(java.lang.String s)

getValue

public java.lang.Object getValue(java.lang.String s)

getStoredValue

public java.lang.String getStoredValue(java.lang.String key)
Parameters:
key - the name of a Preferences option
Returns:
the value for the option that was read from the Preferences file at startup

write

public void write()