Package org.openl.rules.table
Class CompositeGrid
- java.lang.Object
-
- org.openl.rules.table.AGrid
-
- org.openl.rules.table.CompositeGrid
-
- All Implemented Interfaces:
IGrid
public class CompositeGrid extends AGrid
AnIGridimplementation that composes severalIGridTabletogether.
It is possible to compose from top to bottom and from left to right byverticalflag.
Tables are composing one by one, without gaps.- Author:
- snshor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classCompositeGrid.TransformHandles the grid and coordinates of the cell in this grid.
-
Field Summary
-
Fields inherited from class org.openl.rules.table.AGrid
RANGE_SEPARATOR
-
Fields inherited from interface org.openl.rules.table.IGrid
CELL_TYPE_BLANK, CELL_TYPE_BOOLEAN, CELL_TYPE_ERROR, CELL_TYPE_FORMULA, CELL_TYPE_NUMERIC, CELL_TYPE_STRING
-
-
Constructor Summary
Constructors Constructor Description CompositeGrid(IGridTable[] tables, boolean vertical)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ICellgetCell(int column, int row)intgetColumnWidth(int col)IGridTable[]getGridTables()intgetHeight()IGridRegiongetMappedRegion(int i)intgetMaxColumnIndex(int row)intgetMaxRowIndex()IGridRegiongetMergedRegion(int i)intgetMinColumnIndex(int row)intgetMinRowIndex()intgetNumberOfMergedRegions()StringgetRangeUri(int colStart, int rowStart, int colEnd, int rowEnd)Gets the URI to the table by its four coordinates on the sheet.StringgetUri()intgetWidth()booleanisEmpty(int col, int row)CompositeGrid.Transformtransform(int col, int row)Transformes current grid coordinates to appropriate table coordinates.-
Methods inherited from class org.openl.rules.table.AGrid
getRegionContaining, getRegionStartingAt, getTables, isInOneMergedRegion, isPartOfTheMergedRegion, isTopLeftCellInMergedRegion
-
-
-
-
Constructor Detail
-
CompositeGrid
public CompositeGrid(IGridTable[] tables, boolean vertical)
- Parameters:
tables- Tables to be composed.vertical- seevertical
-
-
Method Detail
-
getGridTables
public IGridTable[] getGridTables()
-
getMappedRegion
public IGridRegion getMappedRegion(int i)
-
getCell
public ICell getCell(int column, int row)
-
getColumnWidth
public int getColumnWidth(int col)
-
getHeight
public int getHeight()
-
getMaxColumnIndex
public int getMaxColumnIndex(int row)
-
getMaxRowIndex
public int getMaxRowIndex()
-
getMergedRegion
public IGridRegion getMergedRegion(int i)
-
getMinColumnIndex
public int getMinColumnIndex(int row)
-
getMinRowIndex
public int getMinRowIndex()
-
getNumberOfMergedRegions
public int getNumberOfMergedRegions()
-
getRangeUri
public String getRangeUri(int colStart, int rowStart, int colEnd, int rowEnd)
Description copied from class:AGridGets the URI to the table by its four coordinates on the sheet.- Specified by:
getRangeUriin interfaceIGrid- Overrides:
getRangeUriin classAGrid- Returns:
- URI to the table in the sheet. (e.g.
file:D:\work\Workspace\org.openl.tablets.tutorial4\rules \main&wbName=Tutorial_4.xls&wsName=Vehicle-Scoring&range=B3:D12)
-
getUri
public String getUri()
-
getWidth
public int getWidth()
-
isEmpty
public boolean isEmpty(int col, int row)
-
transform
public CompositeGrid.Transform transform(int col, int row)
Transformes current grid coordinates to appropriate table coordinates.- Parameters:
col- grid column indexrow- grid row index- Returns:
CompositeGrid.Transformthat contains coordinates to cell in the appropriate grid.
-
-