@Override protected int getShellStyle() { return super.getShellStyle() | SWT.SHEET; } };
@Override protected int getShellStyle() { return super.getShellStyle() | SWT.SHEET; } };
@Override protected int getShellStyle() { return super.getShellStyle() | SWT.SHEET; } };
@Override protected int getShellStyle() { return super.getShellStyle() | SWT.SHEET; } };
@Override protected int getShellStyle() { return super.getShellStyle() | SWT.SHEET; } };
@Override protected int getShellStyle() { return super.getShellStyle() | SWT.SHEET; } }; // yes is the
@Override protected int getShellStyle() { return super.getShellStyle() | SWT.SHEET; } };
@Override protected int getShellStyle() { return super.getShellStyle() | SWT.SHEET; } };
@Override protected int getShellStyle() { return super.getShellStyle() | SWT.SHEET; } };
@Override protected int getShellStyle() { return super.getShellStyle() | SWT.SHEET; } };
@Override protected int getShellStyle() { return super.getShellStyle() | SWT.SHEET; } };
@Override protected int getShellStyle() { return super.getShellStyle() | SWT.SHEET; } };
@Override protected int getShellStyle() { return super.getShellStyle() | SWT.SHEET; } };
protected int getShellStyle() { return super.getShellStyle() | SWT.SHEET; } };
/** * Method to open a simple dialog as specified by the <code>kind</code> flag. * * This method accepts varargs of String to set custom button labels. * * Use this method if you want to override the default labels. * * @param kind the kind of dialog to open, one of {@link #ERROR}, * {@link #INFORMATION}, {@link #QUESTION}, * {@link #WARNING}, {@link #CONFIRM}, or * {@link #QUESTION_WITH_CANCEL}. * @param parent the parent shell of the dialog, or * <code>null</code> if none * @param title the dialog's title, or <code>null</code> if none * @param message the message * @param style {@link SWT#NONE} for a default dialog, or * {@link SWT#SHEET} for a dialog with sheet behavior * @param dialogButtonLabels varargs of Strings for the button labels in the * button bar * @return the index of the button that was pressed. * @since 3.13 */ public static int open(int kind, Shell parent, String title, String message, int style, String... dialogButtonLabels) { MessageDialog dialog = new MessageDialog(parent, title, null, message, kind, 0, dialogButtonLabels); style &= SWT.SHEET; dialog.setShellStyle(dialog.getShellStyle() | style); return dialog.open(); }
/** * Convenience method to open a simple dialog as specified by the * <code>kind</code> flag. * * @param kind the kind of dialog to open, one of {@link #ERROR}, * {@link #INFORMATION}, {@link #QUESTION}, {@link #WARNING}, * {@link #CONFIRM}, or {@link #QUESTION_WITH_CANCEL}. * @param parent the parent shell of the dialog, or <code>null</code> if none * @param title the dialog's title, or <code>null</code> if none * @param message the message * @param style {@link SWT#NONE} for a default dialog, or {@link SWT#SHEET} * for a dialog with sheet behavior * @return <code>true</code> if the user presses the OK or Yes button, * <code>false</code> otherwise * @since 3.5 */ public static boolean open(int kind, Shell parent, String title, String message, int style) { MessageDialog dialog = new MessageDialog(parent, title, null, message, kind, 0, getButtonLabels(kind)); style &= SWT.SHEET; dialog.setShellStyle(dialog.getShellStyle() | style); return dialog.open() == 0; }
/** * Convenience method to open a simple dialog as specified by the * <code>kind</code> flag. * * @param kind * the kind of dialog to open, one of {@link #ERROR}, * {@link #INFORMATION}, {@link #QUESTION}, {@link #WARNING}, * {@link #CONFIRM}, or {@link #QUESTION_WITH_CANCEL}. * @param parent * the parent shell of the dialog, or <code>null</code> if none * @param title * the dialog's title, or <code>null</code> if none * @param message * the message * @param style * {@link SWT#NONE} for a default dialog, or {@link SWT#SHEET} for * a dialog with sheet behavior * @return <code>true</code> if the user presses the OK or Yes button, * <code>false</code> otherwise * @since 1.3 */ public static boolean open(int kind, Shell parent, String title, String message, int style) { MessageDialog dialog = new MessageDialog(parent, title, null, message, kind, getButtonLabels(kind), 0); style &= SWT.SHEET; dialog.setShellStyle(dialog.getShellStyle() | style); return dialog.open() == 0; }
/** * Convenience method to open a simple dialog as specified by the * <code>kind</code> flag. * * @param kind * the kind of dialog to open, one of {@link #ERROR}, * {@link #INFORMATION}, {@link #QUESTION}, {@link #WARNING}, * {@link #CONFIRM}, or {@link #QUESTION_WITH_CANCEL}. * @param parent * the parent shell of the dialog, or <code>null</code> if none * @param title * the dialog's title, or <code>null</code> if none * @param message * the message * @param style * {@link SWT#NONE} for a default dialog, or {@link SWT#SHEET} for * a dialog with sheet behavior * @return <code>true</code> if the user presses the OK or Yes button, * <code>false</code> otherwise * @since 3.5 */ public static boolean open(int kind, Shell parent, String title, String message, int style) { MessageDialog dialog = new MessageDialog(parent, title, null, message, kind, 0, getButtonLabels(kind)); style &= SWT.SHEET; dialog.setShellStyle(dialog.getShellStyle() | style); return dialog.open() == 0; }