Package org.eclipse.graphiti.mm.algorithms

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


  public IAddFeature getAddFeature(IFeatureProvider fp) {
    return new AddTaskFeature(fp) {
      @Override
      protected void decorateActivityRectangle(RoundedRectangle rect) {
        IGaService service = Graphiti.getGaService();
        Image img = service.createImage(rect, ImageProvider.IMG_16_MANUAL_TASK);
        service.setLocationAndSize(img, 2, 2, GraphicsUtil.TASK_IMAGE_SIZE, GraphicsUtil.TASK_IMAGE_SIZE);
      }
    };
  }
View Full Code Here


        if(shape.getGraphicsAlgorithm() instanceof MultiText) {
          MultiText text = (MultiText) shape.getGraphicsAlgorithm();
          text.setHeight(height - 25);
          text.setWidth(width);
        } else if(shape.getGraphicsAlgorithm() instanceof Image) {
          Image image = (Image) shape.getGraphicsAlgorithm();
         
          if(bo instanceof CallActivity) {
           
            // calculate position for icon
            final int iconWidthAndHeight = 10;
            final int padding = 5;
            final int xPos = (context.getShape().getGraphicsAlgorithm().getWidth() / 2) - (iconWidthAndHeight / 2);
            final int yPos = context.getShape().getGraphicsAlgorithm().getHeight() - padding - iconWidthAndHeight;

            image.setX(xPos);
            image.setY(yPos);
           
          } else {
            int imageX = image.getX();
            if(imageX > 20) {
              image.setX(width - 20);
            }
          }
        } else if(shape.getGraphicsAlgorithm() instanceof Text) {
          Text text = (Text) shape.getGraphicsAlgorithm();
          text.setHeight(height - 25);
View Full Code Here

      link(containerShape, addedEvent);
    }

    {
      final Shape shape = peCreateService.createShape(containerShape, false);
      final Image image = gaService.createImage(shape, PluginImage.IMG_BOUNDARY_SIGNAL.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

      link(containerShape, addedEvent);
    }

    {
      final Shape shape = peCreateService.createShape(containerShape, false);
      final Image image = gaService.createImage(shape, PluginImage.IMG_THROW_SIGNAL.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

      link(containerShape, addedGateway);
    }

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

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

    {
View Full Code Here

      directEditingInfo.setGraphicsAlgorithm(text);
    }

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

      switch (baseShape) {
      case ACTIVITY:
        gaService.setLocationAndSize(image, 5, 5, IMAGE_SIZE, IMAGE_SIZE);
        break;
View Full Code Here

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

      gaService.setLocationAndSize(image, 10, 10, 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(addedTask));

      gaService.setLocationAndSize(image, 5, 5, IMAGE_SIZE, IMAGE_SIZE);
    }
   
    {
      final Shape shape = peCreateService.createShape(containerShape, false);
      final Image image = gaService.createImage(shape, PluginImage.IMG_ALFRESCO_LOGO.getImageKey());

      gaService.setLocationAndSize(image, 85, 3, IMAGE_SIZE, IMAGE_SIZE);
    }

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

      link(containerShape, addedEvent);
    }

    {
      final Shape shape = peCreateService.createShape(containerShape, false);
      final Image image = gaService.createImage(shape, PluginImage.IMG_BOUNDARY_TIMER.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

      link(containerShape, addedEvent);
    }

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

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

    // add a chopbox anchor to the shape
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.