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; }
protected void disposeAllParents(InputEvent e) { myDisposeEvent = e; dispose(); if (myParent != null) { myParent.disposeAllParents(null); } }
public void disposeChildren() { if (myChild != null) { myChild.disposeChildren(); Disposer.dispose(myChild); myChild = null; } }
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); }
protected final void notifyParentOnChildSelection() { if (myParent == null || myParentValue == null) return; myParent.onChildSelectedFor(myParentValue); }
private void disposeAll() { WizardPopup root = PopupDispatcher.getActiveRoot(); disposeAllParents(null); root.getStep().canceled(); }