/** * @return the active node of the tree */ public TreeNode getActiveNode() { TransientTreeStateBase myTreeState = (TransientTreeStateBase) getTreeState(); String nodeId = myTreeState.getActiveNodeId(); return getNodeById(nodeId); }
/** * Set the active node. * @param nodeId */ public void setActiveNode(final String nodeId) { TransientTreeStateBase myTreeState = (TransientTreeStateBase) getTreeState(); String[] nodePath = getPathInformation(nodeId); String id = ""; for (String string : nodePath) { id += " " + string; } myTreeState.expandPath(nodePath); }
/** * Bean constructor. * @param root */ public TransientTreeModelBase(final TreeNode root) { super(root); setTreeState(new TransientTreeStateBase()); }
/** * Bean constructor. * @param root */ public TransientTreeModelBase(final TreeNode root) { super(root); setTreeState(new TransientTreeStateBase()); }
/** * @return the active node of the tree */ public TreeNode getActiveNode() { TransientTreeStateBase myTreeState = (TransientTreeStateBase) getTreeState(); String nodeId = myTreeState.getActiveNodeId(); return getNodeById(nodeId); }
/** * Set the active node. * @param nodeId */ public void setActiveNode(final String nodeId) { TransientTreeStateBase myTreeState = (TransientTreeStateBase) getTreeState(); String[] nodePath = getPathInformation(nodeId); String id = ""; for (String string : nodePath) { id += " " + string; } myTreeState.expandPath(nodePath); }