ChangeEvent is fired when the slider knob is moved. Canceling the event will move the knob to where it was previously.
For a horizontal progress bar, its preferred height is determined by the larger of the knob and background, and the preferred width is 140, a relatively arbitrary size. These parameters are reversed for a vertical progress bar.
| Modifier and Type | Class and Description |
|---|---|
| public static class | Slider.
The style for a slider, see |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | |
| pack-priv int | |
| pack-priv boolean | |
| private float[] | |
| private float | |
| private Interpolation |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | Slider(float
the minimum value min, float the maximum value max, float the step size between values stepSize, boolean vertical, Slider.the styleSliderStyleCreates a new slider. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean | |
| protected Drawable | |
| protected Drawable | |
| protected Drawable | |
| protected Drawable | |
| public float[] | |
| public float | |
| public Slider. | getStyle()
Overrides com. Implements com. Returns the slider's style. |
| public boolean | |
| public boolean | |
| public void | |
| public void | setSnapToValues(float threshold, float...
May be null to disable snapping. values)Makes this slider snap to the specified values when the knob is within the threshold. |
| public void | setSnapToValues(float[]
May be null to disable snapping. values, float threshold)
Deprecated
Use
setSnapToValues(float, float..
Makes this progress bar snap to the specified values, if the knob is within the threshold. |
| public void | setVisualInterpolationInverse(Interpolation interpolation)
Sets the inverse interpolation to use for display. |
| public void | |
| protected float |
| button | back to summary |
|---|---|
| pack-priv int button | |
| draggingPointer | back to summary |
|---|---|
| pack-priv int draggingPointer | |
| mouseOver | back to summary |
|---|---|
| pack-priv boolean mouseOver | |
| snapValues | back to summary |
|---|---|
| private float[] snapValues | |
| threshold | back to summary |
|---|---|
| private float threshold | |
| visualInterpolationInverse | back to summary |
|---|---|
| private Interpolation visualInterpolationInverse | |
| Slider | back to summary |
|---|---|
| public Slider(float min, float max, float stepSize, boolean vertical, Skin skin) | |
| Slider | back to summary |
|---|---|
| public Slider(float min, float max, float stepSize, boolean vertical, Skin skin, String styleName) | |
| Slider | back to summary |
|---|---|
| public Slider(float min, float max, float stepSize, boolean vertical, Slider. Creates a new slider. If horizontal, its width is determined by the prefWidth parameter, its height is determined by the
maximum of the height of either the slider
| |
| calculatePositionAndValue | back to summary |
|---|---|
| pack-priv boolean calculatePositionAndValue(float x, float y) | |
| getBackgroundDrawable | back to summary |
|---|---|
| protected Drawable getBackgroundDrawable() Overrides com.
| |
| getKnobAfterDrawable | back to summary |
|---|---|
| protected Drawable getKnobAfterDrawable() Overrides com. | |
| getKnobBeforeDrawable | back to summary |
|---|---|
| protected Drawable getKnobBeforeDrawable() Overrides com. | |
| getKnobDrawable | back to summary |
|---|---|
| protected Drawable getKnobDrawable() Overrides com.
| |
| getSnapToValues | back to summary |
|---|---|
public float[] getSnapToValues()
| |
| getSnapToValuesThreshold | back to summary |
|---|---|
| public float getSnapToValuesThreshold() | |
| getStyle | back to summary |
|---|---|
| public Slider. Overrides com. Implements com. Returns the slider's style. Modifying the returned style may not have an effect until | |
| isDragging | back to summary |
|---|---|
| public boolean isDragging() Returns true if the slider is being dragged. | |
| isOver | back to summary |
|---|---|
| public boolean isOver() | |
| setButton | back to summary |
|---|---|
| public void setButton(int button) Sets the mouse button, which can trigger a change of the slider. Is -1, so every button, by default. | |
| setSnapToValues | back to summary |
|---|---|
| public void setSnapToValues(float threshold, float... values) Makes this slider snap to the specified values when the knob is within the threshold.
| |
| setSnapToValues | back to summary |
|---|---|
| public void setSnapToValues(float[] values, float threshold)
Deprecated Makes this progress bar snap to the specified values, if the knob is within the threshold.
| |
| setVisualInterpolationInverse | back to summary |
|---|---|
| public void setVisualInterpolationInverse(Interpolation interpolation) Sets the inverse interpolation to use for display. This should perform the inverse of the
| |
| setVisualPercent | back to summary |
|---|---|
| public void setVisualPercent(float percent) Sets the value using the specified visual percent. | |
| snap | back to summary |
|---|---|
| protected float snap(float value) Returns a snapped value from a value calculated from the mouse position. The default implementation uses
| |
Slider.
| Modifier and Type | Field and Description |
|---|---|
| public Drawable | |
| public Drawable | |
| public Drawable | |
| public Drawable | |
| public Drawable | |
| public Drawable | |
| public Drawable | |
| public Drawable |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| backgroundDown | back to summary |
|---|---|
| public Drawable backgroundDown
| |
| backgroundOver | back to summary |
|---|---|
| public Drawable backgroundOver
| |
| knobAfterDown | back to summary |
|---|---|
| public Drawable knobAfterDown
| |
| knobAfterOver | back to summary |
|---|---|
| public Drawable knobAfterOver
| |
| knobBeforeDown | back to summary |
|---|---|
| public Drawable knobBeforeDown
| |
| knobBeforeOver | back to summary |
|---|---|
| public Drawable knobBeforeOver
| |
| knobDown | back to summary |
|---|---|
| public Drawable knobDown
| |
| knobOver | back to summary |
|---|---|
| public Drawable knobOver
| |
| SliderStyle | back to summary |
|---|---|
| public SliderStyle() | |
| SliderStyle | back to summary |
|---|---|
| public SliderStyle(Drawable background, Drawable knob) | |
| SliderStyle | back to summary |
|---|---|
| public SliderStyle(Slider. | |