public class SimpleLogicalTable extends ALogicalTable
IGridTable, that doesn`t contain merged cells in the top row and left column to ILogicalTable
interface.ITable.getColumn(int)ITable.getColumns(int)ITable.getColumns(int, int)ITable.getRow(int)ITable.getRows(int)ITable.getRows(int, int)ITable.getSubtable(int, int, int, int)getSubtable(int, int, int, int) method implementation.| Constructor and Description |
|---|
SimpleLogicalTable(IGridTable table) |
| Modifier and Type | Method and Description |
|---|---|
int |
findColumnStart(int gridOffset)
Calculates # of the column starting exactly at gridOffset.
|
int |
findRowStart(int gridOffset)
Calculates # of the row starting exactly at gridOffset.
|
ICell |
getCell(int column,
int row) |
int |
getColumnWidth(int column) |
int |
getHeight() |
int |
getRowHeight(int row) |
ILogicalTable |
getSubtable(int column,
int row,
int width,
int height)
This method consider that this table doesn`t have merged regions inside itself.
|
int |
getWidth() |
getColumn, getColumns, getColumns, getRow, getRows, getRows, getSource, isNormalOrientation, toString, transposepublic SimpleLogicalTable(IGridTable table)
public int getWidth()
public int getHeight()
public int findColumnStart(int gridOffset)
ILogicalTablepublic int findRowStart(int gridOffset)
ILogicalTablepublic int getColumnWidth(int column)
column - index of the columnpublic int getRowHeight(int row)
row - index of the rowpublic ILogicalTable getSubtable(int column, int row, int width, int height)
ILogicalTable.getSource() extract the region you need by calling
ITable.getSubtable(int, int, int, int) and create ILogicalTable by calling
LogicalTableHelper.logicalTable(IGridTable). This is optimised implementation because of time overhead
when checking for each table is it really logical or not.SimpleLogicalTableTest.column - from which we want to take the subtable, including this.row - from which we want to take the subtable, including this.width - of the needed table.height - of the needed table.SimpleLogicalTablepublic ICell getCell(int column, int row)
Copyright © 2004–2019 OpenL Tablets. All rights reserved.