List of usage examples for javax.swing.tree DefaultMutableTreeNode getNextLeaf
public DefaultMutableTreeNode getNextLeaf()
From source file:streamme.visuals.Main.java
public void addToPlaylist(DefaultMutableTreeNode node, int listIdx, boolean recursive) { DefaultMutableTreeNode leaf = node.getFirstLeaf(); while (node.isNodeDescendant(leaf)) { DataNode dn = (DataNode) leaf.getUserObject(); javax.swing.tree.TreeNode[] tree = leaf.getPath(); String path = StreamMe.OPTIONS.getOutputPath(); for (int i = 1; i < tree.length; i++) { path += "\\" + ((DataNode) ((DefaultMutableTreeNode) tree[i]).getUserObject()).getName(); }/* w w w . j av a2 s .c o m*/ PlaylistManager.get().addToPlaylist(listIdx, dn.toFileLink(path)); leaf = leaf.getNextLeaf(); } }