Login  Register

ActionListeners for radio buttons in GenericDialog?

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

ActionListeners for radio buttons in GenericDialog?

JonNathan
21 posts
I'd like to have RadioButton selections result in a dialogItemChanged event -- has anyone come up with an easy way to do this?I'm writing a plugin that uses the ExtendedPlugInFilter interface with the live preview checkbox feature.  The plugin uses the GenericDialog class, and employs radio buttons for part of its UI.  When looking at the source code (version 1.48m) for the GenericDialog class, I noticed that there are no Listeners (Action or otherwise) associated with the addRadioButtonGroup method, even though all the other types of UI components (ComboBox, Slider, TextField, etc.) employ Listeners of various types.  It seems RadioButtons get short shrift here...  

Any suggestions?  Or am I missing some functionality already written into the GenericDialog class?

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: ActionListeners for radio buttons in GenericDialog?

Rasband, Wayne (NIH/NIMH) [E]
1064 posts
On Dec 31, 2013, at 11:59 AM, JonNathan wrote:

> I'd like to have RadioButton selections result in a dialogItemChanged event -- has anyone come up with an easy way to do this?I'm writing a plugin that uses the ExtendedPlugInFilter interface with the live preview checkbox feature.  The plugin uses the GenericDialog class, and employs radio buttons for part of its UI.  When looking at the source code (version 1.48m) for the GenericDialog class, I noticed that there are no Listeners (Action or otherwise) associated with the addRadioButtonGroup method, even though all the other types of UI components (ComboBox, Slider, TextField, etc.) employ Listeners of various types.  It seems RadioButtons get short shrift here...

Radio buttons in GenericDialogs cause dialogItemChanged events in the latest daily build (1.48p1). There is an example at

   http://imagej.nih.gov/ij/plugins/radio-buttons/

-wayne

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