Package javax.swing

Examples of javax.swing.JMenuItem.removeActionListener()


        mi.removeActionListener(this);
        mi.addActionListener(this);
        ejectpopup.add(mi);
        mi = new JMenuItem(ui.getResource("popup.eject.openlocation"));
        mi.setActionCommand(PlayerActionEvent.MIPLAYLOCATION);
        mi.removeActionListener(this);
        mi.addActionListener(this);
        ejectpopup.add(mi);
        ui.getAcEject().removeMouseListener(ejectpopupAdapter);
        ejectpopupAdapter = new PopupAdapter(ejectpopup);
        ui.getAcEject().addMouseListener(ejectpopupAdapter);
View Full Code Here


        String[] presets = { "Normal", "Classical", "Club", "Dance", "Full Bass", "Full Bass & Treble", "Full Treble", "Laptop", "Live", "Party", "Pop", "Reggae", "Rock", "Techno" };
        JMenuItem mi;
        for (int p = 0; p < presets.length; p++)
        {
            mi = new JMenuItem(presets[p]);
            mi.removeActionListener(this);
            mi.addActionListener(this);
            mainpopup.add(mi);
        }
        ui.getAcEqPresets().removeActionListener(this);
        ui.getAcEqPresets().addActionListener(this);
View Full Code Here

//            if (actionCount > 0) {
//                for (ActionListener listener : item.getActionListeners()){
//                    item.removeActionListener(listener);
//                }
//            }
            item.removeActionListener(this);
            item.addActionListener(this);
        } else if (o instanceof MenuList) {
            MenuList item = (MenuList)o;
            // TF:18/06/2008:removed this as I don't understand why it's there
//            int actionCount = item.getActionListeners().length;
View Full Code Here

//            if (actionCount > 0) {
//                for (ActionListener listener : item.getActionListeners()){
//                    item.removeActionListener(listener);
//                }
//            }
            item.removeActionListener(this);
            item.addActionListener(this);
        }
    }

    public void actionPerformed(ActionEvent e) {
View Full Code Here

        if (o instanceof JMenuItem) {
            JMenuItem item = (JMenuItem)o;
            int actionCount = item.getActionListeners().length;
            if (actionCount > 0) {
                for (ActionListener listener : item.getActionListeners()){
                    item.removeActionListener(listener);
                }
            }
            item.addActionListener(this);
        }
    }
View Full Code Here

//            if (actionCount > 0) {
//                for (ActionListener listener : item.getActionListeners()){
//                    item.removeActionListener(listener);
//                }
//            }
            item.removeActionListener(this);
            item.addActionListener(this);
        } else if (o instanceof MenuList) {
            MenuList item = (MenuList)o;
            // TF:18/06/2008:removed this as I don't understand why it's there
//            int actionCount = item.getActionListeners().length;
View Full Code Here

//            if (actionCount > 0) {
//                for (ActionListener listener : item.getActionListeners()){
//                    item.removeActionListener(listener);
//                }
//            }
            item.removeActionListener(this);
            item.addActionListener(this);
        }
    }

    public void actionPerformed(ActionEvent e) {
View Full Code Here

        if (o instanceof JMenuItem) {
            JMenuItem item = (JMenuItem)o;
            int actionCount = item.getActionListeners().length;
            if (actionCount > 0) {
                for (ActionListener listener : item.getActionListeners()){
                    item.removeActionListener(listener);
                }
            }
            item.addActionListener(this);
        }
    }
View Full Code Here

        if (o instanceof JMenuItem) {
            JMenuItem item = (JMenuItem)o;
            int actionCount = item.getActionListeners().length;
            if (actionCount > 0) {
                for (ActionListener listener : item.getActionListeners()){
                    item.removeActionListener(listener);
                }
            }
            item.addActionListener(this);
        }
    }
View Full Code Here

//            if (actionCount > 0) {
//                for (ActionListener listener : item.getActionListeners()){
//                    item.removeActionListener(listener);
//                }
//            }
            item.removeActionListener(this);
            item.addActionListener(this);
        } else if (o instanceof MenuList) {
            MenuList item = (MenuList)o;
            // TF:18/06/2008:removed this as I don't understand why it's there
//            int actionCount = item.getActionListeners().length;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.