Package com.evelopers.unimod.glayout.graph

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


            y = Double.MAX_VALUE;
        } else {
            y = Double.MIN_VALUE;
        }

        IOrthItem res   = new BendPoint(x, y);
        ListIterator li = sg.getEdges()
                            .listIterator();

        while (li.hasNext()) {
            SimpleEdge edge = (SimpleEdge) li.next();
View Full Code Here


                GraphsContainer vgc =
                    new GraphsContainer(sg,
                                        edge.getLeft(),
                                        edge.getRight());
                int number   = vertices[i].getIntProperty(FICTIVENUMBER_KEY);
                BendPoint bp = (BendPoint) edge.getBendPoints()
                                               .get(number);
                vgc.removeVertex(vertices[i]);

                // duplicating is controlled inside
                vgc.addEdge(edge);

                bp.setOrthX(vertices[i].getOrthX());
                bp.setOrthY(vertices[i].getOrthY());
            }
        }
    }
View Full Code Here

        SimpleVertex esource = edge.getSource();
        SimpleVertex etarget = edge.getTarget();
        BendPoint[] bparr    = new BendPoint[4];

        // made to move paths for ST edges
        BendPoint start = new BendPoint(esource.getOrthX(),
                                        esource.getOrthY());
        BendPoint finish = new BendPoint(etarget.getOrthX(),
                                         etarget.getOrthY());
        bparr[0]     = new BendPoint(esource.getOrthX(),
                                     esource.getOrthY());
        bparr[1] = SimpleOrthogonalizer.getIntersectionBendPoint(esource, edge);

        if ((st == -1) || (st == 2)) {
            bparr[0].setOrthY(bparr[0].getOrthY() - 1);
            bparr[1].setOrthY(bparr[1].getOrthY() - 1);
        }

        bparr[2]     = SimpleOrthogonalizer.getIntersectionBendPoint(etarget, edge);
        bparr[3]     = new BendPoint(etarget.getOrthX(),
                                     etarget.getOrthY());

        if ((st == 1) || (st == 2)) {
            bparr[2].setOrthY(bparr[2].getOrthY() + 1);
            bparr[3].setOrthY(bparr[3].getOrthY() + 1);
        }

        edge.getBendPoints()
            .clear();

        if (!start.equals(bparr[0])) {
            edge.getBendPoints()
                .add(bparr[0]);
        }

        if (!start.equals(bparr[1])) {
            edge.getBendPoints()
                .add(bparr[1]);
        }

        if (!finish.equals(bparr[2])) {
            edge.getBendPoints()
                .add(bparr[2]);
        }

        if (!finish.equals(bparr[3])) {
            edge.getBendPoints()
                .add(bparr[3]);
        }
    }
View Full Code Here

        vertex.setOrthY(vertex.getVisY());
        vertex.setOrthX(edge.getVisX());
    }

    private static BendPoint getIntersectionBendPoint(SimpleVertex vertex, SimpleEdge edge) {
        return new BendPoint(edge.getVisX(),
                             vertex.getVisY());
    }
View Full Code Here

            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());
View Full Code Here

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

            while (libp.hasNext()) {
                BendPoint bp = (BendPoint) libp.next();

                if (bp.getOrthY() > maxy) {
                    maxy = bp.getOrthY();
                }

                if (bp.getOrthX() > maxx) {
                    maxx = bp.getOrthX();
                }
            }
        }

        maxx += 2;
View Full Code Here

TOP

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

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.