nl.gx.webmanager.cms.element
Interface TableElement

All Superinterfaces:
DelegatedControllerAware, Element, Presentable, Wrapper

public interface TableElement
extends Element

Representation of table element.


Nested Class Summary
static class TableElement.Alignment
          Alignment definition for the table as a whole.
 
Method Summary
 void addColumn()
          Adds a column for every existing row.
 void addRow()
          Adds a row for every existing column.
 java.lang.String getAlign()
          Deprecated. 
 TableElement.Alignment getAlignment()
          Gets the alignment for the table.
 java.lang.String[] getColumnWidths()
          Returns an array container all column widths in the order of existence.
 java.lang.String getLinkCode()
          Returns the code of the related link assigned to the table as a whole.
 java.lang.String getSeparatorStyle()
          Deprecated. This method is only needed for backwards compatibility with table models.
 java.lang.String getStyle()
          Deprecated. This method is only needed for backwards compatibility with table models.
 TableRow[] getTableRows()
          Returns all the rows of the table.
 java.lang.String[] getTableWidths()
          Deprecated. 
 java.lang.String getTitle()
          Returns the title.
 java.lang.String getTitleStyle()
          Deprecated. This method is only needed for backwards compatibility with table models.
 java.lang.String getWidth()
          Returns the width.
 boolean isFirstColumnHeader()
          Returns whether the first column is defined as a header.
 boolean isFirstRowHeader()
          Returns whether the first row is defined as a header.
 void removeColumn(int index)
          Removes the column with indicated index.
 void removeRow(int index)
          Removes the row with indicated index.
 void setAlignment(TableElement.Alignment alignment)
          Sets the alignment for the table.
 void setCellContent(int columnIndex, int rowIndex, java.lang.String content)
          Sets the indicated cell by row and column index with content.
 void setColumnWidths(java.lang.String[] columnWidths)
          Sets the widths for each column defined.
 void setFirstColumnIsHeader(boolean isFirstColumnHeader)
          Sets a prarameter to indicate wether the first column is to be shown as header.
 void setFirstRowIsHeader(boolean isFirstRowHeader)
          Sets a prarameter to indicate wether the first row is to be shown as header.
 void setLinkCode(java.lang.String code)
          Sets the internal link code needed to place an internal link tag around the table.
 void setTitle(java.lang.String title)
          Sets the title.
 void setWidth(java.lang.String width)
          Sets the width for the table either in percentages of pixels.
 
Methods inherited from interface nl.gx.webmanager.cms.element.Element
cleanup, copy, getEditElementHeader, getElementHolder, getHeader, getIcon, getMediaItemVersion, getPageModel, getPageModelElement, getPageVersion, getPersonalization, getWebsite, isAuthorized, setAuthorized, setDefaultPresentation, setEditElementHeader, setHeader, setIcon, setPersonalization
 
Methods inherited from interface nl.gx.webmanager.cms.core.Presentable
getPresentation, render, render, setPresentation
 
Methods inherited from interface nl.gx.webmanager.wrapper.Wrapper
getId, getUUID, setId, setUUID
 
Methods inherited from interface nl.gx.webmanager.springmvc.DelegatedControllerAware
getDelegatedController, setDelegatedController
 

Method Detail

addColumn

void addColumn()
Adds a column for every existing row. If not the first this column will be added at the end.


removeColumn

void removeColumn(int index)
Removes the column with indicated index. The index is zero bound.

Parameters:
index - the zero bound index of the column to be removed

addRow

void addRow()
Adds a row for every existing column. If not the first this row will be added at the end .


removeRow

void removeRow(int index)
Removes the row with indicated index. The index is zero bound.

Parameters:
index - the zero bound index of the row to be removed

setCellContent

void setCellContent(int columnIndex,
                    int rowIndex,
                    java.lang.String content)
Sets the indicated cell by row and column index with content. Existing content is replaced.

Parameters:
columnIndex - the zero bound index of the column
rowIndex - the zero bound index of the row
content - The content

getTableRows

TableRow[] getTableRows()
Returns all the rows of the table.

Returns:
All rows of the table.

isFirstRowHeader

boolean isFirstRowHeader()
Returns whether the first row is defined as a header. Returns true if the horizontal headers checkbox of the element is checked, false otherwise. If the first row is a header, then the presentation for the tableElement should generate every column of the first row with a th tag and scope="col" attribute.

Returns:
whether the first row is defined as a header

setFirstRowIsHeader

