List of usage examples for javax.swing JRadioButtonMenuItem getAccessibleContext
@BeanProperty(bound = false)
public AccessibleContext getAccessibleContext()
From source file:edu.ku.brc.ui.UIHelper.java
/** * Creates a JRadioButtonMenuItem.//from w w w . j ava 2 s . c o m * @param menu parent menu * @param label the label of the menu item * @param mnemonic the mnemonic * @param accessibleDescription the accessible Description * @param enabled enabled * @param action the aciton * @return menu item */ public static JRadioButtonMenuItem createRadioButtonMenuItem(final JMenu menu, final String label, final String mnemonic, final String accessibleDescription, final boolean enabled, final AbstractAction action) { JRadioButtonMenuItem mi = new JRadioButtonMenuItem(getResourceString(label)); if (menu != null) { menu.add(mi); } setLocalizedMnemonic(mi, mnemonic); if (isNotEmpty(accessibleDescription)) { mi.getAccessibleContext().setAccessibleDescription(accessibleDescription); } if (action != null) { mi.addActionListener(action); action.addPropertyChangeListener(new MenuItemPropertyChangeListener(mi)); action.setEnabled(enabled); } return mi; }