Class CompositeGrid

  • All Implemented Interfaces:
    IGrid

    public class CompositeGrid
    extends AGrid
    An IGrid implementation that composes several IGridTable together.
    It is possible to compose from top to bottom and from left to right by vertical flag.
    Tables are composing one by one, without gaps.
    Author:
    snshor
    • Constructor Detail

      • CompositeGrid

        public CompositeGrid​(IGridTable[] tables,
                             boolean vertical)
        Parameters:
        tables - Tables to be composed.
        vertical - see vertical
    • 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: AGrid
        Gets the URI to the table by its four coordinates on the sheet.
        Specified by:
        getRangeUri in interface IGrid
        Overrides:
        getRangeUri in class AGrid
        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 index
        row - grid row index
        Returns:
        CompositeGrid.Transform that contains coordinates to cell in the appropriate grid.