de.lessvoid.nifty.controls
Interface Slider

All Superinterfaces:
NiftyControl
All Known Implementing Classes:
SliderControl, SliderNull

public interface Slider
extends NiftyControl

The Slider interface is the Nifty control API view of a Nifty Slider.

Author:
void

Method Summary
 float getButtonStepSize()
          Get the current button step size.
 float getMax()
          Get the current maximum value.
 float getMin()
          Get the current minimum value for the Slider.
 float getStepSize()
          Get the current StepSize.
 float getValue()
          Get the current value of the Slider.
 void setButtonStepSize(float buttonStepSize)
          Set a new Button StepSize.
 void setMax(float max)
          Set a new maximum value for the Slider.
 void setMin(float min)
          Set a new minimum value for the Slider.
 void setStepSize(float stepSize)
          Set a new StepSize.
 void setup(float min, float max, float current, float stepSize, float buttonStepSize)
          Set all attributes at once.
 void setValue(float value)
          Set the Slider value to a new value.
 
Methods inherited from interface de.lessvoid.nifty.controls.NiftyControl
disable, enable, getElement, getHeight, getId, getStyle, getWidth, hasFocus, isBound, isEnabled, layoutCallback, setEnabled, setFocus, setFocusable, setHeight, setId, setStyle, setWidth
 

Method Detail

setup

void setup(float min,
           float max,
           float current,
           float stepSize,
           float buttonStepSize)
Set all attributes at once.

Parameters:
min - minimum value
max - maximum value
current - current value
stepSize - step size
buttonStepSize - button step size

setValue

void setValue(float value)
Set the Slider value to a new value.

Parameters:
value - the new value for the slider

getValue

float getValue()
Get the current value of the Slider.

Returns:
current value

setMin

void setMin(float min)
Set a new minimum value for the Slider. The default value is 0.

Parameters:
min - new minimum value

getMin

float getMin()
Get the current minimum value for the Slider.

Returns:
get the current minimum

setMax

void setMax(float max)
Set a new maximum value for the Slider. The default value is 100.

Parameters:
max - the new maximum

getMax

float getMax()
Get the current maximum value.

Returns:
current maximum

setStepSize

void setStepSize(float stepSize)
Set a new StepSize. This is the minimum value the Slider value can be changed. The default value is 1.0f.

Parameters:
stepSize - the new step size

getStepSize

float getStepSize()
Get the current StepSize.

Returns:
current stepSize

setButtonStepSize

void setButtonStepSize(float buttonStepSize)
Set a new Button StepSize. This is the value that the slider value changes when one of the up/down or left/right button is clicked. The default value is 25.0f.

Parameters:
buttonStepSize - the new button step size value

getButtonStepSize

float getButtonStepSize()
Get the current button step size.

Returns:
the current step size


Copyright © 2011. All Rights Reserved.