本文整理汇总了Java中org.eclipse.draw2d.EllipseAnchor类的典型用法代码示例。如果您正苦于以下问题:Java EllipseAnchor类的具体用法?Java EllipseAnchor怎么用?Java EllipseAnchor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EllipseAnchor类属于org.eclipse.draw2d包,在下文中一共展示了EllipseAnchor类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: RemoteLinkage
import org.eclipse.draw2d.EllipseAnchor; //导入依赖的package包/类
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));
}
示例2: rotate
import org.eclipse.draw2d.EllipseAnchor; //导入依赖的package包/类
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);
}
示例3: createDefaultAnchor
import org.eclipse.draw2d.EllipseAnchor; //导入依赖的package包/类
@Override
protected ConnectionAnchor createDefaultAnchor() {
return new EllipseAnchor((IFigure) getChildren().get(0));
}
示例4: getSourceConnectionAnchor
import org.eclipse.draw2d.EllipseAnchor; //导入依赖的package包/类
public ConnectionAnchor getSourceConnectionAnchor() {
return new EllipseAnchor(this);
}
示例5: getTargetConnectionAnchor
import org.eclipse.draw2d.EllipseAnchor; //导入依赖的package包/类
public ConnectionAnchor getTargetConnectionAnchor() {
return new EllipseAnchor(this);
}
示例6: initAnchor
import org.eclipse.draw2d.EllipseAnchor; //导入依赖的package包/类
/**
* @see seg.jUCMNav.figures.PathNodeFigure#initAnchor()
*/
protected void initAnchor() {
incomingAnchor = new EllipseAnchor(ellipse);
outgoingAnchor = new EllipseAnchor(ellipse);
}
示例7: initAnchor
import org.eclipse.draw2d.EllipseAnchor; //导入依赖的package包/类
@Override
protected void initAnchor() {
incomingAnchor = new EllipseAnchor(rect1);
outgoingAnchor = new EllipseAnchor(rect1);
}
示例8: initAnchor
import org.eclipse.draw2d.EllipseAnchor; //导入依赖的package包/类
/**
*
* @see seg.jUCMNav.figures.PathNodeFigure#initAnchor()
*/
protected void initAnchor() {
incomingAnchor = new EllipseAnchor(this);
outgoingAnchor = new EllipseAnchor(this);
}
示例9: initAnchor
import org.eclipse.draw2d.EllipseAnchor; //导入依赖的package包/类
@Override
protected void initAnchor() {
incomingAnchor = new EllipseAnchor(layer);
outgoingAnchor = new EllipseAnchor(layer);
}