Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER Copyright 2011 IBM. All rights reserved. Use is subject to license terms. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. You can also obtain a copy of the License at http://odftoolkit.org/docs/license.txt Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. /
 
 package org.odftoolkit.simple.table;
 
 import java.util.List;
 
TableContainer is a container which maintains Table(s) as element(s). Table(s) can be added, removed and iterated in this container.

 
 public interface TableContainer {

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

Returns:
container element which can hold <text:table>.
 
Add a new Table to this container.

Returns:
added table.
 
 	public Table addTable();

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
 
 	public Table addTable(int numRowsint numCols);

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.
 
 	public Table getTableByName(String name);

Return a list of table features in this document.

Returns:
a list of table features in this document.
 
 	public List<TablegetTableList();

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.
New to GrepCode? Check out our FAQ X