Java 类org.eclipse.draw2d.EllipseAnchor 实例源码

项目:cogtool    文件:RemoteLinkage.java   
public RemoteLinkage(IFigure ownerFigure,
                     FrameElement ownerElement,
                     GraphicalWidget<?> labelFigure)
{
    super();

    ownerFig = ownerFigure;
    owner = ownerElement;
    remoteLabelFig = labelFigure;

    setSourceAnchor(new EllipseAnchor(ownerFig));
    setTargetAnchor(new ChopboxAnchor(remoteLabelFig));

    setLineWidth(3);
    setLineStyle(SWT.LINE_DOT);
    setCursor(WindowUtil.getCursor(WindowUtil.RESIZE_ALL_CURSOR));
}
项目:seg.jUCMNav    文件:FailurePointFigure.java   
public void rotate(double angle) {
    // make it always point towards bottom
    if (Math.cos(angle)>0)
        angle -= Math.PI;

    Transform t = new Transform();
    t.setRotation(angle);

    Point center = new Point(getPreferredSize().width / 2, getPreferredSize().height / 2);

    for (int j = 0; j < lines.size(); j++) {
        PointList points = (PointList) lines.get(j);
        Polyline line = (Polyline) rects.get(j);

        PointList newPoints = new PointList();
        for (int i = 0; i < points.size(); i++) {
            Point newPoint = t.getTransformed(new Point(points.getPoint(i).x - center.x, points.getPoint(i).y - center.y));
            //Point pt = new Point(newPoint.x - center.x, newPoint.y - center.y);

            newPoints.addPoint(newPoint);
        }

        newPoints.translate(center.x, center.y);

        line.setPoints(newPoints);
    }

    ((EllipseAnchor)outgoingAnchor).ancestorMoved(this);
}
项目:statecharts    文件:EllipseAnchorDefaultSizeNodeFigure.java   
@Override
protected ConnectionAnchor createDefaultAnchor() {
    return new EllipseAnchor((IFigure) getChildren().get(0));
}
项目:snaker-designer    文件:EventFigure.java   
public ConnectionAnchor getSourceConnectionAnchor() {
    return new EllipseAnchor(this);
}
项目:snaker-designer    文件:EventFigure.java   
public ConnectionAnchor getTargetConnectionAnchor() {
    return new EllipseAnchor(this);
}
项目:snaker-designer    文件:EllipseElementFigure.java   
public ConnectionAnchor getSourceConnectionAnchor() {
    return new EllipseAnchor(this);
}
项目:snaker-designer    文件:EllipseElementFigure.java   
public ConnectionAnchor getTargetConnectionAnchor() {
    return new EllipseAnchor(this);
}
项目:seg.jUCMNav    文件:EmptyPointFigure.java   
/**
 * @see seg.jUCMNav.figures.PathNodeFigure#initAnchor()
 */
protected void initAnchor() {
    incomingAnchor = new EllipseAnchor(ellipse);
    outgoingAnchor = new EllipseAnchor(ellipse);
}
项目:seg.jUCMNav    文件:StartPointFigure.java   
/**
 * @see seg.jUCMNav.figures.PathNodeFigure#initAnchor()
 */
protected void initAnchor() {
    incomingAnchor = new EllipseAnchor(ellipse);
    outgoingAnchor = new EllipseAnchor(ellipse);
}
项目:seg.jUCMNav    文件:FailurePointFigure.java   
@Override
protected void initAnchor() {
    incomingAnchor = new EllipseAnchor(rect1);
    outgoingAnchor = new EllipseAnchor(rect1);
}
项目:seg.jUCMNav    文件:OrForkJoinFigure.java   
/**
 * @see seg.jUCMNav.figures.PathNodeFigure#initAnchor()
 */
protected void initAnchor() {
    incomingAnchor = new EllipseAnchor(ellipse);
    outgoingAnchor = new EllipseAnchor(ellipse);
}
项目:seg.jUCMNav    文件:TimerFigure.java   
/**
 * 
 * @see seg.jUCMNav.figures.PathNodeFigure#initAnchor()
 */
protected void initAnchor() {
    incomingAnchor = new EllipseAnchor(this);
    outgoingAnchor = new EllipseAnchor(this);
}
项目:seg.jUCMNav    文件:AnythingFigure.java   
@Override
protected void initAnchor() {
    incomingAnchor = new EllipseAnchor(layer);
    outgoingAnchor = new EllipseAnchor(layer);
}