Java Code Examples for com.intellij.ui.ScreenUtil#isStandardAddRemoveNotify()

The following examples show how to use com.intellij.ui.ScreenUtil#isStandardAddRemoveNotify() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DesktopFloatingDecorator.java    From consulo with Apache License 2.0 6 votes vote down vote up
@Override
public final void dispose() {
  if (ScreenUtil.isStandardAddRemoveNotify(getParent())) {
    Disposer.dispose(myDelayAlarm);
    Disposer.dispose(myDisposable);
  }
  else {
    if (isShowing()) {
      SwingUtilities.invokeLater(new Runnable() {
        @Override
        public void run() {
          show();
        }
      });
    }
  }
  super.dispose();
}
 
Example 2
Source File: JBTabsImpl.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
public void removeNotify() {
  super.removeNotify();

  setFocused(false);

  removeTimerUpdate();

  if (ScreenUtil.isStandardAddRemoveNotify(this) && myGlassPane != null) {
    myGlassPane.removeMouseMotionPreprocessor(myTabActionsAutoHideListener);
    myGlassPane = null;
  }
}
 
Example 3
Source File: JBTabbedPane.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
public void removeNotify() {
  super.removeNotify();
  if (!ScreenUtil.isStandardAddRemoveNotify(this)) return;
  for (int i = 0; i < getTabCount(); i++) {
    getComponentAt(i).removeHierarchyListener(this);
  }
}
 
Example 4
Source File: LinkLabel.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
public void removeNotify() {
  super.removeNotify();
  if (ScreenUtil.isStandardAddRemoveNotify(this)) {
    disableUnderline();
  }
}
 
Example 5
Source File: IdeMenuBar.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
public void removeNotify() {
  if (ScreenUtil.isStandardAddRemoveNotify(this)) {
    if (myAnimator != null) {
      myAnimator.suspend();
    }
    Disposer.dispose(myDisposable);
  }
  super.removeNotify();
}
 
Example 6
Source File: IdeRootPane.java    From consulo with Apache License 2.0 5 votes vote down vote up
/**
 * Invoked when enclosed frame is being disposed.
 */
@Override
public final void removeNotify(){
  if (ScreenUtil.isStandardAddRemoveNotify(this)) {
    if (!myStatusBarDisposed) {
      myStatusBarDisposed = true;
      Disposer.dispose(myStatusBar);
    }
    removeToolbar();
    setJMenuBar(null);
  }
  super.removeNotify();
}
 
Example 7
Source File: ImplementationViewComponent.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
public void removeNotify() {
  super.removeNotify();
  if (!ScreenUtil.isStandardAddRemoveNotify(this))
    return;
  EditorFactory.getInstance().releaseEditor(myEditor);
  disposeNonTextEditor();
}
 
Example 8
Source File: RunnerContentUi.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
public void removeNotify() {
  super.removeNotify();
  if (!ScreenUtil.isStandardAddRemoveNotify(this)) return;

  if (Disposer.isDisposed(RunnerContentUi.this)) return;

  saveUiState();
}
 
Example 9
Source File: DesktopToolWindowPanelImpl.java    From consulo with Apache License 2.0 5 votes vote down vote up
/**
 * Invoked when enclosed frame is being disposed.
 */
@Override
public final void removeNotify() {
  if (ScreenUtil.isStandardAddRemoveNotify(this)) {
    Disposer.dispose(myDisposable);
  }
  super.removeNotify();
}
 
Example 10
Source File: DesktopStripePanelImpl.java    From consulo with Apache License 2.0 5 votes vote down vote up
/**
 * Invoked when enclosed frame is being shown.
 */
@Override
public void addNotify() {
  super.addNotify();
  updatePresentation();
  KeymapManagerEx.getInstanceEx().addWeakListener(myWeakKeymapManagerListener);
  if (ScreenUtil.isStandardAddRemoveNotify(this)) {
    UISettings.getInstance().addUISettingsListener(myUISettingsListener, myDisposable);
  }
}
 
Example 11
Source File: DesktopStripePanelImpl.java    From consulo with Apache License 2.0 5 votes vote down vote up
/**
 * Invoked when enclosed frame is being disposed.
 */
@Override
public void removeNotify() {
  KeymapManagerEx.getInstanceEx().removeWeakListener(myWeakKeymapManagerListener);
  if (ScreenUtil.isStandardAddRemoveNotify(this)) {
    Disposer.dispose(myDisposable);
  }
  super.removeNotify();
}
 
Example 12
Source File: DetailViewImpl.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void removeNotify() {
  super.removeNotify();
  if (ScreenUtil.isStandardAddRemoveNotify(this))
    clearEditor();
}