Login  Register

Re: How can I get input from an event handler?

Posted by Robert Dougherty on Aug 18, 2014; 3:27am
URL: http://imagej.273.s1.nabble.com/How-can-I-get-input-from-an-event-handler-tp5009243p5009245.html

Avital,

Wayne has a nice example at http://imagej.nih.gov/ij/plugins/mouse-listener.html.  To listen for mouse clicks on an ImagePlus, the trick is to get the ImageCanvas for that ImagePlus and add a MouseListener for the canvas to "this".

Bob

On Aug 17, 2014, at 7:46 AM, Avital Steinberg <[hidden email]> wrote:

> Hi,
> I have an event handler which gets input from mouse clicks. It's in a class
> (class Mouse_Listener) that implents the interfaces PlugInFilter,
> MouseListener and MouseMotionListener. I'm writing a plugin which is in
> another class in the same package. (it implements the PlugIn interface) How
> can I extract the information from the Mouse_Listener class, so that I can
> use it in the other class?
>
> Thank you,
> Avital
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

Robert P. Dougherty
President
OptiNav, Inc.
1414 127th Pl NE #106
Bellevue, WA 98005
(425) 891-4883
FAX (425) 467-1119
[hidden email]
www.optinav. com

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html