Java Utililty Methods JCheckBoxMenuItem

List of utility methods to do JCheckBoxMenuItem

Description

The list of methods to do JCheckBoxMenuItem are organized into topic(s).

Method

voidconfigureJCheckBoxMenuItem(final JCheckBoxMenuItem mi, final Action a)
Configures a JCheckBoxMenuItem for an Action.
mi.setAction(a);
JMenuItemcreateCheckBoxMenuItem(final JInternalFrame f)
create Check Box Menu Item
final JMenuItem theItem = new JCheckBoxMenuItem(f.getTitle());
theItem.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
        try {
            f.setSelected(true);
            f.setIcon(false);
        } catch (PropertyVetoException exc) {
            ;
...
JCheckBoxMenuItemcreateCheckBoxMenuItem(final String text, final boolean selected)
create Check Box Menu Item
return new JCheckBoxMenuItem(text, selected);
JCheckBoxMenuItemcreateCheckBoxMenuItem(String label, int mnemonic, String description, ItemListener action)
create Check Box Menu Item
return createMenuItem(new JCheckBoxMenuItem(label), mnemonic, description, action);
JCheckBoxMenuItemcreateCheckBoxMenuItem(String text, Icon icon, String toolTip, ActionListener... listeners)
create Check Box Menu Item
JCheckBoxMenuItem result = new JCheckBoxMenuItem(text, icon);
if (toolTip != null) {
    result.setToolTipText(toolTip);
for (ActionListener listener : listeners) {
    result.addActionListener(listener);
return result;
...
JCheckBoxMenuItemcreateJCheckBoxMenuItem(String name, String command, ActionListener listener, boolean isSelected)
Creates a check box menu item with specified name, acton command and state.
JCheckBoxMenuItem item = new JCheckBoxMenuItem(name);
item.setActionCommand(command);
item.addActionListener(listener);
item.setSelected(isSelected);
return item;
voidunconfigureJCheckBoxMenuItem(JCheckBoxMenuItem mi, Action a)
Unconfigures a JCheckBoxMenuItem for an Action.
mi.setAction(null);