Package org.eclipse.graphiti.datatypes

Examples of org.eclipse.graphiti.datatypes.ILocation


    ContainerShape parent = (ContainerShape) getFeatureProvider().getPictogramElementForBusinessObject(event.getAttachedToRef());
    ContainerShape secondParent = parent.getContainer();
   
    int x = 0, y = 0;
    if(targetContainer.equals(parent)) {
      ILocation shapeLocation = Graphiti.getLayoutService().getLocationRelativeToDiagram(shape);
      x = shapeLocation.getX();
      y = shapeLocation.getY();
      x += context.getDeltaX();
      y += context.getDeltaY();
      ILocation parentLocation = Graphiti.getLayoutService().getLocationRelativeToDiagram(parent);
      x += parentLocation.getX();
      y += parentLocation.getY();
   
    } else if (targetContainer.equals(sourceContainer)) {
      ILocation shapeLocation = Graphiti.getLayoutService().getLocationRelativeToDiagram(shape);
      x = shapeLocation.getX();
      y = shapeLocation.getY();
      x += context.getDeltaX();
      y += context.getDeltaY();
   
    } else if (targetContainer.equals(secondParent)) {
      ILocation shapeLocation = Graphiti.getLayoutService().getLocationRelativeToDiagram(shape);
      x = shapeLocation.getX();
      y = shapeLocation.getY();
      x += context.getDeltaX();
      y += context.getDeltaY();
      ILocation parentLocation = Graphiti.getLayoutService().getLocationRelativeToDiagram(secondParent);
      x += parentLocation.getX();
      y += parentLocation.getY();
    } else {
      // not valid
      return false;
    }
   
    if(parent != null) {
     
      ILocation parentLocation = Graphiti.getLayoutService().getLocationRelativeToDiagram(parent);
      int parentX = parentLocation.getX();
      int parentY = parentLocation.getY();
     
      int parentWidth = parent.getGraphicsAlgorithm().getWidth();
      int parentHeight = parent.getGraphicsAlgorithm().getHeight();
     
      int EVENT_MAX_OVERLAP = 28;
View Full Code Here


   
    int x = 0, y = 0;
    boolean translateNecessary = false;
    if(targetContainer.equals(parent)) {
      translateNecessary = true;
      ILocation shapeLocation = Graphiti.getLayoutService().getLocationRelativeToDiagram(shape);
      x = shapeLocation.getX();
      y = shapeLocation.getY();
      x += context.getDeltaX();
      y += context.getDeltaY();
      ILocation parentLocation = Graphiti.getLayoutService().getLocationRelativeToDiagram(parent);
      x += parentLocation.getX();
      y += parentLocation.getY();
   
    } else if (targetContainer.equals(sourceContainer)) {
      ILocation shapeLocation = Graphiti.getLayoutService().getLocationRelativeToDiagram(shape);
      x = shapeLocation.getX();
      y = shapeLocation.getY();
      x += context.getDeltaX();
      y += context.getDeltaY();
   
    } else if (targetContainer.equals(secondParent)) {
      translateNecessary = true;
      ILocation shapeLocation = Graphiti.getLayoutService().getLocationRelativeToDiagram(shape);
      x = shapeLocation.getX();
      y = shapeLocation.getY();
      x += context.getDeltaX();
      y += context.getDeltaY();
      ILocation parentLocation = Graphiti.getLayoutService().getLocationRelativeToDiagram(secondParent);
      x += parentLocation.getX();
      y += parentLocation.getY();
    } else {
      // not valid
      return;
    }
   
    if(parent != null) {
     
      ILocation parentLocation = Graphiti.getLayoutService().getLocationRelativeToDiagram(parent);
      int parentX = parentLocation.getX();
      int parentY = parentLocation.getY();
     
      int parentWidth = parent.getGraphicsAlgorithm().getWidth();
      int parentHeight = parent.getGraphicsAlgorithm().getHeight();
     
      int EVENT_MAX_OVERLAP = 28;
View Full Code Here

    final BoundaryEvent addedEvent = (BoundaryEvent) context.getNewObject();
    ContainerShape parent = context.getTargetContainer();
    int x = context.getX();
    int y = context.getY();

    ILocation shapeLocation = Graphiti.getLayoutService().getLocationRelativeToDiagram(parent);
    x += shapeLocation.getX();
    y += shapeLocation.getY();
   
    parent = getDiagram();

    // CONTAINER SHAPE WITH CIRCLE
    final IPeCreateService peCreateService = Graphiti.getPeCreateService();
View Full Code Here

TOP

Related Classes of org.eclipse.graphiti.datatypes.ILocation

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.