Examples of SapphireDiagramEditorPagePart


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

        refreshEnablement();
    }
   
    private void refreshEnablement()
    {
        final SapphireDiagramEditorPagePart diagramEditorPagePart = getPart().nearest( SapphireDiagramEditorPagePart.class );
        setEnabled( diagramEditorPagePart.getZoomLevel() < diagramEditorPagePart.getMaxZoomLevel() );
    }
View Full Code Here

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

    }
   
    @Override
    protected Object run( final Presentation context )
    {
        final SapphireDiagramEditorPagePart diagramEditorPagePart = getPart().nearest( SapphireDiagramEditorPagePart.class );
        diagramEditorPagePart.setZoomLevel( diagramEditorPagePart.getZoomLevel() + 25 );

        return null;
    }
View Full Code Here

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

                      final ActionHandlerDef def )
    {
      super.init(action, def);
      if (action.getType() == SapphireActionType.TOGGLE)
      {
        SapphireDiagramEditorPagePart diagramPart = (SapphireDiagramEditorPagePart)this.getPart();
        setChecked(diagramPart.isShowGuides());
      }
    }
View Full Code Here

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

    }
       
  @Override
  protected Object run(Presentation context)
  {
    SapphireDiagramEditorPagePart diagramPart = (SapphireDiagramEditorPagePart)this.getPart();
    boolean showGuides = !diagramPart.isShowGuides();
    diagramPart.setShowGuides(showGuides);
    return null;
  }
View Full Code Here

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

    }
   
    @Override
    protected Object run( Presentation context )
    {
        final SapphireDiagramEditorPagePart diagramEditorPart = getPart().nearest( SapphireDiagramEditorPagePart.class );

        diagramEditorPart.setZoomLevel( 100 );

        return null;
    }
View Full Code Here

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

  {
    refreshDirtyState();
  }

    private void handleDiagramPageEvent(DiagramPageEvent event) {
      SapphireDiagramEditorPagePart diagramPart = (SapphireDiagramEditorPagePart)event.part();
      switch(event.getDiagramPageEventType()) {
        case GridStateChange:
          setGridVisible(diagramPart.isGridVisible());
          break;
        case GuideStateChange:
          setGuidesVisible(diagramPart.isShowGuides());
          break;
        case DiagramSave:
          save();
          break;
        default:
View Full Code Here

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

                      final ActionHandlerDef def )
    {
        super.init( action, def );
       
        final ISapphirePart part = getPart();
        SapphireDiagramEditorPagePart editorPart = part.nearest(SapphireDiagramEditorPagePart.class);
        editorPart.attach
        (
            new FilteredListener<SelectionChangedEvent>()
            {
                @Override
                protected void handleTypedEvent( final SelectionChangedEvent event )
View Full Code Here

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

        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

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

{

  @Override
  protected Object run(Presentation context)
  {   
    SapphireDiagramEditorPagePart editorPart = context.part().nearest(SapphireDiagramEditorPagePart.class);
    editorPart.selectAll();
    return null;
  }
View Full Code Here

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

                    Element model = (Element)reference.target();
                    if (model == null)
                    {
                        if (reference.text() != null)
                        {
                            SapphireDiagramEditorPagePart diagramEditorPart = getDiagramEditor();
                            DiagramNodePart targetNode = diagramEditorPart.getNode(reference.text());
                            if (targetNode != null)
                            {
                                model = targetNode.getLocalModelElement();
                            }
                        }                       
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.