Java Code Examples for org.eclipse.jface.dialogs.MessageDialog#NONE

The following examples show how to use org.eclipse.jface.dialogs.MessageDialog#NONE . These examples are extracted from open source projects. 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
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
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
/**
	 * 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
/**
	 * 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
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
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$
}