Package com.ardor3d.extension.ui.model
Class DefaultSliderModel
java.lang.Object
com.ardor3d.extension.ui.model.DefaultSliderModel
- All Implemented Interfaces:
SliderModel
A backing data model for UISlider.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
int
int
void
setCurrentValue
(int currentValue) Set a new current value.void
setCurrentValue
(int currentValue, UISlider slider) Set a new current value.void
setMaxValue
(int maxValue) void
setMinValue
(int minValue)
-
Constructor Details
-
DefaultSliderModel
public DefaultSliderModel(int minValue, int maxValue) Construct a new model- Parameters:
minValue
- lowest possible value (inclusive)maxValue
- highest possible value (inclusive)
-
-
Method Details
-
getCurrentValue
public int getCurrentValue()- Specified by:
getCurrentValue
in interfaceSliderModel
- Returns:
- the current set value
-
setCurrentValue
public void setCurrentValue(int currentValue) Description copied from interface:SliderModel
Set a new current value. No change event will be fired.- Specified by:
setCurrentValue
in interfaceSliderModel
- Parameters:
currentValue
- the new current value
-
setCurrentValue
Description copied from interface:SliderModel
Set a new current value. If a slider is provided, fireChangeEvent will be called on it.- Specified by:
setCurrentValue
in interfaceSliderModel
- Parameters:
currentValue
- the new current valueslider
- the slider to call fireChangeEvent, if not null.
-
getMaxValue
public int getMaxValue()- Specified by:
getMaxValue
in interfaceSliderModel
- Returns:
- the highest possible value (inclusive)
-
setMaxValue
public void setMaxValue(int maxValue) - Specified by:
setMaxValue
in interfaceSliderModel
- Parameters:
maxValue
- the new highest possible value (inclusive)
-
getMinValue
public int getMinValue()- Specified by:
getMinValue
in interfaceSliderModel
- Returns:
- the lowest possible value (inclusive)
-
setMinValue
public void setMinValue(int minValue) - Specified by:
setMinValue
in interfaceSliderModel
- Parameters:
minValue
- the new lowest possible value (inclusive)
-