Java JCheckBoxMenuItem unconfigureJCheckBoxMenuItem(JCheckBoxMenuItem mi, Action a)

Here you can find the source of unconfigureJCheckBoxMenuItem(JCheckBoxMenuItem mi, Action a)

Description

Unconfigures a JCheckBoxMenuItem for an Action.

License

Open Source License

Declaration

public static void unconfigureJCheckBoxMenuItem(JCheckBoxMenuItem mi,
        Action a) 

Method Source Code

//package com.java2s;
/*/*from   ww w. j a  va  2 s  . co  m*/
 * @(#)ActionUtil.java
 *
 * Copyright (c) 1996-2010 by the original authors of JHotDraw and all its
 * contributors. All rights reserved.
 *
 * You may not use, copy or modify this file, except in compliance with the 
 * license agreement you entered into with the copyright holders. For details
 * see accompanying license terms.
 */

import javax.swing.*;

public class Main {
    /**
     * Unconfigures a JCheckBoxMenuItem for an Action.
     */
    public static void unconfigureJCheckBoxMenuItem(JCheckBoxMenuItem mi,
            Action a) {
        /*PropertyChangeListener propertyHandler = (PropertyChangeListener) mi.getClientProperty("actionPropertyHandler");
        if (propertyHandler != null) {
            a.removePropertyChangeListener(propertyHandler);
        mi.putClientProperty("actionPropertyHandler", null);
        }*/
        mi.setAction(null);
    }
}

Related

  1. createCheckBoxMenuItem(final JInternalFrame f)
  2. createCheckBoxMenuItem(final String text, final boolean selected)
  3. createCheckBoxMenuItem(String label, int mnemonic, String description, ItemListener action)
  4. createCheckBoxMenuItem(String text, Icon icon, String toolTip, ActionListener... listeners)
  5. createJCheckBoxMenuItem(String name, String command, ActionListener listener, boolean isSelected)