Package org.eclipse.sapphire.ui.diagram.editor

Examples of org.eclipse.sapphire.ui.diagram.editor.ShapeFactoryPart


  }
 
  public void refreshChildren()
  {
    List<ShapePresentation> refreshedChildren = new ArrayList<ShapePresentation>();
    ShapeFactoryPart shapeFactoryPart = (ShapeFactoryPart) part();
    if (shapeFactoryPart.visible())
    {
      for (ShapePart shapePart : shapeFactoryPart.getChildren())
      {
        ShapePresentation childPresentation = getChildShapePresentation(shapePart);
        if (childPresentation == null)
        {
          childPresentation = ShapePresentationFactory.createShapePresentation(this, shapePart, getResourceCache());
View Full Code Here


    {
      return null;
    }
    ShapeEditPart toMove = (ShapeEditPart)child;
    ShapePart toMovePart = (ShapePart)(((ShapeModel)toMove.getModel()).getSapphirePart());
    ShapeFactoryPart factoryPart = (ShapeFactoryPart)toMovePart.parent();
    List<ShapePart> childShapes = factoryPart.getChildren();

    if (!(after instanceof ShapeEditPart))
    {
         return new MoveShapeInFactoryCommand(factoryPart, toMovePart, -1);
    }
View Full Code Here

        final ISapphirePart part = getPart();
      boolean enabled = false;
     
      if (part instanceof ShapePart && part.parent() instanceof ShapeFactoryPart)
      {
        ShapeFactoryPart shapeFactory = (ShapeFactoryPart)part.parent();
        List<ShapePart> children = shapeFactory.getChildren();
        enabled = children.indexOf(part) > 0;
      }
      setEnabled( enabled );
    }
View Full Code Here

  @Override
  protected Object run(Presentation context)
  {
        final ISapphirePart part = getPart();
      ShapeFactoryPart shapeFactory = (ShapeFactoryPart)part.parent();
      Element element = part.getLocalModelElement();
      ElementList<?> list = shapeFactory.getModelElementList();
    list.moveUp(element);
    SapphireDiagramEditorPagePart editorPart = part.nearest(SapphireDiagramEditorPagePart.class);
    editorPart.setSelections(Collections.singletonList(part), true);
    refreshEnablement();
    return null;
View Full Code Here

        final ISapphirePart part = getPart();
      boolean enabled = false;
     
      if (part instanceof ShapePart && part.parent() instanceof ShapeFactoryPart)
      {
        ShapeFactoryPart shapeFactory = (ShapeFactoryPart)part.parent();
        List<ShapePart> children = shapeFactory.getChildren();
        enabled = children.indexOf(part) != -1 && children.indexOf(part) < ( children.size() - 1 ) ;
      }
      setEnabled( enabled );
    }
View Full Code Here

  @Override
  protected Object run(Presentation context)
  {
        final ISapphirePart part = getPart();
      ShapeFactoryPart shapeFactory = (ShapeFactoryPart)part.parent();
      Element element = part.getLocalModelElement();
      ElementList<?> list = shapeFactory.getModelElementList();
    list.moveDown(element);
    SapphireDiagramEditorPagePart editorPart = part.nearest(SapphireDiagramEditorPagePart.class);
    editorPart.setSelections(Collections.singletonList(part), true);
    refreshEnablement();
    return null;
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.ui.diagram.editor.ShapeFactoryPart

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.