protected void writeBody(Device device, STable table, int startX, int endX, int startY, int endY, int emptyIndex) throws IOException { final SListSelectionModel selectionModel = table.getSelectionModel(); StringBuilder selectedArea = Utils.inlineStyles(table .getDynamicStyle(STable.SELECTOR_SELECTED)); StringBuilder evenArea = Utils.inlineStyles(table .getDynamicStyle(STable.SELECTOR_EVEN_ROWS)); StringBuilder oddArea = Utils.inlineStyles(table .getDynamicStyle(STable.SELECTOR_ODD_ROWS)); final SCellRendererPane rendererPane = table.getCellRendererPane(); STableColumnModel columnModel = table.getColumnModel(); for (int r = startY; r < endY; ++r) { writeTableRow(device, table, columnModel, selectionModel, rendererPane, r, startX, endX, emptyIndex, selectedArea, oddArea, evenArea); } }
protected void writeBody(Device device, STable table, int startX, int endX, int startY, int endY, int emptyIndex) throws IOException { final SListSelectionModel selectionModel = table.getSelectionModel(); String selectedAreaStyle = table.getStyle(STable.SELECTOR_SELECTED); String evenAreaStyle = table.getStyle(STable.SELECTOR_EVEN_ROWS); String oddAreaStyle = table.getStyle(STable.SELECTOR_ODD_ROWS); StringBuilder selectedAreaInline = Utils.inlineStyles(table.getDynamicStyle(STable.SELECTOR_SELECTED)); StringBuilder evenAreaInline = Utils.inlineStyles(table.getDynamicStyle(STable.SELECTOR_EVEN_ROWS)); StringBuilder oddAreaInline = Utils.inlineStyles(table.getDynamicStyle(STable.SELECTOR_ODD_ROWS)); final SCellRendererPane rendererPane = table.getCellRendererPane(); STableColumnModel columnModel = table.getColumnModel(); for (int r = startY; r < endY; ++r) { writeTableRow(device, table, columnModel, selectionModel, rendererPane, r, startX, endX, emptyIndex, selectedAreaInline, oddAreaInline, evenAreaInline, selectedAreaStyle, oddAreaStyle, evenAreaStyle); } }
private void writeHeader(Device device, STable table, int startX, int endX) throws IOException { if (!table.isHeaderVisible()) return; final SCellRendererPane rendererPane = table.getCellRendererPane(); STableColumnModel columnModel = table.getColumnModel(); StringBuilder headerArea = Utils.inlineStyles(table .getDynamicStyle(STable.SELECTOR_HEADER)); device.print("<tr class=\"header\""); Utils.optAttribute(device, "style", headerArea); device.print(">"); Utils.printNewline(device, table, 1); writeSelectionHeader(device, table); for (int i = startX; i < endX; ++i) { STableColumn column = columnModel.getColumn(i); if (!column.isHidden()) writeHeaderCell(device, table, rendererPane, i); else ++endX; } device.print("</tr>"); Utils.printNewline(device, table); }
protected void writeHeader(Device device, STable table, int startX, int endX) throws IOException { if (!table.isHeaderVisible()) return; final SCellRendererPane rendererPane = table.getCellRendererPane(); STableColumnModel columnModel = table.getColumnModel(); String headerAreaStyle = table.getStyle(STable.SELECTOR_HEADER); if (headerAreaStyle != null) device.print("<tr class=\"" + headerAreaStyle + '"'); else device.print("<tr class=\"header\""); StringBuilder headerAreaInline = Utils.inlineStyles(table.getDynamicStyle(STable.SELECTOR_HEADER)); Utils.optAttribute(device, "style", headerAreaInline); device.print(">"); Utils.printNewline(device, table, 1); writeSelectionHeader(device, table); for (int i = startX; i < endX; ++i) { STableColumn column = columnModel.getColumn(i); if (!column.isHidden()) writeHeaderCell(device, table, rendererPane, i); else ++endX; } device.print("</tr>"); Utils.printNewline(device, table); }
inlineStyle = table.getDynamicStyle(STable.SELECTOR_CELL); Utils.optAttribute(device, "style", Utils.inlineStyles(inlineStyle));