ij.macro
Class MacroRunner

java.lang.Object
  extended by ij.macro.MacroRunner
All Implemented Interfaces:
Runnable

public class MacroRunner
extends Object
implements Runnable

This class runs macros in a separate thread.


Constructor Summary
MacroRunner()
          Create a MacrRunner.
MacroRunner(File file)
          Create a new object that interprets a macro file using a separate thread.
MacroRunner(Program pgm, int address, String name)
          Create a new object that runs a tokenized macro in a separate thread.
MacroRunner(Program pgm, int address, String name, Editor editor)
          Create a new object that runs a tokenized macro in debug mode if 'editor' is not null.
MacroRunner(Program pgm, int address, String name, String argument)
          Create a new object that runs a tokenized macro in a separate thread, passing a string argument.
MacroRunner(String macro)
          Create a new object that interprets macro source in a separate thread.
MacroRunner(String macro, Editor editor)
          Create a new object that interprets macro source in debug mode if 'editor' is not null.
MacroRunner(String macro, String argument)
          Create a new object that interprets macro source in a separate thread, and also passing a string argument.
 
Method Summary
 Thread getThread()
           
 void run()
           
 void run(Program pgm, int address, String name)
          Runs a tokenized macro on the current thread.
 void runShortcut(Program pgm, int address, 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 MacrRunner.


MacroRunner

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


MacroRunner

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


MacroRunner

public MacroRunner(String macro,
                   String argument)
Create a new object that interprets macro source in a separate thread, and also passing a string argument.


MacroRunner

public MacroRunner(File file)
Create a new object that interprets a macro file using a separate thread.


MacroRunner

public MacroRunner(Program pgm,
                   int address,
                   String name)
Create a new object that runs a tokenized macro in a separate thread.


MacroRunner

public MacroRunner(Program pgm,
                   int address,
                   String name,
                   String argument)
Create a new object that runs a tokenized macro in a separate thread, passing a string argument.


MacroRunner

public MacroRunner(Program pgm,
                   int address,
                   String name,
                   Editor editor)
Create a new object that runs a tokenized macro in debug mode if 'editor' is not null.

Method Detail

runShortcut

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


run

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


getThread

public Thread getThread()

run

public void run()
Specified by:
run in interface Runnable


Copyright © 1997–2014 NIH. All rights reserved.