public class TableTemplate extends Object
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.
Modifier and Type | Class and Description |
---|---|
static class |
TableTemplate.ExtendedStyleType
Extended style types supported by table template.
|
Modifier | Constructor and Description |
---|---|
protected |
TableTemplate()
Create an instance of TableTemplate
|
|
TableTemplate(TableTableTemplateElement tableTableTemplate)
Create an instance of TableTemplate from an element
|
Modifier and Type | Method and Description |
---|---|
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.
|
protected TableTemplate()
public TableTemplate(TableTableTemplateElement tableTableTemplate)
tableTableTemplate
- - the element of table:table-templatepublic String getTableName()
Null will be returned if there is no table template name setting.
public void setTableName(String tableNameValue)
If the parameter tableNameValue
is null, the table template name definition
will be removed.
tableNameValue
- - the table template namepublic String getExtendedTableStyleByType(TableTemplate.ExtendedStyleType type)
Null will be returned if there is no such extended style type setting.
type
- - style typepublic String getExtendedParagraphStyleByType(TableTemplate.ExtendedStyleType type)
Null will be returned if there is no such extended style type setting.
type
- - extended style typepublic void setExtendedStyleByType(TableTemplate.ExtendedStyleType type, String tableStyle, String paraStyle)
type
- - extended style typetableStyle
- - table style nameparaStyle
- - paragraph style namepublic String getTableBodyTableStyle()
Null will be returned if there is no such style setting.
public String getTableBodyParagraphStyle()
Null will be returned if there is no such style setting.
public String getTableEvenColumnsTableStyle()
Null will be returned if there is no such style setting.
public String getTableEvenColumnsParagraphStyle()
Null will be returned if there is no such style setting.
public String getTableEvenRowsTableStyle()
Null will be returned if there is no such style setting.
public String getTableEvenRowsParagraphStyle()
Null will be returned if there is no such style setting.
public String getTableFirstColumnTableStyle()
Null will be returned if there is no such style setting.
public String getTableFirstColumnParagraphStyle()
Null will be returned if there is no such style setting.
public String getTableFirstRowTableStyle()
Null will be returned if there is no such style setting.
public String getTableFirstRowParagraphStyle()
Null will be returned if there is no such style setting.
public String getTableLastColumnTableStyle()
Null will be returned if there is no such style setting.
public String getTableLastColumnParagraphStyle()
Null will be returned if there is no such style setting.
public String getTableLastRowTableStyle()
Null will be returned if there is no such style setting.
public String getTableLastRowParagraphStyle()
Null will be returned if there is no such style setting.
public String getTableOddColumnsTableStyle()
Null will be returned if there is no such style setting.
public String getTableOddColumnsParagraphStyle()
Null will be returned if there is no such style setting.
public String getTableOddRowsTableStyle()
Null will be returned if there is no such style setting.
public String getTableOddRowsParagraphStyle()
Null will be returned if there is no such style setting.
public void setTableBodyStyle(String tableStyleNameValue, String tableParagraphStyleNameValue)
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.
tableStyleNameValue
- - table style name referenced by bodytableParagraphStyleNameValue
- - paragraph style name referenced by bodypublic void setTableEvenColumnsStyle(String tableStyleNameValue, String tableParagraphStyleNameValue)
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.
tableStyleNameValue
- - table style name referenced by even columnstableParagraphStyleNameValue
- - paragraph style name referenced by even columnspublic void setTableEvenRowsStyle(String tableStyleNameValue, String tableParagraphStyleNameValue)
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.
tableStyleNameValue
- - table style name referenced by even rowstableParagraphStyleNameValue
- - paragraph style name referenced by even rowspublic void setTableFirstColumnStyle(String tableStyleNameValue, String tableParagraphStyleNameValue)
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.
tableStyleNameValue
- - table style name referenced by first columntableParagraphStyleNameValue
- - paragraph style name referenced by first columnpublic void setTableFirstRowStyle(String tableStyleNameValue, String tableParagraphStyleNameValue)
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.
tableStyleNameValue
- - table style name referenced by first rowtableParagraphStyleNameValue
- - paragraph style name referenced by first rowpublic void setTableLastColumnStyle(String tableStyleNameValue, String tableParagraphStyleNameValue)
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.
tableStyleNameValue
- - table style name referenced by last columntableParagraphStyleNameValue
- - paragraph style name referenced by last columnpublic void setTableLastRowStyle(String tableStyleNameValue, String tableParagraphStyleNameValue)
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.
tableStyleNameValue
- - table style name referenced by last rowtableParagraphStyleNameValue
- - paragraph style name referenced by last rowpublic void setTableOddColumnsStyle(String tableStyleNameValue, String tableParagraphStyleNameValue)
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.
tableStyleNameValue
- - table style name referenced by odd columnstableParagraphStyleNameValue
- - paragraph style name referenced by odd columnspublic void setTableOddRowsStyle(String tableStyleNameValue, String tableParagraphStyleNameValue)
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.
tableStyleNameValue
- - table style name referenced by odd rowstableParagraphStyleNameValue
- - paragraph style name referenced by odd rowsCopyright © 2010–2018 Apache Software Foundation; Copyright © 2018–2020 The Document Foundation. All rights reserved.