Difference between revisions of "Slider"
Jump to navigation
Jump to search
(6 intermediate revisions by 2 users not shown) | |||
Line 6: | Line 6: | ||
Three versions are available: | Three versions are available: | ||
* ''slider'': vertical slider with a label and an on/off button | * ''slider'': vertical slider with a label and an on/off button | ||
− | [[File:UI Object slider.png]] | + | :[[File:UI Object slider.png]] |
* ''sliderv'': minimal vertical slider | * ''sliderv'': minimal vertical slider | ||
− | [[File:UI Object sliderv.png]] | + | :[[File:UI Object sliderv.png]] |
* ''sliderh'': minimal horizontal slider | * ''sliderh'': minimal horizontal slider | ||
− | [[File:UI Object sliderh.png]] | + | :[[File:UI Object sliderh.png]] |
== Parameters == | == Parameters == | ||
− | *''' | + | *'''address''': address passed to the Java callback method and event in EVENTS |
*'''position''': the object's position. Use the pixels or rows and columns coordinates format | *'''position''': the object's position. Use the pixels or rows and columns coordinates format | ||
*'''label''': the text label on the button. Can contain HTML tags | *'''label''': the text label on the button. Can contain HTML tags | ||
== Syntax == | == Syntax == | ||
− | (slider!id < | + | (slider!<id> <address>; <position>; <label>) |
− | (sliderv!id < | + | (sliderv!<id> <address>; <position>) |
− | (sliderh!id < | + | (sliderh!<id> <address>; <position>) |
E.g. | E.g. | ||
(slider!myslider slider1; x10y20; Label) | (slider!myslider slider1; x10y20; Label) | ||
Line 32: | Line 32: | ||
== UI Attributes == | == UI Attributes == | ||
{{UI Object Attributes (Common)}} | {{UI Object Attributes (Common)}} | ||
− | === | + | === Slider attributes === |
{| class="wikitable" | {| class="wikitable" | ||
!Name | !Name | ||
Line 40: | Line 40: | ||
|rowspan="4"|value | |rowspan="4"|value | ||
− | | | + | |<min>-<max> |
− | |Set the slider's value, from | + | |Set the slider's value, from <min> to <max> |
|- | |- | ||
|0%-100% | |0%-100% | ||
Line 47: | Line 47: | ||
|- | |- | ||
|on | off | |on | off | ||
− | |Set the slider's value to | + | |Set the slider's value to <max> (on) or <min> (off) |
|- | |- | ||
|0-n/n | |0-n/n | ||
|Set the slider's value, specifying a base. E.g. 64/256 sets the slider to 25% | |Set the slider's value, specifying a base. E.g. 64/256 sets the slider to 25% | ||
+ | |- | ||
+ | |||
+ | |range | ||
+ | |<min>,<max> | ||
+ | |Specify minimum and maximum values that the slider's value can assume. Default values are <min>,<max> | ||
|- | |- | ||
Line 64: | Line 69: | ||
|CSS color | |CSS color | ||
|Set the value bar's color | |Set the value bar's color | ||
+ | |- | ||
+ | |||
+ | |rowspan="2"|inverse | ||
+ | |true | ||
+ | |Inverts the slider's bar verse: on a slider object the cursor is at the top when the value is <min>, at the bottom when the value is <max> | ||
+ | |- | ||
+ | |false | ||
+ | |Default behaviour | ||
+ | |- | ||
+ | |||
+ | |spring | ||
+ | |<value> | ||
+ | |When moving and then releasing the cursor, it moves back to the defined spring value | ||
|- | |- | ||
Line 72: | Line 90: | ||
|false | |false | ||
|Field is disabled | |Field is disabled | ||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
Latest revision as of 16:16, 6 June 2014
A slider object that sends requests to the server.
Using this object you can execute customized Java code or generate events for the EVENTS interpreter, like with the user object, passing the object's name and the selected value.
Three versions are available:
- slider: vertical slider with a label and an on/off button
- sliderv: minimal vertical slider
- sliderh: minimal horizontal slider
Parameters
- address: address passed to the Java callback method and event in EVENTS
- position: the object's position. Use the pixels or rows and columns coordinates format
- label: the text label on the button. Can contain HTML tags
Syntax
(slider!<id> <address>; <position>; <label>) (sliderv!<id> <address>; <position>) (sliderh!<id> <address>; <position>)
E.g.
(slider!myslider slider1; x10y20; Label) (sliderv!myslider slider1; x10y20) (sliderh!myslider slider1; x10y20)
UI Attributes
Common attributes
Name | Value | Description |
---|---|---|
pos | x<x>y<y> | Position specified as x/y coordinates. E.g. x-5y10 |
r<r>c<c> | Position specified as row/column. E.g. r1c2 | |
visible | true | Default. Show the object |
false | Hide the object | |
blink | true | slow | Blink the object at a slow speed |
fast | Blink the object at a fast speed | |
false | Stop the blinking | |
opacity | 0.0 ... 1.0 | Object opacity from 0 (not visible) to 1 (fully visible) |
Slider attributes
Name | Value | Description |
---|---|---|
value | <min>-<max> | Set the slider's value, from <min> to <max> |
0%-100% | Set the slider's value, from 0% to 100% | |
off | Set the slider's value to <max> (on) or <min> (off) | |
0-n/n | Set the slider's value, specifying a base. E.g. 64/256 sets the slider to 25% | |
range | <min>,<max> | Specify minimum and maximum values that the slider's value can assume. Default values are <min>,<max> |
bar | true | Show the value bar |
false | Hide the value bar | |
barcolor | CSS color | Set the value bar's color |
inverse | true | Inverts the slider's bar verse: on a slider object the cursor is at the top when the value is <min>, at the bottom when the value is <max> |
false | Default behaviour | |
spring | <value> | When moving and then releasing the cursor, it moves back to the defined spring value |
enabled | true | Field is enabled |
false | Field is disabled |
A CSS color can be specified as
- hex value: #<rr><gg><bb> E.g. #FF1010
- color name: red, blue, white...
- as rgb: rgb(<r>,<g>,<b>) E.g. rgb(255,30,30)
- as rgba: rgba(<r>,<g>,<b>,<alpha>) E.g. rgba(255,30,30,0.5)