Package org.esa.snap.core.util
Class PreferencesPropertyMap
java.lang.Object
org.esa.snap.core.util.AbstractPropertyMap
org.esa.snap.core.util.PreferencesPropertyMap
- All Implemented Interfaces:
EventListener,PreferenceChangeListener,PropertyMap
Implementation of the
PropertyMap interface backed by a Preferences instance.- Since:
- SNAP 2
-
Field Summary
Fields inherited from class org.esa.snap.core.util.AbstractPropertyMap
DEFAULT_COLOR, DEFAULT_FONT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddPropertyChangeListener(String key, PropertyChangeListener listener) protected voidfirePropertyChange(String key, String oldValue, String newValue) protected Stringprotected StringReturns thePropertiesinstance in which this property map stores its key/value pairs.Returns an enumeration of the property keys in this map.voidLoads key/value pairs from a text file into this property map.voidThis method gets called when a preference is added, removed or when its value is changed.voidvoidremovePropertyChangeListener(String key, PropertyChangeListener listener) protected StringvoidStores the key/value pairs of this property map into a text file.Methods inherited from class org.esa.snap.core.util.AbstractPropertyMap
getPropertyBool, getPropertyBool, getPropertyColor, getPropertyColor, getPropertyDouble, getPropertyDouble, getPropertyFont, getPropertyFont, getPropertyInt, getPropertyInt, getPropertyString, getPropertyString, setPropertyBool, setPropertyColor, setPropertyDouble, setPropertyFont, setPropertyInt, setPropertyString
-
Constructor Details
-
PreferencesPropertyMap
-
-
Method Details
-
get
- Specified by:
getin classAbstractPropertyMap
-
get
- Specified by:
getin classAbstractPropertyMap
-
set
- Specified by:
setin classAbstractPropertyMap
-
firePropertyChange
- Specified by:
firePropertyChangein classAbstractPropertyMap
-
load
Description copied from interface:PropertyMapLoads key/value pairs from a text file into this property map.- Specified by:
loadin interfacePropertyMap- Parameters:
file- the text file- Throws:
IOException- if an I/O error occurs
-
store
Description copied from interface:PropertyMapStores the key/value pairs of this property map into a text file.- Specified by:
storein interfacePropertyMap- Parameters:
file- the text fileheader- an optional file header- Throws:
IOException- if an I/O error occurs
-
getProperties
Description copied from interface:PropertyMapReturns thePropertiesinstance in which this property map stores its key/value pairs.- Specified by:
getPropertiesin interfacePropertyMap
-
getPropertyKeys
Description copied from interface:PropertyMapReturns an enumeration of the property keys in this map.- Specified by:
getPropertyKeysin interfacePropertyMap
-
addPropertyChangeListener
- Specified by:
addPropertyChangeListenerin interfacePropertyMap
-
addPropertyChangeListener
- Specified by:
addPropertyChangeListenerin interfacePropertyMap
-
removePropertyChangeListener
- Specified by:
removePropertyChangeListenerin interfacePropertyMap
-
removePropertyChangeListener
- Specified by:
removePropertyChangeListenerin interfacePropertyMap
-
preferenceChange
This method gets called when a preference is added, removed or when its value is changed.- Specified by:
preferenceChangein interfacePreferenceChangeListener- Parameters:
evt- A PreferenceChangeEvent object describing the event source and the preference that has changed.
-