Class PreferenceStoreProxy

java.lang.Object
megamek.common.preference.PreferenceStoreProxy
All Implemented Interfaces:
IPreferenceStore
Direct Known Subclasses:
ButtonOrderPreferences, ClientPreferences, GUIPreferences, UnitDisplayOrderPreferences

public abstract class PreferenceStoreProxy extends Object implements IPreferenceStore
  • Field Details

  • Constructor Details

    • PreferenceStoreProxy

      public PreferenceStoreProxy()
  • Method Details

    • getDefaultBoolean

      public boolean getDefaultBoolean(String name)
      Description copied from interface: IPreferenceStore
      Returns the default value for the boolean preference with the given name.
      Specified by:
      getDefaultBoolean in interface IPreferenceStore
    • getDefaultInt

      public int getDefaultInt(String name)
      Description copied from interface: IPreferenceStore
      Returns the default value for the int preference with the given name.
      Specified by:
      getDefaultInt in interface IPreferenceStore
    • getDefaultLong

      public long getDefaultLong(String name)
      Description copied from interface: IPreferenceStore
      Returns the default value for the long preference with the given name.
      Specified by:
      getDefaultLong in interface IPreferenceStore
    • getDefaultString

      public String getDefaultString(String name)
      Description copied from interface: IPreferenceStore
      Returns the default value for the String preference with the given name.
      Specified by:
      getDefaultString in interface IPreferenceStore
    • getDefaultDouble

      public double getDefaultDouble(String name)
      Description copied from interface: IPreferenceStore
      Returns the default value for the double preference with the given name.
      Specified by:
      getDefaultDouble in interface IPreferenceStore
    • getDefaultFloat

      public float getDefaultFloat(String name)
      Description copied from interface: IPreferenceStore
      Returns the default value for the float preference with the given name.
      Specified by:
      getDefaultFloat in interface IPreferenceStore
    • getBoolean

      public boolean getBoolean(String name)
      Description copied from interface: IPreferenceStore
      Returns the value of the boolean preference with the given name. Returns the predefined default value in case if there is no preference with the given name, or if the current value cannot be treated as a boolean.
      Specified by:
      getBoolean in interface IPreferenceStore
    • getInt

      public int getInt(String name)
      Description copied from interface: IPreferenceStore
      Returns the value of the int preference with the given name. Returns the predefined default value in case if there is no preference with the given name, or if the current value cannot be treated as a int.
      Specified by:
      getInt in interface IPreferenceStore
    • getLong

      public long getLong(String name)
      Description copied from interface: IPreferenceStore
      Returns the value of the long preference with the given name. Returns the predefined default value in case if there is no preference with the given name, or if the current value cannot be treated as a long.
      Specified by:
      getLong in interface IPreferenceStore
    • getFloat

      public float getFloat(String name)
      Description copied from interface: IPreferenceStore
      Returns the value of the float preference with the given name. Returns the predefined default value in case if there is no preference with the given name, or if the current value cannot be treated as a float.
      Specified by:
      getFloat in interface IPreferenceStore
    • getDouble

      public double getDouble(String name)
      Description copied from interface: IPreferenceStore
      Returns the value of the double preference with the given name. Returns the predefined default value in case if there is no preference with the given name, or if the current value cannot be treated as a double.
      Specified by:
      getDouble in interface IPreferenceStore
    • getString

      public String getString(String name)
      Description copied from interface: IPreferenceStore
      Returns the value of the String preference with the given name. Returns the predefined default value in case if there is no preference with the given name, or if the current value cannot be treated as a String.
      Specified by:
      getString in interface IPreferenceStore
    • putValue

      public void putValue(String name, String value)
      Description copied from interface: IPreferenceStore
      Just sets the current value of the preference with the given name. does not fire preference change event
      Specified by:
      putValue in interface IPreferenceStore
    • setDefault

      public void setDefault(String name, boolean value)
      Description copied from interface: IPreferenceStore
      Sets the default value for the boolean preference with the given name.
      Specified by:
      setDefault in interface IPreferenceStore
    • setDefault

      public void setDefault(String name, int value)
      Description copied from interface: IPreferenceStore
      Sets the default value for the int preference with the given name.
      Specified by:
      setDefault in interface IPreferenceStore
    • setDefault

      public void setDefault(String name, long value)
      Description copied from interface: IPreferenceStore
      Sets the default value for the long preference with the given name.
      Specified by:
      setDefault in interface IPreferenceStore
    • setDefault

      public void setDefault(String name, float value)
      Description copied from interface: IPreferenceStore
      Sets the default value for the float preference with the given name.
      Specified by:
      setDefault in interface IPreferenceStore
    • setDefault

      public void setDefault(String name, double value)
      Description copied from interface: IPreferenceStore
      Sets the default value for the double preference with the given name.
      Specified by:
      setDefault in interface IPreferenceStore
    • setDefault

      public void setDefault(String name, String value)
      Description copied from interface: IPreferenceStore
      Sets the default value for the string preference with the given name.
      Specified by:
      setDefault in interface IPreferenceStore
    • setValue

      public void setValue(String name, boolean value)
      Description copied from interface: IPreferenceStore
      Sets the current value of the boolean preference with the given name. A preference change event is reported if the current value of the preference changes from its previous value.
      Specified by:
      setValue in interface IPreferenceStore
    • setValue

      public void setValue(String name, int value)
      Description copied from interface: IPreferenceStore
      Sets the current value of the int preference with the given name. A preference change event is reported if the current value of the preference changes from its previous value.
      Specified by:
      setValue in interface IPreferenceStore
    • setValue

      public void setValue(String name, long value)
      Description copied from interface: IPreferenceStore
      Sets the current value of the long preference with the given name. A preference change event is reported if the current value of the preference changes from its previous value.
      Specified by:
      setValue in interface IPreferenceStore
    • setValue

      public void setValue(String name, float value)
      Description copied from interface: IPreferenceStore
      Sets the current value of the float preference with the given name. A preference change event is reported if the current value of the preference changes from its previous value.
      Specified by:
      setValue in interface IPreferenceStore
    • setValue

      public void setValue(String name, double value)
      Description copied from interface: IPreferenceStore
      Sets the current value of the double preference with the given name. A preference change event is reported if the current value of the preference changes from its previous value.
      Specified by:
      setValue in interface IPreferenceStore
    • setValue

      public void setValue(String name, String value)
      Description copied from interface: IPreferenceStore
      Sets the current value of the String preference with the given name. A preference change event is reported if the current value of the preference changes from its previous value.
      Specified by:
      setValue in interface IPreferenceStore
    • addPreferenceChangeListener

      public void addPreferenceChangeListener(IPreferenceChangeListener listener)
      Description copied from interface: IPreferenceStore
      Adds a preference change listener to this store.
      Specified by:
      addPreferenceChangeListener in interface IPreferenceStore
      Parameters:
      listener - a preference change listener
    • removePreferenceChangeListener

      public void removePreferenceChangeListener(IPreferenceChangeListener listener)
      Description copied from interface: IPreferenceStore
      Removes the given listener from this store.
      Specified by:
      removePreferenceChangeListener in interface IPreferenceStore