public class Forms extends Object
Dialog d=new Dialog(user,"Light interface");
d.add(Forms.out("-","Select one of the following lights"));
d.add(Forms.one(LIST_URI, "Lights",new String[]{"ligth1","light2","light3"}));
d.addSubmit(Forms.submit(SUBMIT_ON,"Turn On"));
d.addSubmit(Forms.submit(SUBMIT_OFF,"Turn Off"));
caller.sendUIRequest(d);
Modifier and Type | Method and Description |
---|---|
static Area |
area(String ref,
String label)
Create a Area control.
|
static Check |
check(String ref,
String label)
Create a Area control.
|
static Media |
media(String label,
String url)
Create a Media control.
|
static SelectMulti |
multi(String ref,
String label,
String[] initialOptions)
Create a SelectMulti control.
|
static SelectOne |
one(String ref,
String label,
String[] initialOptions)
Create a SelectOne control.
|
static Out |
out(String label,
String value)
Create a Out control.
|
static SelectRange |
range(String ref,
String label,
int min,
int max)
Create a SelectRange control.
|
static SubmitCmd |
submit(String ref,
String label)
Create a SubmitCmd control.
|
static Text |
text(String ref,
String label)
Create a Text control.
|
static TriggerCmd |
trigger(String ref,
String label)
Create a TriggerCmd control.
|
public static Area area(String ref, String label)
ref
- The simple reference identifying the input. Set to null to
auto-generate.label
- The label text that identifies the input to the user.public static Check check(String ref, String label)
ref
- The simple reference identifying the input. Set to null to
auto-generate.label
- The label text that identifies the input to the user.public static Media media(String label, String url)
label
- The label text that identifies the output to the user.url
- The URL to the value to be displayed, from the Resource
server.public static Out out(String label, String value)
label
- The label text that identifies the output to the user.value
- The output value to be displayed.public static SelectRange range(String ref, String label, int min, int max)
ref
- The simple reference identifying the input. Set to null to
auto-generate.label
- The label text that identifies the input to the user.min
- The low end of the range that the value can get (inclusive)max
- The high end of the range that the value can get (inclusive)public static SelectMulti multi(String ref, String label, String[] initialOptions)
ref
- The simple reference identifying the input. Set to null to
auto-generate.label
- The label text that identifies the input to the user.initialOptions
- An array of Strings that represent the different possible
options to select.public static SelectOne one(String ref, String label, String[] initialOptions)
ref
- The simple reference identifying the input. Set to null to
auto-generate.label
- The label text that identifies the input to the user.initialOptions
- An array of Strings that represent the different possible
options to select.public static SubmitCmd submit(String ref, String label)
ref
- The simple reference identifying the input. Set to null to
auto-generate.label
- The label text that identifies the submit to the user.public static Text text(String ref, String label)
ref
- The simple reference identifying the input. Set to null to
auto-generate.label
- The label text that identifies the input to the user.public static TriggerCmd trigger(String ref, String label)
ref
- The simple reference identifying the input. Set to null to
auto-generate.label
- The label text that identifies the submit to the user.Copyright © 2018 universAAL Consortium. All rights reserved.