Package com.touchgraph.linkbrowser

Examples of com.touchgraph.linkbrowser.LBEdge


                if (colorString!=null) color = Color.decode(colorString);               
            }
            catch ( NumberFormatException ex) {};
            LBNode fromNode = (LBNode) graphEltSet.findNode(fromID);
            LBNode toNode = (LBNode) graphEltSet.findNode(toID);
            LBEdge newEdge = new LBEdge(fromNode,toNode, length/100);
            newEdge.setVisible(true);
            newEdge.setColor(color);
           
            switch (edgeType) {
                case 0:  newEdge.edgeType = LBEdge.BIDIRECTIONAL_EDGE; break;
                case 1:  newEdge.edgeType = LBEdge.HIERARCHICAL_EDGE; break;
                default: newEdge.edgeType = LBEdge.BIDIRECTIONAL_EDGE; break;
View Full Code Here


        final XMLElement edgeSet = new XMLElement("EDGESET");
        tglbXML.addChild(edgeSet);

        TGForEachEdge fee = new TGForEachEdge() {
            public void forEachEdge( Edge edge ) {
                LBEdge lbEdge = (LBEdge) edge;
                XMLElement edgeElt = new XMLElement("EDGE");               
                edgeElt.setAttribute("fromID", lbEdge.getFrom().getID());
                edgeElt.setAttribute("toID", lbEdge.getTo().getID());
                edgeElt.setAttribute("type", ""+lbEdge.getType());
                edgeElt.setAttribute("length", ""+(int) lbEdge.getLength());                             
                edgeElt.setAttribute("visible", lbEdge.isVisible() ? "true" : "false");
                edgeElt.setAttribute("color", encodeColor(lbEdge.getColor()));               
                edgeSet.addChild(edgeElt);
            }
        };

        graphEltSet.forAllEdges(fee);
View Full Code Here

TOP

Related Classes of com.touchgraph.linkbrowser.LBEdge

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.