Package megamek.common.preference
Class PreferenceStoreProxy
java.lang.Object
megamek.common.preference.PreferenceStoreProxy
- All Implemented Interfaces:
IPreferenceStore
- Direct Known Subclasses:
ButtonOrderPreferences,ClientPreferences,GUIPreferences,UnitDisplayOrderPreferences
-
Field Summary
FieldsFields inherited from interface megamek.common.preference.IPreferenceStore
BOOLEAN_DEFAULT, DOUBLE_DEFAULT, FALSE, FLOAT_DEFAULT, INT_DEFAULT, LONG_DEFAULT, STRING_DEFAULT, TRUE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a preference change listener to this store.booleangetBoolean(String name) Returns the value of thebooleanpreference with the given name.booleangetDefaultBoolean(String name) Returns the default value for thebooleanpreference with the given name.doublegetDefaultDouble(String name) Returns the default value for thedoublepreference with the given name.floatgetDefaultFloat(String name) Returns the default value for thefloatpreference with the given name.intgetDefaultInt(String name) Returns the default value for theintpreference with the given name.longgetDefaultLong(String name) Returns the default value for thelongpreference with the given name.getDefaultString(String name) Returns the default value for theStringpreference with the given name.doubleReturns the value of thedoublepreference with the given name.floatReturns the value of thefloatpreference with the given name.intReturns the value of theintpreference with the given name.longReturns the value of thelongpreference with the given name.Returns the value of theStringpreference with the given name.booleanhasProperty(String name) voidJust sets the current value of the preference with the given name.voidRemoves the given listener from this store.voidsetDefault(String name, boolean value) Sets the default value for thebooleanpreference with the given name.voidsetDefault(String name, double value) Sets the default value for thedoublepreference with the given name.voidsetDefault(String name, float value) Sets the default value for thefloatpreference with the given name.voidsetDefault(String name, int value) Sets the default value for theintpreference with the given name.voidsetDefault(String name, long value) Sets the default value for thelongpreference with the given name.voidsetDefault(String name, String value) Sets the default value for thestringpreference with the given name.voidSets the current value of thebooleanpreference with the given name.voidSets the current value of thedoublepreference with the given name.voidSets the current value of thefloatpreference with the given name.voidSets the current value of theintpreference with the given name.voidSets the current value of thelongpreference with the given name.voidSets the current value of theStringpreference with the given name.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface megamek.common.preference.IPreferenceStore
getAdvancedProperties
-
Field Details
-
store
-
-
Constructor Details
-
PreferenceStoreProxy
public PreferenceStoreProxy()
-
-
Method Details
-
getDefaultBoolean
Description copied from interface:IPreferenceStoreReturns the default value for thebooleanpreference with the given name.- Specified by:
getDefaultBooleanin interfaceIPreferenceStore
-
getDefaultInt
Description copied from interface:IPreferenceStoreReturns the default value for theintpreference with the given name.- Specified by:
getDefaultIntin interfaceIPreferenceStore
-
getDefaultLong
Description copied from interface:IPreferenceStoreReturns the default value for thelongpreference with the given name.- Specified by:
getDefaultLongin interfaceIPreferenceStore
-
getDefaultString
Description copied from interface:IPreferenceStoreReturns the default value for theStringpreference with the given name.- Specified by:
getDefaultStringin interfaceIPreferenceStore
-
getDefaultDouble
Description copied from interface:IPreferenceStoreReturns the default value for thedoublepreference with the given name.- Specified by:
getDefaultDoublein interfaceIPreferenceStore
-
getDefaultFloat
Description copied from interface:IPreferenceStoreReturns the default value for thefloatpreference with the given name.- Specified by:
getDefaultFloatin interfaceIPreferenceStore
-
getBoolean
Description copied from interface:IPreferenceStoreReturns the value of thebooleanpreference 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:
getBooleanin interfaceIPreferenceStore
-
getInt
Description copied from interface:IPreferenceStoreReturns the value of theintpreference 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 an int.- Specified by:
getIntin interfaceIPreferenceStore
-
getLong
Description copied from interface:IPreferenceStoreReturns the value of thelongpreference 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:
getLongin interfaceIPreferenceStore
-
getFloat
Description copied from interface:IPreferenceStoreReturns the value of thefloatpreference 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:
getFloatin interfaceIPreferenceStore
-
getDouble
Description copied from interface:IPreferenceStoreReturns the value of thedoublepreference 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:
getDoublein interfaceIPreferenceStore
-
getString
Description copied from interface:IPreferenceStoreReturns the value of theStringpreference 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:
getStringin interfaceIPreferenceStore
-
putValue
Description copied from interface:IPreferenceStoreJust sets the current value of the preference with the given name. does not fire preference change event- Specified by:
putValuein interfaceIPreferenceStore
-
setDefault
Description copied from interface:IPreferenceStoreSets the default value for thebooleanpreference with the given name.- Specified by:
setDefaultin interfaceIPreferenceStore
-
setDefault
Description copied from interface:IPreferenceStoreSets the default value for theintpreference with the given name.- Specified by:
setDefaultin interfaceIPreferenceStore
-
setDefault
Description copied from interface:IPreferenceStoreSets the default value for thelongpreference with the given name.- Specified by:
setDefaultin interfaceIPreferenceStore
-
setDefault
Description copied from interface:IPreferenceStoreSets the default value for thefloatpreference with the given name.- Specified by:
setDefaultin interfaceIPreferenceStore
-
setDefault
Description copied from interface:IPreferenceStoreSets the default value for thedoublepreference with the given name.- Specified by:
setDefaultin interfaceIPreferenceStore
-
setDefault
Description copied from interface:IPreferenceStoreSets the default value for thestringpreference with the given name.- Specified by:
setDefaultin interfaceIPreferenceStore
-
setValue
Description copied from interface:IPreferenceStoreSets the current value of thebooleanpreference with the given name. A preference change event is reported if the current value of the preference changes from its previous value.- Specified by:
setValuein interfaceIPreferenceStore
-
setValue
Description copied from interface:IPreferenceStoreSets the current value of theintpreference with the given name. A preference change event is reported if the current value of the preference changes from its previous value.- Specified by:
setValuein interfaceIPreferenceStore
-
setValue
Description copied from interface:IPreferenceStoreSets the current value of thelongpreference with the given name. A preference change event is reported if the current value of the preference changes from its previous value.- Specified by:
setValuein interfaceIPreferenceStore
-
setValue
Description copied from interface:IPreferenceStoreSets the current value of thefloatpreference with the given name. A preference change event is reported if the current value of the preference changes from its previous value.- Specified by:
setValuein interfaceIPreferenceStore
-
setValue
Description copied from interface:IPreferenceStoreSets the current value of thedoublepreference with the given name. A preference change event is reported if the current value of the preference changes from its previous value.- Specified by:
setValuein interfaceIPreferenceStore
-
setValue
Description copied from interface:IPreferenceStoreSets the current value of theStringpreference with the given name. A preference change event is reported if the current value of the preference changes from its previous value.- Specified by:
setValuein interfaceIPreferenceStore
-
addPreferenceChangeListener
Description copied from interface:IPreferenceStoreAdds a preference change listener to this store.- Specified by:
addPreferenceChangeListenerin interfaceIPreferenceStore- Parameters:
listener- a preference change listener
-
removePreferenceChangeListener
Description copied from interface:IPreferenceStoreRemoves the given listener from this store.- Specified by:
removePreferenceChangeListenerin interfaceIPreferenceStore
-
hasProperty
- Specified by:
hasPropertyin interfaceIPreferenceStore
-