ini.trakem2.utils
Class ProjectToolbar

java.lang.Object
  extended by ini.trakem2.utils.ProjectToolbar
All Implemented Interfaces:
java.awt.event.MouseListener, java.util.EventListener

public class ProjectToolbar
extends java.lang.Object
implements java.awt.event.MouseListener


Field Summary
static int BRUSH
          A tool to align objects from two different layers.
static int PEN
          A tool to draw/edit.
static int PENCIL
          A tool to draw freehand and then autoconvert to Bezier curves.
static int SELECT
          A tool to select and move Displayable objects (black arrow).
static int WAND
           
 
Method Summary
static void destroy()
           
static int getBrushSize()
          Hacks on the ij.gui.Toolbar to get the proper value, and defaults to 15 if the value is absurd.
static int getForegroundColorValue()
          The luminance of the foreground color.
static int getToolId()
           
static boolean isDataEditTool(int tool)
           
static void keyPressed(java.awt.event.KeyEvent ke)
           
 void mouseClicked(java.awt.event.MouseEvent me)
           
 void mouseEntered(java.awt.event.MouseEvent me)
           
 void mouseExited(java.awt.event.MouseEvent me)
           
 void mousePressed(java.awt.event.MouseEvent me)
           
 void mouseReleased(java.awt.event.MouseEvent me)
           
static int setBrushSize(int inc)
          Change the brush size by the given length increment (in pixel units).
static void setImageJToolbar()
          Restore ImageJ's toolbar.
static void setProjectToolbar()
          Set macro buttons for TrakEM2 in ImageJ's toolbar
static void setTool(int t)
           
static void toolChanged(java.lang.String tool_name)
          Called by macro tools.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SELECT

public static final int SELECT
A tool to select and move Displayable objects (black arrow).

See Also:
Constant Field Values

PENCIL

public static final int PENCIL
A tool to draw freehand and then autoconvert to Bezier curves.

See Also:
Constant Field Values

PEN

public static final int PEN
A tool to draw/edit.

See Also:
Constant Field Values

BRUSH

public static final int BRUSH
A tool to align objects from two different layers.

See Also:
Constant Field Values

WAND

public static final int WAND
See Also:
Constant Field Values
Method Detail

setProjectToolbar

public static void setProjectToolbar()
Set macro buttons for TrakEM2 in ImageJ's toolbar


toolChanged

public static void toolChanged(java.lang.String tool_name)
Called by macro tools.


setImageJToolbar

public static void setImageJToolbar()
Restore ImageJ's toolbar.


destroy

public static void destroy()

setTool

public static void setTool(int t)

getToolId

public static int getToolId()

mousePressed

public void mousePressed(java.awt.event.MouseEvent me)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent me)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent me)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent me)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent me)
Specified by:
mouseExited in interface java.awt.event.MouseListener

getBrushSize

public static int getBrushSize()
Hacks on the ij.gui.Toolbar to get the proper value, and defaults to 15 if the value is absurd.


setBrushSize

public static int setBrushSize(int inc)
Change the brush size by the given length increment (in pixel units). A lower limit of 1 pixel is preserved. Returns the value finally accepted for brush size.


keyPressed

public static void keyPressed(java.awt.event.KeyEvent ke)

isDataEditTool

public static boolean isDataEditTool(int tool)

getForegroundColorValue

public static final int getForegroundColorValue()
The luminance of the foreground color.