Package pspdash.HierarchyTreeModel

Examples of pspdash.HierarchyTreeModel.HierarchyTreeNode


        getSelectedPaths(model.getRoot(), v);
        return v;
    }

    private void getSelectedPaths(Object object, Vector v) {
        HierarchyTreeNode node = (HierarchyTreeNode) object;
        if (!unselectedNodes.contains(node))
            v.add(node.getPath());
        for (int i = node.getChildCount();   i-- > 0; )
            getSelectedPaths(node.getChildAt(i), v);
    }
View Full Code Here


        toggleSelection(treePath);
        return true;
    }

    protected void toggleSelection(TreePath selPath) {
        HierarchyTreeNode node =
            (HierarchyTreeNode) selPath.getLastPathComponent();

        // toggle current selection status.
        boolean isSelected = unselectedNodes.contains(node);
        setSelectionStatusRecursive(node, isSelected);
        if (!isSelected) {
            while (true) {
                node = (HierarchyTreeNode) node.getParent();
                if (node == null) break;
                setSelectionStatus(node, false);
            }
        }
    }
View Full Code Here

TOP

Related Classes of pspdash.HierarchyTreeModel.HierarchyTreeNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.