|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jasperreports.engine.export.JRGridLayout
public class JRGridLayout
Utility class used by grid exporters to create a grid for page layout.
Nested Class Summary | |
---|---|
protected static class |
JRGridLayout.BoxKey
|
Constructor Summary | |
---|---|
protected |
JRGridLayout(ExporterNature nature,
ElementWrapper[] wrappers,
int width,
int height,
int offsetX,
int offsetY,
java.lang.String address)
Constructor. |
|
JRGridLayout(ExporterNature nature,
java.util.List<JRPrintElement> elements,
int width,
int height,
int offsetX,
int offsetY)
Constructor. |
|
JRGridLayout(ExporterNature nature,
java.util.List<JRPrintElement> elements,
int width,
int height,
int offsetX,
int offsetY,
CutsInfo xCuts)
Constructor. |
Method Summary | |
---|---|
protected static void |
addXCuts(ExporterNature nature,
java.util.List<JRPrintElement> elementsList,
int elementOffsetX,
CutsInfo xCuts)
This static method calculates the X cuts for a list of print elements and stores them in the list indicated by the xCuts parameter. |
static CutsInfo |
calculateXCuts(ExporterNature nature,
java.util.List<JRPrintPage> pages,
int startPageIndex,
int endPageIndex,
int width,
int offsetX)
This static method calculates all the X cuts for a list of pages. |
protected void |
createCuts(ElementWrapper[] wrappers,
int elementOffsetX,
int elementOffsetY,
boolean createXCuts)
|
int |
getColumnWidth(int col)
|
JRExporterGridCell[][] |
getGrid()
Returns the constructed element grid. |
int |
getMaxRowHeight(int rowIndex)
|
protected int |
getNextVirtualFrameIndex()
|
int |
getRowHeight(int row)
|
static int |
getRowHeight(JRExporterGridCell[] row)
|
int |
getWidth()
Returns the width available for the grid. |
CutsInfo |
getXCuts()
Returns the list of cut points on the X axis for the grid. |
CutsInfo |
getYCuts()
Returns the list of cut points on the Y axis for the grid. |
protected void |
horizontallyMergeEmptyCells(int startRow,
int startCol,
int endRow,
int endCol)
|
protected boolean |
isOverlap(int row1,
int col1,
int row2,
int col2)
|
protected void |
layoutGrid(ElementWrapper[] wrappers)
Constructs the element grid. |
protected void |
setFrameCellsStyle(JRPrintFrame frame,
int row1,
int col1,
int row2,
int col2)
|
protected void |
setGridElement(ElementWrapper wrapper,
int row1,
int col1,
int row2,
int col2)
|
protected void |
setGridElements(ElementWrapper[] wrappers,
int elementOffsetX,
int elementOffsetY,
int startRow,
int startCol,
int endRow,
int endCol)
|
protected void |
setMargins(ElementWrapper[] wrappers)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JRGridLayout(ExporterNature nature, java.util.List<JRPrintElement> elements, int width, int height, int offsetX, int offsetY)
elements
- the elements that should arranged in a gridwidth
- the width available for the gridheight
- the height available for the gridoffsetX
- horizontal element position offsetoffsetY
- vertical element position offsetpublic JRGridLayout(ExporterNature nature, java.util.List<JRPrintElement> elements, int width, int height, int offsetX, int offsetY, CutsInfo xCuts)
elements
- the elements that should arranged in a gridwidth
- the width available for the gridheight
- the height available for the gridoffsetX
- horizontal element position offsetoffsetY
- vertical element position offsetxCuts
- An optional list of pre-calculated X cuts.protected JRGridLayout(ExporterNature nature, ElementWrapper[] wrappers, int width, int height, int offsetX, int offsetY, java.lang.String address)
wrappers
- the element wrappers that should arranged in a gridwidth
- the width available for the gridheight
- the height available for the gridoffsetX
- horizontal element position offsetoffsetY
- vertical element position offsetaddress
- element addressMethod Detail |
---|
protected void layoutGrid(ElementWrapper[] wrappers)
protected void createCuts(ElementWrapper[] wrappers, int elementOffsetX, int elementOffsetY, boolean createXCuts)
protected void setMargins(ElementWrapper[] wrappers)
protected void setGridElements(ElementWrapper[] wrappers, int elementOffsetX, int elementOffsetY, int startRow, int startCol, int endRow, int endCol)
protected void horizontallyMergeEmptyCells(int startRow, int startCol, int endRow, int endCol)
protected boolean isOverlap(int row1, int col1, int row2, int col2)
protected void setGridElement(ElementWrapper wrapper, int row1, int col1, int row2, int col2)
protected void setFrameCellsStyle(JRPrintFrame frame, int row1, int col1, int row2, int col2)
public JRExporterGridCell[][] getGrid()
public CutsInfo getXCuts()
public CutsInfo getYCuts()
public int getWidth()
public int getColumnWidth(int col)
public int getRowHeight(int row)
public int getMaxRowHeight(int rowIndex)
public static int getRowHeight(JRExporterGridCell[] row)
public static CutsInfo calculateXCuts(ExporterNature nature, java.util.List<JRPrintPage> pages, int startPageIndex, int endPageIndex, int width, int offsetX)
pages
- The list of pages.startPageIndex
- The first page to consider.endPageIndex
- The last page to consider.width
- The page widthoffsetX
- horizontal element position offsetprotected static void addXCuts(ExporterNature nature, java.util.List<JRPrintElement> elementsList, int elementOffsetX, CutsInfo xCuts)
elementsList
- The list of elements to be used to determine the X cuts.elementOffsetX
- horizontal element position offsetxCuts
- The list to which the X cuts are to be added.protected int getNextVirtualFrameIndex()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |