textbender.g.util.prefs
Class StringPreferenceDC

java.lang.Object
  extended by Preference
      extended by StringPreference
          extended by StringPreferenceDC

public class StringPreferenceDC
extends StringPreference

A default-clear string preference. It is removed when it matches the default, rather than stored.


Field Summary
 
Fields inherited from class Preference
key, preferences
 
Constructor Summary
StringPreferenceDC(Preferences preferences, String key, String def)
          Creates a StringPreferenceDC.
 
Method Summary
 void put(String value)
          Stores a new value for the preference, or removes it if it matches the default.
 
Methods inherited from class StringPreference
get, getDefault, setDefault
 
Methods inherited from class Preference
key, preferences, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringPreferenceDC

public StringPreferenceDC(Preferences preferences,
                          String key,
                          String def)
Creates a StringPreferenceDC.

Parameters:
preferences - per preferences()
key - per key()
def - default per getDefault()
Method Detail

put

public void put(String value)
Stores a new value for the preference, or removes it if it matches the default.

Overrides:
put in class StringPreference
Parameters:
value - new value of the preference