List of usage examples for org.eclipse.jface.dialogs IMessageProvider NONE
int NONE
To view the source code for org.eclipse.jface.dialogs IMessageProvider NONE.
Click Source Link
From source file:org.mailster.gui.prefs.widgets.DialogMessageArea.java
License:Open Source License
/** * Show the new message in the message text and update the image. Base the * background color on whether or not there are errors. * /*from ww w .ja v a2s . c o m*/ * @param newMessage The new value for the message * @param newType One of the IMessageProvider constants. If newType is * IMessageProvider.NONE show the title. * @see org.eclipse.jface.dialogs.IMessageProvider */ public void updateText(String newMessage, int newType) { Image newImage = null; switch (newType) { case IMessageProvider.NONE: if (newMessage == null) { this.restoreTitle(); } else { this.showTitle(newMessage, null); } return; case IMessageProvider.INFORMATION: newImage = JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_INFO); break; case IMessageProvider.WARNING: newImage = JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_WARNING); break; case IMessageProvider.ERROR: newImage = JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_ERROR); break; } this.messageComposite.setVisible(true); this.titleLabel.setVisible(false); // Any more updates required? // If the message text equals the tooltip (i.e. non-shortened text is // the same) // and shortened text is the same (i.e. not a resize) // and the image is the same then nothing to do String shortText = Dialog.shortenText(newMessage, messageText); if (newMessage.equals(messageText.getToolTipText()) && newImage == messageImageLabel.getImage() && shortText.equals(messageText.getText())) { return; } this.messageImageLabel.setImage(newImage); this.messageText.setText(Dialog.shortenText(newMessage, messageText)); this.messageText.setToolTipText(newMessage); this.lastMessageText = newMessage; }
From source file:org.modelio.api.ui.ModelioWizardDialog.java
License:Apache License
@objid("d65ecd65-910f-11e0-9de7-002564c97630") @Override//w w w . j av a 2 s . c o m public void updateMessage() { if (this.currentPage == null) { return; } String pageMessage = this.currentPage.getMessage(); if (pageMessage != null && this.currentPage instanceof IMessageProvider) { this.pageMessageType = ((IMessageProvider) this.currentPage).getMessageType(); } else { this.pageMessageType = IMessageProvider.NONE; } if (pageMessage == null) { setMessage(this.pageDescription); } else { setMessage(pageMessage, this.pageMessageType); } setErrorMessage(this.currentPage.getErrorMessage()); }
From source file:org.nightlabs.base.ui.editor.MessageSectionPart.java
License:Open Source License
/** * sets the message to display * @param message the message to set */ public void setMessage(String message) { setMessage(message, IMessageProvider.NONE); }
From source file:org.objectstyle.wolips.wizards.NewWOProjectWizard.java
License:Open Source License
protected D2WApplicationConfigurationPage createD2WConfigurationPage() { D2WApplicationConfigurationPage d2wConfigPage = new D2WApplicationConfigurationPage( "d2WAppConfigurationWizardPage", IMessageProvider.NONE); d2wConfigPage.setTitle(Messages.getString("D2WApplicationConfigurationPage.title")); d2wConfigPage.setDescription(Messages.getString("D2WApplicationConfigurationPage.description")); return d2wConfigPage; }
From source file:org.objectstyle.wolips.wizards.NewWOProjectWizard.java
License:Open Source License
protected PackageSpecifierWizardPage createPackageSpecifierWizardPage() { PackageSpecifierWizardPage packagePage = new PackageSpecifierWizardPage("packageSpecifierWizardPage", IMessageProvider.NONE); packagePage.setTitle("Specify package: "); packagePage.setMessage("Default package for all Java source generated for project"); packagePage.setDescription("Default package for all Java source generated for project"); return packagePage; }
From source file:org.objectstyle.wolips.wizards.NewWOProjectWizard.java
License:Open Source License
protected WOWebServicesWizardPage createWebServicesSupportPage() { WOWebServicesWizardPage webservicesPage = null; if (ResourcesPlugin.getWorkspace().getRoot().getProjects().length > 0) { webservicesPage = new WOWebServicesWizardPage("webservicesSupportWizardPage", IMessageProvider.NONE);//$NON-NLS-1$ webservicesPage.setTitle(Messages.getString("WOWebServicesWizardPage.title")); webservicesPage.setDescription(Messages.getString("WOWebServicesWizardPage.description")); }//w ww. j av a2 s.com return webservicesPage; }
From source file:org.objectstyle.wolips.wizards.NewWOProjectWizard.java
License:Open Source License
protected WOFrameworkSupportPage createFrameworkSupportPage() { WOFrameworkSupportPage frameworkPage = null; if (ResourcesPlugin.getWorkspace().getRoot().getProjects().length > 0) { frameworkPage = new WOFrameworkSupportPage("frameworkSupportWizardPage", IMessageProvider.NONE);//$NON-NLS-1$ frameworkPage.setTitle(Messages.getString("WOFrameworkSupportPage.title")); frameworkPage.setDescription(Messages.getString("WOFrameworkSupportPage.description")); }//from w w w .j a v a2 s . com return frameworkPage; }
From source file:org.org.eclipse.core.utils.platform.tools.DialogHelper.java
License:Open Source License
/** * Applies the status to the status line of a dialog page. *//* w w w.j a va 2 s. c o m*/ public static void applyToStatusLine(DialogPage page, IStatus status) { String message = status.getMessage(); if (message != null) { switch (status.getSeverity()) { case IStatus.OK: page.setMessage(message, IMessageProvider.NONE); page.setErrorMessage(null); break; case IStatus.WARNING: page.setMessage(message, IMessageProvider.WARNING); page.setErrorMessage(null); break; case IStatus.INFO: page.setMessage(message, IMessageProvider.INFORMATION); page.setErrorMessage(null); break; default: if (message.length() == 0) { message = null; } page.setMessage(message, IMessageProvider.ERROR); page.setErrorMessage(null); break; } } }
From source file:org.osate.analysis.arinc653.actions.PreferencesDialog.java
License:Open Source License
public void create() { super.create(); setTitle("ARINC653 preferences"); setMessage("Set preferences for ARINC653 analysis", IMessageProvider.NONE); }
From source file:org.osate.importer.generic.actions.PreferencesDialog.java
License:Open Source License
@Override public void create() { super.create(); // Set the title setTitle("AADL Importer Preferences"); // Set the message setMessage("Set your preferences importing models", IMessageProvider.NONE); }