/** * Opens the dialog but only if the user hasn't choosen to hide it. * Returns <code>NOT_SHOWN</code> if the dialog was not shown. */ public static int open(String id, Shell parent, String title, Image titleImage, String message, int dialogType, String[] buttonLabels, int defaultButtonIndex) { if (!isDialogEnabled(id)) return OptionalMessageDialog.NOT_SHOWN; MessageDialog dialog= new OptionalMessageDialog(id, parent, title, titleImage, message, dialogType, buttonLabels, defaultButtonIndex); return dialog.open(); }
/** * Opens the dialog but only if the user hasn't chosen to hide it. * * @return the index of the pressed button or {@link SWT#DEFAULT} if the dialog got dismissed * without pressing a button (e.g. via Esc) or {{@link #NOT_SHOWN} if the dialog was not * shown */ public static int open(String id, Shell parent, String title, Image titleImage, String message, int dialogType, String[] buttonLabels, int defaultButtonIndex, String checkboxText) { if (!isDialogEnabled(id)) return OptionalMessageDialog.NOT_SHOWN; MessageDialog dialog= new OptionalMessageDialog(id, parent, title, titleImage, message, dialogType, buttonLabels, defaultButtonIndex, checkboxText); return dialog.open(); }
/** * Opens the dialog but only if the user hasn't chosen to hide it. * * @return the index of the pressed button or {@link SWT#DEFAULT} if the dialog got dismissed * without pressing a button (e.g. via Esc) or {{@link #NOT_SHOWN} if the dialog was not * shown */ public static int open(String id, Shell parent, String title, Image titleImage, String message, int dialogType, String[] buttonLabels, int defaultButtonIndex, String checkboxText) { if (!isDialogEnabled(id)) return OptionalMessageDialog.NOT_SHOWN; MessageDialog dialog= new OptionalMessageDialog(id, parent, title, titleImage, message, dialogType, buttonLabels, defaultButtonIndex, checkboxText); return dialog.open(); }