public void actionPerformed(@SuppressWarnings("unused") ActionEvent e) { setVisible(false); } });
/** * Factory method for error dialog. * * @param sourceComponent * one of the components insinde the owning window. * @param translationProvider * the translationProvider for labels. * @param locale * the locale used. * @return the created error dialog instance. */ public static ULCErrorDialog createInstance(ULCComponent sourceComponent, ITranslationProvider translationProvider, Locale locale) { ULCErrorDialog errorDialog; errorDialog = new ULCErrorDialog(UlcUtil.getVisibleWindow(sourceComponent)); errorDialog.translationProvider = translationProvider; errorDialog.locale = locale; errorDialog.initGui(); return errorDialog; }
} else { ex.printStackTrace(); ULCErrorDialog dialog = ULCErrorDialog.createInstance(sourceComponent, getTranslationProvider(), getLocale()); dialog.setMessageIcon(getIconFactory().getErrorIcon( IIconFactory.MEDIUM_ICON_SIZE)); dialog.setTitle(getTranslationProvider().getTranslation("error", getLocale())); dialog.setMessage(HtmlHelper.emphasis(ex.getLocalizedMessage())); dialog.setDetails(ex); int screenRes = ClientContext.getScreenResolution(); dialog.setSize(8 * screenRes, 3 * screenRes); dialog.pack(); UlcUtil.centerOnScreen(dialog); dialog.setVisible(true);
exceptionAsDetails = html.toString(); setDetails(exceptionAsDetails);
/** * Set the details section of the error dialog. If the details are either null * or an empty string, then hide the detailsPane button and hide the detail * scroll pane. Otherwise, just set the detailsPane section. * * @param details * Details to be shown in the detail section of the dialog. This * can be null if you do not want to display the details section of * the dialog. */ public void setDetails(String details) { if (details == null || details.equals("")) { setDetailsVisible(false); detailsButton.setVisible(false); } else { this.detailsPane.setText(details); setDetailsVisible(false); detailsButton.setVisible(true); } }
exceptionAsDetails = html.toString(); setDetails(exceptionAsDetails);
/** * Set the details section of the error dialog. If the details are either null * or an empty string, then hide the detailsPane button and hide the detail * scroll pane. Otherwise, just set the detailsPane section. * * @param details * Details to be shown in the detail section of the dialog. This * can be null if you do not want to display the details section of * the dialog. */ public void setDetails(String details) { if (details == null || details.equals("")) { setDetailsVisible(false); detailsButton.setVisible(false); } else { this.detailsPane.setText(details); setDetailsVisible(false); detailsButton.setVisible(true); } }
/** * Factory method for error dialog. * * @param sourceComponent * one of the components insinde the owning window. * @param translationProvider * the translationProvider for labels. * @param locale * the locale used. * @return the created error dialog instance. */ public static ULCErrorDialog createInstance(ULCComponent sourceComponent, ITranslationProvider translationProvider, Locale locale) { ULCErrorDialog errorDialog; errorDialog = new ULCErrorDialog(UlcUtil.getVisibleWindow(sourceComponent)); errorDialog.translationProvider = translationProvider; errorDialog.locale = locale; errorDialog.initGui(); return errorDialog; }
public void actionPerformed(@SuppressWarnings("unused") ActionEvent e) { setVisible(false); } });