void setFirstRowIsHeader(boolean isFirstRowHeader)
Sets a prarameter to indicate wether the first row is to be shown as header.

Parameters:
isFirstRowHeader - is the first row a header

isFirstColumnHeader

boolean isFirstColumnHeader()
Returns whether the first column is defined as a header. Returns true if the vertical headers checkbox of the element is checked, false otherwise. If the first column is a header, then the presentation for the tableElement should generate the first column of every row with the scope="row" attribute.

Returns:
whether the first column is defined as a header

setFirstColumnIsHeader

void setFirstColumnIsHeader(boolean isFirstColumnHeader)
Sets a prarameter to indicate wether the first column is to be shown as header.

Parameters:
isFirstColumnHeader - is the first columns a header

getTitle

java.lang.String getTitle()
Returns the title.

Returns:
The title for the table

setTitle

void setTitle(java.lang.String title)
Sets the title.

Parameters:
title - the title

getWidth

java.lang.String getWidth()
Returns the width.

Returns:
The width for the table in "30%" or "250" format; empty if no width was specified.

setWidth

void setWidth(java.lang.String width)
Sets the width for the table either in percentages of pixels. Percentages are to be entered as 'xx%' like '30%'. If the percent sign is omitted, the assumption is made that the column width is expressed in pixels.

Parameters:
width - The width to be set

getAlign

@Deprecated
java.lang.String getAlign()
Deprecated. 

Returns the alignment string.

Returns:
The alignment string for the table.

getAlignment

TableElement.Alignment getAlignment()
Gets the alignment for the table.

Returns:
the alignment for the table.

setAlignment

void setAlignment(TableElement.Alignment alignment)
Sets the alignment for the table.

Parameters:
alignment - the alignment for the image.

getTableWidths

@Deprecated
java.lang.String[] getTableWidths()
Deprecated. 

Returns the array containing all defined widths for columns.

Returns:
An array containing all defined widths for columns.

getColumnWidths

java.lang.String[] getColumnWidths()
Returns an array container all column widths in the order of existence.

Returns:
An array containing all defined widths for columns.

setColumnWidths

void setColumnWidths(java.lang.String[] columnWidths)
Sets the widths for each column defined. The number of widths should match the number of columns. Percentages should be entered following a % sign ie '20%'. If the percent sign is omitted, the assumption is made that the column width is expressed in pixels.

Parameters:
columnWidths - The widths of each column

getStyle

java.lang.String getStyle()
Deprecated. This method is only needed for backwards compatibility with table models.

Returns the string for use in the style attribute of the HTML table tag. This method makes use of the following properties in the descriptor XML: Background color for the tableBackground image for the table
NameRequiredTypeDescription
tableBordernointWidth of the table border in pixels
tableBorderColornoColorColor for the table border
tableBackgroundColornoColor
tableBackgroundImagenoImage

Returns:
The style string for the table.

getSeparatorStyle

java.lang.String getSeparatorStyle()
Deprecated. This method is only needed for backwards compatibility with table models.

Returns the string for use in the style attribute of the HTML td tag for the separator. This method makes use of the following properties in the descriptor XML: Color for the row separator
NameRequiredTypeDescription
tableBordernointWidth of the table border in pixels
tableBorderColornoColorColor for the table border
tableRowSeparatorColornoColor

Returns:
The style string for the td.

getTitleStyle

java.lang.String getTitleStyle()
Deprecated. This method is only needed for backwards compatibility with table models.

Returns the string for use in the style attribute of the HTML div tag used for the title of the table. This method makes use of the following properties in the descriptor XML: Background color for the titleThe value to be used for the CSS text-align property
NameRequiredTypeDescription
tableBordernointWidth of the table border in pixels
tableBorderColornoColorColor for the table border
tableTitleBackgroundColornoColor
tableTitleBackgroundImagenoImageBackground image for the title
tableTitleFontnoFontFont string for the title
tableTitleAlignnoString

Returns:
The style string for the title div, e.g. "font: bold 14px Arial;text-align: right"

getLinkCode

java.lang.String getLinkCode()
Returns the code of the related link assigned to the table as a whole.

Returns:
The code which is assigned to the related link.

setLinkCode

void setLinkCode(java.lang.String code)
Sets the internal link code needed to place an internal link tag around the table.

Parameters:
code - the internal link code needed to place an internal link tag around the table.


Copyright © 2007-2011 GX Software BV. All Rights Reserved.