Ejemplo n.º 1
0
 public void removeNotify() {
   final KeyboardFocusManager keyboardFocusManager =
       KeyboardFocusManager.getCurrentKeyboardFocusManager();
   //noinspection HardCodedStringLiteral
   keyboardFocusManager.removePropertyChangeListener("permanentFocusOwner", myEditorRemover);
   //noinspection HardCodedStringLiteral
   keyboardFocusManager.removePropertyChangeListener("focusOwner", myEditorRemover);
   super.removeNotify();
   if (myBusyIcon != null) {
     remove(myBusyIcon);
     Disposer.dispose(myBusyIcon);
     myBusyIcon = null;
   }
 }
Ejemplo n.º 2
0
    public void propertyChange(PropertyChangeEvent e) {
      boolean isDisposed = (Boolean) e.getNewValue();
      if (isDisposed != true) {
        if (log.isLoggable(PlatformLogger.Level.FINE)) {
          log.fine(" Assertion (newValue != true) failed for AppContext.GUI_DISPOSED ");
        }
      }
      AppContext appContext = AppContext.getAppContext();
      synchronized (appContext) {
        appContext.remove(ACTIVE_WINDOWS_KEY);
        appContext.removePropertyChangeListener(AppContext.GUI_DISPOSED, this);

        KeyboardFocusManager kfm = KeyboardFocusManager.getCurrentKeyboardFocusManager();
        kfm.removePropertyChangeListener("activeWindow", activeWindowListener);
      }
    }
 @Override
 public void dispose() {
   super.dispose();
   KeyboardFocusManager focusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
   focusManager.removePropertyChangeListener(this);
 }
Ejemplo n.º 4
0
 /** Deregister us as KeyEventDispatcher and property "managingFocus" listeners. */
 private void removeTraversingOutListeners(KeyboardFocusManager kfm) {
   kfm.removeKeyEventDispatcher(this);
   kfm.removePropertyChangeListener("managingFocus", this);
 }