Class Table
java.lang.Object
com.aquima.interactions.composer.model.Element
com.aquima.interactions.composer.model.CompositeElement
com.aquima.interactions.composer.model.Container
com.aquima.interactions.composer.model.table.TableElement
com.aquima.interactions.composer.model.table.Table
- All Implemented Interfaces:
ICompositeElement
,IContainer
,IElement
,Serializable
Table is a Container object representing a table.
For internal use only. The TableBuilder class may be used to create a table container structure.
- Since:
- 5.0
- Author:
- Jon van Leuven
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionTable
(int columnCount) Constructs the table with the specified amount of columns.Constructs the table with the specified amount of columns.protected
Table
(TableHeader header) Constructs the table with a header. -
Method Summary
Modifier and TypeMethodDescriptionThis method will invoke the visitor for this runtime element.void
this method can be used to add a row to the table.void
addRow
(Serializable id, Serializable[] cells) This method can be used to add a row to the table.This method duplicates the container element.boolean
Compare this container to another (not its elements, @seeCompositeElement.equalsContent(com.aquima.interactions.composer.ICompositeElement)
to compare its elements).boolean
equalsContent
(ICompositeElement other) This methods checks if this table equals the content of another table.int
This method returns the number of columns of the table.This method returns the header that is used by the table.getRowAt
(int index) This method returns the row at the specified index.int
This method returns the number of rows that are present in the table.This method returns the ID that is used to identify a row.TableRow[]
getRows()
This method returns an array containing all the rows of the table.int
hashCode()
void
setHeader
(TableHeader header) This method can be used to specify the table header.void
This method can be used to set the ID that should be used to identify rows.void
sortRows
(Comparator<TableRow> comparator) This method can be used to sort the table rows.Methods inherited from class com.aquima.interactions.composer.model.table.TableElement
setParent
Methods inherited from class com.aquima.interactions.composer.model.Container
addMessage, clearMessages, collectMessages, getDisplayText, getEntityInstanceId, getLastRepeatInstanceId, getMessages, getProperty, getReferenceAttribute, getTypeName, setDisplayText, setEntityContext, setLastRepeatInstanceId, setProperty, setReferenceAttribute, setTypeName, toString
Methods inherited from class com.aquima.interactions.composer.model.CompositeElement
addElement, addElements, getContentStyle, getElement, getElement, getElementCount, getElements, insertElement, removeAllElements, removeElement, replaceElementWithElements, setContentStyle, setElements
Methods inherited from class com.aquima.interactions.composer.model.Element
addPresentationStyle, evaluateTsl, getName, getParent, getPresentationStyles, getPropertyKeys, getRuntimeKey, getVisibilityCondition, hasFocus, hasPresentationStyle, isReadonly, isReadonlyInheritFromParent, isVisible, setFocus, setParent, setPresentationStyle, setPresentationStyles, setPresentationStyles, setReadonly, setReadonlyInheritFromParent, setRuntimeKey, setVisibilityCondition, setVisible
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.aquima.interactions.composer.ICompositeElement
getContentStyle, getElement, getElement, getElementCount, getElements
Methods inherited from interface com.aquima.interactions.composer.IElement
getName, getParent, getPresentationStyles, getPropertyKeys, getRuntimeKey, hasFocus, hasPresentationStyle, isReadonly, isReadonlyInheritFromParent, isVisible
-
Constructor Details
-
Table
Constructs the table with the specified amount of columns.- Parameters:
columnCount
- The number of columns of the table.basedOn
- The container that should be used to copy parameters from.
-
Table
-
Table
public Table(int columnCount) Constructs the table with the specified amount of columns.- Parameters:
columnCount
- The number of columns of the table.
-
Table
Constructs the table with a header.- Parameters:
header
- The table header that should be used.
-
-
Method Details
-
duplicate
Description copied from class:Container
This method duplicates the container element.- Specified by:
duplicate
in interfaceIElement
- Overrides:
duplicate
in classTableElement
- Returns:
- A clone of this element.
-
sortRows
This method can be used to sort the table rows.- Parameters:
comparator
- The comparator that should be used to sort the rows.
-
getColumnCount
public int getColumnCount()This method returns the number of columns of the table.- Returns:
- the number of columns of the table.
-
getHeader
This method returns the header that is used by the table.- Returns:
- the header that is used by the table.
-
setHeader
This method can be used to specify the table header.- Parameters:
header
- The table header that should be used.
-
getRowIdentifier
This method returns the ID that is used to identify a row.- Returns:
- the ID that is used to identify a row.
-
setRowIdentifier
This method can be used to set the ID that should be used to identify rows.- Parameters:
id
- the ID that should be used to identify rows.
-
addRow
this method can be used to add a row to the table.- Parameters:
row
- The row that should be added.
-
addRow
This method can be used to add a row to the table.- Parameters:
id
- The id of the row.cells
- The cells of the row.
-
getRows
This method returns an array containing all the rows of the table.- Returns:
- an array containing all the rows of the table.
-
getRowAt
This method returns the row at the specified index.- Parameters:
index
- The index of the requested row.- Returns:
- The row at the specified index.
-
getRowCount
public int getRowCount()This method returns the number of rows that are present in the table.- Returns:
- the number of rows that are present in the table.
-
accept
Description copied from class:Element
This method will invoke the visitor for this runtime element.- Specified by:
accept
in interfaceICompositeElement
- Specified by:
accept
in interfaceIElement
- Overrides:
accept
in classTableElement
- Parameters:
visitor
- The visitor that should be invoked.- Returns:
- The visitor passed to this method.
- Throws:
AppException
- This exception may be raised by the visitor implementation.
-
equals
Description copied from class:Container
Compare this container to another (not its elements, @seeCompositeElement.equalsContent(com.aquima.interactions.composer.ICompositeElement)
to compare its elements). -
hashCode
public int hashCode() -
equalsContent
This methods checks if this table equals the content of another table. The content will be checked recursive, for example if a table cell contains a container which contains a sub container which contains a field with a different value false will be returned. If other is no instance of Table false is returned.- Specified by:
equalsContent
in interfaceICompositeElement
- Overrides:
equalsContent
in classCompositeElement
- Parameters:
other
- Table to compare to- Returns:
- boolean if content of this table equals the content of another table.
-