Package org.eclipse.graphiti.services

Examples of org.eclipse.graphiti.services.IGaService.createPolygon()


     * @return
     */
    private Polyline createArrow(GraphicsAlgorithmContainer gaContainer) {

      IGaService gaService = Graphiti.getGaService();
      Polyline polyline = gaService.createPolygon(
          gaContainer, new int[] { -9, 6, 0, 0, -9, -6 });
      polyline.setForeground(manageColor(IColorConstant.BLACK));
      polyline.setBackground(manageColor(IColorConstant.BLACK));
      polyline.setLineWidth(1);

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);
View Full Code Here

    ContainerShape container = peService.createContainerShape(context.getTargetContainer(), true);
    Rectangle invisibleRect = gaService.createInvisibleRectangle(container);
    gaService.setLocationAndSize(invisibleRect, context.getX(), context.getY(), width, height + textArea);

    Shape rectShape = peService.createShape(container, false);
    Polygon rect = gaService.createPolygon(rectShape, new int[] { 0, 0, width - e, 0, width, e, width, height, 0,
        height });
    rect.setLineWidth(1);
    StyleUtil.applyBGStyle(rect, this);
    decorate(rect);
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

       
        ConnectionDecorator decorator = Graphiti.getPeService().createConnectionDecorator(connection, false,
            1.0, true);

        IGaService gaService = Graphiti.getGaService();
        Polyline arrow = gaService.createPolygon(decorator, new int[] { -l, w, 0, 0, -l, -w, -l, w });

        arrow.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
        arrow.setLineWidth(2);
      }
View Full Code Here

        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 });
        polyline.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
        polyline.setBackground(manageColor(IColorConstant.WHITE));
        polyline.setFilled(true);
        polyline.setLineWidth(1);
View Full Code Here

      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);
      polygon.setStyle(StyleUtil.getStyleForEvent(getDiagram()));
      gaService.setLocationAndSize(polygon, 0, 0, width, height);

      // create link and wire it
View Full Code Here

    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
View Full Code Here

      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);
      polygon.setStyle(StyleUtil.getStyleForEvent(getDiagram()));
      gaService.setLocationAndSize(polygon, 0, 0, width, height);

      // create link and wire it
View Full Code Here

      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
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.