Module ij
Package ij.plugin

Class MacroInstaller

java.lang.Object
ij.plugin.MacroInstaller
All Implemented Interfaces:
MacroConstants, PlugIn, ActionListener, EventListener

public class MacroInstaller extends Object implements PlugIn, MacroConstants, ActionListener
This plugin implements the Plugins/Macros/Install Macros command. It is also used by the Editor class to install macros in menus and by the ImageJ class to install macros at startup.
  • Field Details

  • Constructor Details

    • MacroInstaller

      public MacroInstaller()
  • Method Details

    • run

      public void run(String path)
      Description copied from interface: PlugIn
      This method is called when the plugin is loaded. 'arg', which may be blank, is the argument specified for this plugin in IJ_Props.txt.
      Specified by:
      run in interface PlugIn
    • install

      public int install(String text)
    • install

      public int install(String text, Menu menu)
    • installFile

      public void installFile(String path)
    • installTool

      public void installTool(String path)
    • installLibrary

      public void installLibrary(String path)
    • installFromJar

      public static void installFromJar(String path)
      Installs a macro set contained in ij.jar.
    • installFromIJJar

      public void installFromIJJar(String path)
      Installs a macro set contained in ij.jar.
    • installSingleTool

      public void installSingleTool(String text)
    • openFromIJJar

      public String openFromIJJar(String path)
      Returns a text file contained in ij.jar.
    • runMacroTool

      public boolean runMacroTool(String name)
    • runMenuTool

      public boolean runMenuTool(String name, String command)
    • runMacroCommand

      public static boolean runMacroCommand(String name)
      Runs a command in the Plugins/Macros submenu on the current thread.
    • isMacroCommand

      public static boolean isMacroCommand(String name)
      Returns 'true' if the macro command 'name' exists.
    • runMacroShortcut

      public static void runMacroShortcut(String name)
    • runMacro

      public void runMacro(String name)
    • runMacro

      public void runMacro(String name, Editor editor)
    • getMacroCount

      public int getMacroCount()
    • getProgram

      public Program getProgram()
    • isAutoRunAndHide

      public boolean isAutoRunAndHide()
      Returns true if an "AutoRunAndHide" macro was run/installed.
    • setFileName

      public void setFileName(String fileName)
    • getFileName

      public static String getFileName()
    • actionPerformed

      public void actionPerformed(ActionEvent evt)
      Specified by:
      actionPerformed in interface ActionListener
    • installStartupMacros

      public void installStartupMacros(String path)
      Installs startup macros and runs AutoRun macro on current thread.
    • autoRun

      public static void autoRun()
      Runs the StartupMacros AutoRun macro on the current thread.
    • toString

      public String toString()
      Overrides:
      toString in class Object