A tool with icon from a plugin
Posted by
Yuekan Jiao-2 on
Nov 27, 2011; 4:59am
URL: http://imagej.273.s1.nabble.com/A-tool-with-icon-from-a-plugin-tp3682428.html
Hello every one,
I am writing a plugin that uses mouse listening. One thing I want to
do is create a tool onto the toolbar - the plugin responds to the
mouse actions (clicking, dragging etc.) on an image when the created
tool is selected, and does not when other tools (area selection,
drawing etc.) are selected. I am able to do this by using the
commented-out sentences in the mouse_listener plugin
int tool = Toolbar.getInstance().addTool("Test Tool");
Toolbar.getInstance().setTool(tool);
and checking if the selected tool is the tool created ("Test Tool").
My question is how I can put an icon (just 1-2 letters) on the tool
created. A icon can be created with a tool macro but running the macro
pushes the default ImageJ macro tools aside.
Thank you.
Yuekan Jiao, PhD
Victoria, BC
[hidden email]