org.odftoolkit.simple.table
Class AbstractTableContainer

java.lang.Object
  extended by org.odftoolkit.simple.table.AbstractTableContainer
All Implemented Interfaces:
TableContainer

public abstract class AbstractTableContainer
extends Object
implements TableContainer

AbstractTableContainer is an abstract implementation of the TableContainer interface, with a default implementation for every method defined in TableContainer , except getTableContainerElement(). Each subclass must implement the abstract method getTableContainerElement().

Since:
0.4.5

Constructor Summary
protected AbstractTableContainer()
           
 
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 container.
 Table getTableByName(String name)
          Return an instance of table feature with the specific table name.
 List<Table> getTableList()
          Return a list of table features in this container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.odftoolkit.simple.table.TableContainer
getTableContainerElement
 

Constructor Detail

AbstractTableContainer

protected AbstractTableContainer()
Method Detail

addTable

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

Specified by:
addTable in interface TableContainer
Returns:
added table.

addTable

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

Specified by:
addTable in interface TableContainer
Parameters:
numRows - the row number
numCols - the column number
Returns:
a new instance of Table

getTableByName

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

Specified by:
getTableByName in interface TableContainer
Parameters:
name - of the table beeing searched for.
Returns:
an instance of table feature with the specific table name.

getTableList

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

Specified by:
getTableList in interface TableContainer
Returns:
a list of table features in this container.

getTableBuilder

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

Specified by:
getTableBuilder in interface TableContainer
Returns:
the table builder of this container.
Since:
0.3.5


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