public GridTableCell(int column, int row, IGridTable table) { this.column = column; this.row = row; this.table = table; int gridColumn = table.getGridColumn(column, row); int gridRow = table.getGridRow(column, row); this.cell = table.getGrid().getCell(gridColumn, gridRow); }
/** * Check is the table is partial */ public boolean isTablePart(String uri) { IGridTable grid = this.getGridTable(uri); if (grid != null && grid.getGrid() instanceof CompositeGrid) { return true; } return false; }
/** * Check is the table is partial */ public boolean isTablePart(String uri) { IGridTable grid = this.getGridTable(uri); if (grid != null && grid.getGrid() instanceof CompositeGrid) { return true; } return false; }
/** * @return Sheet source of editable table */ public XlsSheetSourceCodeModule getSheetSource() { XlsSheetGridModel xlsgrid = (XlsSheetGridModel) gridTable.getGrid(); return xlsgrid.getSheetSource(); }
public boolean isExtensionGrid(String uri) { IGridTable grid = getGridTable(uri); return grid != null && grid.getGrid() instanceof ExtensionWrapperGrid; }
/** * @return Sheet source of editable table */ public XlsSheetSourceCodeModule getSheetSource() { XlsSheetGridModel xlsgrid = (XlsSheetGridModel) gridTable.getGrid(); return xlsgrid.getSheetSource(); }
@Override protected IUndoableGridTableAction performAction(int numberToInsert, IGridRegion fullTableRegion, IGridTable table) { return GridTool.insertRows(numberToInsert, beforeRow, fullTableRegion, table.getGrid(), metaInfoWriter); } }
public void undoAction(IGridTable table) { IWritableGrid grid = (IWritableGrid) table.getGrid(); grid.removeMergedRegion(region); for (IGridRegion mergedRegion : removedRegions) { grid.addMergedRegion(mergedRegion); } }
public void undoAction(IGridTable table) { IWritableGrid grid = (IWritableGrid) table.getGrid(); if (newRegion != null) { grid.removeMergedRegion(newRegion); } grid.addMergedRegion(initialRegion); }
public void undoAction(IGridTable table) { IWritableGrid grid = (IWritableGrid) table.getGrid(); if (toRestore != null) { grid.addMergedRegion(toRestore); } restorePrevCell(grid); }
public void undoAction(IGridTable table) { IWritableGrid grid = (IWritableGrid) table.getGrid(); for (IGridRegion region : createdRegions) { grid.removeMergedRegion(region); } for (IGridRegion region : removedRegions) { grid.addMergedRegion(region); } }
public void undoAction(IGridTable table) { if (newRegion != null) { try { new TableServiceImpl(metaInfoWriter).moveTableTo(new GridTable(newRegion, table.getGrid()), prevRegion); } catch (TableServiceException e) { throw new RuntimeException(e); } } }
public void undoAction(IGridTable table) { IWritableGrid grid = (IWritableGrid) table.getGrid(); if (toRemove != null) { grid.removeMergedRegion(toRemove); } if (toRestore != null) { grid.addMergedRegion(toRestore); } restorePrevCell(grid); }
/** * @return New table id on the sheet where it was saved. It is needed for tables that were moved * to new place during adding new rows and columns on editing. We need to know new destination of the table. * @throws IOException */ public synchronized String save() throws IOException { XlsSheetGridModel xlsgrid = (XlsSheetGridModel) gridTable.getGrid(); xlsgrid.getSheetSource().getWorkbookSource().save(); actions = new UndoableActions(); String uri = getOriginalGridTable().getUri(); return TableUtils.makeTableId(uri); }
public void doAction(IGridTable table) { IWritableGrid grid = (IWritableGrid) table.getGrid(); ICellStyle style = grid.getCell(getCol(), getRow()).getStyle(); prevColor = style != null ? style.getFillForegroundColor() : null; grid.setCellFillColor(getCol(), getRow(), newColor); }
public void doAction(IGridTable table) { IWritableGrid grid = (IWritableGrid) table.getGrid(); ICellStyle style = grid.getCell(getCol(), getRow()).getStyle(); prevAlignment = style != null ? style.getHorizontalAlignment() : HorizontalAlignment.GENERAL; grid.setCellAlignment(getCol(), getRow(), newAlignment); }
public void doAction(IGridTable table) { IWritableGrid grid = (IWritableGrid) table.getGrid(); ICellFont font = grid.getCell(getCol(), getRow()).getFont(); prevColor = font != null ? font.getFontColor() : null; grid.setCellFontColor(getCol(), getRow(), newColor); }
public void doAction(IGridTable table) { IWritableGrid grid = (IWritableGrid) table.getGrid(); ICellStyle style = grid.getCell(getCol(), getRow()).getStyle(); prevIndent = style != null ? style.getIndent() : 0; grid.setCellIndent(getCol(), getRow(), newIndent); }
private boolean isSpecialRow(int rowNum) { ColumnMatch columnMatch = getBoundNode().getColumnMatch(); IGrid grid = columnMatch.getSyntaxNode().getTableBody().getSource().getGrid(); int firstNameRowNum = getSpecialRowCount(columnMatch); IGridRegion firstNameRegion = columnMatch.getRows().get(firstNameRowNum).get(NAMES)[0].getGridRegion(); ICell cell = grid.getCell(firstNameRegion.getLeft(), firstNameRegion.getTop()); return rowNum < cell.getAbsoluteRow(); }
public void undoAction(IGridTable table) { IWritableGrid grid = (IWritableGrid) table.getGrid(); if (StringUtils.isNotBlank(getPrevFormula())) { grid.setCellFormula(getCol(), getRow(), getPrevFormula()); } else { grid.setCellValue(getCol(), getRow(), getPrevValue()); } metaInfoWriter.setMetaInfo(getRow(), getCol(), getPrevMetaInfo()); }