Java 类com.intellij.openapi.ui.popup.IdePopupEventDispatcher 实例源码

项目:consulo    文件:IdePopupManager.java   
private boolean closeAllPopups(boolean forceRestoreFocus, Window window) {
  if (myDispatchStack.size() == 0) return false;

  boolean closed = true;
  for (IdePopupEventDispatcher each : myDispatchStack) {
    if (window != null && !(window instanceof Frame) && window == UIUtil.getWindow(each.getComponent())) {
      // do not close a heavyweight popup that is opened in the specified window
      continue;
    }
    if (forceRestoreFocus) {
      each.setRestoreFocusSilentely();
    }
    closed &= each.close();
  }

  return closed;
}
项目:intellij-ce-playground    文件:IdePopupManager.java   
boolean isPopupActive() {
  for (IdePopupEventDispatcher each : myDispatchStack) {
    if (each.getComponent() == null || !each.getComponent().isShowing()) {
      myDispatchStack.remove(each);
    }
  }

  return myDispatchStack.size() > 0;
}
项目:intellij-ce-playground    文件:IdePopupManager.java   
public boolean closeAllPopups(boolean forceRestoreFocus) {
  if (myDispatchStack.size() == 0) return false;

  boolean closed = true;
  for (IdePopupEventDispatcher each : myDispatchStack) {
    if (forceRestoreFocus) {
      each.setRestoreFocusSilentely();
    }
    closed &= each.close();
  }

  return closed;
}
项目:tools-idea    文件:IdePopupManager.java   
boolean isPopupActive() {
  for (IdePopupEventDispatcher each : myDispatchStack) {
    if (each.getComponent() == null || !each.getComponent().isShowing()) {
      myDispatchStack.remove(each);
    }
  }

  return myDispatchStack.size() > 0;
}
项目:tools-idea    文件:IdePopupManager.java   
public boolean closeAllPopups() {
  if (myDispatchStack.size() == 0) return false;

  boolean closed = true;
  for (IdePopupEventDispatcher each : myDispatchStack) {
    closed &= each.close();
  }

  return closed;
}
项目:consulo    文件:IdePopupManager.java   
boolean isPopupActive() {
  for (IdePopupEventDispatcher each : myDispatchStack) {
    if (each.getComponent() == null || !each.getComponent().isShowing()) {
      myDispatchStack.remove(each);
    }
  }

  return myDispatchStack.size() > 0;
}
项目:consulo    文件:IdePopupManager.java   
public boolean isPopupWindow(Window w) {
  return myDispatchStack.stream()
          .flatMap(IdePopupEventDispatcher::getPopupStream)
          .map(JBPopup::getContent)
          .filter(Objects::nonNull)
          .anyMatch(jbPopupContent -> SwingUtilities.getWindowAncestor(jbPopupContent) == w);
}
项目:intellij-ce-playground    文件:IdePopupManager.java   
public void push(IdePopupEventDispatcher dispatcher) {
  if (!myDispatchStack.contains(dispatcher)) {
    myDispatchStack.add(dispatcher);
  }
}
项目:intellij-ce-playground    文件:IdePopupManager.java   
public void remove(IdePopupEventDispatcher dispatcher) {
  myDispatchStack.remove(dispatcher);
}
项目:tools-idea    文件:IdePopupManager.java   
public void push(IdePopupEventDispatcher dispatcher) {
  if (!myDispatchStack.contains(dispatcher)) {
    myDispatchStack.add(dispatcher);
  }
}
项目:tools-idea    文件:IdePopupManager.java   
public void remove(IdePopupEventDispatcher dispatcher) {
  myDispatchStack.remove(dispatcher);
}
项目:consulo    文件:IdePopupManager.java   
public void push(IdePopupEventDispatcher dispatcher) {
  if (!myDispatchStack.contains(dispatcher)) {
    myDispatchStack.add(dispatcher);
  }
}
项目:consulo    文件:IdePopupManager.java   
public void remove(IdePopupEventDispatcher dispatcher) {
  myDispatchStack.remove(dispatcher);
}