org.apache.fop.fo.flow.table
Class GridUnit
java.lang.Object
org.apache.fop.fo.flow.table.GridUnit
public class GridUnit
extends java.lang.Object
This class represents one grid unit inside a table.
GridUnit(Table table, int colSpanIndex, int rowSpanIndex) - Creates a new grid unit.
|
GridUnit(TableCell cell, int colSpanIndex, int rowSpanIndex) - Creates a new grid unit.
|
FIRST_IN_PART
public static final int FIRST_IN_PART
Indicates that the grid unit is in the first row of the table part (header, footer,
body).
KEEP_WITH_NEXT_PENDING
public static final int KEEP_WITH_NEXT_PENDING
Indicates that the primary grid unit has a pending keep-with-next.
KEEP_WITH_PREVIOUS_PENDING
public static final int KEEP_WITH_PREVIOUS_PENDING
Indicates that the primary grid unit has a pending keep-with-previous.
LAST_IN_PART
public static final int LAST_IN_PART
Indicates that the grid unit is in the last row of the table part (header, footer,
body).
cell
protected TableCell cell
Table cell which occupies this grid unit
GridUnit
protected GridUnit(Table table,
int colSpanIndex,
int rowSpanIndex)
Creates a new grid unit.
table
- the containing tablecolSpanIndex
- index of this grid unit in the span, in column directionrowSpanIndex
- index of this grid unit in the span, in row direction
GridUnit
protected GridUnit(TableCell cell,
int colSpanIndex,
int rowSpanIndex)
Creates a new grid unit.
cell
- table cell which occupies this grid unitcolSpanIndex
- index of this grid unit in the span, in column directionrowSpanIndex
- index of this grid unit in the span, in row direction
getColSpanIndex
public int getColSpanIndex()
- the index of the grid unit inside a cell in column direction
getFlag
public boolean getFlag(int which)
Returns a flag for this GridUnit.
which
- the requested flag
getPrimary
public PrimaryGridUnit getPrimary()
Returns the before-start grid unit of the cell containing this grid unit.
- the before-start grid unit of the cell containing this grid unit.
getRow
public TableRow getRow()
Returns the fo:table-row element (if any) this grid unit belongs to.
- the row containing this grid unit, or null if there is no fo:table-row
element in the corresponding table-part
getRowSpanIndex
public int getRowSpanIndex()
- the index of the grid unit inside a cell in row direction
isEmpty
public boolean isEmpty()
Does this grid unit belong to an empty cell?
- true if this grid unit belongs to an empty cell
isLastGridUnitColSpan
public boolean isLastGridUnitColSpan()
- true if the grid unit is the last in column spanning direction
isLastGridUnitRowSpan
public boolean isLastGridUnitRowSpan()
- true if the grid unit is the last in row spanning direction
isPrimary
public boolean isPrimary()
Is this grid unit the before-start grid unit of the cell?
- true if this grid unit is the before-start grid unit of the cell
setBordersFromCell
protected void setBordersFromCell()
Prepares the borders of this grid unit for upcoming resolution, in the collapsing
model.
setFlag
public void setFlag(int which)
Sets the given flag on this grid unit.
setFlag
public void setFlag(int which,
boolean value)
Sets a flag on a GridUnit.
which
- the flag to setvalue
- the new value for the flag
toString
public String toString()
Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.