public class IntPreference extends AbstractPreference implements IIntPreference
IPreferenceStore
.Constructor and Description |
---|
IntPreference(java.lang.String name,
org.eclipse.jface.preference.IPreferenceStore store)
Creates a new integer-valued preference
with the given name and the given store.
|
Modifier and Type | Method and Description |
---|---|
int |
getValue()
Returns the current value of this preference.
|
void |
setDefault(int value)
Sets the default value for this preference.
|
void |
setValue(int 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 IntPreference(java.lang.String name, org.eclipse.jface.preference.IPreferenceStore store)
name
- the preference name (not null
)store
- the preference store (not null
)public final int getValue()
IIntPreference
getValue
in interface IIntPreference
public final void setValue(int value)
IIntPreference
A preference change event is reported if the current value of the preference actually changes from its previous value.
setValue
in interface IIntPreference
value
- the new current value of this preferencepublic final void setDefault(int value)
Note that if the preference's current value equals the old default value for the preference, the current value changes to the new default value. No preference change events are reported by changing default values.
value
- the new default value for this preferenceCopyright (c) 2014, 2018 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0