private boolean dispatchMouseEvent(AWTEvent event) {
    if (event.getID() != MouseEvent.MOUSE_PRESSED) {
      return false;
    }

    if (ourShowingStep == null) {
      return false;
    }

    WizardPopup eachParent = ourShowingStep;
    final MouseEvent mouseEvent = ((MouseEvent) event);

    Point point = (Point) mouseEvent.getPoint().clone();
    SwingUtilities.convertPointToScreen(point, mouseEvent.getComponent());

    while (true) {
      JComponent content = eachParent.getContent();
      if (content == null || !content.isShowing()) {
        getActiveRoot().cancel();
        return false;
      }

      if (eachParent.getBounds().contains(point) || !eachParent.canClose()) {
        return false;
      }

      eachParent = eachParent.getParent();
      if (eachParent == null) {
        getActiveRoot().cancel();
        return false;
      }
    }
  }
  public static boolean disposeActiveWizard() {
    if (ourActiveWizardRoot != null) {
      ourActiveWizardRoot.disposeChildren();
      ourActiveWizardRoot.dispose();
      return true;
    }

    return false;
  }
 public static void unsetShowing(WizardPopup aBaseWizardPopup) {
   if (ourActiveWizardRoot != null) {
     for (WizardPopup wp = aBaseWizardPopup; wp != null; wp = wp.getParent()) {
       if (wp == ourActiveWizardRoot) {
         ourShowingStep = aBaseWizardPopup.getParent();
         return;
       }
     }
   }
 }
  public boolean requestFocus() {
    if (ourShowingStep != null) {
      ourShowingStep.requestFocus();
    }

    return true;
  }
Exemplo n.º 5
0
 protected void disposeAllParents(InputEvent e) {
   myDisposeEvent = e;
   dispose();
   if (myParent != null) {
     myParent.disposeAllParents(null);
   }
 }
Exemplo n.º 6
0
 public void disposeChildren() {
   if (myChild != null) {
     myChild.disposeChildren();
     Disposer.dispose(myChild);
     myChild = null;
   }
 }
Exemplo n.º 7
0
  public void goBack() {
    if (mySpeedSearch.isHoldingFilter()) {
      mySpeedSearch.reset();
      return;
    }

    if (myParent != null) {
      myParent.disposeChildren();
    } else {
      disposeAll();
    }
  }
 public Component getComponent() {
   return ourShowingStep != null ? ourShowingStep.getContent() : null;
 }
 public boolean dispatchKeyEvent(final KeyEvent e) {
   if (ourShowingStep == null) {
     return false;
   }
   return ourShowingStep.dispatch(e);
 }
Exemplo n.º 10
0
 protected final void notifyParentOnChildSelection() {
   if (myParent == null || myParentValue == null) return;
   myParent.onChildSelectedFor(myParentValue);
 }
Exemplo n.º 11
0
 private void disposeAll() {
   WizardPopup root = PopupDispatcher.getActiveRoot();
   disposeAllParents(null);
   root.getStep().canceled();
 }