SLIDER applet
Description of parameters and interface
functions
Remarks: This document describes two different applets: SimpleSlider applet (axis with one marker) and SliderApplet (axis with two markers and checkbox at bottom). Functions and parameters related to first applet only marked as (1), only to second - as (2), to both - (*).
1. Parameters.
Color parameters(*).
This enumeration of parameters describes color for tree applet.
| Name | Description |
|---|---|
| BG_COLOR | Color of the background of applets |
| FG_COLOR | Color for axis labels and hint text |
| HINT_COLOR | Color for hint rectangle |
MINNVALUE, MAXVALUE and PRECISSION(*).
This parameters describes the range of values on axis and minimal precision
for text labels below of axis. Precission value can be missed, in this case it
value will be calculated automatically.
UPDATE_FUN (*).
The name of script function, wich will be called when value of slider is
changed. It must has one parameter for SimpleSlider and two parameters for
SliderApplet.
CURMIN, CURMAX(2).
These parameters determine initial states of markers. The next condition must
be took place:
MINVALUE <= CURMIN <= CURMAX <=MAXVALUE
CURVALUE parameter(1):
Initial state of marker
MINRANGE parameter(1):
The lower bound of marker. It can be moved between this value and start
position of axis.
TEXT parameter(2):
Text label for checkbox.
2. Functions.
2.1 For SimpleSlider applet.
double getValue()
Returns current selected value.
int getIntValue()
Returns current rounded value.
setValue(double value)
Sets value for slider.
2.2 For SliderApplet applet.
setValues(double v1, double v2)
Sets values for both markers.
setDisabled()
Sets Disable flag for slider. Checkboks turning to off state, markers moving to boundary positions.
getValue(int index)
Returns value of first (index=0) or second (index=1) markers. Returns zero length string if index has another values or if Disable flag was set.
void setEnable(boolean p)
Resets Disable flag for applet.
boolean hasData()
Returns TRUE if Disable flag was not be set.