Package org.eclipse.graphiti.mm.algorithms

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


      link(containerShape, addedEvent);
    }

    {
      final Shape shape = peCreateService.createShape(containerShape, false);
      final Image image = gaService.createImage(shape, PluginImage.IMG_STARTEVENT_MESSAGE.getImageKey());
      image.setWidth(20);
      image.setHeight(20);
      gaService.setLocationAndSize(image, (width - 20) / 2, (height - 20) / 2, 20, 20);
    }

    // add a chopbox anchor to the shape
    peCreateService.createChopboxAnchor(containerShape);
View Full Code Here


    if (addedEvent instanceof StartEvent && ((StartEvent) addedEvent).getEventDefinitions().size() > 0) {

      StartEvent startEvent = (StartEvent) addedEvent;
      final Shape shape = peCreateService.createShape(containerShape, false);
      Image image = null;
      if (startEvent.getEventDefinitions().get(0) instanceof TimerEventDefinition) {
        image = gaService.createImage(shape, PluginImage.IMG_BOUNDARY_TIMER.getImageKey());
      } else if (startEvent.getEventDefinitions().get(0) instanceof MessageEventDefinition){
        image = gaService.createImage(shape, PluginImage.IMG_STARTEVENT_MESSAGE.getImageKey());
      } else
        image = gaService.createImage(shape, PluginImage.IMG_BOUNDARY_ERROR.getImageKey());
     
      image.setWidth(IMAGE_SIZE);
      image.setHeight(IMAGE_SIZE);

      gaService.setLocationAndSize(image, (width - IMAGE_SIZE) / 2, (height - IMAGE_SIZE) / 2, IMAGE_SIZE, IMAGE_SIZE);
    }

    layoutPictogramElement(containerShape);
View Full Code Here

      link(containerShape, addedEvent);
    }

    {
      final Shape shape = peCreateService.createShape(containerShape, false);
      final Image image = gaService.createImage(shape, PluginImage.IMG_ENDEVENT_ERROR.getImageKey());

      gaService.setLocationAndSize(image, 5, 5, 25, 25);
    }

    // add a chopbox anchor to the shape
View Full Code Here

      gaService.setLocationAndSize(secondCircle, 3, 3, width - 6, height - 6);
    }

    {
      final Shape shape = peCreateService.createShape(containerShape, false);
      final Image image = gaService.createImage(shape, getImageKey());
      image.setWidth(IMAGE_SIZE);
      image.setHeight(IMAGE_SIZE);

      gaService.setLocationAndSize(image, (width - IMAGE_SIZE) / 2, (height - IMAGE_SIZE) / 2, IMAGE_SIZE, IMAGE_SIZE);
    }

    // add a chopbox anchor to the shape
View Full Code Here

      directEditingInfo.setGraphicsAlgorithm(text);
    }

    {
      final Shape shape = peCreateService.createShape(containerShape, false);
      final Image image = gaService.createImage(shape, getIcon());

      // calculate position for icon
      final int iconWidthAndHeight = 10;
      final int padding = 5;
      final int xPos = (roundedRectangle.getWidth() / 2) - (iconWidthAndHeight / 2);
View Full Code Here

TOP

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

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.