for (TableRowLineRenderer row = head;row != null;row = row.next()) { for (int i = 0;i < row.getCols().size();i++) { LineRenderer renderable = row.getCols().get(i); eltWidths[i] = Math.max(eltWidths[i], renderable.getActualWidth() + row.row.leftCellPadding + row.row.rightCellPadding); eltMinWidths[i] = Math.max(eltMinWidths[i], renderable.getMinWidth() + row.row.leftCellPadding + row.row.rightCellPadding); int size = tail.getSize(); int[] actualHeights = new int[size]; int[] minHeights = new int[size]; for (TableRowLineRenderer row = head;row != null;row = row.next()) { actualHeights[row.getIndex()] = row.getActualHeight(widths); minHeights[row.getIndex()] = row.getMinHeight(widths); heights = new int[tail.getSize()]; Arrays.fill(heights, -1); for (TableRowLineRenderer row = head;row != null;row = row.next()) { if (row.getIndex() < heights.length) { int[] what; if (row.getColsSize() == widths.length) { what = widths; } else { what = new int[row.getColsSize()]; for (int j = 0;j < widths.length;j++) { what[j % what.length] += widths[j]; TableRowReader next = row.renderer(what, heights[row.getIndex()]); if (rHead == null) {
@Override public int getActualWidth() { int actualWidth = 0; for (TableRowLineRenderer row = head;row != null;row = row.next()) { actualWidth = Math.max(actualWidth, row.getActualWidth()); } return actualWidth + (border != null ? 2 : 0); }
@Override public int getMinWidth() { int minWidth = 0; for (TableRowLineRenderer row = head;row != null;row = row.next()) { minWidth = Math.max(minWidth, row.getMinWidth()); } return minWidth + (border != null ? 2 : 0); }
@Override public int getActualHeight(int width) { if (border != null) { width -= 2; } int actualHeight = 0; for (TableRowLineRenderer row = head;row != null;row = row.next()) { actualHeight += row.getActualHeight(width); } if (border != null) { actualHeight += 2; } return actualHeight; }
private int getMaxColSize() { int n = 0; for (TableRowLineRenderer row = head;row != null;row = row.next()) { n = Math.max(n, row.getColsSize()); } return n; }
TableLineRenderer(TableElement table) { this.rowLayout = table.getRowLayout(); this.columnLayout = table.getColumnLayout(); this.border = table.getBorder(); this.style = table.getStyle(); this.separator = table.getSeparator(); this.overflow = table.getOverflow(); this.leftCellPadding = table.getLeftCellPadding(); this.rightCellPadding = table.getRightCellPadding(); // for (RowElement row : table.getRows()) { if (head == null) { head = tail = new TableRowLineRenderer(this, row); } else { tail = tail.add(new TableRowLineRenderer(this, row)); } } }
private int getMaxColSize() { int n = 0; for (TableRowLineRenderer row = head;row != null;row = row.next()) { n = Math.max(n, row.getColsSize()); } return n; }
@Override public int getActualHeight(int width) { if (border != null) { width -= 2; } int actualHeight = 0; for (TableRowLineRenderer row = head;row != null;row = row.next()) { actualHeight += row.getActualHeight(width); } if (border != null) { actualHeight += 2; } return actualHeight; }
TableLineRenderer(TableElement table) { this.rowLayout = table.getRowLayout(); this.columnLayout = table.getColumnLayout(); this.border = table.getBorder(); this.style = table.getStyle(); this.separator = table.getSeparator(); this.overflow = table.getOverflow(); this.leftCellPadding = table.getLeftCellPadding(); this.rightCellPadding = table.getRightCellPadding(); // for (RowElement row : table.getRows()) { if (head == null) { head = tail = new TableRowLineRenderer(this, row); } else { tail = tail.add(new TableRowLineRenderer(this, row)); } } }
for (TableRowLineRenderer row = head;row != null;row = row.next()) { for (int i = 0;i < row.getCols().size();i++) { LineRenderer renderable = row.getCols().get(i); eltWidths[i] = Math.max(eltWidths[i], renderable.getActualWidth() + row.row.leftCellPadding + row.row.rightCellPadding); eltMinWidths[i] = Math.max(eltMinWidths[i], renderable.getMinWidth() + row.row.leftCellPadding + row.row.rightCellPadding); int size = tail.getSize(); int[] actualHeights = new int[size]; int[] minHeights = new int[size]; for (TableRowLineRenderer row = head;row != null;row = row.next()) { actualHeights[row.getIndex()] = row.getActualHeight(widths); minHeights[row.getIndex()] = row.getMinHeight(widths); heights = new int[tail.getSize()]; Arrays.fill(heights, -1); for (TableRowLineRenderer row = head;row != null;row = row.next()) { if (row.getIndex() < heights.length) { int[] what; if (row.getColsSize() == widths.length) { what = widths; } else { what = new int[row.getColsSize()]; for (int j = 0;j < widths.length;j++) { what[j % what.length] += widths[j]; TableRowReader next = row.renderer(what, heights[row.getIndex()]); if (rHead == null) {
private int getMaxColSize() { int n = 0; for (TableRowLineRenderer row = head;row != null;row = row.next()) { n = Math.max(n, row.getColsSize()); } return n; }
@Override public int getMinWidth() { int minWidth = 0; for (TableRowLineRenderer row = head;row != null;row = row.next()) { minWidth = Math.max(minWidth, row.getMinWidth()); } return minWidth + (border != null ? 2 : 0); }
@Override public int getActualWidth() { int actualWidth = 0; for (TableRowLineRenderer row = head;row != null;row = row.next()) { actualWidth = Math.max(actualWidth, row.getActualWidth()); } return actualWidth + (border != null ? 2 : 0); }
@Override public int getActualHeight(int width) { if (border != null) { width -= 2; } int actualHeight = 0; for (TableRowLineRenderer row = head;row != null;row = row.next()) { actualHeight += row.getActualHeight(width); } if (border != null) { actualHeight += 2; } return actualHeight; }
TableLineRenderer(TableElement table) { this.rowLayout = table.getRowLayout(); this.columnLayout = table.getColumnLayout(); this.border = table.getBorder(); this.style = table.getStyle(); this.separator = table.getSeparator(); this.overflow = table.getOverflow(); this.leftCellPadding = table.getLeftCellPadding(); this.rightCellPadding = table.getRightCellPadding(); // for (RowElement row : table.getRows()) { if (head == null) { head = tail = new TableRowLineRenderer(this, row); } else { tail = tail.add(new TableRowLineRenderer(this, row)); } } }
for (TableRowLineRenderer row = head;row != null;row = row.next()) { for (int i = 0;i < row.getCols().size();i++) { LineRenderer renderable = row.getCols().get(i); eltWidths[i] = Math.max(eltWidths[i], renderable.getActualWidth() + row.row.leftCellPadding + row.row.rightCellPadding); eltMinWidths[i] = Math.max(eltMinWidths[i], renderable.getMinWidth() + row.row.leftCellPadding + row.row.rightCellPadding); int size = tail.getSize(); int[] actualHeights = new int[size]; int[] minHeights = new int[size]; for (TableRowLineRenderer row = head;row != null;row = row.next()) { actualHeights[row.getIndex()] = row.getActualHeight(widths); minHeights[row.getIndex()] = row.getMinHeight(widths); heights = new int[tail.getSize()]; Arrays.fill(heights, -1); for (TableRowLineRenderer row = head;row != null;row = row.next()) { if (row.getIndex() < heights.length) { int[] what; if (row.getColsSize() == widths.length) { what = widths; } else { what = new int[row.getColsSize()]; for (int j = 0;j < widths.length;j++) { what[j % what.length] += widths[j]; TableRowReader next = row.renderer(what, heights[row.getIndex()]); if (rHead == null) {
@Override public int getMinWidth() { int minWidth = 0; for (TableRowLineRenderer row = head;row != null;row = row.next()) { minWidth = Math.max(minWidth, row.getMinWidth()); } return minWidth + (border != null ? 2 : 0); }
@Override public int getActualWidth() { int actualWidth = 0; for (TableRowLineRenderer row = head;row != null;row = row.next()) { actualWidth = Math.max(actualWidth, row.getActualWidth()); } return actualWidth + (border != null ? 2 : 0); }