fop 0.90alpha1

org.apache.fop.layoutmgr.table
Class EffRow

java.lang.Object
  extended byorg.apache.fop.layoutmgr.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.


Field Summary
static int FIRST_IN_BODY
          Indicates that the row is the first in a table-body
static int LAST_IN_BODY
          Indicates that the row is the last in a table-body
 
Constructor Summary
EffRow(int index, int bodyType)
          Creates a new effective row instance.
 
Method Summary
 int getBodyType()
           
 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.
 java.util.List getGridUnits()
           
 MinOptMax getHeight()
           
 int getIndex()
           
 TableRow getTableRow()
           
 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 setFlagForAllGridUnits(int flag, boolean value)
          Sets a flag on all grid units of this effective row.
 void setHeight(MinOptMax mom)
          Sets the calculated height for this EffRow.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FIRST_IN_BODY

public static final int FIRST_IN_BODY
Indicates that the row is the first in a table-body

See Also:
Constant Field Values

LAST_IN_BODY

public static final int LAST_IN_BODY
Indicates that the row is the last in a table-body

See Also:
Constant Field Values
Constructor Detail

EffRow

public EffRow(int index,
              int bodyType)
Creates a new effective row instance.

Parameters:
index - index of the row
bodyType - type of body (one of HEADER, FOOTER, BODY as found on TableRowIterator)
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.

setHeight

public void setHeight(MinOptMax mom)
Sets the calculated height for this EffRow.

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.

setFlagForAllGridUnits

public void setFlagForAllGridUnits(int flag,
                                   boolean value)
Sets a flag on all grid units of this effective row.

Parameters:
flag - which flag to set (on of the GridUnit.* constants)
value - new value for the flag

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
Returns:
true if the flag is set

toString

public java.lang.String toString()
See Also:
Object.toString()

fop 0.90alpha1

Copyright 1999-2005 The Apache Software Foundation. All Rights Reserved.