Package org.eclipse.graphiti.features

Examples of org.eclipse.graphiti.features.IDirectEditingInfo


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

      IDirectEditingInfo directEditingInfo =
          getFeatureProvider().getDirectEditingInfo();
      // set container shape for direct editing after object creation
      directEditingInfo.setMainPictogramElement(pe);
      // set shape and graphics algorithm where the editor for
      // direct editing shall be opened after object creation
   
      Shape textShape = null;
      if (pe instanceof ContainerShape) {
        //Need to find child shape
        List<Shape> shapes = ((ContainerShape) pe).getChildren();
        for (Shape s : shapes) {
          if (s.getGraphicsAlgorithm() instanceof AbstractText) {
            textShape = s;
            break;
          }
        }
      }
     
      if (textShape != null) {
        //pe should be shape and ga text
        directEditingInfo.setPictogramElement(textShape);
        directEditingInfo.setGraphicsAlgorithm(
            textShape.getGraphicsAlgorithm());
        directEditingInfo.setActive(true);
        getDiagramEditor().refresh();
      }
    }
  }
View Full Code Here


      // create link and wire it
      //        link(shape, addedClass);

      // provide information to support direct-editing directly
      // after object creation (must be activated additionally)
      final IDirectEditingInfo directEditingInfo = getFeatureProvider().getDirectEditingInfo();
      // set container shape for direct editing after object creation
      directEditingInfo.setMainPictogramElement(containerShape);
      // set shape and graphics algorithm where the editor for
      // direct editing shall be opened after object creation
      directEditingInfo.setPictogramElement(shape);
      directEditingInfo.setGraphicsAlgorithm(text);
    }

    // add a chopbox anchor to the shape
    peCreateService.createChopboxAnchor(containerShape);
View Full Code Here

      // create link and wire it
      link(shape, addedSubProcess);

      // provide information to support direct-editing directly
      // after object creation (must be activated additionally)
      final IDirectEditingInfo directEditingInfo = getFeatureProvider().getDirectEditingInfo();
      // set container shape for direct editing after object creation
      directEditingInfo.setMainPictogramElement(containerShape);
      // set shape and graphics algorithm where the editor for
      // direct editing shall be opened after object creation
      directEditingInfo.setPictogramElement(shape);
      directEditingInfo.setGraphicsAlgorithm(text);
    }

    // add a chopbox anchor to the shape
    peCreateService.createChopboxAnchor(containerShape);
View Full Code Here

      // create link and wire it
      link(shape, addedSubProcess);

      // provide information to support direct-editing directly
      // after object creation (must be activated additionally)
      final IDirectEditingInfo directEditingInfo = getFeatureProvider().getDirectEditingInfo();
      // set container shape for direct editing after object creation
      directEditingInfo.setMainPictogramElement(containerShape);
      // set shape and graphics algorithm where the editor for
      // direct editing shall be opened after object creation
      directEditingInfo.setPictogramElement(shape);
      directEditingInfo.setGraphicsAlgorithm(text);
    }

    // add a chopbox anchor to the shape
    peCreateService.createChopboxAnchor(containerShape);
View Full Code Here

      // create link and wire it
      link(shape, addedTask);

      // provide information to support direct-editing directly
      // after object creation (must be activated additionally)
      final IDirectEditingInfo directEditingInfo = getFeatureProvider().getDirectEditingInfo();
      // set container shape for direct editing after object creation
      directEditingInfo.setMainPictogramElement(containerShape);
      // set shape and graphics algorithm where the editor for
      // direct editing shall be opened after object creation
      directEditingInfo.setPictogramElement(shape);
      directEditingInfo.setGraphicsAlgorithm(text);
    }

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

      // create link and wire it
      link(shape, addedTask);

      // provide information to support direct-editing directly
      // after object creation (must be activated additionally)
      final IDirectEditingInfo directEditingInfo = getFeatureProvider().getDirectEditingInfo();
      // set container shape for direct editing after object creation
      directEditingInfo.setMainPictogramElement(containerShape);
      // set shape and graphics algorithm where the editor for
      // direct editing shall be opened after object creation
      directEditingInfo.setPictogramElement(shape);
      directEditingInfo.setGraphicsAlgorithm(text);
    }

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

      // create link and wire it
      link(shape, addedCallActivity);

      // provide information to support direct-editing directly
      // after object creation (must be activated additionally)
      final IDirectEditingInfo directEditingInfo = getFeatureProvider().getDirectEditingInfo();
      // set container shape for direct editing after object creation
      directEditingInfo.setMainPictogramElement(containerShape);
      // set shape and graphics algorithm where the editor for
      // direct editing shall be opened after object creation
      directEditingInfo.setPictogramElement(shape);
      directEditingInfo.setGraphicsAlgorithm(text);
    }

    {
      final Shape shape = peCreateService.createShape(containerShape, false);
      final Image image = gaService.createImage(shape, getIcon());
View Full Code Here

TOP

Related Classes of org.eclipse.graphiti.features.IDirectEditingInfo

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.