org.universAAL.support.utils.ui
Class Grouping

Package class diagram package Grouping
java.lang.Object
  extended by org.universAAL.support.utils.ui.Control
      extended by org.universAAL.support.utils.ui.Grouping
All Implemented Interfaces:
IContainer

public class Grouping
extends Control
implements IContainer

Class representing a Grouping of UI element. Groups round up UI elements to be logically and visually arranged , whether it's a frame line, layout or any other way, depending on the UI renderer. WARNING: A Grouping must be added to a SimpleUIRequest or other Group BEFORE any element can be added to it. This is because the Grouping is not actually created until it's added.

Example render:

   _Label________
  |              |
  | [X] Child    |
  | [_Child_]    |
  |______________|
 

Author:
alfiva

Field Summary
 
Fields inherited from class org.universAAL.support.utils.ui.Control
help, hint, label, MY_NAMESPACE, ref
 
Constructor Summary
Grouping()
          Generic empty constructor.
Grouping(String ref)
          Constructor with the reference of the Group to be used in response.
Grouping(String ref, String label)
          Constructor with the reference of the group to be used in response.
Grouping(String ref, String label, Resource root)
          Constructor with the reference of the group to be used in response.
 
Method Summary
 String[] add(Control ctrl)
          Add the given Simple Control UI element to this container.
 String[] create(Group group)
          This method is for internal use of utils only.
 
Methods inherited from class org.universAAL.support.utils.ui.Control
getHelp, getHint, getLabel, getReference, setHelp, setHint, setLabel, setReference, setReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Grouping

public Grouping()
Generic empty constructor. The Group will be generated with default values (empty).


Grouping

public Grouping(String ref)
Constructor with the reference of the Group to be used in response. The reference is a property path, but in this constructor it is simplified as a single String (a single-property path). All other properties of the input are set to defaults (empty). Use method setReference(String[] path) to set a path through several properties.

Parameters:
ref - The simple reference identifying the group. Set to null to auto-generate.

Grouping

public Grouping(String ref,
                String label)
Constructor with the reference of the group to be used in response. The reference is a property path, but in this constructor it is simplified as a single String (a single-property path). Use method setReference(String[] path) to set a path through several properties.

Parameters:
ref - The simple reference identifying the group. Set to null to auto-generate.
label - The label text that identifies the group to the user.

Grouping

public Grouping(String ref,
                String label,
                Resource root)
Constructor with the reference of the group to be used in response. The reference is a property path, but in this constructor it is simplified as a single String (a single-property path). Use method setReference(String[] path) to set a path through several properties.

Parameters:
ref - The simple reference identifying the group. Set to null to auto-generate.
label - The label text that identifies the group to the user.
root - The root Resource for the child elements to be added to this group.
Method Detail

create

public String[] create(Group group)
Description copied from class: Control
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.

Specified by:
create in class Control
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.

add

public String[] add(Control ctrl)
Description copied from interface: IContainer
Add the given Simple Control UI element to this container. Once the control is added it cannot be modified. Controls are renedered in the same order they are added. Controls that are Containers and can add elements as well, like Group or Repeat, must be added BEFORE other controls can be added to them. Controls that need references, like Inputs (with property paths), or Submits (with IDs) will be given an automatic reference if none was set. This reference will be returned by this method, in the form of an Array of Strings representing the reference: a Path for Inputs, or a single String for Submits IDs.

Specified by:
add in interface IContainer
Parameters:
ctrl - The Simple Control UI element to be added.
Returns:
The Array of Strings representing the reference Property Path for Input Controls, or with a single String for Submits IDs.


Copyright © 2014 universAAL Consortium. All Rights Reserved.