• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java AbsoluteBendpoint类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.draw2d.AbsoluteBendpoint的典型用法代码示例。如果您正苦于以下问题:Java AbsoluteBendpoint类的具体用法?Java AbsoluteBendpoint怎么用?Java AbsoluteBendpoint使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AbsoluteBendpoint类属于org.eclipse.draw2d包,在下文中一共展示了AbsoluteBendpoint类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: refreshVisuals

import org.eclipse.draw2d.AbsoluteBendpoint; //导入依赖的package包/类
@Override
protected void refreshVisuals() {
	Link lnk = (Link) getModel();
	String dis = "";
	if (lnk.getSource() instanceof TriggerInstanceTerminalNode || lnk.getTarget() instanceof TriggerInstanceTerminalNode)
		dis = "Period : " + lnk.getPeriod();
	LabeledConnection connection = (LabeledConnection) getConnectionFigure();
	connection.setDisplay(dis);
	connection.redraw();
	List<Point> modelConstraint = ((Link) getModel()).getbPoints();
	List<AbsoluteBendpoint> figureConstraint = new ArrayList<AbsoluteBendpoint>();
	for (Point p : modelConstraint) {
		figureConstraint.add(new AbsoluteBendpoint(p));
	}
	connection.setRoutingConstraint(figureConstraint);
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:17,代码来源:LinkEditPart.java


示例2: refreshVisuals

import org.eclipse.draw2d.AbsoluteBendpoint; //导入依赖的package包/类
@Override
protected void refreshVisuals() {
	EdgeFigure figure = (EdgeFigure) getFigure();
	GWEdge model = (GWEdge) getModel();
	figure.setName(model.getName());
	
	Connection connection = getConnectionFigure();
	 
	List<AbsoluteBendpoint> figureConstraint = new ArrayList<AbsoluteBendpoint>();
	Iterator<Point> iter = ((GWLink) getModel()).getBendpointsIterator(); 
	while(iter.hasNext()) {
		Point p = iter.next();
		figureConstraint.add(new AbsoluteBendpoint(p));
	}
	connection.setRoutingConstraint(figureConstraint);
	 
	figure.setTooltipText(this.getTooltipData());
	figure.setBlockedOrGuarded(model.isBlocked(),model.getGuard().getSource());
	figure.setActionScripted(model.getAction().getSource()); 
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:21,代码来源:EdgePart.java


示例3: showCreateBendpointFeedback

import org.eclipse.draw2d.AbsoluteBendpoint; //导入依赖的package包/类
/**
 * Shows feedback when a bendpoint is being created.  The original figure is used for
 * feedback and the original constraint is saved, so that it can be restored when feedback
 * is erased.
 * @param request the BendpointRequest
 */
protected void showCreateBendpointFeedback(BendpointRequest request) {
    Point p = new Point(request.getLocation());
    List constraint;
    getConnection().translateToRelative(p);
    Bendpoint bp = new AbsoluteBendpoint(p);
    if (originalConstraint == null) {
        saveOriginalConstraint();
        constraint = (List)getConnection().getRoutingConstraint();
        constraint.add(request.getIndex(), bp);
    } else {
        constraint = (List)getConnection().getRoutingConstraint();
    }
    constraint.set(request.getIndex(), bp);
    getConnection().setRoutingConstraint(constraint);
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:22,代码来源:SequenceBendpointEditPolicy.java


示例4: showMoveBendpointFeedback

import org.eclipse.draw2d.AbsoluteBendpoint; //导入依赖的package包/类
/**
 * Shows feedback when a bendpoint is being moved.  Also checks to see if the bendpoint 
 * should be deleted and then calls {@link #showDeleteBendpointFeedback(BendpointRequest)}
 * if needed.  The original figure is used for feedback and the original constraint is 
 * saved, so that it can be restored when feedback is erased.
 * @param request the BendpointRequest
 */
protected void showMoveBendpointFeedback(BendpointRequest request) {
    Point p = new Point(request.getLocation());
    if (!isDeleting)
        setReferencePoints(request);
    
    if (lineContainsPoint(ref1, ref2, p)) {
        if (!isDeleting) {
            isDeleting = true;
            eraseSourceFeedback(request);
            showDeleteBendpointFeedback(request);
        }
        return;
    }
    if (isDeleting) {
        isDeleting = false;
        eraseSourceFeedback(request);
    }
    if (originalConstraint == null)
        saveOriginalConstraint();
    List constraint = (List)getConnection().getRoutingConstraint();
    getConnection().translateToRelative(p);
    Bendpoint bp = new AbsoluteBendpoint(p);
    constraint.set(request.getIndex(), bp);
    getConnection().setRoutingConstraint(constraint);
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:33,代码来源:SequenceBendpointEditPolicy.java


示例5: showCreateBendpointFeedback

import org.eclipse.draw2d.AbsoluteBendpoint; //导入依赖的package包/类
/**
 * Shows feedback when a bendpoint is being created. The original figure is
 * used for feedback and the original constraint is saved, so that it can be
 * restored when feedback is erased.
 * 
 * @param request
 *            the BendpointRequest
 */
protected void showCreateBendpointFeedback(BendpointRequest request) {
	Point p = new Point(request.getLocation());
	List constraint;
	getConnection().translateToRelative(p);
	Bendpoint bp = new AbsoluteBendpoint(p);
	if (originalConstraint == null) {
		saveOriginalConstraint();
		constraint = (List) getConnection().getRoutingConstraint();
		constraint.add(request.getIndex(), bp);
	} else {
		constraint = (List) getConnection().getRoutingConstraint();
	}
	constraint.set(request.getIndex(), bp);
	getConnection().setRoutingConstraint(constraint);
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:24,代码来源:BendpointEditPolicy.java


示例6: showMoveBendpointFeedback

import org.eclipse.draw2d.AbsoluteBendpoint; //导入依赖的package包/类
/**
 * Shows feedback when a bendpoint is being moved. Also checks to see if the
 * bendpoint should be deleted and then calls
 * {@link #showDeleteBendpointFeedback(BendpointRequest)} if needed. The
 * original figure is used for feedback and the original constraint is
 * saved, so that it can be restored when feedback is erased.
 * 
 * @param request
 *            the BendpointRequest
 */
protected void showMoveBendpointFeedback(BendpointRequest request) {
	Point p = new Point(request.getLocation());
	if (!isDeleting)
		setReferencePoints(request);

	if (lineContainsPoint(ref1, ref2, p)) {
		if (!isDeleting) {
			isDeleting = true;
			eraseSourceFeedback(request);
			showDeleteBendpointFeedback(request);
		}
		return;
	}
	if (isDeleting) {
		isDeleting = false;
		eraseSourceFeedback(request);
	}
	if (originalConstraint == null)
		saveOriginalConstraint();
	List constraint = (List) getConnection().getRoutingConstraint();
	getConnection().translateToRelative(p);
	Bendpoint bp = new AbsoluteBendpoint(p);
	constraint.set(request.getIndex(), bp);
	getConnection().setRoutingConstraint(constraint);
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:36,代码来源:BendpointEditPolicy.java


示例7: refreshVisuals

import org.eclipse.draw2d.AbsoluteBendpoint; //导入依赖的package包/类
@Override
protected void refreshVisuals() {
	Connection connection = getConnectionFigure();
	List<Point> modelConstraint = ((Link) getModel()).getbPoints();
	List<AbsoluteBendpoint> figureConstraint = new ArrayList<AbsoluteBendpoint>();
	for (Point p : modelConstraint) {
		figureConstraint.add(new AbsoluteBendpoint(p));
	}
	connection.setRoutingConstraint(figureConstraint);
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:11,代码来源:LinkEditPart.java


示例8: refreshVisuals

import org.eclipse.draw2d.AbsoluteBendpoint; //导入依赖的package包/类
@Override
protected void refreshVisuals() {
	List<Point> modelConstraint = ((Link) getModel()).getbPoints();
	LabeledConnection connection = (LabeledConnection) getConnectionFigure();
	connection.setDisplay("rank : " + ((Link) getModel()).getRank());
	connection.redraw();
	List<AbsoluteBendpoint> figureConstraint = new ArrayList<AbsoluteBendpoint>();
	for (Point p : modelConstraint) {
		figureConstraint.add(new AbsoluteBendpoint(p));
	}
	connection.setRoutingConstraint(figureConstraint);
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:13,代码来源:LinkEditPart.java


示例9: getRealBendpoint

import org.eclipse.draw2d.AbsoluteBendpoint; //导入依赖的package包/类
protected List<org.eclipse.draw2d.Bendpoint> getRealBendpoint(
		Bendpoint bendPoint) {
	List<org.eclipse.draw2d.Bendpoint> constraint = new ArrayList<org.eclipse.draw2d.Bendpoint>();

	constraint
			.add(new AbsoluteBendpoint(bendPoint.getX(), bendPoint.getY()));

	return constraint;
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:10,代码来源:AbstractERDiagramConnectionEditPart.java


示例10: applyResults

import org.eclipse.draw2d.AbsoluteBendpoint; //导入依赖的package包/类
protected void applyResults(RelationshipPart relationshipPart) {
	Edge e = (Edge) partToNodesMap.get(relationshipPart);
	if (e == null)
		return;
	NodeList nodes = e.vNodes;

	PolylineConnection conn = (PolylineConnection) relationshipPart
			.getConnectionFigure();
	if (nodes != null) {
		List<AbsoluteBendpoint> bends = new ArrayList<AbsoluteBendpoint>();
		for (int i = 0; i < nodes.size(); i++) {
			Node vn = nodes.getNode(i);
			int x = vn.x;
			int y = vn.y;
			if (e.isFeedback()) {
				bends.add(new AbsoluteBendpoint(x, y + vn.height));
				bends.add(new AbsoluteBendpoint(x, y));
			} else {
				bends.add(new AbsoluteBendpoint(x, y));
				bends.add(new AbsoluteBendpoint(x, y + vn.height));
			}
		}
		conn.setRoutingConstraint(bends);
	} else {
		conn.setRoutingConstraint(Collections.EMPTY_LIST);
	}

}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:29,代码来源:DirectedGraphLayoutVisitor.java


示例11: refreshBendpoints

import org.eclipse.draw2d.AbsoluteBendpoint; //导入依赖的package包/类
@Override
protected void refreshBendpoints() {
    // ベンド・ポイントの位置情報の取得
    final WalkerConnection connection = (WalkerConnection) getModel();

    // 実際のベンド・ポイントのリスト
    final List<org.eclipse.draw2d.Bendpoint> constraint = new ArrayList<>();

    for (final Bendpoint bendPoint : connection.getBendpoints()) {
        constraint.add(new AbsoluteBendpoint(bendPoint.getX(), bendPoint.getY()));
    }
    getConnectionFigure().setRoutingConstraint(constraint);
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:14,代码来源:CommentConnectionEditPart.java


示例12: refreshBendpoints

import org.eclipse.draw2d.AbsoluteBendpoint; //导入依赖的package包/类
protected void refreshBendpoints() {
	List<Point> bendpoints = getTransition().getBendpoints();
	List<Point> constraint = new ArrayList<Point>();
	for (int i = 0; i < bendpoints.size(); i++) {
		constraint.add(new AbsoluteBendpoint((Point) bendpoints.get(i)));
	}
	getConnectionFigure().setRoutingConstraint(constraint);
}
 
开发者ID:snakerflow,项目名称:snaker-designer,代码行数:9,代码来源:TransitionEditPart.java


示例13: refreshBendpoints

import org.eclipse.draw2d.AbsoluteBendpoint; //导入依赖的package包/类
/**
 * Updates the bendpoints, based on the model.
 */
protected void refreshBendpoints() {
    EList modelConstraint = getLinkRef().getBendpoints();

    List figureConstraint = new ArrayList();
    for (int i = 0; i < modelConstraint.size(); i++) {
        LinkRefBendpoint bendpoint = (LinkRefBendpoint) modelConstraint.get(i);
        AbsoluteBendpoint abp = new AbsoluteBendpoint(bendpoint.getX(), bendpoint.getY());
        figureConstraint.add(abp);
    }
    getConnectionFigure().setRoutingConstraint(figureConstraint);
}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:15,代码来源:LinkRefEditPart.java


示例14: refreshVisuals

import org.eclipse.draw2d.AbsoluteBendpoint; //导入依赖的package包/类
@Override
protected void refreshVisuals() {
	List<AbsoluteBendpoint> points=new ArrayList<AbsoluteBendpoint>();
	List<Point> bendpoints=((Transition)this.getModel()).getBendpoints();
	for(Point p:bendpoints){
		points.add(new AbsoluteBendpoint(p));
	}
	getConnectionFigure().setRoutingConstraint(points);
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:10,代码来源:TransitionEditPart.java


示例15: getRealBendpoint

import org.eclipse.draw2d.AbsoluteBendpoint; //导入依赖的package包/类
protected List<org.eclipse.draw2d.Bendpoint> getRealBendpoint(final Bendpoint bendPoint) {
    final List<org.eclipse.draw2d.Bendpoint> constraint = new ArrayList<org.eclipse.draw2d.Bendpoint>();

    constraint.add(new AbsoluteBendpoint(bendPoint.getX(), bendPoint.getY()));

    return constraint;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:8,代码来源:AbstractERDiagramConnectionEditPart.java



注:本文中的org.eclipse.draw2d.AbsoluteBendpoint类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java IWorldAccess类代码示例发布时间:2022-05-22
下一篇:
Java IStatus类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap