public class DoublePreference extends AbstractPreference implements IDoublePreference
IPreferenceStore
.Constructor and Description |
---|
DoublePreference(java.lang.String name,
org.eclipse.jface.preference.IPreferenceStore store)
Creates a new double-valued preference
with the given name and the given store.
|
Modifier and Type | Method and Description |
---|---|
double |
getValue()
Returns the current value of this preference.
|
void |
setDefault(double value)
Sets the default value for this preference.
|
void |
setValue(double value)
Sets the current value of this preference.
|
addListener, getName, getStore, isDefault, removeListener, setToDefault
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addListener, removeListener
public DoublePreference(java.lang.String name, org.eclipse.jface.preference.IPreferenceStore store)
name
- the preference name (not null
)store
- the preference store (not null
)public final double getValue()
IDoublePreference
getValue
in interface IDoublePreference
public final void setValue(double value)
IDoublePreference
A preference change event is reported if the current value of the preference actually changes from its previous value.
setValue
in interface IDoublePreference
value
- the new current value of this preferencepublic final void setDefault(double value)
Note that the current value of the preference is affected if the preference's current value was its old default value, in which case it changes to the new default value. If the preference's current is different from its old default value, its current value is unaffected. No preference change events are reported by changing default values.
value
- the new default value for the preference