use of com.haulmont.cuba.desktop.sys.JXErrorPaneExt in project cuba by cuba-platform.
the class DefaultExceptionHandler method handle.
@Override
public boolean handle(Thread thread, Throwable exception) {
JXErrorPane errorPane = new JXErrorPaneExt();
errorPane.setErrorInfo(createErrorInfo(exception));
JDialog dialog = JXErrorPane.createDialog(App.getInstance().getMainFrame(), errorPane);
dialog.setMinimumSize(new Dimension(600, (int) dialog.getMinimumSize().getHeight()));
final DialogWindow lastDialogWindow = getLastDialogWindow();
dialog.addWindowListener(new WindowAdapter() {
@Override
public void windowClosed(WindowEvent e) {
if (lastDialogWindow != null)
lastDialogWindow.enableWindow();
else
App.getInstance().getMainFrame().activate();
}
});
dialog.setModal(false);
if (lastDialogWindow != null)
lastDialogWindow.disableWindow(null);
else
App.getInstance().getMainFrame().deactivate(null);
dialog.setVisible(true);
return true;
}
Aggregations