textbender.g.util.prefs
Class FloatPreferenceDC

java.lang.Object
  extended by Preference
      extended by FloatPreference
          extended by FloatPreferenceDC

public class FloatPreferenceDC
extends FloatPreference

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


Field Summary
 
Fields inherited from class Preference
key, preferences
 
Constructor Summary
FloatPreferenceDC(Preferences preferences, String key, float def)
          Creates a FloatPreferenceDC.
 
Method Summary
 void put(float value)
          Stores a new value for the preference, or removes it if it matches the default.
 
Methods inherited from class FloatPreference
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

FloatPreferenceDC

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

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

put

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

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