private boolean isSelectionColumnVisible(STable table) { if (table.getRowSelectionRenderer() != null && table.getSelectionModel().getSelectionMode() != SListSelectionModel.NO_SELECTION) return true; return false; }
protected static boolean isSelectionColumnVisible(STable table) { return table.getRowSelectionRenderer() != null && table.getSelectionModel().getSelectionMode() != SListSelectionModel.NO_SELECTION; }
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); } }
viewComponent.setModel(tableModel); listSelectionModelBinder.bindSelectionModel(connector, viewComponent .getSelectionModel(), null); int maxColumnSize = computePixelWidth(viewComponent, maxColumnCharacterLength);