Package com.evelopers.unimod.glayout.graph

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


                   element.getVertexext().getLeftTop().y + 1);
        }
    }

    private void makeVEdges(SimpleVertex element) {
        SimpleGraph inner = (SimpleGraph) element.getProperty(Constant.LAYER_KEY);

        if (inner != null) {
            if (inner.getVertices()
                         .size() > 1) {
                Connectivity.makeConnected(inner);
                Connectivity.makeBiconnected(inner);
            }
View Full Code Here


        int th = element.getEdgesIncoming()
                        .size() + spec;

        if (element.getProperty(Constant.LAYER_KEY) != null) {
            SimpleGraph elg = (SimpleGraph) element.getProperty(Constant.LAYER_KEY);
            Dimension d     = (Dimension) elg.getProperty(Constant.SIZES_KEY);

            if (d != null) {
                if (d.width > tw) {
                    tw = d.width;
                }
View Full Code Here

        while (li.hasNext()) {
            SimpleEdge edge = (SimpleEdge) li.next();
            SimpleVertex v1 = edge.getAnother(element);

            SimpleGraph inner = (SimpleGraph) element.getProperty(Constant.LAYER_KEY);
            boolean inside    = false;

            if (inner != null) {
                List innerv = (List) inner.getProperty(AltMultiLayerBuilder.LOWERV_KEY);
                List innerc = inner.getVertices();

                if (innerv != null) {
                    if (innerv.contains(v1)) {
                        inside = true;
                    }
View Full Code Here

                if (ve.getLeftTop()
                          .getX() >= x) {
                    ve.move(new Point(w + 1, 0));

                    if (element.getProperty(Constant.LAYER_KEY) != null) {
                        SimpleGraph elg =
                            (SimpleGraph) element.getProperty(Constant.LAYER_KEY);
                        moveSG(elg, w + 1, 0);
                    }
                }
            }
View Full Code Here

        }

        int th = Constant.getMINVH();

        if (element.getProperty(Constant.LAYER_KEY) != null) {
            SimpleGraph elg = (SimpleGraph) element.getProperty(Constant.LAYER_KEY);
            Dimension d     = (Dimension) elg.getProperty(Constant.SIZES_KEY);

            if (d != null) {
                if (d.width > tw) {
                    tw = d.width;
                }
View Full Code Here

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

            if (element.getProperty(Constant.LAYER_KEY) != null) {
                SimpleGraph elg = (SimpleGraph) element.getProperty(Constant.LAYER_KEY);
                moveSG(elg, x, y);
            }

            VertexExt ve = element.getVertexext();
View Full Code Here

    /*
     *  (non-Javadoc)
     * @see com.evelopers.unimod.glayout.graph.topsort.ITopSorter#parameterizedTopSort(double, double)
     */
    public void parameterizedTopSort(double wstep, double startnum) {
        SimpleGraph temp = sg.instanceCopy();
        double curr      = startnum;

        while (temp.getVertices()
                       .size() > 0) {
            List zeroinc    = new ArrayList();
            ListIterator li = temp.getVertices()
                                  .listIterator();

            while (li.hasNext()) {
                SimpleVertex vertex = (SimpleVertex) li.next();

View Full Code Here

        if (esize != enums.length) {
            System.err.println("FATAL. Numbering error.");
            System.exit(0);
        }

        SimpleGraph sg    = new SimpleGraph();
        SimpleVertex[] sv = new SimpleVertex[vsize];
        SimpleEdge[] se   = new SimpleEdge[esize];

        for (int i = 0; i < sv.length; i++) {
            sv[i] = new SimpleVertex();

            if (vnums != null) {
                sv[i].setOrthX(vnums[i][0]);
                sv[i].setOrthY(vnums[i][1]);
            }
        }

        for (int i = 0; i < se.length; i++) {
            se[i] = new SimpleEdge(sv[enums[i][0]], sv[enums[i][1]]);
        }

        sg.addEdges(Arrays.asList(se));
        sg.addVertices(Arrays.asList(sv));

        return sg;
    }
View Full Code Here

TOP

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

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.