This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I need to use RadioMenuItem not current CeckBox one. So I tried to implement my own RadioBooleanStateAction. But it is not so easy (see all funct. in org.openide.awt.Action class). So as I do not want to duplicate all that stuff I request some support in OpenIDE! Regards, Hanz ;-))
Hanzi, please describe in greater detail what you request and why. (keep in mind that I'm a bit slower so make your comment simple, stupid :-)
OK. If I use BooleanStateAction it displays boolean state action as JComboBoxMenuItem. (It uses org.openide.awt.Actions.CheckboxMenuItem but there is no org.openide.awt.Actions.RadioButtonMenuItem :((). But my HIEna wants to see Radio button there - so what can I do?!?! Please help me.... ( = implement Actions.RadioButtonMenuItem) thanks.
It's not particularly difficult even without support from the APIs, e.g.: http://www.netbeans.org/unbranded-source/browse/~checkout~/contrib/insertunicode/src/org/netbeans/modules/insertunicode/InsertUnicodeAction.java?content-type=text/plain There is a bit of extra functionality in org.openide.awt.Actions but not that much. Slightly easier support for HelpCtx, maybe. Accelerator functionality, which would not apply here because there would be no accelerator for submenuitems anyway. Ditto icons, short descriptions. Maybe setting button.accessibleContext.accessibleName would be helpful, though I am not sure if that is really required for a menu item that already displays fairly obvious text.
Assigned to new owner.
There is support for checkbox in Actions: http://bits.netbeans.org/6.9.1/javadoc/org-openide-awt/org/openide/awt/Actions.html#checkbox(java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean) feel free to provide patch to implement radiobuttons in similar style.