Difference between revisions of "UserList"
Jump to navigation
Jump to search
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{UI Object Header}} | {{UI Object Header}} | ||
− | A panel with a list of [[user|user buttons]], used to execute customized Java code or generate events for the EVENTS interpreter. | + | A panel with a list of items that work like [[user|user buttons]], used to execute customized Java code or generate events for the EVENTS interpreter. |
+ | |||
Pressing an item of the list, HSYCO calls the method: | Pressing an item of the list, HSYCO calls the method: | ||
:userCommand(String name, String param) | :userCommand(String name, String param) | ||
Line 6: | Line 7: | ||
:USER name=param | :USER name=param | ||
defined in EVENTS. | defined in EVENTS. | ||
+ | |||
If the repeat parameter is "true", a long press will repeat the request every second. | If the repeat parameter is "true", a long press will repeat the request every second. | ||
For a tutorial on how to use this object see [[Working with User objects]]. | For a tutorial on how to use this object see [[Working with User objects]]. | ||
− | [[File:UI Object | + | [[File:UI Object userlist.png]] |
== Parameters == | == Parameters == | ||
Line 20: | Line 22: | ||
*'''size''': the panel's width and height | *'''size''': the panel's width and height | ||
*'''css''': optional. Defines the CSS style for the input field | *'''css''': optional. Defines the CSS style for the input field | ||
− | *'''repeat''': if | + | *'''repeat''': if "enabled", the command will be repeat every second |
== Syntax == | == Syntax == | ||
− | ( | + | (userlist!<id> <name>; <parameters>; <labels>; <position>; <width>; <height>; <css>; <repeat>) |
E.g. | E.g. | ||
− | (userlist!myuserlist name; p1,p2,p3; user one, user two, user three; r1c1; 220; 224) | + | (userlist!myuserlist name; p1,p2,p3; user one,user two,user three; r1c1; 220; 224; font-size:16px; enabled) |
== UI Attributes == | == UI Attributes == | ||
Line 38: | Line 40: | ||
|rowspan="2"|enabled | |rowspan="2"|enabled | ||
|true | |true | ||
− | | | + | |Object is enabled |
|- | |- | ||
|false | |false | ||
− | | | + | |Object is disabled |
|- | |- | ||
|rowspan="2"|focus | |rowspan="2"|focus | ||
|true | |true | ||
− | |Focus the | + | |Focus the object. Only a single object should have this attribute at "true". |
|- | |- | ||
|false | |false | ||
Line 65: | Line 67: | ||
|- | |- | ||
− | | | + | |parameters |
|comma-separated list of strings | |comma-separated list of strings | ||
|Parameters | |Parameters | ||
Line 77: | Line 79: | ||
|width | |width | ||
|number of pixels | |number of pixels | ||
− | |Set the | + | |Set the object's width |
|- | |- | ||
|height | |height | ||
|number of pixels | |number of pixels | ||
− | |Set the | + | |Set the object's height |
+ | |- | ||
+ | |||
+ | |rowspan="2"|panel | ||
+ | |true | ||
+ | |Show background panel | ||
+ | |- | ||
+ | |false | ||
+ | |Hide background panel | ||
|- | |- | ||
|} | |} |
Latest revision as of 15:15, 6 February 2014
A panel with a list of items that work like user buttons, used to execute customized Java code or generate events for the EVENTS interpreter.
Pressing an item of the list, HSYCO calls the method:
- userCommand(String name, String param)
in the user.class class. HSYCO also executes all actions associated to the event:
- USER name=param
defined in EVENTS.
If the repeat parameter is "true", a long press will repeat the request every second.
For a tutorial on how to use this object see Working with User objects.
Parameters
- id: the object's ID, used by UISets
- name: name passed to the Java callback method and event in EVENTS
- parameters: comma-separated list of the parameters passed to the Java callback method and event in EVENTS
- labels: comma-separated list of labels corresponding to the parameters. If missing, parameters will be shown instead
- position: the object's position. Use the pixels or rows and columns coordinates format
- size: the panel's width and height
- css: optional. Defines the CSS style for the input field
- repeat: if "enabled", the command will be repeat every second
Syntax
(userlist!<id> <name>; <parameters>; <labels>; <position>; <width>; <height>; <css>; <repeat>)
E.g.
(userlist!myuserlist name; p1,p2,p3; user one,user two,user three; r1c1; 220; 224; font-size:16px; enabled)
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) |
UserList attributes
Name | Value | Description |
---|---|---|
enabled | true | Object is enabled |
false | Object is disabled | |
focus | true | Focus the object. Only a single object should have this attribute at "true". |
false | Reset focus | |
error | true | Manually shows an error feedback on the panel. |
false | Hides the error visualization. | |
name | string | UserList name |
parameters | comma-separated list of strings | Parameters |
labels | comma-separated list of strings | UserList labels |
width | number of pixels | Set the object's width |
height | number of pixels | Set the object's height |
panel | true | Show background panel |
false | Hide background panel |