/** * Use the given <code>treeTableCellEditor</code> when editing the * hierarchy column of the tree table. */ public void setEditor(TreeTableCellEditor treeTableCellEditor) { checkAccessThread(); // ensure we can find the view column index of the hierarchical column final int viewColumnIndex = table.convertColumnIndexToView(hierarchyColumnModelIndex); if (viewColumnIndex == -1) { throw new IllegalArgumentException("Unable to locate a view index for the given model index: " + hierarchyColumnModelIndex); } // look up the hierarchical TableColumn final TableColumn viewColumn = table.getColumnModel().getColumn(viewColumnIndex); // dispose the old editor this.treeTableCellEditor.dispose(); // install the new editor this.treeTableCellEditor = treeTableCellEditor; treeTableCellEditor.setShowExpanderForEmptyParent(showExpanderForEmptyParent); viewColumn.setCellEditor(treeTableCellEditor); }
/** * Use the given <code>treeTableCellEditor</code> when editing the * hierarchy column of the tree table. */ public void setEditor(TreeTableCellEditor treeTableCellEditor) { checkAccessThread(); // ensure we can find the view column index of the hierarchical column final int viewColumnIndex = table.convertColumnIndexToView(hierarchyColumnModelIndex); if (viewColumnIndex == -1) throw new IllegalArgumentException("Unable to locate a view index for the given model index: " + hierarchyColumnModelIndex); // look up the hierarchical TableColumn final TableColumn viewColumn = table.getColumnModel().getColumn(viewColumnIndex); // dispose the old editor this.treeTableCellEditor.dispose(); // install the new editor this.treeTableCellEditor = treeTableCellEditor; treeTableCellEditor.setShowExpanderForEmptyParent(showExpanderForEmptyParent); viewColumn.setCellEditor(treeTableCellEditor); }
/** * Use the given <code>treeTableCellEditor</code> when editing the * hierarchy column of the tree table. */ public void setEditor(TreeTableCellEditor treeTableCellEditor) { checkAccessThread(); // ensure we can find the view column index of the hierarchical column final int viewColumnIndex = table.convertColumnIndexToView(hierarchyColumnModelIndex); if (viewColumnIndex == -1) throw new IllegalArgumentException("Unable to locate a view index for the given model index: " + hierarchyColumnModelIndex); // look up the hierarchical TableColumn final TableColumn viewColumn = table.getColumnModel().getColumn(viewColumnIndex); // dispose the old editor this.treeTableCellEditor.dispose(); // install the new editor this.treeTableCellEditor = treeTableCellEditor; treeTableCellEditor.setShowExpanderForEmptyParent(showExpanderForEmptyParent); viewColumn.setCellEditor(treeTableCellEditor); }
treeTableCellEditor.dispose();
treeTableCellEditor.dispose();
treeTableCellEditor.dispose();