List of usage examples for org.eclipse.jface.dialogs Dialog DLG_IMG_MESSAGE_INFO
String DLG_IMG_MESSAGE_INFO
To view the source code for org.eclipse.jface.dialogs Dialog DLG_IMG_MESSAGE_INFO.
Click Source Link
"dialog_messasge_info_image"
). From source file:gov.redhawk.sca.ui.ScaLabelProvider.java
License:Open Source License
@Override public Image getToolTipImage(final Object element) { if (element instanceof IStatusProvider) { final IStatusProvider dpo = (IStatusProvider) element; final IStatus status = dpo.getStatus(); if (status != null && !status.isOK()) { switch (status.getSeverity()) { case IStatus.INFO: return JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_INFO); case IStatus.WARNING: return JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_WARNING); case IStatus.ERROR: return JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_ERROR); default: return null; }//from w ww . j a va2s .com } } return null; }
From source file:melnorme.util.swt.components.misc.StatusMessageWidget.java
License:Open Source License
public static Image getImageForSeverity(Severity severity) { switch (severity) { case INFO:/*w w w. ja v a2 s .c om*/ return Dialog.getImage(Dialog.DLG_IMG_MESSAGE_INFO); case WARNING: return Dialog.getImage(Dialog.DLG_IMG_MESSAGE_WARNING); case ERROR: return Dialog.getImage(Dialog.DLG_IMG_MESSAGE_ERROR); } throw assertFail(); }
From source file:net.tourbook.ui.MessageRegion.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./* w ww.j av a 2 s.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 IMessageProvider */ public void updateText(final String newMessage, final int newType) { Image newImage = null; boolean showingError = false; switch (newType) { case IMessageProvider.NONE: hideRegion(); 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); showingError = true; break; } if (newMessage == null) {//No message so clear the area hideRegion(); return; } showRegion(); // Any more updates required if (newMessage.equals(messageText.getText()) && newImage == messageImageLabel.getImage()) { return; } messageImageLabel.setImage(newImage); messageText.setText(newMessage); if (showingError) { setMessageColors(JFaceColors.getErrorBackground(messageComposite.getDisplay())); } else { lastMessageText = newMessage; setMessageColors(JFaceColors.getBannerBackground(messageComposite.getDisplay())); } }
From source file:org.eclipse.cdt.internal.ui.newui.StatusMessageLine.java
License:Open Source License
/** * Find an image associated with the status. *///from w ww .j a v a 2s . c o m private Image findImage(IStatus status) { if (status.isOK()) { return null; } else if (status.matches(IStatus.ERROR)) { return JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_ERROR); } else if (status.matches(IStatus.WARNING)) { return JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_WARNING); } else if (status.matches(IStatus.INFO)) { return JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_INFO); } return null; }
From source file:org.eclipse.dirigible.ide.common.status.StatusLineManagerUtil.java
License:Open Source License
public static void setInfoMessage(String message) { getDefaultStatusLineManager().removeAll(); getDefaultStatusLineManager().setMessage(JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_INFO), message); clearMessages();/*from ww w . j a v a2 s . co m*/ }
From source file:org.eclipse.dltk.ruby.testing.internal.RubyTestingMainLaunchConfigurationTab.java
License:Open Source License
/** * @param status// ww w. j a v a 2 s . co m */ private void updateEngineStatus(IStatus status) { Image newImage = null; String newMessage = status.getMessage(); switch (status.getSeverity()) { case IStatus.OK: newMessage = EMPTY_STRING; break; case IStatus.INFO: newImage = JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_INFO); break; case IStatus.WARNING: newImage = JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_WARNING); break; case IStatus.ERROR: newImage = JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_ERROR); break; } showMessage(newMessage, newImage); }
From source file:org.eclipse.e4.tools.ui.designer.properties.AppearanceSection.java
License:Open Source License
protected void setMessage(IStatus status) { if (imageLabel == null || imageLabel.isDisposed() || messageLabel == null || messageLabel.isDisposed()) { return;/*from ww w . jav a 2 s. c o m*/ } Image image = null; String message = null; if (status != null && !status.isOK()) { int severity = status.getSeverity(); switch (severity) { case IStatus.ERROR: image = JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_ERROR); break; case IStatus.WARNING: image = JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_WARNING); break; case IStatus.INFO: image = JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_INFO); break; } message = status.getMessage(); } boolean visible = image != null; imageLabel.setImage(image); imageLabelData.exclude = messageLableData.exclude = !visible; imageLabel.setVisible(visible); messageLabel.setVisible(visible); messageLabel.setText(message == null ? "" : message); imageLabel.getParent().layout(new Control[] { imageLabel, messageLabel }); }
From source file:org.eclipse.eatop.workspace.ui.internal.preferences.ModelConverterDescriptionLabels.java
License:Open Source License
/** * Creates a new ModelConverterDescriptionLabels instance * // w w w. jav a 2 s. com * @param parent * a widget which will be the parent of the new instance (cannot be null) */ public ModelConverterDescriptionLabels(Composite parent) { super(parent, SWT.NONE); GridLayout gridLayout = new GridLayout(2, false); setLayout(gridLayout); fWarning = createNewSection(Dialog.DLG_IMG_MESSAGE_WARNING, WARNING_TITLE_TEXT); fDescription = createNewSection(Dialog.DLG_IMG_MESSAGE_INFO, DESC_TITLE_TEXT); setConverterDescription(null); }
From source file:org.eclipse.equinox.internal.p2.ui.model.EmptyElementExplanation.java
License:Open Source License
protected String getImageId(Object obj) { if (severity == IStatus.ERROR) return Dialog.DLG_IMG_MESSAGE_ERROR; if (severity == IStatus.WARNING) return Dialog.DLG_IMG_MESSAGE_WARNING; return Dialog.DLG_IMG_MESSAGE_INFO; }
From source file:org.eclipse.help.ui.internal.views.MissingContentPart.java
License:Open Source License
public void updateStatus() { // Only update the controls if the status has changed boolean isRemoteHelpUnavailable = RemoteStatusData.isAnyRemoteHelpUnavailable(); if (isRemoteHelpUnavailable && wasRemoteHelpUnavailable) { return; // Nothing to do, remote help unavailable message already showing }/*from w w w .j a v a 2 s .c o m*/ boolean isUnresolvedPlaceholders = MissingContentManager.getInstance().isUnresolvedPlaceholders(); if (isRemoteHelpUnavailable == wasRemoteHelpUnavailable && isUnresolvedPlaceholders == wasUnresolvedPlaceholders) { return; } disposeLink(); wasRemoteHelpUnavailable = isRemoteHelpUnavailable; wasUnresolvedPlaceholders = isUnresolvedPlaceholders; FormToolkit toolkit = new FormToolkit(container.getDisplay()); if (isRemoteHelpUnavailable) { createHelpMissingLink(container, toolkit, Dialog.DLG_IMG_MESSAGE_WARNING, Messages.remoteHelpUnavailable, MissingContentManager.getInstance().getRemoteHelpUnavailablePage(true), true); } else if (isUnresolvedPlaceholders) { createHelpMissingLink(container, toolkit, Dialog.DLG_IMG_MESSAGE_INFO, Messages.ReusableHelpPart_missingContent, MissingContentManager.getInstance().getHelpMissingPage(true), false); } toolkit.dispose(); }