org.eclipse.jface.action.IStatusLineManager Maven / Gradle / Ivy
/*******************************************************************************
* Copyright (c) 2000, 2015 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jface.action;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.swt.graphics.Image;
/**
* The IStatusLineManager
interface provides protocol for
* displaying messages on a status line, for monitoring progress, and for
* managing contributions to the status line.
*
* Note: An error message overrides the current message until the error
* message is cleared.
*
*
* This package also provides a concrete status line manager implementation,
* {@link StatusLineManager StatusLineManager}.
*
*/
public interface IStatusLineManager extends IContributionManager {
/**
* Creates a new progress monitor which reports progress in the status line.
* Note that the returned progress monitor may only be accessed from the UI
* thread. Reusing the monitor requires to finally call progressMonitor.done()
* before using it again.
*
* @return the progress monitor
*
* Note: There is a delay after a beginTask message before the
* monitor is shown. This may not be appropriate for all apps.
* @see IProgressMonitor
*/
public IProgressMonitor getProgressMonitor();
/**
* Returns whether the cancel button on the status line's progress monitor
* is enabled.
*
* @return true
if the cancel button is enabled, or false
if not
*/
public boolean isCancelEnabled();
/**
* Sets whether the cancel button on the status line's progress monitor
* is enabled.
*
* @param enabled true
if the cancel button is enabled, or false
if not
*/
public void setCancelEnabled(boolean enabled);
/**
* Sets the error message text to be displayed on the status line.
* The image on the status line is cleared.
*
* An error message overrides the current message until the error
* message is cleared (set to null
).
*
*
* @param message the error message, or null
to clear
* the current error message.
*/
public void setErrorMessage(String message);
/**
* Sets the image and error message to be displayed on the status line.
*
* An error message overrides the current message until the error
* message is cleared (set to null
).
*
*
* @param image the image to use, or null
for no image
* @param message the error message, or null
to clear
* the current error message.
*/
public void setErrorMessage(Image image, String message);
/**
* Sets the message text to be displayed on the status line.
* The image on the status line is cleared.
*
* This method replaces the current message but does not affect the
* error message. That is, the error message, if set, will continue
* to be displayed until it is cleared (set to null
).
*
*
* @param message the message, or null
for no message
*/
public void setMessage(String message);
/**
* Sets the image and message to be displayed on the status line.
*
* This method replaces the current message but does not affect the
* error message. That is, the error message, if set, will continue
* to be displayed until it is cleared (set to null
).
*
*
* @param image the image to use, or null
for no image
* @param message the message, or null
for no message
*/
public void setMessage(Image image, String message);
}