public class Header extends Component implements TableContainer, VariableContainer
| Constructor and Description |
|---|
Header(StyleHeaderElement element)
Create a header instance by an object of
StyleHeaderElement. |
| Modifier and Type | Method and Description |
|---|---|
Table |
addTable()
Add a new Table to this container.
|
Table |
addTable(int numRows,
int numCols)
Add a new Table to this container with a specified row number and column number.
|
Section |
appendSection(String name)
Create an empty section and append it at the end of the footer.
|
VariableField |
declareVariable(String name,
VariableField.VariableType type)
Declare a new variable field to this container.
|
StyleHeaderElement |
getOdfElement()
Return an instance of
StyleHeaderElement which represents this feature. |
Table.TableBuilder |
getTableBuilder()
Return the table builder of this document.
|
Table |
getTableByName(String name)
Return an instance of table feature with the specific table name.
|
OdfElement |
getTableContainerElement()
Get the ODF element which can have
|
List<Table> |
getTableList()
Return a list of table features in this document.
|
OdfElement |
getVariableContainerElement()
Get the ODF element which can have variable declare section as child element directly according
to ODF specification.
|
VariableField |
getVariableFieldByName(String name)
Return the declared variable by name.
|
boolean |
isVisible()
Get this header is visible or not.
|
void |
setVisible(boolean isVisible)
Set this header visible or not.
|
getComponentByElement, getOwnerDocument, registerComponent, unregisterComponentpublic Header(StyleHeaderElement element)
StyleHeaderElement.element - - an object of StyleHeaderElementpublic StyleHeaderElement getOdfElement()
StyleHeaderElement which represents this feature.getOdfElement in class ComponentStyleHeaderElementpublic boolean isVisible()
true, otherwise return false
.public void setVisible(boolean isVisible)
isVisible - If isVisible is true, the header of this document is visible,
otherwise is invisible.public Table addTable()
TableContaineraddTable in interface TableContainerpublic Table addTable(int numRows, int numCols)
TableContainerThe table will be inserted at the end of the tableContainer. An unique table name will be
given, you may set a custom table name using the setTableName method.
addTable in interface TableContainernumRows - the row numbernumCols - the column numberTablepublic Table getTableByName(String name)
TableContainergetTableByName in interface TableContainername - of the table being searched for.public List<Table> getTableList()
TableContainergetTableList in interface TableContainerpublic Table.TableBuilder getTableBuilder()
TableContainergetTableBuilder in interface TableContainerpublic OdfElement getTableContainerElement()
TableContainergetTableContainerElement in interface TableContainerpublic OdfElement getVariableContainerElement()
VariableContainerThe variable declare section may be
getVariableContainerElement in interface VariableContainerpublic VariableField declareVariable(String name, VariableField.VariableType type)
VariableContainerdeclareVariable in interface VariableContainername - the unique name of this variable field.type - the type of this variable field.public VariableField getVariableFieldByName(String name)
VariableContainergetVariableFieldByName in interface VariableContainername - the unique name of this variable field.public Section appendSection(String name)
name - - specify the section nameRuntimeException - if content DOM could not be initializedCopyright © 2010–2018 Apache Software Foundation; Copyright © 2018–2020 The Document Foundation. All rights reserved.