List of usage examples for org.eclipse.jface.dialogs MessageDialog NONE
int NONE
To view the source code for org.eclipse.jface.dialogs MessageDialog NONE.
Click Source Link
From source file:org.ect.reo.ui.properties.reconf.EditReconfRuleDialog.java
License:Open Source License
public EditReconfRuleDialog(Shell shell, String rule, boolean export) { super(shell, "New reconfiguration rule", null, "New reconfiguration rule:", MessageDialog.NONE, new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0); this.rule = rule; this.export = export; }
From source file:org.erlide.ui.wizards.ErlangProjectImportWizardPage.java
License:Open Source License
/** * Displays a Yes/No question to the user with the specified message and * returns the user's response.// w w w .j a va2 s . c o m * * @param message * the question to ask * @return <code>true</code> for Yes, and <code>false</code> for No */ protected boolean queryYesNoQuestion(final String message) { final MessageDialog dialog = new MessageDialog(getContainer().getShell(), WizardMessages.Question, null, message, MessageDialog.NONE, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 0) { }; // ensure yes is the default return dialog.open() == 0; }
From source file:org.fedoraproject.eclipse.packager.bodhi.internal.ui.BodhiUpdateInfoDialog.java
License:Open Source License
/** * Creates a message info dialog. The link to the bodhi update * is created by createCustomArea()./*from w w w . j a va 2 s. co m*/ * * @param parentShell * @param bodhiInstanceUrl The URL to the bodhi instance. * @param buildName The name of the update just pushed. * @param bodhiResponseMsg Placeholder for auxiliary response msg from Bodhi. */ public BodhiUpdateInfoDialog(Shell parentShell, URL bodhiInstanceUrl, String buildName, String bodhiResponseMsg) { super(parentShell, BodhiText.BodhiUpdateInfoDialog_updateResponseTitle, BodhiPlugin.getImageDescriptor("icons/Artwork_DesignService_bodhi-icon-16.png").createImage(), //$NON-NLS-1$ bodhiResponseMsg, MessageDialog.NONE, new String[] { IDialogConstants.OK_LABEL }, 0); this.buildName = buildName; this.bodhiInstanceUrl = bodhiInstanceUrl; }
From source file:org.fedoraproject.eclipse.packager.koji.internal.handlers.KojiBuildHandler.java
License:Open Source License
/** * Create KojiMessageDialog based on taskId and kojiWebUrl. * /*from w w w . ja va2 s . com*/ * @param taskId * The task ID to use for the message. * @param kojiWebUrl * The url to Koji Web without any parameters. * @return A new KojiMessageDialog for the given Web Url and task Id. */ public KojiMessageDialog getKojiMsgDialog(int taskId, URL kojiWebUrl) { ImageDescriptor descriptor = KojiPlugin.getImageDescriptor("icons/Artwork_DesignService_koji-icon-16.png"); //$NON-NLS-1$ Image titleImage = descriptor.createImage(); Image msgContentImage = KojiPlugin.getImageDescriptor("icons/koji.png") //$NON-NLS-1$ .createImage(); KojiMessageDialog msgDialog = new KojiMessageDialog(shell, NLS.bind(KojiText.KojiBuildHandler_kojiBuild, fedoraProjectRoot.getProductStrings().getBuildToolName()), titleImage, MessageDialog.NONE, new String[] { IDialogConstants.OK_LABEL }, 0, kojiWebUrl, taskId, NLS.bind(KojiText.KojiMessageDialog_buildResponseMsg, fedoraProjectRoot.getProductStrings().getBuildToolName()), msgContentImage, fedoraProjectRoot.getProductStrings().getBuildToolName()); return msgDialog; }
From source file:org.fedoraproject.eclipse.packager.tests.KojiMessageDialogTest.java
License:Open Source License
/** * Useful test for bugs with the KojiDialog. This test is not intended to be * run in a Hudson job, since it will block the test run until the OK button * of the dialog is pressed./*from www .j a v a 2s . co m*/ */ @Test public void canOpenMessageDialog() { PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() { @Override public void run() { ImageDescriptor descriptor = KojiPlugin .getImageDescriptor("icons/Artwork_DesignService_koji-icon-16.png"); //$NON-NLS-1$ titleImage = descriptor.createImage(); contentImage = KojiPlugin.getImageDescriptor("icons/koji.png") //$NON-NLS-1$ .createImage(); try { dialog = new KojiMessageDialog(null, "blah", titleImage, MessageDialog.NONE, new String[] { IDialogConstants.OK_LABEL }, 0, new URL("http://test.com"), 1, "koji", contentImage, "koji"); dialog.open(); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }); }
From source file:org.gluster.storage.management.console.views.VolumeLogsView.java
License:Open Source License
@Override public void doubleClick(DoubleClickEvent event) { VolumeLogMessage volumeLogMessage = (VolumeLogMessage) ((StructuredSelection) event.getSelection()) .getFirstElement();// w ww . j a v a 2 s. c o m String message = DateUtil.formatDate(volumeLogMessage.getTimestamp()) + " " + DateUtil.formatTime(volumeLogMessage.getTimestamp()) + " [" + volumeLogMessage.getSeverity() + "]" + CoreConstants.NEWLINE + CoreConstants.NEWLINE + volumeLogMessage.getMessage(); new MessageDialog(getSite().getShell(), "Log message from " + volumeLogMessage.getBrick(), null, message, MessageDialog.NONE, new String[] { "Close" }, 0).open(); }
From source file:org.jboss.tools.common.model.ui.wizards.one.ServiceDialogImpl.java
License:Open Source License
private int getEclipseType(int type) { if (type == ERROR) return MessageDialog.ERROR; if (type == MESSAGE) return MessageDialog.INFORMATION; if (type == WARNING) return MessageDialog.WARNING; if (type == QUESTION) return MessageDialog.QUESTION; return MessageDialog.NONE; }
From source file:org.jboss.tools.windup.ui.internal.wizards.WindupReportExportWizardPage1.java
License:Open Source License
/** * Displays a Yes/No question to the user with the specified message and returns the user's response. * // ww w . j a va 2 s . co m * @param message the question to ask * @return <code>true</code> for Yes, and <code>false</code> for No */ private boolean queryYesNoQuestion(String message) { MessageDialog dialog = new MessageDialog(getContainer().getShell(), Messages.Question, (Image) null, message, MessageDialog.NONE, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 0) { protected int getShellStyle() { return super.getShellStyle() | SWT.SHEET; } }; // ensure yes is the default return dialog.open() == 0; }
From source file:org.kalypso.core.status.AbstractStatusDialog.java
License:Open Source License
private static int toMessageType(final int severity) { switch (severity) { case IStatus.OK: return MessageDialog.NONE; case IStatus.INFO: return MessageDialog.INFORMATION; case IStatus.WARNING: return MessageDialog.WARNING; case IStatus.ERROR: return MessageDialog.ERROR; case IStatus.CANCEL: // hm, better cancel icon? return MessageDialog.NONE; default:// w w w .j a v a 2s . c om return MessageDialog.NONE; } }
From source file:org.kelvinst.psfimport.ui.importWizards.PsfImportWizardFilesSelectionPage.java
License:Open Source License
/** * Displays a Yes/No question to the user with the specified message and * returns the user's response.//from w ww.j a v a 2s . c o m * * @param message * the question to ask * @return <code>true</code> for Yes, and <code>false</code> for No */ protected boolean queryYesNoQuestion(String message) { MessageDialog dialog = new MessageDialog(getContainer().getShell(), "Question", (Image) null, message, MessageDialog.NONE, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 0) { protected int getShellStyle() { return super.getShellStyle() | SWT.SHEET; } }; // ensure yes is the default return dialog.open() == 0; }