Examples of removeActionListener()


Examples of javax.swing.JMenuItem.removeActionListener()

//            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

Examples of javax.swing.JMenuItem.removeActionListener()

//            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

Examples of javax.swing.JMenuItem.removeActionListener()

        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

Examples of javax.swing.JMenuItem.removeActionListener()

        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

Examples of javax.swing.JMenuItem.removeActionListener()

//            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

Examples of javax.swing.JMenuItem.removeActionListener()

//            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

Examples of javax.swing.JToggleButton.removeActionListener()

        // unregister all active components
        for ( int i=0; i<getComponentCount(); ++i ) {
            Component c = getComponent(i);
            if ( !(c instanceof JToggleButton) ) continue;
            JToggleButton tb = (JToggleButton)c;
            tb.removeActionListener(m_lstnr);
            if ( m_group != null )
                m_group.remove(tb);
        }
       
        // clear this container and add new components
View Full Code Here

Examples of javax.swing.Timer.removeActionListener()

    Timer t = new Timer(1, this);
    ActionListener other = new otherListener();
    t.addActionListener(other);

    harness.check(t.getActionListeners().length, 2, "must be 2 listeners");
    t.removeActionListener(this);

    harness.check(t.getActionListeners().length, 1, "must be 1 listener");

    t.removeActionListener(new otherListener());
View Full Code Here

Examples of javax.swing.Timer.removeActionListener()

    harness.check(t.getActionListeners().length, 2, "must be 2 listeners");
    t.removeActionListener(this);

    harness.check(t.getActionListeners().length, 1, "must be 1 listener");

    t.removeActionListener(new otherListener());

    harness.check(t.getActionListeners().length, 1, "must still be 1 listener");

    t.removeActionListener(other);
    harness.check(t.getActionListeners().length, 0, "must be no listeners");
View Full Code Here

Examples of javax.swing.Timer.removeActionListener()

    t.removeActionListener(new otherListener());

    harness.check(t.getActionListeners().length, 1, "must still be 1 listener");

    t.removeActionListener(other);
    harness.check(t.getActionListeners().length, 0, "must be no listeners");
  }

  /* Test setLogTimers(boolean). */
  public void test_LogTimers(TestHarness harness)
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.