当前位置: 首页>>代码示例>>Java>>正文


Java PolylineDecoration.setTemplate方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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


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