| java.lang.Object net.sf.jasperreports.engine.export.JRGridLayout
JRGridLayout | public class JRGridLayout (Code) | | Utility class used by grid exporters to create a grid for page layout.
author: Lucian Chirita (lucianc@users.sourceforge.net) version: $Id: JRGridLayout.java 1806 2007-08-06 12:36:33Z teodord $ |
Inner Class :protected static class SortedList extends ArrayList | |
Inner Class :protected static class BoxKey | |
Constructor Summary | |
public | JRGridLayout(ExporterNature nature, List elements, int width, int height, int offsetX, int offsetY) Constructor. | public | JRGridLayout(ExporterNature nature, List elements, int width, int height, int offsetX, int offsetY, List xCuts) Constructor. | protected | JRGridLayout(ExporterNature nature, ElementWrapper[] wrappers, int width, int height, int offsetX, int offsetY, String address) Constructor. |
Method Summary | |
protected static void | addXCuts(ExporterNature nature, List elementsList, int elementOffsetX, List 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. | public static List | calculateXCuts(ExporterNature nature, List 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) | public JRExporterGridCell[][] | getGrid() Returns the constructed element grid. | public static int | getMaxRowHeight(JRExporterGridCell[] row) | protected int | getNextVirtualFrameIndex() | public int | getRowHeight(int row) | public static int | getRowHeight(JRExporterGridCell[] row) | public int | getWidth() Returns the width available for the grid. | public List | getXCuts() Returns the list of cut points on the X axis for the grid. | public List | 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) | public boolean | isColNotEmpty(int colIdx) Decides whether a column is empty or not. | public boolean | isColSpanned(int colIdx) Decides whether a column is occupied by spanning rows or not. | protected boolean | isOverlap(int row1, int col1, int row2, int col2) | public boolean | isRowNotEmpty(int rowIdx) Decides whether a row is empty or not. | public boolean | isRowSpanned(int rowIdx) Decides whether a row is occupied by spanning columns or not. | 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) |
JRGridLayout | public JRGridLayout(ExporterNature nature, List elements, int width, int height, int offsetX, int offsetY)(Code) | | Constructor.
Parameters: elements - the elements that should arranged in a grid Parameters: width - the width available for the grid Parameters: height - the height available for the grid Parameters: offsetX - horizontal element position offset Parameters: offsetY - vertical element position offset |
JRGridLayout | public JRGridLayout(ExporterNature nature, List elements, int width, int height, int offsetX, int offsetY, List xCuts)(Code) | | Constructor.
Parameters: elements - the elements that should arranged in a grid Parameters: width - the width available for the grid Parameters: height - the height available for the grid Parameters: offsetX - horizontal element position offset Parameters: offsetY - vertical element position offset Parameters: xCuts - An optional list of pre-calculated X cuts. |
JRGridLayout | protected JRGridLayout(ExporterNature nature, ElementWrapper[] wrappers, int width, int height, int offsetX, int offsetY, String address)(Code) | | Constructor.
Parameters: wrappers - the element wrappers that should arranged in a grid Parameters: width - the width available for the grid Parameters: height - the height available for the grid Parameters: offsetX - horizontal element position offset Parameters: offsetY - vertical element position offset Parameters: address - element address |
addXCuts | protected static void addXCuts(ExporterNature nature, List elementsList, int elementOffsetX, List xCuts)(Code) | | This static method calculates the X cuts for a list of print elements and
stores them in the list indicated by the xCuts parameter.
Parameters: elementsList - The list of elements to be used to determine the X cuts. Parameters: elementOffsetX - horizontal element position offset Parameters: xCuts - The list to which the X cuts are to be added. |
calculateXCuts | public static List calculateXCuts(ExporterNature nature, List pages, int startPageIndex, int endPageIndex, int width, int offsetX)(Code) | | This static method calculates all the X cuts for a list of pages.
Parameters: pages - The list of pages. Parameters: startPageIndex - The first page to consider. Parameters: endPageIndex - The last page to consider. Parameters: width - The page width Parameters: offsetX - horizontal element position offset |
createCuts | protected void createCuts(ElementWrapper[] wrappers, int elementOffsetX, int elementOffsetY, boolean createXCuts)(Code) | | |
getNextVirtualFrameIndex | protected int getNextVirtualFrameIndex()(Code) | | |
getRowHeight | public int getRowHeight(int row)(Code) | | |
getWidth | public int getWidth()(Code) | | Returns the width available for the grid.
the width available for the grid |
getXCuts | public List getXCuts()(Code) | | Returns the list of cut points on the X axis for the grid.
the list of cut points on the X axis for the grid |
getYCuts | public List getYCuts()(Code) | | Returns the list of cut points on the Y axis for the grid.
the list of cut points on the X axis for the grid |
horizontallyMergeEmptyCells | protected void horizontallyMergeEmptyCells(int startRow, int startCol, int endRow, int endCol)(Code) | | |
isColNotEmpty | public boolean isColNotEmpty(int colIdx)(Code) | | Decides whether a column is empty or not.
Parameters: colIdx - the column index true iff the column is not empty |
isColSpanned | public boolean isColSpanned(int colIdx)(Code) | | Decides whether a column is occupied by spanning rows or not.
Parameters: colIdx - the column index true iff the column is not empty |
isOverlap | protected boolean isOverlap(int row1, int col1, int row2, int col2)(Code) | | |
isRowNotEmpty | public boolean isRowNotEmpty(int rowIdx)(Code) | | Decides whether a row is empty or not.
Parameters: rowIdx - the row index true iff the row is not empty |
isRowSpanned | public boolean isRowSpanned(int rowIdx)(Code) | | Decides whether a row is occupied by spanning columns or not.
Parameters: rowIdx - the row index true iff the row is not empty |
setFrameCellsStyle | protected void setFrameCellsStyle(JRPrintFrame frame, int row1, int col1, int row2, int col2)(Code) | | |
setGridElement | protected void setGridElement(ElementWrapper wrapper, int row1, int col1, int row2, int col2)(Code) | | |
setGridElements | protected void setGridElements(ElementWrapper[] wrappers, int elementOffsetX, int elementOffsetY, int startRow, int startCol, int endRow, int endCol)(Code) | | |
|
|