Package org.eclipse.handly.ui.preference
Class FloatPreference
java.lang.Object
org.eclipse.handly.ui.preference.AbstractPreference
org.eclipse.handly.ui.preference.FloatPreference
- All Implemented Interfaces:
IFloatPreference,IPreference
Implements a float-valued preference.
The preference is stored in an
IPreferenceStore.-
Constructor Summary
ConstructorsConstructorDescriptionFloatPreference(String name, org.eclipse.jface.preference.IPreferenceStore store) Creates a new float-valued preference with the given name and the given store. -
Method Summary
Modifier and TypeMethodDescriptionfinal floatgetValue()Returns the current value of this preference.final voidsetDefault(float value) Sets the default value for this preference.final voidsetValue(float value) Sets the current value of this preference.Methods inherited from class org.eclipse.handly.ui.preference.AbstractPreference
addListener, getName, getStore, isDefault, removeListener, setToDefaultMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.handly.ui.preference.IPreference
addListener, removeListener
-
Constructor Details
-
FloatPreference
Creates a new float-valued preference with the given name and the given store.- Parameters:
name- the preference name (notnull)store- the preference store (notnull)
-
-
Method Details
-
getValue
public final float getValue()Description copied from interface:IFloatPreferenceReturns the current value of this preference.- Specified by:
getValuein interfaceIFloatPreference- Returns:
- the current value of this preference
-
setValue
public final void setValue(float value) Description copied from interface:IFloatPreferenceSets the current value of this preference.A preference change event is reported if the current value of the preference actually changes from its previous value.
- Specified by:
setValuein interfaceIFloatPreference- Parameters:
value- the new current value of this preference
-
setDefault
public final void setDefault(float value) Sets the default value for this preference.Note that if the preference's current value equals the old default value, the current value changes to the new default value. No preference change events are reported by changing default values.
- Parameters:
value- the new default value for this preference
-