|
fop 0.94 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.layoutmgr.table.GridUnit
public class GridUnit
This class represents one grid unit inside a table.
Field Summary | |
---|---|
static int |
FIRST_IN_PART
Indicates that the grid unit is in the first row of the table part (header, footer, body). |
static int |
FIRST_IN_TABLE
Indicates that the grid unit is in the first row of the table. |
static int |
IN_FIRST_COLUMN
Indicates that the grid unit is in the first column. |
static int |
IN_LAST_COLUMN
Indicates that the grid unit is in the last column. |
static int |
KEEP_WITH_NEXT_PENDING
Indicates that the primary grid unit has a pending keep-with-next. |
static int |
KEEP_WITH_PREVIOUS_PENDING
Indicates that the primary grid unit has a pending keep-with-previous. |
static int |
LAST_IN_PART
Indicates that the grid unit is in the last row of the table part (header, footer, body). |
static int |
LAST_IN_TABLE
Indicates that the grid unit is in the last row of the table. |
Constructor Summary | |
---|---|
protected |
GridUnit(PrimaryGridUnit primary,
TableCell cell,
TableColumn column,
int startCol,
int colSpanIndex)
Creates a new grid unit. |
|
GridUnit(PrimaryGridUnit primary,
TableColumn column,
int startCol,
int colSpanIndex)
Creates a new grid unit. |
|
GridUnit(TableCell cell,
TableColumn column,
int startCol,
int colSpanIndex)
Creates a new grid unit. |
Method Summary | |
---|---|
void |
assignBorderForSeparateBorderModel()
Assigns the borders from the given cell to this cell info. |
GridUnit |
createNextRowSpanningGridUnit()
|
TableBody |
getBody()
|
CommonBorderPaddingBackground |
getBorders()
|
TableCell |
getCell()
|
int |
getColSpanIndex()
|
TableColumn |
getColumn()
|
boolean |
getFlag(int which)
Returns a flag for this GridUnit. |
CommonBorderPaddingBackground.BorderInfo |
getOriginalBorderInfoForCell(int side)
Returns a BorderInfo instance for a side of the currently applicable cell before border resolution (i.e. the value from the FO). |
PrimaryGridUnit |
getPrimary()
Returns the before-start grid unit of the cell containing this grid unit. |
TableRow |
getRow()
|
int |
getRowSpanIndex()
|
int |
getStartCol()
|
Table |
getTable()
|
boolean |
hasBorders()
|
boolean |
isEmpty()
Does this grid unit belong to an empty cell? |
boolean |
isLastGridUnitColSpan()
|
boolean |
isLastGridUnitRowSpan()
|
boolean |
isPrimary()
Is this grid unit the before-start grid unit of the cell? |
void |
resolveBorder(GridUnit other,
int side)
Resolve collapsing borders for the given cell. |
void |
resolveBorder(GridUnit other,
int side,
int resFlags)
Resolve collapsing borders for the given cell. |
void |
setFlag(int which,
boolean value)
Sets a flag on a GridUnit. |
void |
setRow(TableRow row)
Sets the table-row FO, if applicable. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int IN_FIRST_COLUMN
public static final int IN_LAST_COLUMN
public static final int FIRST_IN_TABLE
public static final int FIRST_IN_PART
public static final int LAST_IN_PART
public static final int LAST_IN_TABLE
public static final int KEEP_WITH_NEXT_PENDING
public static final int KEEP_WITH_PREVIOUS_PENDING
Constructor Detail |
---|
public GridUnit(TableCell cell, TableColumn column, int startCol, int colSpanIndex)
cell
- table cell which occupies this grid unitcolumn
- table column this grid unit belongs tostartCol
- index of the column this grid unit belongs tocolSpanIndex
- index of this grid unit in the span, in column directionpublic GridUnit(PrimaryGridUnit primary, TableColumn column, int startCol, int colSpanIndex)
primary
- the before-start grid unit of the cell containing this grid unitcolumn
- table column this grid unit belongs tostartCol
- index of the column this grid unit belongs tocolSpanIndex
- index of this grid unit in the span, in column directionprotected GridUnit(PrimaryGridUnit primary, TableCell cell, TableColumn column, int startCol, int colSpanIndex)
primary
- the before-start grid unit of the cell containing this grid unitcell
- table cell which occupies this grid unitcolumn
- table column this grid unit belongs tostartCol
- index of the column this grid unit belongs tocolSpanIndex
- index of this grid unit in the span, in column directionMethod Detail |
---|
public TableCell getCell()
public TableColumn getColumn()
public TableRow getRow()
public void setRow(TableRow row)
row
- the table-row FOpublic TableBody getBody()
public Table getTable()
public PrimaryGridUnit getPrimary()
public boolean isPrimary()
public boolean isEmpty()
public int getStartCol()
public boolean isLastGridUnitColSpan()
public boolean isLastGridUnitRowSpan()
public int getRowSpanIndex()
public int getColSpanIndex()
public CommonBorderPaddingBackground.BorderInfo getOriginalBorderInfoForCell(int side)
side
- for which side to return the BorderInfo
public CommonBorderPaddingBackground getBorders()
public boolean hasBorders()
public void assignBorderForSeparateBorderModel()
public void resolveBorder(GridUnit other, int side)
other
- neighbouring grid unit if anyside
- the side to resolve (one of CommonBorderPaddingBackground.BEFORE|AFTER|START|END)public void resolveBorder(GridUnit other, int side, int resFlags)
other
- neighbouring grid unit if anyside
- the side to resolve (one of CommonBorderPaddingBackground.BEFORE|AFTER|START|END)resFlags
- flags for the border resolutionpublic boolean getFlag(int which)
which
- the requested flag
public void setFlag(int which, boolean value)
which
- the flag to setvalue
- the new value for the flagpublic GridUnit createNextRowSpanningGridUnit()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
fop 0.94 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |