本文整理汇总了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));
}
开发者ID:cogtool,项目名称:cogtool,代码行数:18,代码来源:RemoteLinkage.java
示例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);
}
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:30,代码来源:FailurePointFigure.java
示例3: createDefaultAnchor
import org.eclipse.draw2d.EllipseAnchor; //导入依赖的package包/类
@Override
protected ConnectionAnchor createDefaultAnchor() {
return new EllipseAnchor((IFigure) getChildren().get(0));
}
开发者ID:Yakindu,项目名称:statecharts,代码行数:5,代码来源:EllipseAnchorDefaultSizeNodeFigure.java
示例4: getSourceConnectionAnchor
import org.eclipse.draw2d.EllipseAnchor; //导入依赖的package包/类
public ConnectionAnchor getSourceConnectionAnchor() {
return new EllipseAnchor(this);
}
开发者ID:snakerflow,项目名称:snaker-designer,代码行数:4,代码来源:EventFigure.java
示例5: getTargetConnectionAnchor
import org.eclipse.draw2d.EllipseAnchor; //导入依赖的package包/类
public ConnectionAnchor getTargetConnectionAnchor() {
return new EllipseAnchor(this);
}
开发者ID:snakerflow,项目名称:snaker-designer,代码行数:4,代码来源:EventFigure.java
示例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);
}
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:8,代码来源:EmptyPointFigure.java
示例7: initAnchor
import org.eclipse.draw2d.EllipseAnchor; //导入依赖的package包/类
@Override
protected void initAnchor() {
incomingAnchor = new EllipseAnchor(rect1);
outgoingAnchor = new EllipseAnchor(rect1);
}
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:6,代码来源:FailurePointFigure.java
示例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);
}
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:9,代码来源:TimerFigure.java
示例9: initAnchor
import org.eclipse.draw2d.EllipseAnchor; //导入依赖的package包/类
@Override
protected void initAnchor() {
incomingAnchor = new EllipseAnchor(layer);
outgoingAnchor = new EllipseAnchor(layer);
}
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:6,代码来源:AnythingFigure.java
注:本文中的org.eclipse.draw2d.EllipseAnchor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论