Package org.eclipse.graphiti.services

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


                if (graphicsAlgorithm instanceof Polyline) {

                    Polyline polyline = (Polyline) graphicsAlgorithm;
                    Point secondPoint = polyline.getPoints().get(1);
                    Point newSecondPoint =
                        gaService.createPoint(containerWidth,
                            secondPoint.getY());
                    polyline.getPoints().set(1, newSecondPoint);
                    anythingChanged = true;

                } else if (graphicsAlgorithm instanceof Rectangle){
View Full Code Here


      IDimension size = gaService.calculateSize(ga);
      if (containerHeight != size.getHeight()) {
        if (ga instanceof Polyline) {
          Polyline line = (Polyline) ga;
          Point firstPoint = line.getPoints().get(0);
          Point newPoint = gaService.createPoint(firstPoint.getX(), containerHeight);
          line.getPoints().set(1, newPoint);
        } else if (ga instanceof Text) {
          gaService.setHeight(ga, containerHeight);
        }
      }
View Full Code Here

        if (childGa instanceof Text) {
          s.getGraphicsAlgorithm().setHeight(newHeight);
        } else if (childGa instanceof Polyline) {
          Polyline line = (Polyline) childGa;
          Point firstPoint = line.getPoints().get(0);
          Point newPoint = service.createPoint(firstPoint.getX(), newHeight);
          line.getPoints().set(1, newPoint);
        }
      }

      return new Dimension(newWidth, newHeight);
View Full Code Here

        if (childGa instanceof Text) {
          s.getGraphicsAlgorithm().setHeight(ga.getHeight());
        } else if (childGa instanceof Polyline) {
          Polyline line = (Polyline) childGa;
          Point firstPoint = line.getPoints().get(0);
          Point newPoint = service.createPoint(firstPoint.getX(), ga.getHeight());
          line.getPoints().set(1, newPoint);
        }
      }
      return new Dimension(ga.getWidth(), ga.getHeight());
    }
View Full Code Here

    IGaService gaService = Graphiti.getGaService();
    IPeService peService = Graphiti.getPeService();

    FixPointAnchor anchor = peService.createFixPointAnchor(s);
    peService.setPropertyValue(anchor, BOUNDARY_FIXPOINT_ANCHOR, loc.getKey());
    anchor.setLocation(gaService.createPoint(x, y));
    gaService.createInvisibleRectangle(anchor);

    return anchor;
  }
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.