Package org.eclipse.graphiti.mm.pictograms

Examples of org.eclipse.graphiti.mm.pictograms.ConnectionDecorator


      @Override
      protected void createConnectionDecorators(Connection connection) {
        IPeService peService = Graphiti.getPeService();
        IGaService gaService = Graphiti.getGaService();

        ConnectionDecorator endDecorator = peService.createConnectionDecorator(connection, false, 1.0, true);

        int w = 5;
        int l = 10;

        Polyline polyline = gaService.createPolyline(endDecorator, new int[] { -l, w, 0, 0, -l, -w });
View Full Code Here


      @Override
      protected void createConnectionDecorators(Connection connection) {
        IPeService peService = Graphiti.getPeService();
        IGaService gaService = Graphiti.getGaService();

        ConnectionDecorator endDecorator = peService.createConnectionDecorator(connection, false, 1.0, true);
        ConnectionDecorator startDecorator = peService.createConnectionDecorator(connection, false, 0, true);

        int w = 5;
        int l = 15;
       
        Polyline polyline = gaService.createPolygon(endDecorator, new int[] { -l, w, 0, 0, -l, -w, -l, w });
View Full Code Here

    // create link and wire it
    link(connection, addedSequenceFlow);

    // add dynamic text decorator for the reference name
    ConnectionDecorator textDecorator = peCreateService.createConnectionDecorator(connection, true, 0.5, true);
    MultiText text = gaService.createDefaultMultiText(getDiagram(), textDecorator);
    text.setStyle(StyleUtil.getStyleForTask((getDiagram())));
    text.setHorizontalAlignment(Orientation.ALIGNMENT_LEFT);
    text.setVerticalAlignment(Orientation.ALIGNMENT_CENTER);
    if (OSUtil.getOperatingSystem() == OSEnum.Mac) {
      text.setFont(gaService.manageFont(getDiagram(), text.getFont().getName(), 11));
    }
   
    if(addConContext.getProperty("org.activiti.designer.connectionlabel") != null) {
      GraphicInfo labelLocation = (GraphicInfo) addConContext.getProperty("org.activiti.designer.connectionlabel");
      gaService.setLocation(text, (int)labelLocation.getX(), (int)labelLocation.getY());
    } else {
      gaService.setLocation(text, 10, 0);
    }
   
    if (StringUtils.isNotEmpty(addedSequenceFlow.getName())) {
      TextUtil.setTextSize(addedSequenceFlow.getName(), text);
    }

    // set reference name in the text decorator
    text.setValue(addedSequenceFlow.getName());

    // add static graphical decorators (composition and navigable)
    ConnectionDecorator cd = peCreateService.createConnectionDecorator(connection, false, 1.0, true);
    createArrow(cd);

    return connection;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.graphiti.mm.pictograms.ConnectionDecorator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.