|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jrefinery.report.targets.table.TableGridLayout.Element
The Element class encapsulates all TableCellData-object within a single grid cell. When the report is badly designed, cells may overlay. This will cause trouble when the table is printed later, so we do not accept multiple non-background TableCellData objects.
TableCellData backgrounds can be combined to create complex background structures. Usually, the cell backgrounds must be merged before the cellbackground can be applied to the generated table. As this is dependent on the table implementation, we do not assume anything here, and just collect all backgrounds in the list.
TableCellData.isBackground()
Constructor Summary | |
TableGridLayout.Element()
Creates a new element. |
Method Summary | |
void |
add(TableGridPosition pos)
Adds a new TableGridPosition to the element. |
java.util.List |
getBackground()
Returns the list of backgrounds of this element. |
TableGridPosition |
getRoot()
Returns the data cell for this element. |
java.lang.String |
toString()
Creates a string representation of this Element. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TableGridLayout.Element()
Method Detail |
public void add(TableGridPosition pos)
If the new position contains a data cell:
if no data cell has been set so far, the cell is added as new
data element. if there is a data cell already set, the new cell data
is ignored.
If the new position contains a background information:
if no data cell has been set so far, the cell is added to the list of
available backgrounds. When a new data cell is added, the backgrounds
are validated. A cell background is valid, if it fully contains the
data cell area.
If there is a data cell already set, the background is validated imediatly
and added if valid.
Invalid backgrounds or duplicate data cells are discarded.
pos
- the new TableGridPosition to be added to this element.
java.lang.NullPointerException
- if the given position is nullpublic java.util.List getBackground()
public TableGridPosition getRoot()
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |