org.apache.fop.fo.flow.table
Class EffRow
java.lang.Object
org.apache.fop.fo.flow.table.EffRow
public class EffRow
extends java.lang.Object
This class represents an effective row in a table and holds a list of grid units occupying
the row as well as some additional values.
static int | FIRST_IN_PART - Indicates that the row is the first in a table-body
|
static int | LAST_IN_PART - Indicates that the row is the last in a table-body
|
EffRow(int index, int bodyType, List gridUnits) - Creates a new effective row instance.
|
int | getBodyType()
|
int | getBreakAfter() - Returns the break class for this row.
|
int | getBreakBefore() - Returns the break class for this row.
|
MinOptMax | getExplicitHeight()
|
boolean | getFlag(int which) - Returns a flag for this effective row.
|
GridUnit | getGridUnit(int column) - Returns the grid unit at a given position.
|
List | getGridUnits()
|
MinOptMax | getHeight() - Returns the calculated height for this EffRow, including the cells'
bpds/paddings/borders, and the table's border-separation.
|
int | getIndex()
|
TableRow | getTableRow()
|
boolean | mustKeepTogether() - Returns true if this row is enclosed by an fo:table-row element that has
keep-together set.
|
boolean | mustKeepWithNext() - Returns true if the enclosing (if any) fo:table-row element of this row, or if any
of the cells ending on this row, have keep-with-next set.
|
boolean | mustKeepWithPrevious() - Returns true if the enclosing (if any) fo:table-row element of this row, or if any
of the cells starting on this row, have keep-with-previous set.
|
GridUnit | safelyGetGridUnit(int column) - Returns the grid unit at a given position.
|
void | setExplicitHeight(MinOptMax mom) - Sets the height for this row that resulted from the explicit height properties specified
by the user.
|
void | setHeight(MinOptMax mom) - Sets the calculated height for this EffRow, including everything (cells' bpds,
paddings, borders, and border-separation).
|
String | toString() -
|
FIRST_IN_PART
public static final int FIRST_IN_PART
Indicates that the row is the first in a table-body
LAST_IN_PART
public static final int LAST_IN_PART
Indicates that the row is the last in a table-body
EffRow
public EffRow(int index,
int bodyType,
List gridUnits)
Creates a new effective row instance.
index
- index of the rowbodyType
- type of body (one of HEADER, FOOTER, BODY as found on TableRowIterator)gridUnits
- the grid units this row is made of
getBodyType
public int getBodyType()
- an indicator what type of body this EffRow is in (one of HEADER, FOOTER, BODY
as found on TableRowIterator)
getBreakAfter
public int getBreakAfter()
Returns the break class for this row. This is a combination of break-after set on
the last children of any cells ending on this row.
Note: this method doesn't take into account break-after set on
the enclosing fo:table-row element, if any, as it must be ignored if the row
belongs to a group of spanned rows (see XSL-FO 1.1, 7.20.1).
Note: this works only after getNextKuthElements on the
corresponding TableCellLM have been called!
getBreakBefore
public int getBreakBefore()
Returns the break class for this row. This is a combination of break-before set on
the first children of any cells starting on this row.
Note: this method doesn't take into account break-before set on
the enclosing fo:table-row element, if any, as it must be ignored if the row
belongs to a group of spanned rows (see XSL-FO 1.1, 7.20.2).
Note: this works only after getNextKuthElements on the
corresponding TableCellLM have been called!
getExplicitHeight
public MinOptMax getExplicitHeight()
- the explicit height of the EffRow (as specified through properties)
getFlag
public boolean getFlag(int which)
Returns a flag for this effective row. Only a subset of the flags on GridUnit is supported.
The flag is determined by inspecting flags on the EffRow's GridUnits.
getGridUnit
public GridUnit getGridUnit(int column)
Returns the grid unit at a given position.
column
- index of the grid unit in the row (zero based)
getGridUnits
public List getGridUnits()
- the list of GridUnits for this EffRow
getHeight
public MinOptMax getHeight()
Returns the calculated height for this EffRow, including the cells'
bpds/paddings/borders, and the table's border-separation.
getIndex
public int getIndex()
- the index of the EffRow in the sequence of rows
getTableRow
public TableRow getTableRow()
- the table-row FO for this EffRow, or null if there is no table-row.
mustKeepTogether
public boolean mustKeepTogether()
Returns true if this row is enclosed by an fo:table-row element that has
keep-together set.
- true if this row must be kept together
mustKeepWithNext
public boolean mustKeepWithNext()
Returns true if the enclosing (if any) fo:table-row element of this row, or if any
of the cells ending on this row, have keep-with-next set.
- true if this row must be kept with the next content
mustKeepWithPrevious
public boolean mustKeepWithPrevious()
Returns true if the enclosing (if any) fo:table-row element of this row, or if any
of the cells starting on this row, have keep-with-previous set.
- true if this row must be kept with the previous content
safelyGetGridUnit
public GridUnit safelyGetGridUnit(int column)
Returns the grid unit at a given position. In contrast to getGridUnit() this
method returns null if there's no grid unit at the given position. The number of
grid units for row x can be smaller than the number of grid units for row x-1.
column
- index of the grid unit in the row (zero based)
- the requested grid unit or null if there's no grid unit at this position.
setExplicitHeight
public void setExplicitHeight(MinOptMax mom)
Sets the height for this row that resulted from the explicit height properties specified
by the user.
setHeight
public void setHeight(MinOptMax mom)
Sets the calculated height for this EffRow, including everything (cells' bpds,
paddings, borders, and border-separation).
mom
- the calculated height
toString
public String toString()
Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.