Package org.eclipse.graphiti.mm.algorithms

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


    return null;
  }

  private Shape draw(DecorationAlgorithm algorithm, ContainerShape shape) {
    Shape linkShape = Graphiti.getPeService().createShape(shape, false);
    Polygon link = GraphicsUtil.createEventLink(linkShape);
    link.setFilled(false);
    link.setForeground(algorithm.manageColor(StyleUtil.CLASS_FOREGROUND));
    return linkShape;
  }
View Full Code Here


    return linkShape;
  }

  private Shape drawFilled(DecorationAlgorithm algorithm, ContainerShape shape) {
    Shape linkShape = Graphiti.getPeService().createShape(shape, false);
    Polygon link = GraphicsUtil.createEventLink(linkShape);
    link.setFilled(true);
    link.setBackground(algorithm.manageColor(StyleUtil.CLASS_FOREGROUND));
    link.setForeground(algorithm.manageColor(StyleUtil.CLASS_FOREGROUND));
    return linkShape;
  }
View Full Code Here

    return draw(algorithm, shape);
  }

  private Shape draw(DecorationAlgorithm algorithm, ContainerShape shape) {
    Shape escalationShape = Graphiti.getPeService().createShape(shape, false);
    Polygon escalation = GraphicsUtil.createEventEscalation(escalationShape);
    escalation.setFilled(false);
    escalation.setForeground(algorithm.manageColor(StyleUtil.CLASS_FOREGROUND));
    return escalationShape;
  }
View Full Code Here

    return escalationShape;
  }

  private Shape drawFilled(DecorationAlgorithm algorithm, ContainerShape shape) {
    Shape escalationShape = Graphiti.getPeService().createShape(shape, false);
    Polygon escalation = GraphicsUtil.createEventEscalation(escalationShape);
    escalation.setFilled(true);
    escalation.setBackground(algorithm.manageColor(StyleUtil.CLASS_FOREGROUND));
    escalation.setForeground(algorithm.manageColor(StyleUtil.CLASS_FOREGROUND));
    return escalationShape;
  }
View Full Code Here

  }

  private Polygon 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

    final int width = context.getWidth() <= 0 ? 40 : context.getWidth();
    final int height = context.getHeight() <= 0 ? 40 : context.getHeight();

    final IGaService gaService = Graphiti.getGaService();

    Polygon polygon;
    {
      int xy[] = new int[] { 0, 20, 20, 0, 40, 20, 20, 40, 0, 20 };
      final Polygon invisiblePolygon = gaService.createPolygon(containerShape, xy);
      invisiblePolygon.setFilled(false);
      invisiblePolygon.setLineVisible(false);
      gaService.setLocationAndSize(invisiblePolygon, context.getX(), context.getY(), width, height);

      // create and set visible polygon inside invisible polygon
      polygon = gaService.createPolygon(invisiblePolygon, xy);
      polygon.setParentGraphicsAlgorithm(invisiblePolygon);
View Full Code Here

      // check whether the context has a size (e.g. from a create feature)
      // otherwise define a default size for the shape
      width = context.getWidth() <= 0 ? 60 : context.getWidth();
      height = context.getHeight() <= 0 ? 60 : context.getHeight();

      Polygon polygon;
      {
        int xy[] = new int[] { 0, 30, 30, 0, 60, 30, 30, 60, 0, 30 };

        final Polygon invisiblePolygon = gaService.createPolygon(containerShape, xy);
        invisiblePolygon.setFilled(false);
        invisiblePolygon.setLineVisible(false);
        gaService.setLocationAndSize(invisiblePolygon, context.getX(), context.getY(), width, height);

        // create and set visible circle inside invisible circle
        polygon = gaService.createPolygon(invisiblePolygon, xy);
        algorithm = polygon;
View Full Code Here

    final int width = context.getWidth() <= 0 ? 40 : context.getWidth();
    final int height = context.getHeight() <= 0 ? 40 : context.getHeight();

    final IGaService gaService = Graphiti.getGaService();

    Polygon polygon;
    {
      int xy[] = new int[] { 0, 20, 20, 0, 40, 20, 20, 40, 0, 20 };
      final Polygon invisiblePolygon = gaService.createPolygon(containerShape, xy);
      invisiblePolygon.setFilled(false);
      invisiblePolygon.setLineVisible(false);
      gaService.setLocationAndSize(invisiblePolygon, context.getX(), context.getY(), width, height);

      // create and set visible circle inside invisible circle
      polygon = gaService.createPolygon(invisiblePolygon, xy);
      polygon.setParentGraphicsAlgorithm(invisiblePolygon);
View Full Code Here

    final int width = context.getWidth() <= 0 ? 40 : context.getWidth();
    final int height = context.getHeight() <= 0 ? 40 : context.getHeight();

    final IGaService gaService = Graphiti.getGaService();

    Polygon polygon;
    {
      int xy[] = new int[] { 0, 20, 20, 0, 40, 20, 20, 40, 0, 20 };
      final Polygon invisiblePolygon = gaService.createPolygon(containerShape, xy);
      invisiblePolygon.setFilled(false);
      invisiblePolygon.setLineVisible(false);
      gaService.setLocationAndSize(invisiblePolygon, context.getX(), context.getY(), width, height);

      // create and set visible circle inside invisible circle
      polygon = gaService.createPolygon(invisiblePolygon, xy);
      polygon.setParentGraphicsAlgorithm(invisiblePolygon);
View Full Code Here

    final int width = context.getWidth() <= 0 ? 40 : context.getWidth();
    final int height = context.getHeight() <= 0 ? 40 : context.getHeight();

    final IGaService gaService = Graphiti.getGaService();

    Polygon polygon;
    {
      int xy[] = new int[] { 0, 20, 20, 0, 40, 20, 20, 40, 0, 20 };
      final Polygon invisiblePolygon = gaService.createPolygon(containerShape, xy);
      invisiblePolygon.setFilled(false);
      invisiblePolygon.setLineVisible(false);
      gaService.setLocationAndSize(invisiblePolygon, context.getX(), context.getY(), width, height);

      // create and set visible polygon inside invisible polygon
      polygon = gaService.createPolygon(invisiblePolygon, xy);
      polygon.setParentGraphicsAlgorithm(invisiblePolygon);
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.