Package org.apache.fop.fo.flow.table
Class EffRow
- java.lang.Object
-
- org.apache.fop.fo.flow.table.EffRow
-
public class EffRow extends java.lang.ObjectThis class represents an effective row in a table and holds a list of grid units occupying the row as well as some additional values.
-
-
Field Summary
Fields Modifier and Type Field Description static intFIRST_IN_PARTIndicates that the row is the first in a table-bodystatic intLAST_IN_PARTIndicates that the row is the last in a table-body
-
Constructor Summary
Constructors Constructor Description EffRow(int index, int bodyType, java.util.List gridUnits)Creates a new effective row instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBodyType()intgetBreakAfter()Returns the break class for this row.intgetBreakBefore()Returns the break class for this row.MinOptMaxgetExplicitHeight()booleangetFlag(int which)Returns a flag for this effective row.GridUnitgetGridUnit(int column)Returns the grid unit at a given position.java.util.ListgetGridUnits()MinOptMaxgetHeight()Returns the calculated height for this EffRow, including the cells' bpds/paddings/borders, and the table's border-separation.intgetIndex()KeepgetKeepTogether()Returns the keep-together strength for this element.KeepgetKeepWithNext()Returns the strength of the keep constraint 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.KeepgetKeepWithPrevious()Returns the strength of the keep constraint 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.TableRowgetTableRow()GridUnitsafelyGetGridUnit(int column)Returns the grid unit at a given position.voidsetExplicitHeight(MinOptMax mom)Sets the height for this row that resulted from the explicit height properties specified by the user.voidsetHeight(MinOptMax mom)Sets the calculated height for this EffRow, including everything (cells' bpds, paddings, borders, and border-separation).java.lang.StringtoString()
-
-
-
Field Detail
-
FIRST_IN_PART
public static final int FIRST_IN_PART
Indicates that the row is the first in a table-body- See Also:
- Constant Field Values
-
LAST_IN_PART
public static final int LAST_IN_PART
Indicates that the row is the last in a table-body- See Also:
- Constant Field Values
-
-
Method Detail
-
getIndex
public int getIndex()
- Returns:
- the index of the EffRow in the sequence of rows
-
getBodyType
public int getBodyType()
- Returns:
- an indicator what type of body this EffRow is in (one of HEADER, FOOTER, BODY as found on TableRowIterator)
-
getTableRow
public TableRow getTableRow()
- Returns:
- the table-row FO for this EffRow, or null if there is no table-row.
-
getHeight
public MinOptMax getHeight()
Returns the calculated height for this EffRow, including the cells' bpds/paddings/borders, and the table's border-separation.- Returns:
- the row's height
-
setHeight
public void setHeight(MinOptMax mom)
Sets the calculated height for this EffRow, including everything (cells' bpds, paddings, borders, and border-separation).- Parameters:
mom- the calculated height
-
getExplicitHeight
public MinOptMax getExplicitHeight()
- Returns:
- the explicit height of the EffRow (as specified through properties)
-
setExplicitHeight
public void setExplicitHeight(MinOptMax mom)
Sets the height for this row that resulted from the explicit height properties specified by the user.- Parameters:
mom- the height
-
getGridUnits
public java.util.List getGridUnits()
- Returns:
- the list of GridUnits for this EffRow
-
getGridUnit
public GridUnit getGridUnit(int column)
Returns the grid unit at a given position.- Parameters:
column- index of the grid unit in the row (zero based)- Returns:
- the requested grid unit.
-
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.- Parameters:
column- index of the grid unit in the row (zero based)- Returns:
- the requested grid unit or null if there's no grid unit at this position.
-
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.- Parameters:
which- the requested flag (one ofFIRST_IN_PARTorLAST_IN_PART)- Returns:
- true if the flag is set
-
getKeepWithPrevious
public Keep getKeepWithPrevious()
Returns the strength of the keep constraint 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.- Returns:
- the strength of the keep-with-previous constraint
-
getKeepWithNext
public Keep getKeepWithNext()
Returns the strength of the keep constraint 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.- Returns:
- the strength of the keep-with-next constraint
-
getKeepTogether
public Keep getKeepTogether()
Returns the keep-together strength for this element. Note: The keep strength returned does not take the parent table's keeps into account!- Returns:
- the keep-together strength
-
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!
- Returns:
- one of
Constants.EN_AUTO,Constants.EN_COLUMN,Constants.EN_PAGE,Constants.EN_EVEN_PAGE,Constants.EN_ODD_PAGE
-
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!
- Returns:
- one of
Constants.EN_AUTO,Constants.EN_COLUMN,Constants.EN_PAGE,Constants.EN_EVEN_PAGE,Constants.EN_ODD_PAGE
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-