Class MetisPreferenceSet.MetisIntegerPreference
java.lang.Object
io.github.tonywasher.joceanus.metis.preference.MetisPreferenceSet.MetisPreferenceItem
io.github.tonywasher.joceanus.metis.preference.MetisPreferenceSet.MetisIntegerPreference
- Enclosing class:
MetisPreferenceSet
public static class MetisPreferenceSet.MetisIntegerPreference
extends MetisPreferenceSet.MetisPreferenceItem
Integer preference.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor. -
Method Summary
Modifier and TypeMethodDescriptionObtain the maximum value.Obtain the minimum value.getValue()Obtain the value of the preference.voidSet range.voidSet value.protected voidstoreThePreference(Object pNewValue) Store the value of the preference.booleanvalidate()Validate the range.Methods inherited from class io.github.tonywasher.joceanus.metis.preference.MetisPreferenceSet.MetisPreferenceItem
getDisplay, getHandle, getKey, getPreferenceName, getSet, getType, getViewerValue, isAvailable, isChanged, isHidden, setHidden, setNewValue, setTheValue
-
Constructor Details
-
MetisIntegerPreference
Constructor.- Parameters:
pSet- the preference SetpKey- the key of the preference
-
-
Method Details
-
getValue
Description copied from class:MetisPreferenceSet.MetisPreferenceItemObtain the value of the preference.- Overrides:
getValuein classMetisPreferenceSet.MetisPreferenceItem- Returns:
- the value of the preference
-
getMinimum
Obtain the minimum value.- Returns:
- the minimum
-
getMaximum
Obtain the maximum value.- Returns:
- the maximum
-
setValue
Set value.- Parameters:
pNewValue- the new value
-
setRange
Set range.- Parameters:
pMinimum- the minimum valuepMaximum- the maximum value
-
validate
public boolean validate()Validate the range.- Returns:
- true/false
-
storeThePreference
Description copied from class:MetisPreferenceSet.MetisPreferenceItemStore the value of the preference.- Specified by:
storeThePreferencein classMetisPreferenceSet.MetisPreferenceItem- Parameters:
pNewValue- the new value to store
-