org.apache.fop.layoutmgr.table
Class TableRowIterator
java.lang.Object
org.apache.fop.layoutmgr.table.TableRowIterator
public class TableRowIterator
extends java.lang.Object
Iterator that lets the table layout manager step over all the rows of a part of the
table (table-header, table-footer or table-body).
Note: This class is not thread-safe.
static int | BODY - Selects the table-body elements for iteration.
|
static int | FOOTER - Selects the table-footer elements for iteration.
|
static int | HEADER - Selects the table-header elements for iteration.
|
protected Table | table - The table on which this instance operates.
|
org.apache.fop.layoutmgr.table.EffRow | getFirstRow() - Returns the first effective row.
|
org.apache.fop.layoutmgr.table.EffRow | getFollowingRow(org.apache.fop.layoutmgr.table.EffRow row) - Returns the row following the given row, without moving the iterator.
|
org.apache.fop.layoutmgr.table.EffRow | getLastRow() - Returns the last effective row.
|
org.apache.fop.layoutmgr.table.EffRow[] | getNextRowGroup() - Returns the next row group if any.
|
org.apache.fop.layoutmgr.table.EffRow | getPrecedingRow(org.apache.fop.layoutmgr.table.EffRow row) - Returns the row preceding the given row, without moving the iterator.
|
BODY
public static final int BODY
Selects the table-body elements for iteration.
FOOTER
public static final int FOOTER
Selects the table-footer elements for iteration.
HEADER
public static final int HEADER
Selects the table-header elements for iteration.
table
protected Table table
The table on which this instance operates.
TableRowIterator
public TableRowIterator(Table table,
ColumnSetup columns,
int tablePart)
Creates a new TableRowIterator.
table
- the table to iterate overcolumns
- the column setup for the tabletablePart
- indicates what part of the table to iterate over (HEADER, FOOTER, BODY)
getFirstRow
public org.apache.fop.layoutmgr.table.EffRow getFirstRow()
Returns the first effective row.
- the requested effective row.
getFollowingRow
public org.apache.fop.layoutmgr.table.EffRow getFollowingRow(org.apache.fop.layoutmgr.table.EffRow row)
Returns the row following the given row, without moving the iterator.
row
- a row in the iterated table part
- the following row, or null if there is no more row
getLastRow
public org.apache.fop.layoutmgr.table.EffRow getLastRow()
Returns the last effective row.
Note:This is inefficient for large tables because the whole table
if preloaded.
- the requested effective row.
getNextRowGroup
public org.apache.fop.layoutmgr.table.EffRow[] getNextRowGroup()
Returns the next row group if any. A row group in this context is the minimum number of
consecutive rows which contains all spanned grid units of its cells.
- the next row group, or null
getPrecedingRow
public org.apache.fop.layoutmgr.table.EffRow getPrecedingRow(org.apache.fop.layoutmgr.table.EffRow row)
Returns the row preceding the given row, without moving the iterator.
row
- a row in the iterated table part
- the preceding row, or null if there is no such row (the given row is the
first one in the table part)
Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.