// from the found popup panel
while (shownPath.size() > 0) {
if (shownPath.getLast().popupPanel == c)
return;
PopupInfo last = shownPath.removeLast();
Popup popup = popupPanels.get(last.popupPanel);
popup.hide();
if (last.popupOriginator instanceof JCommandButton) {
((JCommandButton) last.popupOriginator)
.getPopupModel().setPopupShowing(false);
}
this.firePopupHidden(last.popupPanel,
last.popupOriginator);
popupPanels.remove(last.popupPanel);
}
}
c = c.getParent();
}
}
if (!foundAndDismissed || (comp == null)) {
while (shownPath.size() > 0) {
PopupInfo last = shownPath.removeLast();
Popup popup = popupPanels.get(last.popupPanel);
popup.hide();
if (last.popupOriginator instanceof JCommandButton) {
((JCommandButton) last.popupOriginator).getPopupModel()
.setPopupShowing(false);
}
this.firePopupHidden(last.popupPanel, last.popupOriginator);