Package snap.swing

Class AWTPrefs

java.lang.Object
snap.util.Prefs
snap.swing.AWTPrefs

public class AWTPrefs extends Prefs
AWT implementation of Snap Prefs.
  • Method Details

    • getValue

      public Object getValue(String aKey, Object aDefault)
      Description copied from class: Prefs
      Returns a value for given string and default.
      Specified by:
      getValue in class Prefs
    • setValue

      public void setValue(String aKey, Object aValue)
      Sets a value for given string.
      Specified by:
      setValue in class Prefs
    • remove

      public void remove(String aKey)
      Removes a value for given key.
      Overrides:
      remove in class Prefs
    • getString

      public String getString(String aKey, String aDefault)
      Returns a value for given string and default.
      Overrides:
      getString in class Prefs
    • getInt

      public int getInt(String aKey, int aDefault)
      Returns an int value for given key.
      Overrides:
      getInt in class Prefs
    • getDouble

      public double getDouble(String aKey, double aDefault)
      Returns a float value for given key.
      Overrides:
      getDouble in class Prefs
    • getBoolean

      public boolean getBoolean(String aKey, boolean aDefault)
      Returns a boolean value for given key.
      Overrides:
      getBoolean in class Prefs
    • getKeys

      public String[] getKeys()
      Returns the currently set prefs keys.
      Specified by:
      getKeys in class Prefs
    • getChild

      public AWTPrefs getChild(String aName)
      Returns a child prefs for given name.
      Overrides:
      getChild in class Prefs
    • flush

      public void flush()
      Updates this persistant store associated with these preferences.
      Overrides:
      flush in class Prefs
    • clear

      public void clear()
      Clears all the preferences.
      Overrides:
      clear in class Prefs
    • getPrefs

      public static AWTPrefs getPrefs(String aName)
      Returns the shared AWTPrefs.