Package ij.gui

Class Toolbar

    • Constructor Detail

      • Toolbar

        public Toolbar()
    • Method Detail

      • init

        public void init()
      • getToolId

        public static int getToolId()
        Returns the ID of the current tool (Toolbar.RECTANGLE, Toolbar.OVAL, etc.).
      • getToolId

        public int getToolId​(String name)
        Returns the ID of the tool whose name (the description displayed in the status bar) starts with the specified string, or -1 if the tool is not found.
      • getInstance

        public static Toolbar getInstance()
        Returns a reference to the ImageJ toolbar.
      • setTool

        public boolean setTool​(String name)
      • getToolName

        public static String getToolName()
        Returns the name of the current tool.
      • setTool

        public void setTool​(int tool)
      • getColor

        public Color getColor()
        Deprecated.
        replaced by getForegroundColor()
      • setColor

        public void setColor​(Color c)
        Deprecated.
        replaced by setForegroundColor()
      • getForegroundColor

        public static Color getForegroundColor()
      • setForegroundColor

        public static void setForegroundColor​(Color c)
      • getBackgroundColor

        public static Color getBackgroundColor()
      • setBackgroundColor

        public static void setBackgroundColor​(Color c)
      • getBrushSize

        public static int getBrushSize()
        Returns the size of the selection brush tool, or 0 if the brush tool is not enabled.
      • setBrushSize

        public static void setBrushSize​(int size)
        Set the size of the selection brush tool, in pixels.
      • getRoundRectArcSize

        public static int getRoundRectArcSize()
        Returns the rounded rectangle arc size, or 0 if the rounded rectangle tool is not enabled.
      • setRoundRectArcSize

        public static void setRoundRectArcSize​(int size)
        Sets the rounded rectangle corner diameter (pixels).
      • getMultiPointMode

        public static boolean getMultiPointMode()
        Returns 'true' if the multi-point tool is enabled.
      • getRectToolType

        public static int getRectToolType()
        Returns the rectangle tool type (RECT_ROI, ROUNDED_RECT_ROI or ROTATED_RECT_ROI).
      • getOvalToolType

        public static int getOvalToolType()
        Returns the oval tool type (OVAL_ROI, ELLIPSE_ROI or BRUSH_ROI).
      • getButtonSize

        public static int getButtonSize()
        Returns the button width (button spacing).
      • restorePreviousTool

        public void restorePreviousTool()
      • restoreTools

        public static void restoreTools()
      • addTool

        public int addTool​(String toolTip)
        Adds a tool to the toolbar. The 'toolTip' string is displayed in the status bar when the mouse is over the tool icon. The 'toolTip' string may include icon (http://imagej.nih.gov/ij/developer/macro/macros.html#tools). Returns the tool ID, or -1 if all tool slots are in use.
      • addMacroTool

        public void addMacroTool​(String name,
                                 MacroInstaller macroInstaller,
                                 int id)
        Used by the MacroInstaller class to install a set of macro tools.
      • addMacroTool

        public void addMacroTool​(String name,
                                 MacroInstaller macroInstaller)
        Used by the MacroInstaller class to add a macro tool to the toolbar.
      • removeMacroTools

        public static void removeMacroTools()
      • addPlugInTool

        public static void addPlugInTool​(PlugInTool tool)
        Adds a plugin tool to the first available toolbar slot, or to the last slot if the toolbar is full.
      • getPlugInTool

        public static PlugInTool getPlugInTool()
      • installStartupTools

        public void installStartupTools()
      • showCode

        public static void showCode​(String title,
                                    String code)
      • installStartupMacrosTools

        public static boolean installStartupMacrosTools()
      • getNumTools

        public int getNumTools()