CheckTreeTableManager manager = new CheckTreeTableManager(treetable); manager.getSelectionModel().addPathsByNodes(defaultMutableTreeTableNodeList); treetable.getColumnModel().getColumn(0).setPreferredWidth(150);
private void setupColumnsWidths() { treeTable.getColumnModel().getColumn(0).setMinWidth(200); treeTable.getColumnModel().getColumn(1).setMinWidth(200); }
@Override public void actionPerformed(ActionEvent e) { DefaultTableColumnModelExt columnModel = (DefaultTableColumnModelExt) table.getColumnModel(); TableColumn tableColumn = Collections.list(columnModel.getColumns()) .stream() .filter(f -> f.getHeaderValue().equals(category)) .findFirst() .orElseThrow(); columnModel.removeColumn(tableColumn); categoryService.removeCategory(category); LOG.debug("// WORKAROUND 28.12.2018/tornaia: resetting column model with a new but empty one. It is required to set the columnModel later otherwise tree will remain empty"); table.setColumnModel(new DefaultTableColumnModel()); dashboardEventPublisher.updateDashboard(); } }
|| ((treeRow < 0) && (row < 0))) {// or outside but leading if (treeRow >= 0) { //Issue 561-swingx: in content box, update column lead to focus getColumnModel().getSelectionModel().setLeadSelectionIndex(column);
|| ((treeRow < 0) && (row < 0))) {// or outside but leading if (treeRow >= 0) { //Issue 561-swingx: in content box, update column lead to focus getColumnModel().getSelectionModel().setLeadSelectionIndex(column);
|| ((treeRow < 0) && (row < 0))) {// or outside but leading if (treeRow >= 0) { //Issue 561-swingx: in content box, update column lead to focus getColumnModel().getSelectionModel().setLeadSelectionIndex(column);
|| ((treeRow < 0) && (row < 0))) {// or outside but leading if (treeRow >= 0) { //Issue 561-swingx: in content box, update column lead to focus getColumnModel().getSelectionModel().setLeadSelectionIndex(column);
int columnIndex = jTree.getColumnModel().getColumnCount() - i - 1; jTree.getColumnExt(columnIndex).setMinWidth(18); jTree.getColumnExt(columnIndex).setPreferredWidth(140);