Package ij.plugin.frame

Examples of ij.plugin.frame.Editor


                MacroInstaller mi = new MacroInstaller();
                label = label.substring(0, label.length()-1) + ".txt";
                path = "/macros/"+label;
        if (IJ.shiftKeyDown()) {
          String macros = mi.openFromIJJar(path);
                    Editor ed = new Editor();
                    ed.setSize(350, 300);
                    ed.create(label, macros);
                  IJ.setKeyUp(KeyEvent.VK_SHIFT);
        } else
          mi.installFromIJJar(path);
            } else {
                // load from ImageJ/macros/toolsets
View Full Code Here


      compileAndRun(arg);
   }
  
  void edit() {
    if (open("", "Open macro or plugin")) {
      Editor ed = (Editor)IJ.runPlugIn("ij.plugin.frame.Editor", "");
      if (ed!=null) ed.open(dir, name);
    }
  }
View Full Code Here

    }
    if (sb!=null) {
      if (install)
        (new MacroInstaller()).install(new String(sb));
      else
        (new Editor()).create(urlString, new String(sb));
    }
  }
View Full Code Here

        g.dispose();
        WindowManager.checkForDuplicateName = true;
        new ImagePlus("Clipboard", bi).show();
      } else if (textSupported) {
        String text = (String)transferable.getTransferData(DataFlavor.stringFlavor);
        Editor ed = new Editor();
        ed.setSize(600, 300);
        ed.create("Clipboard", text);
        IJ.showStatus("");
      } else
        IJ.error("Unable to find an image on the system clipboard");
    } catch (Throwable t) {
      IJ.showStatus(""+t);
View Full Code Here

      createPlugin(name, type, arg);
    }
   
  public void createMacro(String name) {
    int options = (monospaced?Editor.MONOSPACED:0)+(menuBar?Editor.MENU_BAR:0);
    ed = new Editor(rows, columns, 0, options);
    if (type==MACRO && !name.endsWith(".txt"))
      name = SaveDialog.setExtension(name, ".txt");
    else if (type==JAVASCRIPT && !name.endsWith(".js")) {
      if (name.equals("Macro")) name = "script";
      name = SaveDialog.setExtension(name, ".js");
View Full Code Here

        new ImagePlus("Clipboard", bi).show();
      } else if (textSupported) {
        String text = (String)transferable.getTransferData(DataFlavor.stringFlavor);
        if (IJ.isMacintosh())
          text = Tools.fixNewLines(text);
        Editor ed = new Editor();
        ed.setSize(600, 300);
        ed.create("Clipboard", text);
        IJ.showStatus("");
      } else
        IJ.error("Unable to find an image on the system clipboard");
    } catch (Throwable e) {
      IJ.handleException(e);
View Full Code Here

    Frame frame = WindowManager.getFrontWindow();
    if (frame!=null && (frame instanceof TextWindow)) {
      TextPanel tp = ((TextWindow)frame).getTextPanel();
      tp.saveAs("");
    } else if (frame!=null && (frame instanceof Editor)) {
      Editor ed = (Editor)frame;
      ed.saveAs();
    } else {
      IJ.error("Save As Text",
        "This command requires a TextWindow, such\n"
        + "as the \"Log\" window, or an Editor window. Use\n"
        + "File>Save>Text Image to save an image as text.");
View Full Code Here

                MacroInstaller mi = new MacroInstaller();
                label = label.substring(0, label.length()-1) + ".txt";
                path = "/macros/"+label;
        if (IJ.shiftKeyDown()) {
          String macros = mi.openFromIJJar(path);
                    Editor ed = new Editor();
                    ed.setSize(350, 300);
                    ed.create(label, macros);
                  IJ.setKeyUp(KeyEvent.VK_SHIFT);
        } else
          mi.installFromIJJar(path);
            } else {
                // load from ImageJ/macros/toolsets
View Full Code Here

      compileAndRun(arg);
   }
  
  void edit() {
    if (open("", "Open macro or plugin")) {
      Editor ed = (Editor)IJ.runPlugIn("ij.plugin.frame.Editor", "");
      if (ed!=null) ed.open(dir, name);
    }
  }
View Full Code Here

      compileAndRun(arg);
   }
  
  void edit() {
    if (open("", "Open macro or plugin")) {
      Editor ed = (Editor)IJ.runPlugIn("ij.plugin.frame.Editor", "");
      if (ed!=null) ed.open(dir, name);
    }
  }
View Full Code Here

TOP

Related Classes of ij.plugin.frame.Editor

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.