@SuppressWarnings("Duplicates") private void printShapeText(final TableShape<S,P> shape, final StringBuilder sb) { final int nrows = shape.getNumberOfRows(); final int ncols = shape.getNumberOfColumns(); for (int row = 0; row < nrows; row++){ for (int col = 0; col < ncols; col++){ TableCell<S, P> cell = shape.getCell(row, col); //defensive null checks; don't know if they're necessary if (cell != null){ String txt = cell.getText(); txt = (txt == null) ? "" : txt; sb.append(txt); if (col < ncols-1){ sb.append('\t'); } } } sb.append('\n'); } }
for (int col=0; col<cols; col++) { TableCell<?,?> tc = ts.getCell(row, col); if (tc == null || tc.isMerged()) { continue; Paint fillPaint = drawPaint.getPaint(graphics, tc.getFillStyle().getPaint()); graphics.setPaint(fillPaint); Rectangle2D cellAnc = tc.getAnchor(); graphics.fill(cellAnc); StrokeStyle stroke = tc.getBorderStyle(edge); if (stroke == null) { continue;
if (be != null) { if (args.length == 0) { cell.removeBorder(be); } else { for (Object o : args) { if (o instanceof Double) { cell.setBorderWidth(be, (Double)o); } else if (o instanceof Color) { cell.setBorderColor(be, (Color)o); } else if (o instanceof LineDash) { cell.setBorderDash(be, (LineDash)o); } else if (o instanceof LineCompound) { cell.setBorderCompound(be, (LineCompound)o);
cell.getProperties().put("deferToParentPrefWidth", Boolean.TRUE); Node n = cell.getSkin() == null ? null : cell.getSkin().getNode(); if (n instanceof Region) for (int row = 0; row < rows; row++) cell.updateTableColumn(col); cell.updateTableView(col.getTableView()); cell.updateIndex(row); String oldText = cell.getText(); cell.setText(StringUtils.repeat("W", Math.max(0, minWidth))); cell.impl_processCSS(false); minPxWidth = cell.prefWidth(-1); header.getChildren().remove(cell); cell.setText(oldText); if ((cell.getText() != null && !cell.getText().isEmpty()) || cell.getGraphic() != null) cell.impl_processCSS(false); desiredWidth = Math.max(desiredWidth, cell.prefWidth(-1)); desiredWidth = Math.max(desiredWidth, minPxWidth); header.getChildren().remove(cell);
if (be != null) { if (args.length == 0) { cell.removeBorder(be); } else { for (Object o : args) { if (o instanceof Double) { cell.setBorderWidth(be, (Double)o); } else if (o instanceof Color) { cell.setBorderColor(be, (Color)o); } else if (o instanceof LineDash) { cell.setBorderDash(be, (LineDash)o); } else if (o instanceof LineCompound) { cell.setBorderCompound(be, (LineCompound)o);
for (int col=0; col<cols; col++) { TableCell<?,?> tc = ts.getCell(row, col); if (tc == null || tc.isMerged()) { continue; Paint fillPaint = drawPaint.getPaint(graphics, tc.getFillStyle().getPaint()); graphics.setPaint(fillPaint); Rectangle2D cellAnc = tc.getAnchor(); graphics.fill(cellAnc); StrokeStyle stroke = tc.getBorderStyle(edge); if (stroke == null) { continue;
@SuppressWarnings("Duplicates") private void printShapeText(final TableShape<S,P> shape, final StringBuilder sb) { final int nrows = shape.getNumberOfRows(); final int ncols = shape.getNumberOfColumns(); for (int row = 0; row < nrows; row++){ for (int col = 0; col < ncols; col++){ TableCell<S, P> cell = shape.getCell(row, col); //defensive null checks; don't know if they're necessary if (cell != null){ String txt = cell.getText(); txt = (txt == null) ? "" : txt; sb.append(txt); if (col < ncols-1){ sb.append('\t'); } } } sb.append('\n'); } }