Пример #1
0
 protected void uninstallListeners(AbstractButton b) {
   BasicButtonListener listener = getButtonListener(b);
   if (listener != null) {
     b.removeMouseListener(listener);
     b.removeMouseMotionListener(listener);
     b.removeFocusListener(listener);
     b.removeChangeListener(listener);
     b.removePropertyChangeListener(listener);
   }
 }
Пример #2
0
  @Override
  public void uninstallUI(JComponent c) {
    AbstractButton button = (AbstractButton) c;

    ButtonInfo info = getButtonInfo(button);

    button.removeMouseListener(info.basicListener);
    button.removeMouseMotionListener(info.basicListener);
    button.removeFocusListener(info.basicListener);
    button.removePropertyChangeListener(info.basicListener);
    button.removeChangeListener(info.basicListener);
    button.removeKeyListener(focusArrowListener);
    button.removeComponentListener(componentListener);
    button.removeKeyListener(keyArmingListener);
    button.removePropertyChangeListener(positionAndShapeListener);

    super.uninstallUI(c);
  }