Package diva.graph

Examples of diva.graph.GraphModel.nodes()


    protected Object copyComposite(Object origComposite) {
        GraphModel model = getLayoutTarget().getGraphModel();
        Object copyComposite = _local.createComposite(null);
        HashMap map = new HashMap();

        for (Iterator i = model.nodes(origComposite); i.hasNext();) {
            Object origNode = i.next();

            if (getLayoutTarget().isNodeVisible(origNode)) {
                Rectangle2D r = getLayoutTarget().getBounds(origNode);
                LevelInfo inf = new LevelInfo();
View Full Code Here


                _local.addNode(this, copyNode, copyComposite);
                map.put(origNode, copyNode);
            }
        }

        for (Iterator i = model.nodes(origComposite); i.hasNext();) {
            Object origTail = i.next();

            for (Iterator j = model.outEdges(origTail); j.hasNext();) {
                Object origEdge = j.next();
                Object origHead = model.getHead(origEdge);
View Full Code Here

     */
    public void layout(Object composite) {
        LayoutTarget target = getLayoutTarget();
        GraphModel model = target.getGraphModel();

        for (Iterator ns = model.nodes(composite); ns.hasNext();) {
            Object node = ns.next();

            if (target.isNodeVisible(node)) {
                Rectangle2D vp = target.getViewport(composite);
                Rectangle2D bounds = target.getBounds(node);
View Full Code Here

                _gw++;
            }

            _grid = new Object[_gw][_gh];

            Iterator nodes = model.nodes(_graph);

            for (int x = 0; x < _gw; x++) {
                for (int y = 0; y < _gh; y++) {
                    if (!nodes.hasNext()) {
                        break;
View Full Code Here

        }

        int[] inTailPt = getXY(inTail);
        int[] inHeadPt = getXY(inHead);

        for (Iterator i = model.nodes(composite); i.hasNext();) {
            Object node = i.next();

            for (Iterator j = model.outEdges(node); j.hasNext();) {
                Object edge = j.next();
                Object tail = model.getTail(edge);
View Full Code Here

        int[] inTailPt = getXY(inTail);
        int[] inHeadPt = getXY(inHead);

        for (int which = 0; which < 2; which++) {
            if (inTailPt[which] == inHeadPt[which]) {
                for (Iterator i = model.nodes(composite); i.hasNext();) {
                    Object node = i.next();

                    for (Iterator j = model.outEdges(node); j.hasNext();) {
                        Object edge = j.next();
                        Object tail = model.getTail(edge);
View Full Code Here

            diva.graph.basic.BasicGraphModel local = getLocalGraphModel();
            Object copyComposite = local.createComposite(null);
            HashMap map = new HashMap();

            // Copy all the nodes for the graph.
            for (Iterator i = model.nodes(origComposite); i.hasNext();) {
                Object origNode = i.next();

                if (target.isNodeVisible(origNode)) {
                    Rectangle2D r = target.getBounds(origNode);
                    LevelInfo inf = new LevelInfo();
View Full Code Here

        public void layout(Object node) {
            GraphModel model = getController().getGraphModel();

            // System.out.println("layout = " + node);
            //        new Exception().printStackTrace();
            Iterator nodes = model.nodes(node);
            Vector westPorts = new Vector();
            Vector eastPorts = new Vector();
            Vector southPorts = new Vector();
            Vector northPorts = new Vector();
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.