Examples of PictogramElement


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

     * Maps update requests to methods.
     */
    @Override
    public IUpdateFeature getUpdateFeature(IUpdateContext context) {

        PictogramElement pictogramElement = context.getPictogramElement();
        if (pictogramElement instanceof ContainerShape) {
            Object bo = getBusinessObjectForPictogramElement(pictogramElement);
            if (bo instanceof LocalVariableStatement) {
              if (Utility.isPEVariable((LocalVariableStatement) bo)) {
                return new UpdateProcessingElementFeature(this);
View Full Code Here

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

     * objects are resized, not layouting of complete diagram.
     */
    @Override
    public ILayoutFeature getLayoutFeature(ILayoutContext context) {

        PictogramElement pictogramElement = context.getPictogramElement();
        Object bo = getBusinessObjectForPictogramElement(pictogramElement);

        if (bo instanceof LocalVariableStatement) {
          if (Utility.isPEVariable((LocalVariableStatement) bo)) {
            return new LayoutPEFeature(this);
View Full Code Here

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

  
      if (getDiagram().getChildren().size() == 0) {
        layout = true;
      }
     
        PictogramElement pictogramElement = context.getPictogramElement();
        eu.admire.dispel.containers.Package pck =
          (eu.admire.dispel.containers.Package)
          getBusinessObjectForPictogramElement(pictogramElement);
       
         //Add any missing
View Full Code Here

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

  }
 
  @Override
  public void execute(ICustomContext context) {

    PictogramElement pe = context.getPictogramElements()[0];

    Object o = getBusinessObjectForPictogramElement(pe);
   
    //Need to handle both pes and literals here
    if (Utility.isObjectLiteral(o) || o instanceof LocalVariableStatement) {
View Full Code Here

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

   * Removes any connections to PE.
   */
  public void preDelete(IDeleteContext context) {

    //Need to find any incoming or outgoing connections and delete them
    PictogramElement pe = context.getPictogramElement();

    eu.admire.dispel.containers.Package p =
        Utility.getPackage(getDiagram());
    if (pe instanceof ContainerShape) {
      ContainerShape cs = (ContainerShape) pe;
View Full Code Here

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

     * Check we have a PE connected to the model.
     */
    public boolean canLayout(ILayoutContext context) {

       // return true, if pictogram element is linked to a LVS
       PictogramElement pe = context.getPictogramElement();
       if (!(pe instanceof ContainerShape)) {
           return false;
       }

       EList<EObject> businessObjects = pe.getLink().getBusinessObjects();

       if (businessObjects.size() == 1
              && businessObjects.get(0) instanceof LocalVariableStatement) {
         return true;
       }
View Full Code Here

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

   * Allow editing if clicked on variable name.
   */
  @Override
  public boolean canDirectEdit(IDirectEditingContext context) {

    PictogramElement pe = context.getPictogramElement();
    Object bo = getBusinessObjectForPictogramElement(pe);
    GraphicsAlgorithm ga = context.getGraphicsAlgorithm();

    // support direct editing, if it is a PE, and the user clicked
    // directly on the text and not somewhere else in the rectangle
View Full Code Here

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

  /**
   * Get the current value in the model.
   */
  public String getInitialValue(IDirectEditingContext context) {

    PictogramElement pe = context.getPictogramElement();
    LocalVariableStatement lvs = (LocalVariableStatement)
        getBusinessObjectForPictogramElement(pe);

    return lvs.getVariable().getName();
  }
View Full Code Here

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

   */
  @Override
  public void setValue(String value, IDirectEditingContext context) {

    // set the new name for the PE
    PictogramElement pe = context.getPictogramElement();
    LocalVariableStatement lvs = (LocalVariableStatement) getBusinessObjectForPictogramElement(pe);

    lvs.getVariable().setName(value);

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

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

  @Override
  protected void addDefaultMenuGroupRest(IMenuManager manager) {
    addAlignmentSubMenu(manager, GEFActionConstants.GROUP_REST);

    PictogramElement pes[] = getBehavior().getSelectedPictogramElements();
    ICustomContext context = new CustomContext(pes);

    IToolBehaviorProvider tb = getConfigurationProvider().getDiagramTypeProvider().getCurrentToolBehaviorProvider();
    IContextMenuEntry[] contextMenuEntries = tb.getContextMenu(context);
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.