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)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Prefs
public Prefs(java.lang.String fileName)
Prefs
public Prefs(Prefs parent,
java.lang.String fileName)
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 controlsprompt - 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()