Java 类com.intellij.openapi.ui.DialogWrapperDialog 实例源码

项目:intellij-ce-playground    文件:DiffUtil.java   
public static void closeWindow(@NotNull Window window, boolean modalOnly) {
  if (window instanceof IdeFrameImpl) return;
  if (modalOnly && window instanceof Frame) return;

  if (window instanceof DialogWrapperDialog) {
    ((DialogWrapperDialog)window).getDialogWrapper().doCancelAction();
    return;
  }

  window.setVisible(false);
  window.dispose();
}
项目:intellij-ce-playground    文件:DiffPanelOptions.java   
private boolean dialogWrapperClose(Container window) {
  if (!(window instanceof DialogWrapperDialog)) return false;
  while (window instanceof DialogWrapperDialog) {
    DialogWrapperDialog dlg = (DialogWrapperDialog)window;
    window = window.getParent();
    dlg.getDialogWrapper().doCancelAction();
  }
  return true;
}
项目:intellij-ce-playground    文件:NotificationsManagerImpl.java   
@Nullable
public static Window findWindowForBalloon(Project project) {
  Window frame = WindowManager.getInstance().getFrame(project);
  if (frame == null && project == null) {
    frame = KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow();
    while (frame instanceof DialogWrapperDialog && ((DialogWrapperDialog)frame).getDialogWrapper().isModalProgress()) {
      frame = frame.getOwner();
    }
  }
  if (frame == null && project == null) {
    frame = (Window)WelcomeFrame.getInstance();
  }
  return frame;
}
项目:tools-idea    文件:DiffPanelOptions.java   
private boolean dialogWrapperClose(Container window) {
  if (!(window instanceof DialogWrapperDialog)) return false;
  while (window instanceof DialogWrapperDialog) {
    DialogWrapperDialog dlg = (DialogWrapperDialog)window;
    window = window.getParent();
    dlg.getDialogWrapper().close(DialogWrapper.OK_EXIT_CODE);
  }
  return true;
}
项目:consulo    文件:DiffUtil.java   
public static void closeWindow(@Nonnull Window window, boolean modalOnly) {
  if (window instanceof IdeFrameImpl) return;
  if (modalOnly && window instanceof Frame) return;

  if (window instanceof DialogWrapperDialog) {
    ((DialogWrapperDialog)window).getDialogWrapper().doCancelAction();
    return;
  }

  window.setVisible(false);
  window.dispose();
}
项目:consulo    文件:DiffPanelOptions.java   
private boolean dialogWrapperClose(Container window) {
  if (!(window instanceof DialogWrapperDialog)) return false;
  while (window instanceof DialogWrapperDialog) {
    DialogWrapperDialog dlg = (DialogWrapperDialog)window;
    window = window.getParent();
    dlg.getDialogWrapper().doCancelAction();
  }
  return true;
}
项目:consulo    文件:NotificationsManagerImpl.java   
@Nullable
public static Window findWindowForBalloon(@Nullable Project project) {
  Window frame = WindowManager.getInstance().getFrame(project);
  if (frame == null && project == null) {
    frame = (Window)WelcomeFrame.getInstance();
  }
  if (frame == null && project == null) {
    frame = KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow();
    while (frame instanceof DialogWrapperDialog && ((DialogWrapperDialog)frame).getDialogWrapper().isModalProgress()) {
      frame = frame.getOwner();
    }
  }
  return frame;
}