Package org.antlr.xjlib.appkit.gview.object

Examples of org.antlr.xjlib.appkit.gview.object.GLink


        /** Set the child position */
        child.setPositionOfUpperLeftCorner(x, parent.getBottom()+VERTICAL_GAP);

        /** Create the link from the parent to this child */
        GLink link = new GLink(parent, GLink.ANCHOR_BOTTOM,
                child, GLink.ANCHOR_TOP,
                GLink.SHAPE_ELBOW, "", 0);
        link.setDraggable(DRAGGABLE);

        /** Configure the link geometry */
        SLinkElbow l = (SLinkElbow)link.getLink();
        l.setOutOffsetLength(10);
        l.getArrow().setLength(6);

        /** Add the link and the child */
        parent.addElement(link);
View Full Code Here


        }

        GElement source = graph.findElementWithLabel(tokens[1]);
        GElement target = graph.findElementWithLabel(tokens[2]);

        GLink link = new GLink(source, GElementCircle.ANCHOR_CENTER,
                target, GElementCircle.ANCHOR_CENTER,
                GLink.SHAPE_BEZIER, label, 0);

        link.setBezierControlPoints(points);
        link.setBezierLabelPosition(labelPosition);

        return link;
    }
View Full Code Here

        }

        GElement source = graph.findElementWithLabel(sourceName);
        GElement target = graph.findElementWithLabel(targetName);

        GLink link = new GLink(source, GElementCircle.ANCHOR_CENTER,
                target, GElementCircle.ANCHOR_CENTER,
                GLink.SHAPE_BEZIER, labelName, 0);

        if(points == null) {
            System.err.println("No points for "+sourceName+", "+targetName+", "+tokens.length);
            for (int i = 0; i < tokens.length; i++) {
                String token = tokens[i];
                System.out.println(token);
            }
        }

        link.setBezierControlPoints(points);
        link.setBezierLabelPosition(labelPosition);

        return link;
    }
View Full Code Here

    public double eventLinkFlateness() {
        return DEFAULT_LINK_FLATENESS;
    }

    public void eventCreateLink(GElement source, String sourceAnchorKey, GElement target, String targetAnchorKey, int shape, Point p) {
        rootElement.addElement(new GLink(source, sourceAnchorKey, target, targetAnchorKey, shape, "", p, GView.DEFAULT_LINK_FLATENESS));
    }
View Full Code Here

TOP

Related Classes of org.antlr.xjlib.appkit.gview.object.GLink

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.