| Constructor and Description |
|---|
TableBuilder(TableContainer container)
TableBuilder constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Table |
getTableInstance(org.odftoolkit.odfdom.dom.element.table.TableTableElement odfElement)
Get a table feature instance by an instance of
TableTableElement. |
Table |
newTable()
Construct the
Table feature. |
Table |
newTable(int numRows,
int numCols)
Construct the
Table feature with a specified row number
and column number. |
Table |
newTable(int numRows,
int numCols,
int headerRowNumber,
int headerColumnNumber)
Construct the
Table feature with a specified row number,
column number, header row number, header column number. |
Table |
newTable(int numRows,
int numCols,
int headerRowNumber,
int headerColumnNumber,
double marginLeft,
double marginRight)
Construct the
Table feature with a specified row number,
column number, header row number, header column number, left margin
space and right margin space. |
Table |
newTable(String[] rowLabel,
String[] columnLabel,
double[][] data)
Construct the Table feature with a specified 2 dimension array as the
data of this table.
|
Table |
newTable(String[] rowLabel,
String[] columnLabel,
String[][] data)
Construct the Table feature with a specified 2 dimension array as the
data of this table.
|
public TableBuilder(TableContainer container)
TableContainer constructor. The end user isn't allowed to call it
directly, otherwise an IllegalStateException will be
thrown.container - the owner TableContainer.IllegalStateException - if new TableBuilder out of owner Document constructor,
this exception will be thrown.public Table getTableInstance(org.odftoolkit.odfdom.dom.element.table.TableTableElement odfElement)
TableTableElement.odfElement - an instance of TableTableElementTable that can represent
odfElementpublic Table newTable()
Table feature. The default column count is
5. The default row count is 2.
The table will be inserted at the end of the table container. An
unique table name will be given, you may set a custom table name
using the setTableName method.
If the container is a text document, cell borders will be created by default.
Table feature instancepublic Table newTable(int numRows, int numCols, int headerRowNumber, int headerColumnNumber)
Table feature with a specified row number,
column number, header row number, header column number.
The table will be inserted at the end of the container. An unique
table name will be given, you may set a custom table name using the
setTableName method.
If the container is a text document, cell borders will be created by default.
numRows - the row numbernumCols - the column numberheaderRowNumber - the header row numberheaderColumnNumber - the header column numberTablepublic Table newTable(int numRows, int numCols, int headerRowNumber, int headerColumnNumber, double marginLeft, double marginRight)
Table feature with a specified row number,
column number, header row number, header column number, left margin
space and right margin space.
The table will be inserted at the end of the container. An unique
table name will be given, you may set a custom table name using the
setTableName method.
If the container is a text document, cell borders will be created by default.
numRows - the row numbernumCols - the column numberheaderRowNumber - the header row numberheaderColumnNumber - the header column numbermarginLeft - the left table margin in centimeter(cm), between the left
margin of table container and the tablemarginRight - the right table margin in centimeter(cm), between the
right margin of table container and the tableTablepublic Table newTable(int numRows, int numCols)
Table feature with a specified row number
and column number.
The table will be inserted at the end of the container. An unique
table name will be given, you may set a custom table name using the
setTableName method.
If the container is a text document, cell borders will be created by default.
numRows - the row numbernumCols - the column numberTablepublic Table newTable(String[] rowLabel, String[] columnLabel, double[][] data)
The table will be inserted at the end of the container. An unique
table name will be given, you may set a custom table name using the
setTableName method.
If the container is a text document, cell borders will be created by default.
rowLabel - set as the header row, it can be null if no header row
neededcolumnLabel - set as the header column, it can be null if no header
column neededdata - the two dimension array of double as the data of this
tableTablepublic Table newTable(String[] rowLabel, String[] columnLabel, String[][] data)
The table will be inserted at the end of the container. An unique
table name will be given, you may set a custom table name using the
setTableName method.
If the container is a text document, cell borders will be created by default.
rowLabel - set as the header row, it can be null if no header row
neededcolumnLabel - set as the header column, it can be null if no header
column neededdata - the two dimension array of string as the data of this
tableTableCopyright © 2010–2018 Apache Software Foundation; Copyright © 2018–2019 The Document Foundation. All rights reserved.