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; } } } }
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; } } }