|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object frysk.gui.prefs.FryskPreference frysk.gui.prefs.IntPreference
public class IntPreference
IntPreference represents a preference that takes integer values within a contiguous range.
Nested Class Summary | |
---|---|
static interface |
IntPreference.IntPreferenceListener
|
Constructor Summary | |
---|---|
IntPreference(String name,
int min,
int max,
int fallback)
Creates a new IntPreference. |
Method Summary | |
---|---|
void |
addListener(IntPreference.IntPreferenceListener listener)
Adds a new listener to this preference. |
int |
getCurrentValue()
|
int |
getMaxValue()
|
int |
getMinValue()
|
void |
load(Preferences prefs)
Loads the value of this preference from the provided model |
void |
revert()
Replaces the current value of the preference with the one in the model |
void |
save(Preferences prefs)
Saves the current value of this preference into the model and notifies all listeners |
void |
setCurrentValue(int newVal)
Sets the value of this preference. |
Methods inherited from class frysk.gui.prefs.FryskPreference |
---|
getName |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntPreference(String name, int min, int max, int fallback)
name
- The name of the preferencemin
- The minimum valuemax
- The maximum valuefallback
- The default value.Method Detail |
---|
public int getCurrentValue()
public int getMinValue()
public int getMaxValue()
public void setCurrentValue(int newVal)
newVal
- The new value for this preference.public void save(Preferences prefs)
public void load(Preferences prefs)
public void addListener(IntPreference.IntPreferenceListener listener)
listener
- The IntPreferenceListenerpublic void revert()
revert
in class FryskPreference
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |