org.odftoolkit.simple.table
Class TableTemplate

java.lang.Object
  extended by org.odftoolkit.simple.table.TableTemplate

public class TableTemplate
extends Object

TableTemplate represents the table template feature in ODF documents.

Besides the seven types of style (first row, first column, last row, last column, even/odd rows,even/odd columns and body) defined by table:table-template in ODF 1.2, TableTemplate provide extension mechnism, which allows user to specify style value to additional cells. For example, in ODF 1.2 the four coner cells can only inherit styles from the colum or row they are existing, but through TableTemplate.ExtendedStyleType, they can reference any style defined in the document.

TableTemplate provide method to get/set a set of references to table cell styles that specify the formatting to be used on a table.


Nested Class Summary
static class TableTemplate.ExtendedStyleType
          Extended style types supported by table template.
 
Constructor Summary
protected TableTemplate()
          Create an instance of TableTemplate
  TableTemplate(TableTableTemplateElement tableTableTemplate)
          Create an instance of TableTemplate from an element
 
Method Summary
 String getExtendedParagraphStyleByType(TableTemplate.ExtendedStyleType type)
          get the value of paragraph style specified by type.
 String getExtendedTableStyleByType(TableTemplate.ExtendedStyleType type)
          get the value of table style specified by type.
 String getTableBodyParagraphStyle()
          get the value of paragraph style of body.
 String getTableBodyTableStyle()
          get the value of table style of body.
 String getTableEvenColumnsParagraphStyle()
          get the value of paragraph style of even columns.
 String getTableEvenColumnsTableStyle()
          get the value of table style of even columns.
 String getTableEvenRowsParagraphStyle()
          get the value of paragraph style of even rows.
 String getTableEvenRowsTableStyle()
          get the value of table style of even rows.
 String getTableFirstColumnParagraphStyle()
          get the value of paragraph style of first column.
 String getTableFirstColumnTableStyle()
          get the value of table style of first colum.
 String getTableFirstRowParagraphStyle()
          get the value of paragraph style of first row.
 String getTableFirstRowTableStyle()
          get the value of table style of first row.
 String getTableLastColumnParagraphStyle()
          get the value of paragraph style of last column.
 String getTableLastColumnTableStyle()
          get the value of table style of last column.
 String getTableLastRowParagraphStyle()
          get the value of paragraph style of last row.
 String getTableLastRowTableStyle()
          get the value of table style of last row.
 String getTableName()
          Return the name of table template.
 String getTableOddColumnsParagraphStyle()
          get the value of paragraph style of odd columns.
 String getTableOddColumnsTableStyle()
          get the value of table style of odd columns.
 String getTableOddRowsParagraphStyle()
          get the value of paragraph style of odd rows.
 String getTableOddRowsTableStyle()
          get the value of table style of odd rows.
 void setExtendedStyleByType(TableTemplate.ExtendedStyleType type, String tableStyle, String paraStyle)
          set the value of table style and paragraph style specified by type.
 void setTableBodyStyle(String tableStyleNameValue, String tableParagraphStyleNameValue)
          Set the value of table style and paragraph style of body.
 void setTableEvenColumnsStyle(String tableStyleNameValue, String tableParagraphStyleNameValue)
          Set the value of table style and paragraph style of even columns.
 void setTableEvenRowsStyle(String tableStyleNameValue, String tableParagraphStyleNameValue)
          Set the value of table style and paragraph style of even rows.
 void setTableFirstColumnStyle(String tableStyleNameValue, String tableParagraphStyleNameValue)
          Set the value of table style and paragraph style of first column.
 void setTableFirstRowStyle(String tableStyleNameValue, String tableParagraphStyleNameValue)
          Set the value of table style and paragraph style of first row.
 void setTableLastColumnStyle(String tableStyleNameValue, String tableParagraphStyleNameValue)
          Set the value of table style and paragraph style of last column.
 void setTableLastRowStyle(String tableStyleNameValue, String tableParagraphStyleNameValue)
          Set the value of table style and paragraph style of last row.
 void setTableName(String tableNameValue)
          Set the name of table template.
 void setTableOddColumnsStyle(String tableStyleNameValue, String tableParagraphStyleNameValue)
          Set the value of table style and paragraph style of odd columns.
 void setTableOddRowsStyle(String tableStyleNameValue, String tableParagraphStyleNameValue)
          Set the value of table style and paragraph style of odd rows.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableTemplate

protected TableTemplate()
Create an instance of TableTemplate


TableTemplate

public TableTemplate(TableTableTemplateElement tableTableTemplate)
Create an instance of TableTemplate from an element

Parameters:
tableTableTemplate - - the element of table:table-template
Method Detail

getTableName

public String getTableName()
Return the name of table template.

Null will be returned if there is no table template name setting.

Returns:
the table template name.

setTableName

public void setTableName(String tableNameValue)
Set the name of table template.

If the parameter tableNameValue is null, the table template name definition will be removed.

Parameters:
tableNameValue - - the table template name

getExtendedTableStyleByType

public String getExtendedTableStyleByType(TableTemplate.ExtendedStyleType type)
get the value of table style specified by type.

Null will be returned if there is no such extended style type setting.

Parameters:
type - - style type
Returns:
the style name referenced by this style type

getExtendedParagraphStyleByType

public String getExtendedParagraphStyleByType(TableTemplate.ExtendedStyleType type)
get the value of paragraph style specified by type.

Null will be returned if there is no such extended style type setting.

Parameters:
type - - extended style type
Returns:
the style name referenced by this style type

setExtendedStyleByType

public void setExtendedStyleByType(TableTemplate.ExtendedStyleType type,
                                   String tableStyle,
                                   String paraStyle)
set the value of table style and paragraph style specified by type.

Parameters:
type - - extended style type
tableStyle - - table style name
paraStyle - - paragraph style name

getTableBodyTableStyle

public String getTableBodyTableStyle()
get the value of table style of body.

Null will be returned if there is no such style setting.

Returns:
the style name referenced by table style of body.

getTableBodyParagraphStyle

public String getTableBodyParagraphStyle()
get the value of paragraph style of body.

Null will be returned if there is no such style setting.

Returns:
the style name referenced by paragraph style of body.

getTableEvenColumnsTableStyle

public String getTableEvenColumnsTableStyle()
get the value of table style of even columns.

Null will be returned if there is no such style setting.

Returns:
the style name referenced by table style of even columns.

getTableEvenColumnsParagraphStyle

public String getTableEvenColumnsParagraphStyle()
get the value of paragraph style of even columns.

Null will be returned if there is no such style setting.

Returns:
the style name referenced by paragraph style of even columns.

getTableEvenRowsTableStyle

public String getTableEvenRowsTableStyle()
get the value of table style of even rows.

Null will be returned if there is no such style setting.

Returns:
the style name referenced by table style of even rows.

getTableEvenRowsParagraphStyle

public String getTableEvenRowsParagraphStyle()
get the value of paragraph style of even rows.

Null will be returned if there is no such style setting.

Returns:
the style name referenced by paragraph style of even rows.

getTableFirstColumnTableStyle

public String getTableFirstColumnTableStyle()
get the value of table style of first colum.

Null will be returned if there is no such style setting.

Returns:
the style name referenced by table style of first column.

getTableFirstColumnParagraphStyle

public String getTableFirstColumnParagraphStyle()
get the value of paragraph style of first column.

Null will be returned if there is no such style setting.

Returns:
the style name referenced by paragraph style of first column.

getTableFirstRowTableStyle

public String getTableFirstRowTableStyle()
get the value of table style of first row.

Null will be returned if there is no such style setting.

Returns:
the style name referenced by table style of first row.

getTableFirstRowParagraphStyle

public String getTableFirstRowParagraphStyle()
get the value of paragraph style of first row.

Null will be returned if there is no such style setting.

Returns:
the style name referenced by paragraph style of first row.

getTableLastColumnTableStyle

public String getTableLastColumnTableStyle()
get the value of table style of last column.

Null will be returned if there is no such style setting.

Returns:
the style name referenced by table style of last column.

getTableLastColumnParagraphStyle

public String getTableLastColumnParagraphStyle()
get the value of paragraph style of last column.

Null will be returned if there is no such style setting.

Returns:
the style name referenced by paragraph style of last column.

getTableLastRowTableStyle

public String getTableLastRowTableStyle()
get the value of table style of last row.

Null will be returned if there is no such style setting.

Returns:
the style name referenced by table style of last row.

getTableLastRowParagraphStyle

public String getTableLastRowParagraphStyle()
get the value of paragraph style of last row.

Null will be returned if there is no such style setting.

Returns:
the style name referenced by paragraph style of last row.

getTableOddColumnsTableStyle

public String getTableOddColumnsTableStyle()
get the value of table style of odd columns.

Null will be returned if there is no such style setting.

Returns:
the style name referenced by table style of odd columns.

getTableOddColumnsParagraphStyle

public String getTableOddColumnsParagraphStyle()
get the value of paragraph style of odd columns.

Null will be returned if there is no such style setting.

Returns:
the style name referenced by paragraph style of odd columns.

getTableOddRowsTableStyle

public String getTableOddRowsTableStyle()
get the value of table style of odd rows.

Null will be returned if there is no such style setting.

Returns:
the style name referenced by table style of odd rows.

getTableOddRowsParagraphStyle

public String getTableOddRowsParagraphStyle()
get the value of paragraph style of odd rows.

Null will be returned if there is no such style setting.

Returns:
the style name referenced by paragraph style of odd rows.

setTableBodyStyle

public void setTableBodyStyle(String tableStyleNameValue,
                              String tableParagraphStyleNameValue)
Set the value of table style and paragraph style of body.

If the parameter tableStyleNameValue is null, the table style name definition in body will be removed. If the parameter tableParagraphStyleNameValue is null, the paragraph style name definition in body will be removed.

Parameters:
tableStyleNameValue - - table style name referenced by body
tableParagraphStyleNameValue - - paragraph style name referenced by body

setTableEvenColumnsStyle

public void setTableEvenColumnsStyle(String tableStyleNameValue,
                                     String tableParagraphStyleNameValue)
Set the value of table style and paragraph style of even columns.

If the parameter tableStyleNameValue is null, the table style name definition in even columns will be removed. If the parameter tableParagraphStyleNameValue is null, the paragraph style name definition in even columns will be removed.

Parameters:
tableStyleNameValue - - table style name referenced by even columns
tableParagraphStyleNameValue - - paragraph style name referenced by even columns

setTableEvenRowsStyle

public void setTableEvenRowsStyle(String tableStyleNameValue,
                                  String tableParagraphStyleNameValue)
Set the value of table style and paragraph style of even rows.

If the parameter tableStyleNameValue is null, the table style name definition in even rows will be removed. If the parameter tableParagraphStyleNameValue is null, the paragraph style name definition in even rows will be removed.

Parameters:
tableStyleNameValue - - table style name referenced by even rows
tableParagraphStyleNameValue - - paragraph style name referenced by even rows

setTableFirstColumnStyle

public void setTableFirstColumnStyle(String tableStyleNameValue,
                                     String tableParagraphStyleNameValue)
Set the value of table style and paragraph style of first column.

If the parameter tableStyleNameValue is null, the table style name definition in first column will be removed. If the parameter tableParagraphStyleNameValue is null, the paragraph style name definition in first column will be removed.

Parameters:
tableStyleNameValue - - table style name referenced by first column
tableParagraphStyleNameValue - - paragraph style name referenced by first column

setTableFirstRowStyle

public void setTableFirstRowStyle(String tableStyleNameValue,
                                  String tableParagraphStyleNameValue)
Set the value of table style and paragraph style of first row.

If the parameter tableStyleNameValue is null, the table style name definition in first row will be removed. If the parameter tableParagraphStyleNameValue is null, the paragraph style name definition in first row will be removed.

Parameters:
tableStyleNameValue - - table style name referenced by first row
tableParagraphStyleNameValue - - paragraph style name referenced by first row

setTableLastColumnStyle

public void setTableLastColumnStyle(String tableStyleNameValue,
                                    String tableParagraphStyleNameValue)
Set the value of table style and paragraph style of last column.

If the parameter tableStyleNameValue is null, the table style name definition in last column will be removed. If the parameter tableParagraphStyleNameValue is null, the paragraph style name definition in last column will be removed.

Parameters:
tableStyleNameValue - - table style name referenced by last column
tableParagraphStyleNameValue - - paragraph style name referenced by last column

setTableLastRowStyle

public void setTableLastRowStyle(String tableStyleNameValue,
                                 String tableParagraphStyleNameValue)
Set the value of table style and paragraph style of last row.

If the parameter tableStyleNameValue is null, the table style name definition in last row will be removed. If the parameter tableParagraphStyleNameValue is null, the paragraph style name definition in last row will be removed.

Parameters:
tableStyleNameValue - - table style name referenced by last row
tableParagraphStyleNameValue - - paragraph style name referenced by last row

setTableOddColumnsStyle

public void setTableOddColumnsStyle(String tableStyleNameValue,
                                    String tableParagraphStyleNameValue)
Set the value of table style and paragraph style of odd columns.

If the parameter tableStyleNameValue is null, the table style name definition in odd columns will be removed. If the parameter tableParagraphStyleNameValue is null, the paragraph style name definition in odd columns will be removed.

Parameters:
tableStyleNameValue - - table style name referenced by odd columns
tableParagraphStyleNameValue - - paragraph style name referenced by odd columns

setTableOddRowsStyle

public void setTableOddRowsStyle(String tableStyleNameValue,
                                 String tableParagraphStyleNameValue)
Set the value of table style and paragraph style of odd rows.

If the parameter tableStyleNameValue is null, the table style name definition in odd rows will be removed. If the parameter tableParagraphStyleNameValue is null, the paragraph style name definition in odd rows will be removed.

Parameters:
tableStyleNameValue - - table style name referenced by odd rows
tableParagraphStyleNameValue - - paragraph style name referenced by odd rows


Copyright © 2010-2017 The Apache Software Foundation. All Rights Reserved.