Java 类org.eclipse.draw2d.PolylineDecoration 实例源码

项目:gw4e.project    文件:EdgeFigure.java   
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));
}
项目:FRaMED    文件:ORMConnectionFigureFactory.java   
/**
 * 
 * {@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;
}
项目:FRaMED    文件:ORMConnectionFigureFactory.java   
/**
 * {@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;
}
项目:jive    文件:MessageFigure.java   
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);
  }
}
项目:pandionj    文件:Utils.java   
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);
}
项目:pandionj    文件:FrameViewer.java   
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);
}
项目:NEXCORE-UML-Modeler    文件:MessageEditPart.java   
/**
 * @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;
    }
}
项目:seg.jUCMNav    文件:KPIModelLinkRefConnection.java   
/**
 * 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();
}
项目:seg.jUCMNav    文件:LinkRefConnection.java   
/**
 * 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();
}
项目:MMINT    文件:ModelElementEndpointReference2EditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    df.setLineWidth(3);
    df.setLineStyle(Graphics.LINE_DASH);
    return df;
}
项目:MMINT    文件:BinaryMappingReference2EditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    df.setLineWidth(3);
    df.setLineStyle(Graphics.LINE_DASH);
    return df;
}
项目:ROADDesigner    文件:FactLinkEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createSourceDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    df.setLineWidth(1);
    return df;
}
项目:ROADDesigner    文件:FactLink2EditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    df.setLineWidth(2);
    return df;
}
项目:HelloBrazil    文件:MatchHomeEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    return df;
}
项目:HelloBrazil    文件:TeamAtGroupEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    return df;
}
项目:HelloBrazil    文件:MatchAwayEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    return df;
}
项目:HelloBrazil    文件:GroupFirstTeamEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    return df;
}
项目:HelloBrazil    文件:EliminationMatchWinnerEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    return df;
}
项目:HelloBrazil    文件:GroupSecondTeamEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    return df;
}
项目:simplified-bpmn-example    文件:Association2EditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    return df;
}
项目:simplified-bpmn-example    文件:AssociationEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    return df;
}
项目:MMINT    文件:TargetLifelineReferenceEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    return df;
}
项目:MMINT    文件:ClassReferenceEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    return df;
}
项目:MMINT    文件:SourceLifelineReferenceEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    return df;
}
项目:MMINT    文件:OperationReferenceEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    return df;
}
项目:MMINT    文件:AssociationEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    return df;
}
项目:MMINT    文件:ModelEndpoint2EditPart.java   
/**
 * @generated
 */
private RotatableDecoration createSourceDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    return df;
}
项目:MMINT    文件:BinaryModelRelEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    df.setLineWidth(3);
    return df;
}
项目:MMINT    文件:ModelEndpoint3EditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    return df;
}
项目:MMINT    文件:ModelEndpointEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    df.setLineWidth(3);
    return df;
}
项目:MMINT    文件:BinaryMappingReferenceEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    df.setLineWidth(3);
    return df;
}
项目:MMINT    文件:ModelElementEndpointReferenceEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    df.setLineWidth(3);
    return df;
}
项目:MMINT    文件:DependerLinkEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    return df;
}
项目:MMINT    文件:ContributionEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    return df;
}
项目:MMINT    文件:DependeeLinkEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    return df;
}
项目:MMINT    文件:DependerLinkEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    return df;
}
项目:MMINT    文件:ContributionEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    return df;
}
项目:MMINT    文件:DependeeLinkEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    return df;
}
项目:MMINT    文件:TransitionEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    return df;
}
项目:MMINT    文件:TransitionEditPart.java   
/**
 * @generated
 */
private RotatableDecoration createTargetDecoration() {
    PolylineDecoration df = new PolylineDecoration();
    return df;
}