org.odftoolkit.simple.table
Interface TableContainer

All Known Implementing Classes:
AbstractTableContainer, ChartDocument, Document, Footer, GraphicsDocument, Header, PresentationDocument, Section, Slide, SpreadsheetDocument, TextDocument

public interface TableContainer

TableContainer is a container which maintains Table(s) as element(s). Table(s) can be added, removed and iterated in this container.

Since:
0.4.5
See Also:
Table, TextDocument, SpreadsheetDocument

Method Summary
 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.
 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 as child element directly according to ODF specification.
 List<Table> getTableList()
          Return a list of table features in this document.
 

Method Detail

getTableContainerElement

OdfElement getTableContainerElement()
Get the ODF element which can have as child element directly according to ODF specification. This Element will help to find the position to insert a new Table. For example, element is usable with element, so TextDocument will return OfficeTextElement. While Presentation Notes is an indirectly TableContainer, which holds Table with the help of its grand-child element , so for Notes, DrawTextBoxElement should be return.

Returns:
container element which can hold .

addTable

Table addTable()
Add a new Table to this container.

Returns:
added table.

addTable

Table addTable(int numRows,
               int numCols)
Add a new Table to this container with a specified row number and column number.

The 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.

Parameters:
numRows - the row number
numCols - the column number
Returns:
a new instance of Table

getTableByName

Table getTableByName(String name)
Return an instance of table feature with the specific table name.

Parameters:
name - of the table being searched for.
Returns:
an instance of table feature with the specific table name.

getTableList

List<Table> getTableList()
Return a list of table features in this document.

Returns:
a list of table features in this document.

getTableBuilder

Table.TableBuilder getTableBuilder()
Return the table builder of this document. Every document has a table builder, which supplies all of the table creation realization, for example newTable().

Returns:
the table builder of this document.


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