Package org.eclipse.graphiti.mm.algorithms

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


    IPeService peService = Graphiti.getPeService();
    ContainerShape containerShape = peService.createContainerShape(context.getTargetContainer(), true);

    IGaService gaService = Graphiti.getGaService();

    Rectangle invisibleRect = gaService.createInvisibleRectangle(containerShape);
    gaService.setLocationAndSize(invisibleRect, context.getX(), context.getY(), EVENT_SIZE, EVENT_SIZE
            + EVENT_TEXT_AREA);

    Shape ellipseShape = peService.createShape(containerShape, false);
    peService.setPropertyValue(ellipseShape, EVENT_ELEMENT, EVENT_CIRCLE);
View Full Code Here


    IGaService gaService = Graphiti.getGaService();

    int width = context.getWidth() > 0 ? context.getWidth() : 600;
    int height = context.getHeight() > 0 ? context.getHeight() : 100;

    Rectangle rect = gaService.createRectangle(containerShape);

    StyleUtil.applyBGStyle(rect, this);

    if (FeatureSupport.isTargetLane(context) || FeatureSupport.isTargetParticipant(context)) {
      GraphicsAlgorithm ga = context.getTargetContainer().getGraphicsAlgorithm();
View Full Code Here

  }

  private FixPointAnchor createAnchor(PictogramElement elem) {
    FixPointAnchor sa = peService.createFixPointAnchor((AnchorContainer) elem);
    sa.setReferencedGraphicsAlgorithm(elem.getGraphicsAlgorithm());
    Rectangle rect = gaService.createInvisibleRectangle(sa);
    gaService.setSize(rect, 1, 1);
    return sa;
  }
View Full Code Here

    final IGaService gaService = Graphiti.getGaService();
    RoundedRectangle roundedRectangle; // need to access it later
    {
      // create invisible outer rectangle expanded by
      // the width needed for the anchor
      final Rectangle invisibleRectangle = gaService.createInvisibleRectangle(containerShape);
      gaService.setLocationAndSize(invisibleRectangle, context.getX(), context.getY(), width, height);

      // create and set visible rectangle inside invisible rectangle
      roundedRectangle = gaService.createRoundedRectangle(invisibleRectangle, 5, 5);
      roundedRectangle.setParentGraphicsAlgorithm(invisibleRectangle);
View Full Code Here

    final IGaService gaService = Graphiti.getGaService();
    RoundedRectangle roundedRectangle; // need to access it later
    {
      // create invisible outer rectangle expanded by
      // the width needed for the anchor
      final Rectangle invisibleRectangle = gaService.createInvisibleRectangle(containerShape);
      gaService.setLocationAndSize(invisibleRectangle, context.getX(), context.getY(), width, height);

      // create and set visible rectangle inside invisible rectangle
      roundedRectangle = gaService.createRoundedRectangle(invisibleRectangle, 5, 5);
      roundedRectangle.setParentGraphicsAlgorithm(invisibleRectangle);
View Full Code Here

      RoundedRectangle roundedRectangle; // need to access it later
      {
        // create invisible outer rectangle expanded by
        // the width needed for the anchor
        final Rectangle invisibleRectangle = gaService.createInvisibleRectangle(containerShape);
        gaService.setLocationAndSize(invisibleRectangle, context.getX(), context.getY(), width, height);

        // create and set visible rectangle inside invisible rectangle
        roundedRectangle = gaService.createRoundedRectangle(invisibleRectangle, 20, 20);
        algorithm = roundedRectangle;
View Full Code Here

    final IGaService gaService = Graphiti.getGaService();
    {
      // create invisible outer rectangle expanded by
      // the width needed for the anchor
      final Rectangle invisibleRectangle = gaService.createInvisibleRectangle(containerShape);
      gaService.setLocationAndSize(invisibleRectangle, x, y, width, height);

      // create and set visible rectangle inside invisible rectangle
      Rectangle rectangle = gaService.createRectangle(invisibleRectangle);
      rectangle.setParentGraphicsAlgorithm(invisibleRectangle);
      rectangle.setStyle(StyleUtil.getStyleForPool(getDiagram()));
      gaService.setLocationAndSize(rectangle, 0, 0, width, height);

      // create link and wire it
      link(containerShape, addedLane);
    }
View Full Code Here

    // TODO: we currently only support horizontal lanes!!!
    final int height = Math.max(50, context.getHeight());
    final int width = Math.max(100, context.getWidth());
    final int commentEdge = 20;
   
    final Rectangle rect = gaService.createInvisibleRectangle(containerShape);
    gaService.setLocationAndSize(rect, context.getX(), context.getY(), width, height);
   
    final Shape lineShape = peCreateService.createShape(containerShape, false);
    final Polyline line
      = gaService.createPolyline(lineShape
View Full Code Here

    final IGaService gaService = Graphiti.getGaService();
    {
      // create invisible outer rectangle expanded by
      // the width needed for the anchor
      final Rectangle invisibleRectangle = gaService.createInvisibleRectangle(containerShape);
      gaService.setLocationAndSize(invisibleRectangle, context.getX(), context.getY(), width, height);

      // create and set visible rectangle inside invisible rectangle
      Rectangle rectangle = gaService.createRectangle(invisibleRectangle);
      rectangle.setParentGraphicsAlgorithm(invisibleRectangle);
      rectangle.setStyle(StyleUtil.getStyleForPool(getDiagram()));
      gaService.setLocationAndSize(rectangle, 0, 0, width, height);

      // create link and wire it
      link(containerShape, addedPool);
    }
View Full Code Here

    RoundedRectangle roundedRectangle; // need to access it later
    {
      // create invisible outer rectangle expanded by
      // the width needed for the anchor
      final Rectangle invisibleRectangle = gaService.createInvisibleRectangle(containerShape);
      gaService.setLocationAndSize(invisibleRectangle, context.getX(), context.getY(), width, height);

      // create and set visible rectangle inside invisible rectangle
      roundedRectangle = gaService.createRoundedRectangle(invisibleRectangle, 20, 20);
      algorithm = roundedRectangle;
View Full Code Here

TOP

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

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.