Package prefuse.data

Examples of prefuse.data.Tree.removeChild()


        int size = tree.getNodeCount();
        Node r = tree.getRoot();
        Node c = r.getFirstChild();
        Edge e = c.getParentEdge();
       
        assertEquals(true, tree.removeChild(c));
        assertEquals(tree.getNodeCount(), size-1);
        assertEquals(false, c.isValid());
        assertEquals(false, e.isValid());
        assertEquals(true, r.getFirstChild() != c);
    }
View Full Code Here


        for ( int i=0; iter.hasNext(); ++i ) {
            nodes[i] = (Node)iter.next();
            edges[i] = (Edge)nodes[i].getParentEdge();
        }
       
        assertEquals(true, tree.removeChild(c));
        assertEquals(tree.getNodeCount(), size-13);
        assertEquals(true, r.getFirstChild() != c);
        for ( int i=0; i<nodes.length; ++i ) {
            assertEquals(false, nodes[i].isValid());
            assertEquals(false, edges[i].isValid());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.