Module ij
Package ij.macro

Class MacroRunner

  • All Implemented Interfaces:
    java.lang.Runnable

    public class MacroRunner
    extends java.lang.Object
    implements java.lang.Runnable
    This class runs macros in a separate thread.
    • Constructor Summary

      Constructors 
      Constructor Description
      MacroRunner()
      Create a MacroRunner.
      MacroRunner​(Program pgm, int address, java.lang.String name)
      Runs a tokenized macro in a separate thread.
      MacroRunner​(Program pgm, int address, java.lang.String name, Editor editor)
      Runs a tokenized macro in debug mode if 'editor' is not null.
      MacroRunner​(Program pgm, int address, java.lang.String name, java.lang.String argument)
      Runs a tokenized macro in a separate thread, passing a string argument.
      MacroRunner​(java.io.File file)
      Interprets a macro file in a separate thread.
      MacroRunner​(java.lang.String macro)
      Create a new object that interprets macro source in a separate thread.
      MacroRunner​(java.lang.String macro, Editor editor)
      Create a new object that interprets macro source in debug mode if 'editor' is not null.
      MacroRunner​(java.lang.String macro, java.lang.String argument)
      Interprets macro source in a separate thread, passing a string argument.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Thread getThread()  
      void run()
      Used to run the macro code in 'macro' on a separate thread.
      void run​(Program pgm, int address, java.lang.String name)
      Runs a tokenized macro on the current thread.
      void runShortcut​(Program pgm, int address, java.lang.String name)
      Runs tokenized macro on current thread if pgm.queueCommands is true.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MacroRunner

        public MacroRunner()
        Create a MacroRunner.
      • MacroRunner

        public MacroRunner​(java.lang.String macro)
        Create a new object that interprets macro source in a separate thread.
      • MacroRunner

        public MacroRunner​(java.lang.String macro,
                           Editor editor)
        Create a new object that interprets macro source in debug mode if 'editor' is not null.
      • MacroRunner

        public MacroRunner​(java.lang.String macro,
                           java.lang.String argument)
        Interprets macro source in a separate thread, passing a string argument.
      • MacroRunner

        public MacroRunner​(java.io.File file)
        Interprets a macro file in a separate thread.
      • MacroRunner

        public MacroRunner​(Program pgm,
                           int address,
                           java.lang.String name)
        Runs a tokenized macro in a separate thread.
      • MacroRunner

        public MacroRunner​(Program pgm,
                           int address,
                           java.lang.String name,
                           java.lang.String argument)
        Runs a tokenized macro in a separate thread, passing a string argument.
      • MacroRunner

        public MacroRunner​(Program pgm,
                           int address,
                           java.lang.String name,
                           Editor editor)
        Runs a tokenized macro in debug mode if 'editor' is not null.
    • Method Detail

      • runShortcut

        public void runShortcut​(Program pgm,
                                int address,
                                java.lang.String name)
        Runs tokenized macro on current thread if pgm.queueCommands is true.
      • run

        public void run​(Program pgm,
                        int address,
                        java.lang.String name)
        Runs a tokenized macro on the current thread.
      • getThread

        public java.lang.Thread getThread()
      • run

        public void run()
        Used to run the macro code in 'macro' on a separate thread.
        Specified by:
        run in interface java.lang.Runnable