*/
public void doModal()
throws InterruptedException, SuspendNotAllowedException {
Desktop desktop = getDesktop();
if (desktop == null)
throw new SuspendNotAllowedException("Not attached, "+this);
if (!desktop.getWebApp().getConfiguration().isEventThreadEnabled()) {
doHighlighted();
return;
}
checkOverlappable(MODAL);
if (_mode != MODAL) {
if (!Events.inEventListener())
throw new SuspendNotAllowedException("doModal must be called in an event listener");
int oldmode = _mode;
boolean oldvisi = isVisible();
setVisible(true); //if MODAL, it must be visible; vice versa