Java Code Examples for org.eclipse.jface.dialogs.MessageDialog#NONE
The following examples show how to use
org.eclipse.jface.dialogs.MessageDialog#NONE .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XCheckFilteredTreeDialog.java From nebula with Eclipse Public License 2.0 | 5 votes |
public XCheckFilteredTreeDialog(String dialogTitle, String dialogMessage, PatternFilter patternFilter, IContentProvider contentProvider, IBaseLabelProvider labelProvider, ViewerSorter viewerSorter) { super(Display.getCurrent().getActiveShell(), dialogTitle, null, dialogMessage, MessageDialog.NONE, new String[] { XViewerText.get("button.ok"), XViewerText.get("button.cancel")}, 0); //$NON-NLS-1$ //$NON-NLS-2$ this.contentProvider = contentProvider; this.labelProvider = labelProvider; this.patternFilter = patternFilter; this.viewerSorter = viewerSorter; setShellStyle(getShellStyle() | SWT.RESIZE); }
Example 2
Source File: ListDialogSortableFiltered.java From nebula with Eclipse Public License 2.0 | 5 votes |
public ListDialogSortableFiltered(String dialogTitle, String dialogMessage, PatternFilter patternFilter, IContentProvider contentProvider, IBaseLabelProvider labelProvider, ViewerSorter viewerSorter) { super(Display.getCurrent().getActiveShell(), dialogTitle, null, dialogMessage, MessageDialog.NONE, new String[] {XViewerText.get("button.ok"), XViewerText.get("button.cancel")}, 0); //$NON-NLS-1$ //$NON-NLS-2$ this.contentProvider = contentProvider; this.labelProvider = labelProvider; this.patternFilter = patternFilter; this.viewerSorter = viewerSorter; setShellStyle(getShellStyle() | SWT.RESIZE); }
Example 3
Source File: NativeDialogFactory.java From translationstudio8 with GNU General Public License v2.0 | 5 votes |
/** * Show message box. * * In default mode, a native MessageBox is used. * In testing mode, we use a MessageDialog, showing the same title and message. * * @param messageText the text of the message * @param title the title * @param iconStyle the icon style * @param shell the parent shell */ public static void showMessageBox(Shell shell, String messageText, final String title, final int iconStyle) { if (shell == null) { // logger // .fatal("Shell not yet instantiated, cannot display error message"); System.err.println("Shell not yet instantiated, cannot display error message"); } else { switch (getMode()) { case DEFAULT: { MessageBox messageBox = new MessageBox(shell, iconStyle); messageBox.setMessage(messageText); messageBox.setText(title); messageBox.open(); break; } case TESTING: { // ignore the iconStyle, this only creates trouble when testing. MessageDialog messagDialog = new MessageDialog(shell, title, null, messageText, MessageDialog.NONE, new String[] { "OK" }, 0); messagDialog.open(); break; } default: final String msg = "Reached default case in NativeDialogFactory, this is a bug, unknown state " + getMode(); // logger.warn(msg); System.err.println(msg); throw new RuntimeException(msg); } } }
Example 4
Source File: NativeDialogFactory.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
/** * Show message box. * * In default mode, a native MessageBox is used. * In testing mode, we use a MessageDialog, showing the same title and message. * * @param messageText the text of the message * @param title the title * @param iconStyle the icon style * @param shell the parent shell */ public static void showMessageBox(Shell shell, String messageText, final String title, final int iconStyle) { if (shell == null) { // logger // .fatal("Shell not yet instantiated, cannot display error message"); System.err.println("Shell not yet instantiated, cannot display error message"); } else { switch (getMode()) { case DEFAULT: { MessageBox messageBox = new MessageBox(shell, iconStyle); messageBox.setMessage(messageText); messageBox.setText(title); messageBox.open(); break; } case TESTING: { // ignore the iconStyle, this only creates trouble when testing. MessageDialog messagDialog = new MessageDialog(shell, title, null, messageText, MessageDialog.NONE, new String[] { "OK" }, 0); messagDialog.open(); break; } default: final String msg = "Reached default case in NativeDialogFactory, this is a bug, unknown state " + getMode(); // logger.warn(msg); System.err.println(msg); throw new RuntimeException(msg); } } }
Example 5
Source File: XViewerCustomizeDialog.java From nebula with Eclipse Public License 2.0 | 4 votes |
private XViewerCustomizeDialog(XViewer xViewer, Shell parentShell) { super(parentShell, "", null, "", MessageDialog.NONE, buttons, 0); //$NON-NLS-1$ //$NON-NLS-2$ this.xViewerToCustomize = xViewer; setShellStyle(getShellStyle() | SWT.RESIZE); }
Example 6
Source File: DateSelectionDialog.java From nebula with Eclipse Public License 2.0 | 4 votes |
public DateSelectionDialog(String dialogTitle, String dialogMessage, Date selectedDate) { this(Display.getCurrent().getActiveShell(), dialogTitle, null, dialogMessage, MessageDialog.NONE, new String[] { XViewerText.get("button.ok"), XViewerText.get("button.cancel")}, 0, selectedDate); //$NON-NLS-1$ //$NON-NLS-2$ }