Package org.eclipse.graphiti.mm.algorithms

Examples of org.eclipse.graphiti.mm.algorithms.Polygon


  }
 
  private Polyline createArrow(GraphicsAlgorithmContainer gaContainer) {
    int xy[] = new int[] { -10, -5, 0, 0, -10, 5, -8, 0 };
    int beforeAfter[] = new int[] { 3, 3, 0, 0, 3, 3, 3, 3 };
    Polygon polyline = Graphiti.getGaCreateService().createPolygon(gaContainer, xy, beforeAfter);
    polyline.setStyle(StyleUtil.getStyleForPolygon(getDiagram()));
    return polyline;
  }
View Full Code Here


        return false;
      }

      @Override
      protected void decorate(Polygon p) {
        Polygon arrow = GraphicsUtil.createDataArrow(p);
        arrow.setFilled(false);
        arrow.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
      }

      @Override
      public String getName(DataInput t) {
        return t.getName();
View Full Code Here

      protected void decorateGateway(ContainerShape container) {
        Ellipse outer = GraphicsUtil.createGatewayOuterCircle(container);
        outer.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
        Ellipse inner = GraphicsUtil.createGatewayInnerCircle(container);
        inner.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
        Polygon pentagon = GraphicsUtil.createGatewayPentagon(container);
        pentagon.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
        pentagon.setFilled(false);
      }

      @Override
      public PictogramElement add(IAddContext context) {
        PictogramElement element = super.add(context);
View Full Code Here

        int whalf = width / 2;

        int[] xy = { 0, 10, whalf, 20, width, 10, width, height - 10, whalf, height, 0, height - 10 };
        int[] bend = { 0, 0, whalf, whalf, 0, 0, 0, 0, whalf, whalf, 0, 0 };
        Polygon polygon = gaService.createPolygon(invisibleRect, xy, bend);
        polygon.setFilled(true);
        // polygon.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));

        StyleUtil.applyBGStyle(polygon, this);

        xy = new int[] { 0, 14, whalf, 24, width, 14 };
View Full Code Here

        return false;
      }

      @Override
      protected void decorate(Polygon p) {
        Polygon arrow = GraphicsUtil.createDataArrow(p);
        arrow.setFilled(true);
        arrow.setBackground(manageColor(StyleUtil.CLASS_FOREGROUND));
        arrow.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
      }

      @Override
      public String getName(DataOutput t) {
        return t.getName();
View Full Code Here

  private void drawEventBased(ContainerShape container) {
    Ellipse outer = GraphicsUtil.createGatewayOuterCircle(container);
    outer.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
    Ellipse inner = GraphicsUtil.createGatewayInnerCircle(container);
    inner.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
    Polygon pentagon = GraphicsUtil.createGatewayPentagon(container);
    pentagon.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
    pentagon.setFilled(false);
  }
View Full Code Here

  }

  private void drawExclusiveEventBased(ContainerShape container) {
    Ellipse ellipse = GraphicsUtil.createGatewayOuterCircle(container);
    ellipse.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
    Polygon pentagon = GraphicsUtil.createGatewayPentagon(container);
    pentagon.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
    pentagon.setFilled(false);
  }
View Full Code Here

  }

  private void drawParallelMultipleEventBased(ContainerShape container) {
    Ellipse ellipse = GraphicsUtil.createGatewayOuterCircle(container);
    ellipse.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
    Polygon cross = GraphicsUtil.createEventGatewayParallelCross(container);
    cross.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
  }
View Full Code Here

      drawMultiple(event, shape);
    }
  }
 
  private void drawMultiple(Event event, Shape shape) {
    Polygon pentagon = GraphicsUtil.createEventPentagon(shape);
    pentagon.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
    if (event instanceof ThrowEvent) {
      pentagon.setBackground(manageColor(StyleUtil.CLASS_FOREGROUND));
    } else {
      pentagon.setFilled(false);
    }
  }
View Full Code Here

      pentagon.setFilled(false);
    }
  }
 
  private void drawParallelMultiple(Event event, Shape shape) {
    Polygon cross = GraphicsUtil.createEventParallelMultiple(shape);
    cross.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
  }
View Full Code Here

TOP

Related Classes of org.eclipse.graphiti.mm.algorithms.Polygon

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.