Package org.eclipse.graphiti.mm.algorithms

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


    return envelope;
  }

  public static Polygon createDataArrow(Polygon p) {
    int[] points = { 4, 8, 14, 8, 14, 4, 18, 10, 14, 16, 14, 12, 4, 12 };
    Polygon arrow = gaService.createPolygon(p, points);
    arrow.setLineWidth(1);
    return arrow;
  }
View Full Code Here


    return invisibleRect;
  }

  private static Compensation createCompensation(GraphicsAlgorithmContainer container, int w, int h) {
    int[] xy = { 0, h / 2, w / 2, 0, w / 2, h };
    Polygon arrow1 = gaService.createPolygon(container, xy);
    arrow1.setFilled(false);

    xy = new int[] { w / 2, h / 2, w, 0, w, h };
    Polygon arrow2 = gaService.createPolygon(container, xy);
    arrow2.setFilled(false);

    Compensation compensation = new Compensation();
    compensation.arrow1 = arrow1;
    compensation.arrow2 = arrow2;
View Full Code Here

    ContainerShape containerShape = peService.createContainerShape(context.getTargetContainer(), true);
    Rectangle rect = gaService.createInvisibleRectangle(containerShape);
    gaService.setLocationAndSize(rect, context.getX(), context.getY(), d, d + p);

    Shape gatewayShape = peService.createShape(containerShape, false);
    Polygon gateway = GraphicsUtil.createGateway(gatewayShape);
    StyleUtil.applyBGStyle(gateway, this);
    gaService.setLocationAndSize(gateway, 0, 0, d, d);
    decorateGateway(containerShape);

    Shape textShape = peService.createShape(containerShape, false);
View Full Code Here

    Rectangle rect = gaService.createInvisibleRectangle(containerShape);
    gaService.setLocationAndSize(rect, context.getX(), context.getY(), w, h);

    int w_5th = w / 5;
    int[] xy = { w_5th, 0, w_5th * 4, 0, w, h / 2, w_5th * 4, h, w_5th, h, 0, h / 2 };
    Polygon hexagon = gaService.createPolygon(rect, xy);

    StyleUtil.applyBGStyle(hexagon, this);

    peService.createChopboxAnchor(containerShape);
    AnchorUtil.addFixedPointAnchors(containerShape, rect);
View Full Code Here

    return draw(algorithm, shape);
  }

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

    return cancelShape;
  }

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

    return draw(algorithm, shape);
  }

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

    return signalShape;
  }

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

    return draw(algorithm, shape);
  }

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

    return errorShape;
  }

  private Shape drawFilled(DecorationAlgorithm algorithm, ContainerShape shape) {
    Shape errorShape = Graphiti.getPeService().createShape(shape, false);
    Polygon error = GraphicsUtil.createEventError(errorShape);
    error.setFilled(true);
    error.setForeground(algorithm.manageColor(StyleUtil.CLASS_FOREGROUND));
    error.setBackground(algorithm.manageColor(StyleUtil.CLASS_FOREGROUND));
    return errorShape;
  }
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.