V
- the kind of value this preference usespublic class DockPropertyPreference<V> extends DefaultPreference<V>
Preference
that can read and write its value from a
DockProperties
.Constructor and Description |
---|
DockPropertyPreference(DockProperties properties,
PropertyKey<V> key,
Path type,
Path path)
Creates a new preference.
|
DockPropertyPreference(DockProperties properties,
PropertyKey<V> key,
java.lang.String label,
Path type,
Path path)
Creates a new preference.
|
DockPropertyPreference(java.lang.String prefix,
DockProperties properties,
PropertyKey<V> key,
V defaultValue,
Path type,
Path path)
Creates a new preference.
|
Modifier and Type | Method and Description |
---|---|
void |
read()
Uses an unknown source to reload this preference.
|
void |
write()
Stores the contents of this preference at the location where it will
be used.
|
addPreferenceListener, doOperation, getDefaultValue, getDescription, getLabel, getOperations, getPath, getTypePath, getValue, getValueInfo, isEnabled, isNatural, removePreferenceListener, setDefaultValue, setDescription, setDescriptionId, setLabel, setLabelId, setModel, setNatural, setValue, setValueInfo
fireChanged, hasListeners, listeners
public DockPropertyPreference(DockProperties properties, PropertyKey<V> key, Path type, Path path)
properties
- the properties from which this preference reads its values
and to which it writes its valueskey
- the key of the value this preference reads from a DockProperties
.type
- the type of values used in this preferencepath
- the unique path of this preferencepublic DockPropertyPreference(DockProperties properties, PropertyKey<V> key, java.lang.String label, Path type, Path path)
properties
- the properties from which this preference reads its values
and to which it writes its valueskey
- the key of the value this preference reads from a DockProperties
.label
- the text associated with this preferencetype
- the type of values used in this preferencepath
- the unique path of this preferencepublic DockPropertyPreference(java.lang.String prefix, DockProperties properties, PropertyKey<V> key, V defaultValue, Path type, Path path)
prefix
- the prefix of the key used for the TextManager
. The strings
".label" and ".description" will be added to prefix
in order
to generate two keys.properties
- the properties from which this preference reads its values
and to which it writes its valueskey
- the key of the value this preference reads from a DockProperties
.defaultValue
- the initial value of this preferencetype
- the type of values used in this preferencepath
- the unique path of this preferencepublic void read()
Preference
Preference
should not change its value.public void write()
Preference