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

Java PolylineDecoration类代码示例

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

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



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

示例1: EdgeFigure

import org.eclipse.draw2d.PolylineDecoration; //导入依赖的package包/类
public EdgeFigure() {
	tooltipFigure = new TooltipFigure();
	setToolTip(tooltipFigure);
	
	this.setLineWidth(this.getLineWidth() * 2);
	
	this.setTargetDecoration(new PolylineDecoration());

	label = new Label("e_"+ID.getId());
	label.setOpaque(true);
	label.setBackgroundColor(ColorConstants.buttonLightest);
	label.setBorder(new LineBorder());
 	add(label, new MidpointLocator(this, 0));
	
	guardedFigure = new GuardFigure();
	blockedFigure = new BlockedFigure();
	actionFigure = new ActionFigure ();
	add (actionFigure, new RelativeLocator(label,0.5,1.5));
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:20,代码来源:EdgeFigure.java


示例2: createRoleRelationshipExclusionFigure

import org.eclipse.draw2d.PolylineDecoration; //导入依赖的package包/类
/**
 * 
 * {@link Relations}s from type roleprohibition and relationshipexclusion have as figure a
 * dashed line with a white arrow tip at target end of this connection.
 * 
 * @return conn org.eclipse.draw2d.PolylineConnection
 * */
private static Figure createRoleRelationshipExclusionFigure() {
  // create white arrow tip
  PolylineDecoration poly1 = new PolylineDecoration();
  poly1.setTemplate(INVERTED_TRIANGLE_TIP);
  poly1.setAntialias(SWT.ON);
  poly1.setBackgroundColor(ColorConstants.black);
  poly1.setScale(5, 5);
  
  PolylineDecoration poly2 = new PolylineDecoration();
  poly2.setTemplate(INVERTED_TRIANGLE_TIP);
  poly2.setAntialias(SWT.ON);
  poly2.setBackgroundColor(ColorConstants.black);
  poly2.setScale(5, 5);

  PolylineConnection conn = new PolylineConnection();
  conn.setAntialias(SWT.ON);
  conn.setLineDash(new float[] {5.0f, 5.0f});
  conn.setLineStyle(SWT.LINE_CUSTOM);
  conn.setTargetDecoration(poly1);
  conn.setSourceDecoration(poly2);
  conn.setConnectionRouter(new BendpointConnectionRouter());
  return conn;
}
 
开发者ID:leondart,项目名称:FRaMED,代码行数:31,代码来源:ORMConnectionFigureFactory.java


示例3: createRoleProhibitonFigure

import org.eclipse.draw2d.PolylineDecoration; //导入依赖的package包/类
/**
 * {@link Relation}s from type roleprohibition have as figure a dased line with two inverted and
 * open arrow tips at both ends of this connection.
 * 
 * @return conn org.eclipse.draw2d.PolylineConnection
 */
private static Figure createRoleProhibitonFigure() {
  PolylineDecoration poly1 = new PolylineDecoration();
  poly1.setTemplate(INVERTED_TRIANGLE_TIP);
  poly1.setAntialias(SWT.ON);
  poly1.setBackgroundColor(ColorConstants.black);
  poly1.setScale(5, 5);


  PolylineDecoration poly2 = new PolylineDecoration();
  poly2.setTemplate(INVERTED_TRIANGLE_TIP);
  poly2.setAntialias(SWT.ON);
  poly2.setBackgroundColor(ColorConstants.black);
  poly2.setScale(5, 5);


  PolylineConnection conn = new PolylineConnection();
  conn.setAntialias(SWT.ON);
  conn.setLineDash(new float[] {5.0f, 5.0f});
  conn.setLineStyle(SWT.LINE_CUSTOM);
  conn.setTargetDecoration(poly1);
  conn.setSourceDecoration(poly2);
  conn.setConnectionRouter(new BendpointConnectionRouter());

  return conn;
}
 
开发者ID:leondart,项目名称:FRaMED,代码行数:32,代码来源:ORMConnectionFigureFactory.java


示例4: TerminatorMessageFigure

import org.eclipse.draw2d.PolylineDecoration; //导入依赖的package包/类
TerminatorMessageFigure(final boolean isTransparent, final boolean isException)
{
  super();
  setOpaque(!isTransparent);
  setLineStyle(SWT.LINE_DASH);
  setForegroundColor(isException ? ColorConstants.red : (isTransparent ? ColorConstants.white
      : ColorConstants.gray));
  setLineWidthFloat(1.15f);
  // omit decoration for transparent figures that are not exceptions
  if (isException || !isTransparent)
  {
    final PolylineDecoration decoration = new PolylineDecoration();
    decoration.setScale(8, 3);
    setTargetDecoration(decoration);
  }
}
 
开发者ID:UBPL,项目名称:jive,代码行数:17,代码来源:MessageFigure.java


示例5: addArrowDecoration

import org.eclipse.draw2d.PolylineDecoration; //导入依赖的package包/类
static void addArrowDecoration(PolylineConnection pointer) {
	PolylineDecoration decoration = new PolylineDecoration();
	PointList points = new PointList();
	points.addPoint(-1, -1);
	points.addPoint(0, 0);
	points.addPoint(-1, 1);
	decoration.setTemplate(points);
	decoration.setScale(PandionJConstants.ARROW_EDGE, PandionJConstants.ARROW_EDGE);
	decoration.setLineWidth(PandionJConstants.ARROW_LINE_WIDTH);
	decoration.setOpaque(true);
	pointer.setTargetDecoration(decoration);
}
 
开发者ID:andre-santos-pt,项目名称:pandionj,代码行数:13,代码来源:Utils.java


示例6: addArrowDecoration

import org.eclipse.draw2d.PolylineDecoration; //导入依赖的package包/类
private void addArrowDecoration(PolylineConnection pointer) {
	PolylineDecoration decoration = new PolylineDecoration();
	PointList points = new PointList();
	points.addPoint(-1, -1);
	points.addPoint(0, 0);
	points.addPoint(-1, 1);
	decoration.setTemplate(points);
	decoration.setScale(Constants.ARROW_EDGE, Constants.ARROW_EDGE);
	decoration.setLineWidth(Constants.ARROW_LINE_WIDTH);
	decoration.setOpaque(true);
	pointer.setTargetDecoration(decoration);
}
 
开发者ID:andre-santos-pt,项目名称:pandionj,代码行数:13,代码来源:FrameViewer.java


示例7: createFigure

import org.eclipse.draw2d.PolylineDecoration; //导入依赖的package包/类
/**
 * @see nexcore.tool.uml.ui.core.diagram.edit.part.AbstractDiagramConnectionEditPart#createFigure()
 */
@Override
protected IFigure createFigure() {

    Relation relation = (Relation) getModel();
    PolylineConnection connection = (PolylineConnection) super.createFigure();
    connection.setForegroundColor(Display.getCurrent().getSystemColor(SWT.COLOR_BLACK));

    connection.addRoutingListener(RoutingAnimator.getDefault());
    connection.setConnectionRouter(new BendpointConnectionRouter());

    if (RelationType.SYNCHRONOUS_MESSAGE.equals(relation.getRelationType())) {
        return connection;
    } else if (RelationType.ASYNCHRONOUS_MESSAGE.equals(relation.getRelationType())) {
        PolylineDecoration poly = new PolylineDecoration();
        PointList p = new PointList();
        p.addPoint(0, 0);
        p.addPoint(-1, -1);
        p.addPoint(-1, 1);
        poly.setPoints(p);
        poly.setScale(10, 5);
        connection.setTargetDecoration(poly);
        connection.setLineStyle(Graphics.LINE_SOLID);
        return connection;
    } else if (RelationType.REPLY_MESSAGE.equals(relation.getRelationType())) {
        connection.setLineStyle(Graphics.LINE_DOT);
        return connection;
    } else if (RelationType.CREATE_MESSAGE.equals(relation.getRelationType())) {
        return connection;
    } else if (RelationType.DESTROY_MESSAGE.equals(relation.getRelationType())) {
        return connection;
    } else {
        return connection;
    }
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:38,代码来源:MessageEditPart.java


示例8: KPIModelLinkRefConnection

import org.eclipse.draw2d.PolylineDecoration; //导入依赖的package包/类
/**
 * Constructor. Set the default type to kpiModelLink
 */
public KPIModelLinkRefConnection() {
    super();
    setLineWidth(3);
    kpiModelLink = new PolylineDecoration();
    kpiModelLink.setTemplate(PolylineDecoration.TRIANGLE_TIP);
    kpiModelLink.setLineWidth(3);
    kpiModelLink.setLineStyle(SWT.LINE_SOLID);
    kpiModelLink.setScale(17, 7);

    this.type = TYPE_KPIMODEL_LINK;
    setConnectionVisual();
}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:16,代码来源:KPIModelLinkRefConnection.java


示例9: LinkRefConnection

import org.eclipse.draw2d.PolylineDecoration; //导入依赖的package包/类
/**
 * Constructor. Set the default type to Contribution
 */
public LinkRefConnection() {
    super();
    setLineWidth(3);
    setAntialias(GeneralPreferencePage.getAntialiasingPref());

    contribution = new PolylineDecoration();
    contribution.setTemplate(PolylineDecoration.TRIANGLE_TIP);
    contribution.setLineWidth(3);
    contribution.setScale(17, 7);
    contribution.setAntialias(GeneralPreferencePage.getAntialiasingPref());

    line = new PolylineDecoration();
    line.setTemplate(LINE);
    line.setLineWidth(3);
    line.setScale(10, 10);
    line.setAntialias(GeneralPreferencePage.getAntialiasingPref());

    depend = new PolygonDecoration();
    depend.setTemplate(DEPENDENCY_FIG);
    depend.setLineWidth(3);
    depend.setFill(true);
    depend.setForegroundColor(ColorManager.LINE);
    depend.setScale(2, 2);
    depend.setAntialias(GeneralPreferencePage.getAntialiasingPref());

    this.type = TYPE_CONTRIBUTION;
    setConnectionVisual();
}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:32,代码来源:LinkRefConnection.java


示例10: createTargetDecoration

import org.eclipse.draw2d.PolylineDecoration; //导入依赖的package包/类
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
	PolylineDecoration df = new PolylineDecoration();
	df.setLineWidth(3);
	df.setLineStyle(Graphics.LINE_DASH);
	return df;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:10,代码来源:ModelElementEndpointReference2EditPart.java


示例11: createSourceDecoration

import org.eclipse.draw2d.PolylineDecoration; //导入依赖的package包/类
/**
 * @generated
 */
private RotatableDecoration createSourceDecoration() {
	PolylineDecoration df = new PolylineDecoration();
	df.setLineWidth(1);
	return df;
}
 
开发者ID:road-framework,项目名称:ROADDesigner,代码行数:9,代码来源:FactLinkEditPart.java


示例12: createTargetDecoration

import org.eclipse.draw2d.PolylineDecoration; //导入依赖的package包/类
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
	PolylineDecoration df = new PolylineDecoration();
	df.setLineWidth(2);
	return df;
}
 
开发者ID:road-framework,项目名称:ROADDesigner,代码行数:9,代码来源:FactLink2EditPart.java


示例13: createTargetDecoration

import org.eclipse.draw2d.PolylineDecoration; //导入依赖的package包/类
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
	PolylineDecoration df = new PolylineDecoration();
	return df;
}
 
开发者ID:ggxx,项目名称:HelloBrazil,代码行数:8,代码来源:MatchHomeEditPart.java


示例14: createSourceDecoration

import org.eclipse.draw2d.PolylineDecoration; //导入依赖的package包/类
/**
 * @generated
 */
private RotatableDecoration createSourceDecoration() {
	PolylineDecoration df = new PolylineDecoration();
	return df;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:8,代码来源:ModelEndpoint2EditPart.java


示例15: createTargetDecoration

import org.eclipse.draw2d.PolylineDecoration; //导入依赖的package包/类
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
	PolylineDecoration df = new PolylineDecoration();
	df.setLineWidth(3);
	return df;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:9,代码来源:BinaryModelRelEditPart.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java ConnectionMetaData类代码示例发布时间:2022-05-22
下一篇:
Java SharedCDRClientRequestDispatcherImpl类代码示例发布时间: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