ij.plugin.MacroInstaller Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ij Show documentation
Show all versions of ij Show documentation
ImageJ is an open source Java image processing program inspired by NIH Image for the Macintosh.
package ij.plugin;
import java.awt.*;
import java.io.*;
import java.awt.event.*;
import ij.*;
import ij.gui.*;
import ij.macro.*;
import ij.text.*;
import ij.util.Tools;
import ij.io.*;
import ij.macro.MacroConstants;
import ij.plugin.frame.*;
import java.util.*;
/** 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. */
public class MacroInstaller implements PlugIn, MacroConstants, ActionListener {
public static final int MAX_SIZE = 28000, MAX_MACROS=100, XINC=10, YINC=18;
public static final char commandPrefix = '^';
static final String commandPrefixS = "^";
static final int MACROS_MENU_COMMANDS = 7; // number of commands in Plugins>Macros submenu
private int[] macroStarts;
private String[] macroNames;
private MenuBar mb = new MenuBar();
private int nMacros;
private Program pgm;
private boolean firstEvent = true;
private String shortcutsInUse;
private int inUseCount;
private int nShortcuts;
private int toolCount;
private String text;
private String anonymousName;
private Menu macrosMenu;
private int autoRunCount, autoRunAndHideCount;
private boolean openingStartupMacrosInEditor;
private boolean installTools = true;
private static String defaultDir, fileName;
private static MacroInstaller instance, listener;
private Thread macroToolThread;
private ArrayList
© 2015 - 2024 Weber Informatics LLC | Privacy Policy