ch.sahits.model.gui
Interface IFormGroup

All Superinterfaces:
IFormElement

public interface IFormGroup
extends IFormElement

This interface defines a container that can hold several form elements. For example a label and it's input field or a group of radio buttons

Since:
0.9.4
Author:
Andi Hotz

Method Summary
 void add(IFormElement element)
          Add an element to the group
 java.util.List<IFormElement> elements()
          Retrieve a list of all elements of this group
 IFormGroup findGroup(java.lang.String groupName)
          Retrieve the group with the name groupName.
 java.util.List<IFormElement> flatten()
          Flatten all elements of the group into a list
 java.lang.String getName()
          Retrieve the name of the group
 int internHashCode()
          This method returns a hashCode that does not recurse through the elements since this may cause endless ricurrsion.
 void printTree(int level)
          Print the tree of a group element
 void setName(java.lang.String name)
          Set the name of the group
 
Methods inherited from interface ch.sahits.model.gui.IFormElement
getId, getTooltip, setId, setTooltip
 

Method Detail

elements

java.util.List<IFormElement> elements()
Retrieve a list of all elements of this group

Returns:
List of IFormElements

add

void add(IFormElement element)
Add an element to the group

Parameters:
element - to be added

getName

java.lang.String getName()
Retrieve the name of the group

Specified by:
getName in interface IFormElement
Returns:
element name

setName

void setName(java.lang.String name)
Set the name of the group

Specified by:
setName in interface IFormElement
Parameters:
name - of the group

findGroup

IFormGroup findGroup(java.lang.String groupName)
Retrieve the group with the name groupName. The group is searched in the elements of the group.

Parameters:
groupName - name of the group
Returns:
found IFormGroup element or null if nothing is found

printTree

void printTree(int level)
Print the tree of a group element

Parameters:
level - indention level is the depth of the node

flatten

java.util.List<IFormElement> flatten()
Flatten all elements of the group into a list

Returns:
List of elements

internHashCode

int internHashCode()
This method returns a hashCode that does not recurse through the elements since this may cause endless ricurrsion.

Returns:
constant hash Code