|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.universAAL.support.utils.ui.Forms
public class Forms
Helper shortcut class with static methods to generate all kinds of SimpleControls UI elements more quickly, directly usable from the add methods of the Simple UI Requests.
Example: Creating a dialog for selecting a light from a list and have commands for turning it on and off.
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);
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |