Package es.iiia.shapegrammar.model

Examples of es.iiia.shapegrammar.model.NodeModel


    if (selection != null && selection instanceof IStructuredSelection) {
      Object obj = ((IStructuredSelection) selection).getFirstElement();
      // If we had a selection lets open the editor
      if (obj != null) {
        //ShapeModel geometry = (ShapeModel) obj;
        NodeModel model = (NodeModel) obj;
        ShapeGrammarInput input = new ShapeGrammarInput(model);
        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
          page.showView(IPageLayout.ID_PROP_SHEET);
        } catch (PartInitException e) {
          Debugger.getInstance().addMessage(e.getStackTrace());
View Full Code Here


    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

TOP

Related Classes of es.iiia.shapegrammar.model.NodeModel

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.