private void nodeSelectedInWGTree(int selRow, TreePath selPath) { DefaultMutableTreeNode node = ((DefaultMutableTreeNode) selPath.getLastPathComponent()); WargearTreeUserObjectContainer container = (WargearTreeUserObjectContainer) node.getUserObject(); if (container.getItem() != null) { this.startItemEdit(container); return; } else if (container.getGroup() != null) { this.startGroupEdit(container); } }
private void startGroupEdit(WargearTreeUserObjectContainer container) { this.saveData(); if (this.currentContainer != null) this.currentContainer.unHighlightPath(); WargearGroupPanel panel = new WargearGroupPanel(container.getGroup(), this); this.currentGroupPanel = panel; this.currentContainer = container; this.editorPane.removeAll(); this.editorPane.add(this.currentGroupPanel); this.editorPane.updateUI(); this.currentContainer.highlightPath(); this.wargearTree.updateUI(); }