Package com.evelopers.unimod.glayout.graph

Examples of com.evelopers.unimod.glayout.graph.SimpleEdge


            SimpleVertex element = (SimpleVertex) li.next();
            ListIterator li2     = element.getEdgesOutgoing()
                                          .listIterator();

            while (li2.hasNext()) {
                SimpleEdge edge = (SimpleEdge) li2.next();
                double delta    =
                    (0.0 + edge.getAnother(element)
                               .getTopnum()) - edge.getWeight() - element.getTopnum();

                if (delta < 0) {
                    int step = (int) Math.floor(-delta);
                    updateList(ll,
                               step,
                               ll.indexOf(edge.getAnother(element)));
                }
            }
        }
    }
View Full Code Here


        ListIterator li = sv.getEdgesOutgoing()
                            .listIterator();

        while (li.hasNext()) {
            SimpleEdge element = (SimpleEdge) li.next();

            if (element.getAnother(sv)
                           .getProperty(this) == null) {
                dfsvisit(element.getAnother(sv),
                         ll);
            }
        }

        sv.setProperty(this, TopSorter.BLACK);
View Full Code Here

        li = sg.getEdges()
               .listIterator();

        while (li.hasNext()) {
            SimpleEdge e = (SimpleEdge) li.next();

            //if (e.getId() != 3) continue;
            bg.setColor(Consts.EDGE_C);

            //bg.drawString("e"+e.getId(), xconvert(e.getSource().getOrthX()) - Consts.VR/2, yconvert(e.getSource().getOrthY()) - Consts.VR/2);
            int[] xpoints = new int[e.getBendPoints()
                                     .size() + 2];
            int[] ypoints = new int[e.getBendPoints()
                                     .size() + 2];
            xpoints[0]     = xconvert(e.getSource().getOrthX());
            ypoints[0]     = yconvert(e.getSource().getOrthY());

            ListIterator libp = e.getBendPoints()
                                 .listIterator();
            int index = 1;

            while (libp.hasNext()) {
                BendPoint bp = (BendPoint) libp.next();
                xpoints[index]     = xconvert(bp.getOrthX());
                ypoints[index]     = yconvert(bp.getOrthY());
                index++;
            }

            xpoints[index]     = xconvert(e.getTarget().getOrthX());
            ypoints[index]     = yconvert(e.getTarget().getOrthY());

            for (int i = 0; i < xpoints.length; i++) {
                //    bg.fillOval(xpoints[i], ypoints[i], Consts.OVR, Consts.OVR);
            }

            bg.drawPolyline(xpoints, ypoints, e.getBendPoints().size() + 2);
        }
    }
View Full Code Here

        ListIterator lie = sg.getEdges()
                             .listIterator();

        while (lie.hasNext()) {
            SimpleEdge edge   = (SimpleEdge) lie.next();
            ListIterator libp = edge.getBendPoints()
                                    .listIterator();

            while (libp.hasNext()) {
                BendPoint bp = (BendPoint) libp.next();
View Full Code Here

        li = sg.getEdges()
               .listIterator();

        while (li.hasNext()) {
            SimpleEdge e = (SimpleEdge) li.next();
            bg.setColor(Color.RED);
            bg.drawLine(xconvert(e.getVisX()),
                        yconvert(e.getVisYB()),
                        xconvert(e.getVisX()),
                        yconvert(e.getVisYT()));
            bg.drawString("e" + e.getId(), xconvert(e.getVisX()) - Consts.VR,
                          yconvert(e.getVisYB()) - (Consts.VR / 2));
        }
    }
View Full Code Here

TOP

Related Classes of com.evelopers.unimod.glayout.graph.SimpleEdge

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.