ch.sahits.model.gui
Interface IForm

All Superinterfaces:
java.lang.Cloneable
All Known Subinterfaces:
IJavaForm

public interface IForm
extends java.lang.Cloneable

Definition of a form with all its contents.
A Form is clonable so it is easier to manipulate the form to conform to various constraints that might be put up by the generation methods.

Since:
0.9.4
Author:
Andi Hotz

Method Summary
 void add(IFormElement element)
          Add an element at the last position of the list
 void add(IFormElement element, int index)
          Add an element at position indexof the list.
 java.lang.Object clone()
          Increase the visibility of clone
 java.util.List<IFormElement> elements()
          Retrieve a list of all elements in a form
 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
 EFormLayout getLayout()
          Retrieve the layout of the form
 void printTree()
          Print out the form hierarchical elements
 void setLayout(EFormLayout layout)
          Set the form layout
 

Method Detail

elements

java.util.List<IFormElement> elements()
Retrieve a list of all elements in a form

Returns:
list of all element in the order they appear in the form

add

void add(IFormElement element)
Add an element at the last position of the list

Parameters:
element - to be added

add

void add(IFormElement element,
         int index)
Add an element at position indexof the list. All succeeding elements (including the on at position index are moved by one position.

Parameters:
element - to be added
index - where the element should be added

getLayout

EFormLayout getLayout()
Retrieve the layout of the form

Returns:
Form layout

setLayout

void setLayout(EFormLayout layout)
Set the form layout

Parameters:
layout -

findGroup

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

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

printTree

void printTree()
Print out the form hierarchical elements


flatten

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

Returns:
List of elements

clone

java.lang.Object clone()
Increase the visibility of clone

Returns:
cloned form