public class SliderEntry extends EntryItem
Constructor and Description |
---|
SliderEntry(int min,
int max,
int init,
int majorSpacing,
int minorSpacing)
Creates a horizontal slider with given properties.
|
Modifier and Type | Method and Description |
---|---|
javax.swing.JSlider |
getSlider()
Returns the underlaying JSlider
|
int |
getValue()
Returns the current knob position.
|
boolean |
isTouched()
Returns true, if the slider widget was hit by the mouse until the last call if this method.
|
void |
setEnabled(boolean enable)
Enable/disable the button.
|
void |
setValue(int value)
Sets the current knob position programmatically.
|
public SliderEntry(int min, int max, int init, int majorSpacing, int minorSpacing)
min
- the minimum value of the slidermax
- the maximum value of the sliderinit
- the initial knob position of the slidermajorSpacing
- the number of values between the major tick marksminorSpacing
- the number of values between the minor tick markspublic javax.swing.JSlider getSlider()
public int getValue()
public void setValue(int value)
value
- the new knob positionpublic void setEnabled(boolean enable)
public boolean isTouched()