overwrite menu command

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

overwrite menu command

Michael Strupp
Hello ImageJ community

I'm looking for a way to overwrite a menu command, because I need to modify the functionality of the scrollingtool(hand) of imagej.
Maybe there is an event which can be catched after the scrollingtool gets activated by the user.
Does anybody know how to do this?

Kind regards,
Michael

--
Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss für nur 17,95 Euro/mtl.!* http://dslspecial.gmx.de/freedsl-surfflat/?ac=OM.AD.PD003K11308T4569a
Reply | Threaded
Open this post in threaded view
|

Re: overwrite menu command

Albert Cardona
Hi Michael,

> Hello ImageJ community
>
> I'm looking for a way to overwrite a menu command, because I need to modify the functionality of the scrollingtool(hand) of imagej.
> Maybe there is an event which can be catched after the scrollingtool gets activated by the user.
> Does anybody know how to do this?
>  


You have to extend the ij.gui.ImageCanvas and override the
mousePressed/mouseDragged/mouseReleased methods to read from
Toolbar.getToolID() == Toolbar.HAND, and then do what you want with it.

Then just create ImageWindow instances with that extended canvas and the
ImagePlus of interest.

Albert

--
Albert Cardona
http://albert.rierol.net