@Override public IGridRegion getAbsoluteRegion() { return delegate.getAbsoluteRegion(); }
public IGridRegion getAbsoluteRegion() { return delegate.getAbsoluteRegion(); }
public IGridRegion getAbsoluteRegion() { return cell.getAbsoluteRegion(); }
private static List<IGridRegion> getiGridRegions(SpreadsheetTracerLeaf stl) { List<IGridRegion> regions = new ArrayList<IGridRegion>(); regions.add(stl.getSpreadsheetCell().getSourceCell().getAbsoluteRegion()); return regions; }
private static List<IGridRegion> getiGridRegions(SpreadsheetTracerLeaf stl) { List<IGridRegion> regions = new ArrayList<IGridRegion>(); regions.add(stl.getSpreadsheetCell().getSourceCell().getAbsoluteRegion()); return regions; }
/** * Returns all regions of a table. * * @param table the table with regions. * @return a the regions of the table. */ public static List<IGridRegion> getGridRegions(ILogicalTable table) { int height = table.getHeight(); int width = table.getWidth(); List<IGridRegion> regions = new ArrayList<IGridRegion>(); // Go through all possible cells for (int row = 0; row < height; row++) { for (int column = 0; column < width; column++) { ICell cell = table.getCell(column, row); regions.add(cell.getAbsoluteRegion()); } } return regions; } }
private static List<IGridRegion> getiGridRegions(MethodTableTraceObject mmto) { List<IGridRegion> regions = new ArrayList<IGridRegion>(); ITable<?> tableBodyGrid = mmto.getTraceObject().getSyntaxNode().getTableBody().getSource(); ICell cell; for (int row = 0; row < tableBodyGrid.getHeight(); row += cell.getHeight()) { cell = tableBodyGrid.getCell(0, row); regions.add(cell.getAbsoluteRegion()); } return regions; }
private static List<IGridRegion> getiGridRegions(MethodTableTraceObject mmto) { List<IGridRegion> regions = new ArrayList<IGridRegion>(); ITable<?> tableBodyGrid = mmto.getTraceObject().getSyntaxNode().getTableBody().getSource(); ICell cell; for (int row = 0; row < tableBodyGrid.getHeight(); row += cell.getHeight()) { cell = tableBodyGrid.getCell(0, row); regions.add(cell.getAbsoluteRegion()); } return regions; }
private static void validateSimpleParam(ILogicalTable table, IBindingContext bindingContext) throws SyntaxNodeException { ICell theCell = table.getSource().getCell(0, 0); if (table.getWidth() > 1 || table.getHeight() > 1) { for (int i = 0; i < table.getHeight(); i++) { for (int j = 0; j < table.getWidth(); j++) { if ((!(i == 0 && j == 0))) { ICell cell = table.getCell(j, i); if ((theCell.getAbsoluteRegion().getTop() != cell.getAbsoluteRegion().getTop() || theCell .getAbsoluteRegion() .getLeft() != cell.getAbsoluteRegion().getLeft()) && cell.getStringValue() != null) { if (!cell.getStringValue().startsWith(COMMENTARY)) { IGridTable cellTable = getTopLeftCellFromMergedRegion(table.getSource()); throw SyntaxNodeExceptionUtils.createError( "Table structure is wrong. More than one cell with data found where only one cell is expected.", new GridCellSourceCodeModule(cellTable, bindingContext)); } } } } } } }
int leftCell = tableRegion.getLeft(); int topCell = tableRegion.getTop(); int firstPropertyRow = IGridRegion.Tool.height(grid.getCell(leftCell, topCell).getAbsoluteRegion());
private static int getPropertyRowIndex(IGridRegion tableRegion, IGrid grid, String newPropName) { int leftCell = tableRegion.getLeft(); int topCell = tableRegion.getTop(); int firstPropertyRow = IGridRegion.Tool.height(grid.getCell(leftCell, topCell).getAbsoluteRegion()); String propsHeader = grid.getCell(leftCell, topCell + firstPropertyRow).getStringValue(); if (tableWithoutPropertySection(propsHeader)) { return -1; } int propsCount = grid.getCell(leftCell, topCell + 1).getHeight(); int propNameCellOffset = grid.getCell(leftCell, topCell + 1).getWidth(); for (int i = 0; i < propsCount; i++) { String propNameFromTable = grid.getCell(leftCell + propNameCellOffset, topCell + 1 + i) .getStringValue(); if (propNameFromTable != null && propNameFromTable.equals(newPropName)) { return topCell + 1 + i; } } return -1; }
private static IUndoableGridTableAction resizePropertiesHeader(IGridRegion tableRegion, IGrid grid, MetaInfoWriter metaInfoWriter) { int leftCell = tableRegion.getLeft(); int topCell = tableRegion.getTop(); int firstPropertyRow = IGridRegion.Tool.height(grid.getCell(leftCell, topCell).getAbsoluteRegion()); int propsCount = grid.getCell(leftCell, topCell + firstPropertyRow).getHeight(); if (propsCount == 1) { IGridRegion propHeaderRegion = grid.getRegionContaining(leftCell, topCell + firstPropertyRow); if (propHeaderRegion == null) { propHeaderRegion = new GridRegion(topCell + firstPropertyRow, leftCell, topCell + firstPropertyRow, leftCell); } return new UndoableResizeMergedRegionAction(propHeaderRegion, 1, INSERT, ROWS); } else { return new UndoableCompositeAction(resizeMergedRegions(grid, firstPropertyRow, 1, INSERT, ROWS, tableRegion, metaInfoWriter)); } }
int leftCell = tableRegion.getLeft(); int topCell = tableRegion.getTop(); IGridRegion headerRegion = grid.getCell(leftCell, topCell).getAbsoluteRegion(); for (int row = headerRegion.getBottom() + 1; row < tableRegion.getBottom(); row = cellToExpandRegion .getBottom() + 1) { cellToExpandRegion = grid.getCell(leftCell + regionWidth - 1, row).getAbsoluteRegion();