|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.odftoolkit.simple.table.Table.TableBuilder
public static class Table.TableBuilder
This is a tool class which supplies all of the table creation detail.
The end user isn't allowed to create it directly, otherwise an
IllegalStateException
will be thrown.
Constructor Summary | |
---|---|
Table.TableBuilder(TableContainer container)
TableBuilder constructor. |
Method Summary | |
---|---|
Table |
getTableInstance(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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Table.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.Method Detail |
---|
public Table getTableInstance(TableTableElement odfElement)
TableTableElement
.
odfElement
- an instance of TableTableElement
Table
that can represent
odfElement
public 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 number
Table
public 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 table
Table
public 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 number
Table
public 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
table
Table
public 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
table
Table
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |