Package es.iiia.shapeeditor

Examples of es.iiia.shapeeditor.ShapeEditor


  public static final String ID = "es.iiia.sgi.handlers.saveas";
 
  public Object execute(ExecutionEvent event) throws ExecutionException {   
    // save depending on active editor
    if (HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().getActiveEditor() != null) {
      ShapeEditor se = (ShapeEditor) HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().getActiveEditor();
      se.doSaveAs();
      LoadHandler.addRecentFile(ShapeGrammarModel.ACTIVE_SHAPE_GRAMMAR.getCurrentFileName());
    } else {
      // TODO: Be sure this does not happen!!!
    }
   
View Full Code Here


        try {
          // get Editor ID (it can be specific for different geometry)
          String editorID = model.getEditorId();
         
          // open editor         
          ShapeEditor editor = (ShapeEditor) page.openEditor(input, editorID == null ? ShapeEditor.ID : editorID);
         
          // hook event listener on editor
          model.addPropertyChangeListener(editor);
         
          // open properties
View Full Code Here

    // now open editor
    ShapeGrammarInput input = new ShapeGrammarInput(shape);
    try {
      // opens editor
      ShapeEditor editor = (ShapeEditor) workbenchWindow.getActivePage()
          .openEditor(
              input,
              shape.getEditorId() == null ? ShapeEditor.ID
                  : shape.getEditorId());
View Full Code Here

    //combo.setBackground(ColorConstants.Bold);
    combo.setToolTipText("Zoom Level");

    combo.addModifyListener(new ModifyListener() {
      public void modifyText(final ModifyEvent e) {
        ShapeEditor editor = ((ShapeEditor) PlatformUI
            .getWorkbench().getActiveWorkbenchWindow()
              .getActivePage().getActiveEditor());

        String txval = combo.getItem(combo.getSelectionIndex());
        txval = txval.replace('%', ' ').trim();
        int val = Integer.parseInt(txval);
       
        editor.setZoom((float) val / 100f);
        selectedIndex = combo.getSelectionIndex();
      }
    });

    return combo;
View Full Code Here

        cutAction);
  }

  @Override
  public void setActiveEditor(IEditorPart part) {
    ShapeEditor editor = (ShapeEditor) part;
    createGlobalActionHandlers(editor);

    // prepare the outline page

    NodeModel model = (NodeModel) editor.getModel();
    ShapeEditorOutlinePage outline = (ShapeEditorOutlinePage) editor
        .getContentOutlinePage(model);

    model.removePropertyChangeListener(outline);
    model.addPropertyChangeListener(outline);

    outline.repaint(editor.getModel());

    // this.fireChangeListeners(null, part);
  }
View Full Code Here

  @Override
  public void run() {
    try {
      if (ShapeClipboard.get() != null) {
        ShapeEditor editor = (ShapeEditor) workbenchWindow
            .getActivePage().getActiveEditor();
        for (GeometryModel mdl : ShapeClipboard.get()) {
          editor.getModel().addChild(mdl.clone());
        }
      }
    } catch (Exception ex) {

    }
View Full Code Here

   
  }
 
  @Override
  public void run() {
    ShapeEditor editor = (ShapeEditor) workbenchWindow.getActivePage().getActiveEditor();
    editor.deleteSelection();
  }
View Full Code Here

    workbenchWindow.getSelectionService().removeSelectionListener(this);
  }

  @Override
  public void run() {
    ShapeEditor editor = (ShapeEditor) workbenchWindow.getActivePage().getActiveEditor();
    ShapeClipboard.put(editor.getSelectedControllers());
  }
View Full Code Here

    //workbenchWindow.getSelectionService().removeSelectionListener(this);
  }
 
  @Override
  public void run() {
    ShapeEditor editor = (ShapeEditor) workbenchWindow.getActivePage().getActiveEditor();
    editor.doSave(null);
  }
View Full Code Here

    workbenchWindow.getSelectionService().removeSelectionListener(this);
  }

  @Override
  public void run() {
    ShapeEditor editor = (ShapeEditor) workbenchWindow.getActivePage().getActiveEditor();
    ShapeClipboard.put(editor.getSelectedControllers());
    for (ControllerBase ctr : editor.getSelectedControllers()) {
      editor.getModel().removeChild(ctr.getModel());
    }
    editor.getSelectedControllers().clear();
  }
View Full Code Here

TOP

Related Classes of es.iiia.shapeeditor.ShapeEditor

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.