|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jrefinery.report.targets.table.TableGridLayout
The table grid layout is used to layout the collected TableCellData object from the TableGrid into the table. The cells position is calculated by comparing the cell bounds with the collected x and y-cuts.
Nested Class Summary | |
static class |
TableGridLayout.Element
The Element class encapsulates all TableCellData-object within a single grid cell. |
Constructor Summary | |
TableGridLayout(int[] pxCuts,
int[] pyCuts,
TableCellData[] positions)
Creates a new TableGridLayout. |
Method Summary | |
protected void |
add(TableCellData pos)
Adds the table cell data position into the table grid. |
protected void |
addToGrid(int posX,
int posY,
TableGridPosition gPos)
Adds the gridposition into the table, positionated at the cell (posX, posY). |
int |
getColumnEnd(int column)
Returns the end position of the given column in points. |
int |
getColumnStart(int column)
Returns the start position of the given column in points. |
TableGridLayout.Element |
getData(int x,
int y)
Returns the element located in the specified cell. |
int |
getHeight()
Returns the number of rows of the table. |
int |
getRowEnd(int row)
Returns the start position of the given row in points. |
int |
getRowStart(int row)
Returns the start position of the given row in points. |
int |
getWidth()
Returns the number of columns of the table. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TableGridLayout(int[] pxCuts, int[] pyCuts, TableCellData[] positions)
pxCuts
- the collected horizontal cell bounds from the TableGrid,.pyCuts
- the collected vertical cell bounds from the TableGrid.positions
- the positions collected by the table grid.Method Detail |
protected void add(TableCellData pos)
pos
- the new position that should be added into the gridprotected void addToGrid(int posX, int posY, TableGridPosition gPos)
posX
- the x position within the tablegrid.posY
- the y position within the tablegrid.gPos
- the TableGridPosition that should be added to the table.
java.lang.IndexOutOfBoundsException
- if posX or posY are invalid.
java.lang.NullPointerException
- if the given table grid position is invalidpublic TableGridLayout.Element getData(int x, int y)
x
- the table columny
- the table row
public int getWidth()
public int getHeight()
public int getColumnStart(int column)
column
- the column
public int getRowStart(int row)
row
- the row
public int getColumnEnd(int column)
column
- the column
public int getRowEnd(int row)
row
- the row
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |