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

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


        public boolean applicable( final ServiceContext context )
        {
          ISapphirePart part = context.find(ISapphirePart.class);
          if (part instanceof SapphireDiagramEditorPagePart)
          {
            SapphireDiagramEditorPagePart diagramPagePart = (SapphireDiagramEditorPagePart)part;
            DiagramEditorPageDef pageDef = diagramPagePart.getPageDef();
            if (pageDef.getLayoutPersistence().content() == LayoutPersistence.SIDE_BY_SIDE)
            {
              return true;
            }
          }
View Full Code Here


        public boolean applicable( final ServiceContext context )
        {
          ISapphirePart part = context.find(ISapphirePart.class);
          if (part instanceof SapphireDiagramEditorPagePart)
          {
            SapphireDiagramEditorPagePart diagramPagePart = (SapphireDiagramEditorPagePart)part;
            DiagramEditorPageDef pageDef = diagramPagePart.getPageDef();
            if (pageDef.getLayoutPersistence().content() == LayoutPersistence.PROJECT)
            {
              return true;
            }
          }
View Full Code Here

        public boolean applicable( final ServiceContext context )
        {
            ISapphirePart part = context.find(ISapphirePart.class);
            if (part instanceof SapphireDiagramEditorPagePart)
            {
                SapphireDiagramEditorPagePart diagramPagePart = (SapphireDiagramEditorPagePart)part;
                DiagramEditorPageDef pageDef = diagramPagePart.getPageDef();
                if (pageDef.getConnectionServiceType().content() == ConnectionServiceType.STANDARD)
                {
                    return true;
                }
            }
View Full Code Here

  @Override
  public void init(SapphireAction action, ActionHandlerDef def)
  {
    super.init(action, def);

        SapphireDiagramEditorPagePart part = (SapphireDiagramEditorPagePart) getPart();
    part.attach(new Listener()
    {
      @Override
      public void handle(final Event e)
      {
                if( e instanceof SelectionChangedEvent )
View Full Code Here

  }

    @Override
    public boolean isEnabled()
    {
        final SapphireDiagramEditorPagePart page = (SapphireDiagramEditorPagePart) getPart();
       
        for( ISapphirePart selectedPart : page.getSelections() )
        {
            if( selectedPart instanceof DiagramConnectionPart )
            {
                if( ! ( (DiagramConnectionPart) selectedPart ).getBendpoints().isEmpty() )
                {
View Full Code Here

    }

    @Override
    protected Object run( final Presentation context)
    {
        final SapphireDiagramEditorPagePart page = (SapphireDiagramEditorPagePart) getPart();
       
        for( ISapphirePart selectedPart : page.getSelections() )
        {
            if( selectedPart instanceof DiagramConnectionPart )
            {
                ( (DiagramConnectionPart) selectedPart ).removeAllBendpoints();
            }
View Full Code Here

      for (DiagramConnectionPart connPart : this.selectedConnectionParts)
      {
        connPart.detach(this.connectionPartListener);
      }
     
      SapphireDiagramEditorPagePart pagePart = (SapphireDiagramEditorPagePart) getPart();
      List<DiagramConnectionPart> newSelectedParts = new ArrayList<DiagramConnectionPart>();
      for (ISapphirePart part : pagePart.getSelections())
      {
        if (part instanceof DiagramConnectionPart)
        {
          newSelectedParts.add((DiagramConnectionPart)part);
          ((DiagramConnectionPart) part).attach(this.connectionPartListener);
View Full Code Here

  @Override
  protected Object run(Presentation context)
  {
      final Element element = this.factory.getModelElementList().insert( this.type );
    final ShapePart shapePart = this.factory.getShapePart( element );
    SapphireDiagramEditorPagePart diagramPart = this.nodePart.nearest(SapphireDiagramEditorPagePart.class);
    if (shapePart.isEditable())
    {
      diagramPart.selectAndDirectEdit(shapePart);
    }
    return null;
  }
View Full Code Here

      {
        enabled = true;
      }
      else
      {
        SapphireDiagramEditorPagePart diagramPart = part.nearest(SapphireDiagramEditorPagePart.class);
        List<ISapphirePart> selectedParts = diagramPart.getSelections();
        for (ISapphirePart selectedPart : selectedParts)
        {
          if (selectedPart instanceof DiagramNodePart || selectedPart instanceof ShapePart ||
              (selectedPart instanceof DiagramConnectionPart && ((DiagramConnectionPart)selectedPart).removable()))
          {
View Full Code Here

            ShapePart shapePart = (ShapePart)part;
            deleteShapePart(shapePart);
        }
        else if (part instanceof SapphireDiagramEditorPagePart)
        {
          SapphireDiagramEditorPagePart pagePart = (SapphireDiagramEditorPagePart)part;
          List<ISapphirePart> parts = new ArrayList<ISapphirePart>();
          parts.addAll(pagePart.getSelections());
          for (ISapphirePart selectedPart : parts)
          {
            if (selectedPart instanceof DiagramConnectionPart)
            {
                    DiagramConnectionPart connPart = (DiagramConnectionPart)selectedPart;
View Full Code Here

TOP

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

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.