Package y.base

Examples of y.base.NodeList


     * @param parentNode The parent node
     *
     * @return List of descendant nodes (parent node is included)
     */
    public NodeList getVisibleDescendants(Node parentNode) {
        NodeList visibleDescendants = new NodeList();
        NodeList allDescendants = getDescendants(parentNode);
        for (NodeCursor nc = getHierarchyManager().getInnerGraph(parentNode).nodes(); nc.ok(); nc.next()) {
            if (allDescendants.contains(nc.node())) {
                visibleDescendants.add(nc.node());
            }
        }

        return visibleDescendants;
View Full Code Here


     * @param parentNode Parent node.
     *
     * @return List of all descendant nodes.
     */
    public NodeList getDescendants(Node parentNode) {
        NodeList descendants = new NodeList();

        descendants.add(parentNode);
        for (NodeCursor nc = getHierarchyManager().getChildren(parentNode); nc.ok(); nc.next()) {
            descendants.addAll(getDescendants(nc.node()));
        }

        return descendants;
    }
View Full Code Here

        sLogger.debug("Expand folder node " + parentNode);

        getHierarchyManager().openFolder(parentNode);

        // reinsert low level edges
        NodeList visibleDescendants = fGraph.getVisibleDescendants(parentNode);
        List<Edge> reinsertedLowLevelEdges = new ArrayList<Edge>();
        for (Object node : visibleDescendants) {
//            reinsertLowLevelEdges((Node) node);
            for (Edge edge : reinsertLowLevelEdges((Node) node)) {
                if (!reinsertedLowLevelEdges.contains(edge)) {
View Full Code Here

            fAddedNodes.add(node);
        } else if (graphEvent.getType() == GraphEvent.POST_NODE_REMOVAL) {
            Node node = (Node) graphEvent.getData();
            fRemovedNodes.add(node);
        } else if (graphEvent.getType() == GraphEvent.SUBGRAPH_INSERTION) {
            NodeList nl = (NodeList) graphEvent.getData();
            for (NodeCursor nc = nl.nodes(); nc.ok(); nc.next()) {
                fAddedNodes.add(nc.node());
            }
        } else if (graphEvent.getType() == GraphEvent.EDGE_CREATION) {
            Edge edge = (Edge) graphEvent.getData();
            fAddedEdges.add(edge);
View Full Code Here

TOP

Related Classes of y.base.NodeList

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.