Package org.eclipse.sapphire.ui

Examples of org.eclipse.sapphire.ui.ISapphirePart.parent()


      GraphicalEditPart editpart = getGraphicalEditPart(part);
      ISapphirePart parentPart = part.parent();
      while ((editpart == null || !editpart.isSelectable()) && parentPart != null)
      {
        editpart = getGraphicalEditPart(parentPart);
        parentPart = parentPart.parent();
      }
      if (editpart != null)
      {
        // Force a layout first.
        viewer.flush();
View Full Code Here


                  {
                      return true;
                  }
              }
             
              part = part.parent();
          }
         
      return parent != null && parent.keyPressed(event);
    }
    return false;
View Full Code Here

        SapphirePart highestUninitializedAncestor = null;
       
        while( ancestor instanceof SapphirePart && ! ( (SapphirePart) ancestor ).initialized() )
        {
            highestUninitializedAncestor = (SapphirePart) ancestor;
            ancestor = ancestor.parent();
        }
       
        if( highestUninitializedAncestor == null )
        {
            initListSelectionServiceListener();
View Full Code Here

                {
                    return;
                }
            }
           
            part = part.parent();
        }
    }
   
    private boolean handleKeyEvent( final Event event,
                                    final SapphireActionGroup groupOfActions,
View Full Code Here

    private void refreshEnablement()
    {
        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;
      }
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);
View Full Code Here

    private void refreshEnablement()
    {
        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 ) ;
      }
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);
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.