org.universAAL.support.utils.ui
Class Control

Package class diagram package Control
java.lang.Object
  extended by org.universAAL.support.utils.ui.Control
Direct Known Subclasses:
DataTable, Grouping, InputControl, Media, Out, SubmitCmd

public abstract class Control
extends Object

Abstract class representing a Form Control in a Simple UI request. Form Controls are UI elements that can be added to Containers, be them Dialogs, SubDialogs, Messages or even other Controls such as Groups or Repeats.

Author:
alfiva

Field Summary
protected  String help
          Help text popup.
protected  String hint
          Hint text popup.
protected  Label label
          Text label.
static String MY_NAMESPACE
          Default namespace
protected  PropertyPath ref
          Path for ID.
 
Constructor Summary
Control()
           
 
Method Summary
abstract  String[] create(Group group)
          This method is for internal use of utils only.
 String getHelp()
          Get the Help string associated with this control.
 String getHint()
          Get the Hint string associated with this control.
 String getLabel()
          Get the Label string associated with this control.
 String[] getReference()
          Get the reference Property Path that identifies this control within the request and the response in the case of Input Controls.
 void setHelp(String help)
          Set the Help string associated with this control.
 void setHint(String hint)
          Set the Hint string associated with this control.
 void setLabel(String txt)
          Set the Label string associated with this control.
 void setReference(String reference)
          Set the reference Property Path that identifies this control within the request and the response in the case of Input Controls.
 void setReference(String[] reference)
          Set the reference Property Path that identifies this control within the request and the response in the case of Input Controls.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MY_NAMESPACE

public static final String MY_NAMESPACE
Default namespace

See Also:
Constant Field Values

ref

protected PropertyPath ref
Path for ID.


label

protected Label label
Text label.


help

protected String help
Help text popup.


hint

protected String hint
Hint text popup.

Constructor Detail

Control

public Control()
Method Detail

create

public abstract String[] create(Group group)
This method is for internal use of utils only. It creates the actual official uaal control configured with the properties defined by this class. Once it is created it cannot be modified.

Parameters:
group - The UI group to which the control is being added.
Returns:
An array of Strings representing the property path used to identify the control in the response. This is only of interest for Input Controls. Submits and Triggers have only one String value. If the path has not been set manually by the time this method is called, an automatic one must be generated.

getHelp

public String getHelp()
Get the Help string associated with this control.

Returns:
The Help String

setHelp

public void setHelp(String help)
Set the Help string associated with this control.

Parameters:
help - The Help String

getHint

public String getHint()
Get the Hint string associated with this control.

Returns:
The Help String

setHint

public void setHint(String hint)
Set the Hint string associated with this control.

Parameters:
hint - The Hint String

getReference

public String[] getReference()
Get the reference Property Path that identifies this control within the request and the response in the case of Input Controls. For Submits, it is a single String ID.

Returns:
The Array of Strings representing the reference Property path

setReference

public void setReference(String reference)
Set the reference Property Path that identifies this control within the request and the response in the case of Input Controls. For Submits, it is a single String ID.

Parameters:
reference - The String representing the reference Property path or ID

setReference

public void setReference(String[] reference)
Set the reference Property Path that identifies this control within the request and the response in the case of Input Controls. For Submits, it is a single String ID, so it only counts the last value.

Parameters:
reference - The Array of Strings representing the reference Property path or ID

getLabel

public String getLabel()
Get the Label string associated with this control.

Returns:
The Label String

setLabel

public void setLabel(String txt)
Set the Label string associated with this control.

Parameters:
txt - The Label String


Copyright © 2014 universAAL Consortium. All Rights Reserved.