Posted by
Jeff Hardin on
Jul 23, 2009; 1:27pm
URL: http://imagej.273.s1.nabble.com/Intercepting-keystrokes-in-plugin-tp3691678p3691679.html
Hi folks,
Oops! I meant, of course, "... to magnify or reduce the ImageWindow
using the up and down arrow keys..."
Cheers,
Jeff
----------------------------------------------
Jeff Hardin
Professor and Chair, Department of Zoology
Director, Biology Core Curriculum
University of Wisconsin
1117 W. Johnson St.
Madison, WI 53706
voice: (608) 262-9634
fax: (608) 262-7319
email:
[hidden email]
web page:
http://worms.zoology.wisc.eduOn Jul 22, 2009, at 11:00 PM, IMAGEJ automatic digest system wrote:
> Date: Wed, 22 Jul 2009 00:39:42 -0500
> From: Jeff Hardin <
[hidden email]>
> Subject: Intercepting keystrokes in plugin
>
> Hello Imagers,
>
> I wrote a plugin a long time ago (for browsing 4d datasets from disc)
> that extends the ImageWindow class, and creates a KeyListener to act
> on the up, down, left, and right arrow keys. This worked well before
> the default behavior was to magnify or reduce the ImageWindow using
> the right and left arrow keys, as in more recent versions of ImageJ.
> Now the plugin reads the key stroke and acts on it, but the key stroke
> is passed to ImageJ, which then magnifies or reduces the ImageWindow.
> I guess I'm stupid, but I don't see how to prevent this.
>
> Any ideas would be deeply appreciated!
>
> Cheers,
>
> Jeff