public class GridUnit
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected TableCell |
cell
Table cell which occupies this grid unit
|
protected CollapsingBorderModel |
collapsingBorderModel
The border model helper associated with the table
|
static int |
FIRST_IN_PART
Indicates that the grid unit is in the first row of the table part (header, footer,
body).
|
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).
|
Modifier | Constructor and Description |
---|---|
protected |
GridUnit(TableCell cell,
int colSpanIndex,
int rowSpanIndex)
Creates a new grid unit.
|
protected |
GridUnit(Table table,
int colSpanIndex,
int rowSpanIndex)
Creates a new grid unit.
|
Modifier and Type | Method and Description |
---|---|
CommonBorderPaddingBackground.BorderInfo |
getBorderAfter(int which)
Returns the resolved border-after of this grid unit, in the collapsing-border
model.
|
CommonBorderPaddingBackground.BorderInfo |
getBorderBefore(int which)
Returns the resolved border-before of this grid unit, in the collapsing-border
model.
|
CommonBorderPaddingBackground.BorderInfo |
getBorderEnd()
Returns the resolved border-end of this grid unit, in the collapsing-border
model.
|
CommonBorderPaddingBackground.BorderInfo |
getBorderStart()
Returns the resolved border-start of this grid unit, in the collapsing-border
model.
|
TableCell |
getCell()
Returns the table cell associated with this grid unit.
|
int |
getColSpanIndex() |
boolean |
getFlag(int which)
Returns a flag for this GridUnit.
|
PrimaryGridUnit |
getPrimary()
Returns the before-start grid unit of the cell containing this grid unit.
|
TableRow |
getRow()
Returns the fo:table-row element (if any) this grid unit belongs to.
|
int |
getRowSpanIndex() |
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?
|
protected void |
setBordersFromCell()
Prepares the borders of this grid unit for upcoming resolution, in the collapsing
model.
|
void |
setFlag(int which)
Sets the given flag on this grid unit.
|
void |
setFlag(int which,
boolean value)
Sets a flag on a GridUnit.
|
java.lang.String |
toString() |
public static final int FIRST_IN_PART
public static final int LAST_IN_PART
public static final int KEEP_WITH_NEXT_PENDING
public static final int KEEP_WITH_PREVIOUS_PENDING
protected TableCell cell
protected CollapsingBorderModel collapsingBorderModel
protected GridUnit(Table table, int colSpanIndex, int rowSpanIndex)
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 directionprotected GridUnit(TableCell cell, int colSpanIndex, int rowSpanIndex)
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 directionprotected void setBordersFromCell()
public TableCell getCell()
public TableRow getRow()
public PrimaryGridUnit getPrimary()
public boolean isPrimary()
public boolean isEmpty()
public boolean isLastGridUnitColSpan()
public boolean isLastGridUnitRowSpan()
public int getRowSpanIndex()
public int getColSpanIndex()
public CommonBorderPaddingBackground.BorderInfo getBorderBefore(int which)
which
- one of ConditionalBorder.NORMAL
,
ConditionalBorder.LEADING_TRAILING
or ConditionalBorder.REST
public CommonBorderPaddingBackground.BorderInfo getBorderAfter(int which)
which
- one of ConditionalBorder.NORMAL
,
ConditionalBorder.LEADING_TRAILING
or ConditionalBorder.REST
public CommonBorderPaddingBackground.BorderInfo getBorderStart()
public CommonBorderPaddingBackground.BorderInfo getBorderEnd()
public boolean getFlag(int which)
which
- the requested flagpublic void setFlag(int which, boolean value)
which
- the flag to setvalue
- the new value for the flagpublic void setFlag(int which)
which
- the flag to setpublic java.lang.String toString()
toString
in class java.lang.Object
Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.