Package org.openl.rules.table
Class LogicalTableHelper
- java.lang.Object
-
- org.openl.rules.table.LogicalTableHelper
-
public class LogicalTableHelper extends Object
Helper class, that provides methods for creation logical tables and calculating logical columns and rows.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ILogicalTablelogicalTable(IGridTable table)If there is no merged cells in the top row and left column - returnsSimpleLogicalTablein other case returnLogicalTablestatic ILogicalTablelogicalTable(IGridTable table, ILogicalTable columnOffsetsTable, ILogicalTable rowOffsetsTable)static ILogicalTablemake1ColumnTable(ILogicalTable t)static ILogicalTablemergeBounds(ILogicalTable leftRows, ILogicalTable topColumns)This method will produce a logical table defined by 2 tables: leftRows and topColumns Both tables are logical tables.static ILogicalTableunmergeColumns(ILogicalTable table, int fromColumn, int toColumn)
-
-
-
Method Detail
-
logicalTable
public static ILogicalTable logicalTable(IGridTable table, ILogicalTable columnOffsetsTable, ILogicalTable rowOffsetsTable)
-
logicalTable
public static ILogicalTable logicalTable(IGridTable table)
If there is no merged cells in the top row and left column - returnsSimpleLogicalTablein other case returnLogicalTable- Parameters:
table- Original source grid table.- Returns:
ILogicalTabletable with correctly calculated height and width.
-
mergeBounds
public static ILogicalTable mergeBounds(ILogicalTable leftRows, ILogicalTable topColumns)
This method will produce a logical table defined by 2 tables: leftRows and topColumns Both tables are logical tables. Rows in a new table will be defined by rows in leftRows table, and columns by the columns topColumns table. "Left" and "top" points to relative location of defining tables. It should be used only with "normal" orientation- Parameters:
leftRows-topColumns-- Returns:
-
make1ColumnTable
public static ILogicalTable make1ColumnTable(ILogicalTable t)
- Returns:
- table with 1 column, if necessary transposed, caller is responsible to check that table is either 1xN or Nx1
-
unmergeColumns
public static ILogicalTable unmergeColumns(ILogicalTable table, int fromColumn, int toColumn)
-
-