List of usage examples for javax.swing.tree DefaultMutableTreeNode getChildAfter
public TreeNode getChildAfter(TreeNode aChild)
aChild
, which must be a child of this node. From source file:org.artifactory.webapp.wicket.actionable.tree.ActionableItemsTree.java
public TreeNode getNextTreeNode(TreeNode node) { ITreeState state = getTreeState();//from ww w . j a v a2 s . c o m DefaultMutableTreeNode parent = (DefaultMutableTreeNode) node.getParent(); if (parent == null) { return null; } if (!node.isLeaf() && node.getAllowsChildren() && state.isNodeExpanded(node)) { return node.getChildAt(0); } TreeNode nextNode = parent.getChildAfter(node); if (nextNode == null) { return getNextParent(parent); } return nextNode; }
From source file:org.artifactory.webapp.wicket.actionable.tree.ActionableItemsTree.java
public TreeNode getNextParent(DefaultMutableTreeNode node) { DefaultMutableTreeNode parent = (DefaultMutableTreeNode) node.getParent(); if (parent == null) { return null; }//from ww w . j a va 2s .c om TreeNode nextNode = parent.getChildAfter(node); if (nextNode == null) { return getNextParent(parent); } return nextNode; }