7995 |
7995 |
final String ttle =
|
7996 |
7996 |
finalTitle + (stack == null ? "" : " (Press HELP to view stack trace)");
|
7997 |
7997 |
final logical bool = finalVar;
|
7998 |
|
|
7999 |
|
eventBracket(() ->
|
|
7998 |
|
|
7999 |
int tempTerm = forceInteractive();
|
|
8000 |
try
|
8000 |
8001 |
{
|
8001 |
|
WidgetFactory wf = tk.getFactory();
|
8002 |
|
alrtBox[0] = wf.createAlertBox(alertType, list, buttons, bool, ttle, color, stack);
|
8003 |
|
alrtBox[0].setEnabled(true);
|
8004 |
|
alrtBox[0].setVisible(true);
|
8005 |
|
});
|
8006 |
|
|
8007 |
|
Window wnd = targetWindowWorker(windowId);
|
8008 |
|
final Container pane = wnd.getContentPane();
|
8009 |
|
|
8010 |
|
eventDrawingBracket(alrtBox[0], () ->
|
|
8002 |
eventBracket(() ->
|
|
8003 |
{
|
|
8004 |
WidgetFactory wf = tk.getFactory();
|
|
8005 |
alrtBox[0] = wf.createAlertBox(alertType, list, buttons, bool, ttle, color, stack);
|
|
8006 |
alrtBox[0].setEnabled(true);
|
|
8007 |
alrtBox[0].setVisible(true);
|
|
8008 |
});
|
|
8009 |
|
|
8010 |
Window wnd = targetWindowWorker(windowId);
|
|
8011 |
final Container pane = wnd.getContentPane();
|
|
8012 |
|
|
8013 |
eventDrawingBracket(alrtBox[0], () ->
|
|
8014 |
{
|
|
8015 |
// alert box can have two forms - an embeddable window or top-level window
|
|
8016 |
if (!(alrtBox[0] instanceof TopLevelWindow))
|
|
8017 |
pane.add(alrtBox[0]);
|
|
8018 |
|
|
8019 |
alrtBox[0].setFocus(alrtBox[0].focus());
|
|
8020 |
EventManager.postEvent(new FocusEvent(alrtBox[0].focus(), EventType.FOCUS_GAINED));
|
|
8021 |
alrtBox[0].repaint();
|
|
8022 |
});
|
|
8023 |
|
|
8024 |
modalEventLoop(alrtBox[0], focusState, saveFocus, wnd);
|
|
8025 |
}
|
|
8026 |
finally
|
8011 |
8027 |
{
|
8012 |
|
// alert box can have two forms - an embeddable window or top-level window
|
8013 |
|
if (!(alrtBox[0] instanceof TopLevelWindow))
|
8014 |
|
pane.add(alrtBox[0]);
|
8015 |
|
|
8016 |
|
alrtBox[0].setFocus(alrtBox[0].focus());
|
8017 |
|
EventManager.postEvent(new FocusEvent(alrtBox[0].focus(), EventType.FOCUS_GAINED));
|
8018 |
|
alrtBox[0].repaint();
|
8019 |
|
});
|
8020 |
|
|
8021 |
|
modalEventLoop(alrtBox[0], focusState, saveFocus, wnd);
|
|
8028 |
restoreRedirection(tempTerm);
|
|
8029 |
}
|
8022 |
8030 |
});
|
8023 |
8031 |
return alrtBox[0].getResult();
|
8024 |
8032 |
}
|