Package org.eclipse.graphiti.mm.pictograms

Examples of org.eclipse.graphiti.mm.pictograms.Shape


  protected Shape drawForBoundary(DecorationAlgorithm algorithm, ContainerShape shape) {
    return drawEnvleope(algorithm, shape);
  }

  private Shape drawEnvleope(DecorationAlgorithm algorithm, ContainerShape shape) {
    Shape envelopeShape = Graphiti.getPeService().createShape(shape, false);
    Envelope env = GraphicsUtil.createEventEnvelope(envelopeShape);
    env.rect.setForeground(algorithm.manageColor(StyleUtil.CLASS_FOREGROUND));
    env.line.setForeground(algorithm.manageColor(StyleUtil.CLASS_FOREGROUND));
    return envelopeShape;
  }
View Full Code Here


    env.line.setForeground(algorithm.manageColor(StyleUtil.CLASS_FOREGROUND));
    return envelopeShape;
  }

  private Shape drawFilledEnvelope(DecorationAlgorithm algorithm, ContainerShape shape) {
    Shape envelopeShape = Graphiti.getPeService().createShape(shape, false);
    Envelope env = GraphicsUtil.createEventEnvelope(envelopeShape);
    env.rect.setFilled(true);
    env.rect.setBackground(algorithm.manageColor(StyleUtil.CLASS_FOREGROUND));
    env.rect.setForeground(algorithm.manageColor(StyleUtil.CLASS_FOREGROUND));
    env.line.setForeground(algorithm.manageColor(IColorConstant.WHITE));
View Full Code Here

  protected Shape drawForBoundary(DecorationAlgorithm algorithm, ContainerShape shape) {
    return draw(shape);
  }

  private Shape draw(ContainerShape shape) {
    Shape conditionShape = Graphiti.getPeService().createShape(shape, false);
    GraphicsUtil.createEventImage(conditionShape, ImageProvider.IMG_20_CONDITION);
    return conditionShape;
  }
View Full Code Here

  protected Shape drawForBoundary(DecorationAlgorithm algorithm, ContainerShape shape) {
    return draw(algorithm, shape);
  }

  private Shape draw(DecorationAlgorithm algorithm, ContainerShape shape) {
    Shape escalationShape = Graphiti.getPeService().createShape(shape, false);
    Polygon escalation = GraphicsUtil.createEventEscalation(escalationShape);
    escalation.setFilled(false);
    escalation.setForeground(algorithm.manageColor(StyleUtil.CLASS_FOREGROUND));
    return escalationShape;
  }
View Full Code Here

    escalation.setForeground(algorithm.manageColor(StyleUtil.CLASS_FOREGROUND));
    return escalationShape;
  }

  private Shape drawFilled(DecorationAlgorithm algorithm, ContainerShape shape) {
    Shape escalationShape = Graphiti.getPeService().createShape(shape, false);
    Polygon escalation = GraphicsUtil.createEventEscalation(escalationShape);
    escalation.setFilled(true);
    escalation.setBackground(algorithm.manageColor(StyleUtil.CLASS_FOREGROUND));
    escalation.setForeground(algorithm.manageColor(StyleUtil.CLASS_FOREGROUND));
    return escalationShape;
View Full Code Here

  @Override
  protected void hook(Activity activity, ContainerShape container, IAddContext context, int width, int height) {
    IPeService peService = Graphiti.getPeService();
    IGaService gaService = Graphiti.getGaService();

    Shape textShape = peService.createShape(container, false);
    MultiText text = gaService.createDefaultMultiText(getDiagram(), textShape, activity.getName());
    int padding = GraphicsUtil.TASK_IMAGE_SIZE;
    gaService.setLocationAndSize(text, 0, padding, width, height - padding);
    text.setStyle(StyleUtil.getStyleForText(getDiagram()));
    text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
View Full Code Here

    boolean canResize = super.canResizeShape(context);

    // perform further check only if move allowed by default feature
    if (canResize == true) {
      // don't allow resize if the class name has the length of 1
      Shape shape = context.getShape();
      Object bo = getBusinessObjectForPictogramElement(shape);
      if (bo instanceof Task || bo instanceof CallActivity) {
        canResize = true;
      } else {
        canResize = false;
View Full Code Here

      height = 55;
    }
    if(width < 105) {
      width = 105;
    }
    Shape boShape = context.getShape();
    int oldX = boShape.getGraphicsAlgorithm().getX();
    int oldY = boShape.getGraphicsAlgorithm().getY();
    int deltaHeight = height - boShape.getGraphicsAlgorithm().getHeight();
   
    super.resizeShape(context);
   
    int newX = boShape.getGraphicsAlgorithm().getX();
    int newY = boShape.getGraphicsAlgorithm().getY();
   
    Object bo = getBusinessObjectForPictogramElement(boShape);
   
    Activity activity = (Activity) bo;
    for (BoundaryEvent boundaryEvent : activity.getBoundaryEvents()) {
View Full Code Here

      // create link and wire it
      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);
    }
View Full Code Here

        connection.getBendpoints().add(bendPoint);
      }
     
    } else {
     
      Shape sourceShape = (Shape) getPictogramElement(sourceElement);
      ILocation sourceShapeLocation = Graphiti.getLayoutService().getLocationRelativeToDiagram(sourceShape);
      int sourceX = sourceShapeLocation.getX();
      int sourceY = sourceShapeLocation.getY();
     
      Shape targetShape = (Shape) getPictogramElement(targetElement);
      ILocation targetShapeLocation = Graphiti.getLayoutService().getLocationRelativeToDiagram(targetShape);
      int targetX = targetShapeLocation.getX();
      int targetY = targetShapeLocation.getY();
     
      if (sourceElement instanceof Gateway && targetElement instanceof Gateway == false) {
View Full Code Here

TOP

Related Classes of org.eclipse.graphiti.mm.pictograms.Shape

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.