Package org.eclipse.graphiti.mm.pictograms

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


    return eClass.getName();
  }

  @Override
  public void setValue(String value, IDirectEditingContext context) {
    PictogramElement pe = context.getPictogramElement();

    ExclusiveGateway gateway = (ExclusiveGateway) getBusinessObjectForPictogramElement(pe);
    gateway.setName(value);

    updatePictogramElement(((Shape) pe).getContainer());
View Full Code Here


    updatePictogramElement(((Shape) pe).getContainer());
  }

  @Override
  public boolean canDirectEdit(IDirectEditingContext context) {
    PictogramElement pe = context.getPictogramElement();
    Object bo = getBusinessObjectForPictogramElement(pe);
    GraphicsAlgorithm ga = context.getGraphicsAlgorithm();

    return bo instanceof ExclusiveGateway && ga instanceof Text;
  }
View Full Code Here

    return TYPE_TEXT;
    }

  @Override
    public String getInitialValue(IDirectEditingContext context) {
    PictogramElement pe = context.getPictogramElement();
    TextAnnotation annotation = (TextAnnotation) getBusinessObjectForPictogramElement(pe);
    return annotation.getText();
  }
View Full Code Here

    return annotation.getText();
  }

  @Override
    public void setValue(String value, IDirectEditingContext context) {
    PictogramElement pe = context.getPictogramElement();
    TextAnnotation annotation = (TextAnnotation) getBusinessObjectForPictogramElement(pe);
    annotation.setText(value);
    updatePictogramElement(((Shape) pe).getContainer());
    }
View Full Code Here

    updatePictogramElement(((Shape) pe).getContainer());
    }
 
  @Override
  public boolean canDirectEdit(IDirectEditingContext context) {
    PictogramElement pe = context.getPictogramElement();
    Object bo = getBusinessObjectForPictogramElement(pe);
    GraphicsAlgorithm ga = context.getGraphicsAlgorithm();
    return bo instanceof TextAnnotation && ga instanceof MultiText;
  }
View Full Code Here

    return algorithms;
  }

  public static GraphicsAlgorithm getSelectionBorder(PictogramElement element) {
    Collection<Shape> children = Graphiti.getPeService().getAllContainedShapes((ContainerShape) element);
    PictogramElement first = children.iterator().next();
    return first.getGraphicsAlgorithm();
  }
View Full Code Here

    super(fp);
  }

  @Override
  public boolean canLayout(ILayoutContext context) {
    PictogramElement pictoElem = context.getPictogramElement();
    if (!(pictoElem instanceof ContainerShape)) {
      return false;
    }
    Object bo = getBusinessObjectForPictogramElement(pictoElem);
    return bo instanceof TextAnnotation;
View Full Code Here

    }

  @Override
    public IReason updateNeeded(IUpdateContext context) {
    IPeService peService = Graphiti.getPeService();
    PictogramElement element = context.getPictogramElement();
    String property = peService.getPropertyValue(element, getPropertyKey());
    if(property == null) {
      return Reason.createFalseReason();
    }
    Activity activity = (Activity) getBusinessObjectForPictogramElement(context.getPictogramElement());
View Full Code Here

    return TYPE_TEXT;
    }

  @Override
    public String getInitialValue(IDirectEditingContext context) {
    PictogramElement pe = context.getPictogramElement();
    Lane lane = (Lane) getBusinessObjectForPictogramElement(pe);
    return lane.getName();
    }
View Full Code Here

    return lane.getName();
    }

  @Override
    public void setValue(String value, IDirectEditingContext context) {
    PictogramElement pe = context.getPictogramElement();
    Lane lane = (Lane) getBusinessObjectForPictogramElement(pe);
    lane.setName(value);
    updatePictogramElement(((Shape) pe).getContainer());
    }
View Full Code Here

TOP

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

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.