Package org.eclipse.graphiti.services

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


    {
      // create shape for image
      final Shape shape = peCreateService.createShape(containerShape, false);

      // create and set image
      final Image image = gaService.createImage(shape, ImageProvider.getKeyForLargeIcon(addedClass.getIconName()));
      gaService.setLocationAndSize(image, imageRect.x, imageRect.y, imageRect.width, imageRect.height);

      // if addedClass has no resource we add it to the resource of the diagram
      // in a real scenario the business model would have its own resource
//      if (addedClass.eResource() == null) {
View Full Code Here


          globalTaskShape = peService.createShape(container, false);
          peService.setPropertyValue(globalTaskShape, GLOBAL_TASK_SHAPE_PROPERTY, Boolean.toString(true));
        }
        String imageId = getImageId(t);
        if (imageId != null) {
          Image image = gaService.createImage(globalTaskShape, imageId);
          gaService.setLocationAndSize(image, MARKER_OFFSET + 2, MARKER_OFFSET + 2, 16, 16);
        }
      }

      else if (callActivity.getCalledElementRef() instanceof Process) {
View Full Code Here

  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_SCRIPT_TASK);
        service.setLocationAndSize(img, 2, 2, GraphicsUtil.TASK_IMAGE_SIZE, GraphicsUtil.TASK_IMAGE_SIZE);
      }
    };
  }
View Full Code Here

  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_BUSINESS_RULE_TASK);
        service.setLocationAndSize(img, 2, 2, 16, 16);
      }

      @Override
      protected int getWidth() {
View Full Code Here

  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_USER_TASK);
        service.setLocationAndSize(img, 2, 2, GraphicsUtil.TASK_IMAGE_SIZE, GraphicsUtil.TASK_IMAGE_SIZE);
      }
    };
  }
View Full Code Here

  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_SEND_TASK);
        service.setLocationAndSize(img, 2, 2, GraphicsUtil.TASK_IMAGE_SIZE, GraphicsUtil.TASK_IMAGE_SIZE);
      }
    };
  }
View Full Code Here

  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_SERVICE_TASK);
        service.setLocationAndSize(img, 2, 2, GraphicsUtil.TASK_IMAGE_SIZE, GraphicsUtil.TASK_IMAGE_SIZE);
      }
    };
  }
View Full Code Here

  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_RECEIVE_TASK);
        service.setLocationAndSize(img, 2, 2, GraphicsUtil.TASK_IMAGE_SIZE, GraphicsUtil.TASK_IMAGE_SIZE);
      }
    };
  }
View Full Code Here

    return new AddTaskFeature(fp) {

      @Override
      protected void decorateActivityRectangle(RoundedRectangle rect) {
        IGaService service = Graphiti.getGaService();
        Image img = service.createImage(rect, ImageProvider.IMG_16_SEND_TASK);
        service.setLocationAndSize(img, 2, 2, GraphicsUtil.TASK_IMAGE_SIZE, GraphicsUtil.TASK_IMAGE_SIZE);
      }
    };
  }
View Full Code Here

  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

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.