本文整理汇总了Java中org.eclipse.gef.handles.BendpointMoveHandle类的典型用法代码示例。如果您正苦于以下问题:Java BendpointMoveHandle类的具体用法?Java BendpointMoveHandle怎么用?Java BendpointMoveHandle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BendpointMoveHandle类属于org.eclipse.gef.handles包,在下文中一共展示了BendpointMoveHandle类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createSelectionHandles
import org.eclipse.gef.handles.BendpointMoveHandle; //导入依赖的package包/类
@Override
protected List<?> createSelectionHandles() {
final Relationship relation = (Relationship) getHost().getModel();
if (relation.getSourceWalker() == relation.getTargetWalker()) {
showSelectedLine();
if (getHost().getRoot().getContents() instanceof ERDiagramEditPart) {
// TODO ymd ここを通るケースを確認できず。消すかもしれない。
final ERDiagramEditPart diagramEditPart = (ERDiagramEditPart) getHost().getRoot().getContents();
diagramEditPart.refreshVisuals();
}
final List<BendpointMoveHandle> list = new ArrayList<>();
list.add(new BendpointMoveHandle((ConnectionEditPart) getHost(), 1, 2));
return list;
}
return super.createSelectionHandles();
}
开发者ID:dbflute-session,项目名称:erflute,代码行数:20,代码来源:RelationBendpointEditPolicy.java
示例2: createHandlesForUserBendpoints
import org.eclipse.gef.handles.BendpointMoveHandle; //导入依赖的package包/类
private List createHandlesForUserBendpoints() {
List list = new ArrayList();
ConnectionEditPart connEP = (ConnectionEditPart) getHost();
PointList points = getConnection().getPoints();
List bendPoints = (List) getConnection().getRoutingConstraint();
int bendPointIndex = 0;
Point currBendPoint = null;
if (bendPoints == null)
bendPoints = NULL_CONSTRAINT;
else if (!bendPoints.isEmpty())
currBendPoint = ((Bendpoint) bendPoints.get(0)).getLocation();
for (int i = 0; i < points.size() - 1; i++) {
// Put a create handle on the middle of every segment
list.add(new BendpointCreationHandle(connEP, bendPointIndex, i));
// If the current user bendpoint matches a bend location, show a
// move handle
if (i < points.size() - 1 && bendPointIndex < bendPoints.size()
&& currBendPoint.equals(points.getPoint(i + 1))) {
list.add(new BendpointMoveHandle(connEP, bendPointIndex, i + 1));
// Go to the next user bendpoint
bendPointIndex++;
if (bendPointIndex < bendPoints.size())
currBendPoint = ((Bendpoint) bendPoints.get(bendPointIndex))
.getLocation();
}
}
return list;
}
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:34,代码来源:BendpointEditPolicy.java
示例3: createSelectionHandles
import org.eclipse.gef.handles.BendpointMoveHandle; //导入依赖的package包/类
@Override
protected List createSelectionHandles() {
final Relation relation = (Relation) getHost().getModel();
if (relation.getSource() == relation.getTarget()) {
final List<BendpointMoveHandle> list = new ArrayList<BendpointMoveHandle>();
final ConnectionEditPart connEP = (ConnectionEditPart) getHost();
list.add(new BendpointMoveHandle(connEP, 1, 2));
showSelectedLine();
// ERDiagramEditPart diagramEditPart = (ERDiagramEditPart) this
// .getHost().getRoot().getContents();
// diagramEditPart.refreshVisuals();
return list;
}
return super.createSelectionHandles();
}
开发者ID:roundrop,项目名称:ermasterr,代码行数:23,代码来源:RelationBendpointEditPolicy.java
示例4: createSelectionHandles
import org.eclipse.gef.handles.BendpointMoveHandle; //导入依赖的package包/类
@Override
protected List createSelectionHandles() {
Relation relation = (Relation) getHost().getModel();
if (relation.getSource() == relation.getTarget()) {
List<BendpointMoveHandle> list = new ArrayList<BendpointMoveHandle>();
ConnectionEditPart connEP = (ConnectionEditPart) getHost();
list.add(new BendpointMoveHandle(connEP, 1, 2));
this.showSelectedLine();
// ERDiagramEditPart diagramEditPart = (ERDiagramEditPart) this
// .getHost().getRoot().getContents();
// diagramEditPart.refreshVisuals();
return list;
}
return super.createSelectionHandles();
}
开发者ID:kozake,项目名称:ermaster-k,代码行数:23,代码来源:RelationBendpointEditPolicy.java
注:本文中的org.eclipse.gef.handles.BendpointMoveHandle类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论