/** * {@inheritDoc} */ @Override public void setModel(TableModel newModel) { // JW: need to look here? is done in tableChanged as well. boolean wasEnabled = getSelectionMapper().isEnabled(); getSelectionMapper().setEnabled(false); try { super.setModel(newModel); } finally { getSelectionMapper().setEnabled(wasEnabled); } }
/** * Overridden to update selectionMapper */ @Override public void setSelectionModel(ListSelectionModel newModel) { super.setSelectionModel(newModel); getSelectionMapper().setViewSelectionModel(getSelectionModel()); }
table.getSelectionMapper().setEnabled(false); table.setSelectionModel(selectionModel); table.setColumnControlVisible(true);
table.setSortable(false); table.getTableHeader().setDefaultRenderer(new JTableHeader().getDefaultRenderer()); table.getSelectionMapper().setEnabled(false); table.setSelectionModel(selectionModel); table.setColumnControlVisible(true);
table.getSelectionMapper().setEnabled(false); table.setSelectionModel(selectionModel); table.setColumnControlVisible(true);
table.setSortable(false); table.getTableHeader().setDefaultRenderer(new JTableHeader().getDefaultRenderer()); table.getSelectionMapper().setEnabled(false); table.setSelectionModel(selectionModel); table.setColumnControlVisible(true);
boolean wasEnabled = getSelectionMapper().isEnabled(); getSelectionMapper().setEnabled(false); try { SizeSequence rowModel = nullSuperRowModel(e); getSelectionMapper().setEnabled(wasEnabled);
getSelectionMapper().clearModelSelection(); getRowModelMapper().clearModelSizes(); updateViewSizeSequence(); getSelectionMapper().insertIndexInterval(start, length, true); getRowModelMapper().insertIndexInterval(start, length, getRowHeight()); getSelectionMapper().removeIndexInterval(start, end); getRowModelMapper().removeIndexInterval(start, deletedCount);
/** * Sets the FilterPipeline for filtering table rows, maybe null to remove * all previously applied filters. * * Note: the current "interactive" sortState is preserved (by internally * copying the old sortKeys to the new pipeline, if any). * * @param pipeline the <code>FilterPipeline</code> to use, null removes all * filters. */ public void setFilters(FilterPipeline pipeline) { FilterPipeline old = getFilters(); List<? extends SortKey> sortKeys = null; if (old != null) { old.removePipelineListener(pipelineListener); sortKeys = old.getSortController().getSortKeys(); } if (pipeline == null) { pipeline = new FilterPipeline(); } filters = pipeline; filters.getSortController().setSortKeys(sortKeys); // JW: first assign to prevent (short?) illegal internal state // #173-swingx use(filters); getRowModelMapper().setFilters(filters); getSelectionMapper().setFilters(filters); repaint(); }