AWTX Home | Demo | Documentation | Download | Support
Using this applet you can make range selection of numeric values. You set min and max range limits in <applet> tag, you also can set precision (1, 0.1, ...) and text for the checkbox. You should drag min/max markers with mouse. Current marker position you get from JavaScript code.
Class SliderApplet
- public class SliderApplet
- extends Applet
- implements ItemListener
Applet parameters
<applet width="200" height="60" codebase="." code="SliderApplet.class"
name="LSlider">
<param name="TEXT" value="Radius:">
<param name="MINVALUE" value="10.5">
<param name="MAXVALUE" value="15.9">
<param name="PRECISION" value="0.1">
<param name="CURMIN" value="11.3">
<param name="CURMAX" value="13.6">
</applet>
- TEXT
- The slider title to be displayed near the checkbox.
Usually describes the measure of the slider (Temperature, Power, etc.)
- MINVALUE
- Determines Min limit of the slider scale.
- MAXVALUE
- Determines Max limit of the slider scale.
- PRECISION
- Determines the precision of the slider scale, so when you drag a marker its value is being increased with this precision. Example: 1 ; 0.1 ; 0.01 ; 10
- CURMIN
- Current value of Min-marker.
- CURMAX
- Current value of Max-marker.
-
()
-
(int)
-
()
-
()
-
(double, double)
-
SliderApplet
public SliderApplet()
setValues
public void setValues(double v1, double v2)
- Sets current values for Min and Max markers.
- Parameters:
- v1 - new Min-marker value,
v2 - new Max-marker value.
setDisabled
public void setDisabled()
- Disables the slider, so the checkbox is unchecked
and no current values for markers.
To enable the slider back you can check the checkbox or mouse drag any marker.
getValue
public String getValue(int index)
- Parameters:
- index - determines which value to return,
0 means current Min,
1 means current Max.
- Returns:
- Current value of Min or Max marker.
hasData
public boolean hasData()
- Returns:
true if the slider is enabled (the checkbox is checked)
so the slider has data, false otherwise.

Questions or comments? Write us, you are always welcome.
Check our other products.
|