KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > action > IStatusLineManager


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jface.action;
12
13 import org.eclipse.core.runtime.IProgressMonitor;
14 import org.eclipse.swt.graphics.Image;
15
16 /**
17  * The <code>IStatusLineManager</code> interface provides protocol
18  * for displaying messages on a status line, for monitoring progress,
19  * and for managing contributions to the status line.
20  * <p>
21  * <b>Note:</b> An error message overrides the current message until
22  * the error message is cleared.
23  * </p><p>
24  * This package also provides a concrete status line manager implementation,
25  * {@link StatusLineManager <code>StatusLineManager</code>}.
26  * </p>
27  */

28 public interface IStatusLineManager extends IContributionManager {
29     /**
30      * Returns a progress monitor which reports progress
31      * in the status line.
32      *
33      * @return the progress monitor
34      *
35      * Note: There is a delay after a beginTask message before the monitor is shown.
36      * This may not be appropriate for all apps.
37      */

38     public IProgressMonitor getProgressMonitor();
39
40     /**
41      * Returns whether the cancel button on the status line's progress monitor
42      * is enabled.
43      *
44      * @return <code>true</code> if the cancel button is enabled, or <code>false</code> if not
45      */

46     public boolean isCancelEnabled();
47
48     /**
49      * Sets whether the cancel button on the status line's progress monitor
50      * is enabled.
51      *
52      * @param enabled <code>true</code> if the cancel button is enabled, or <code>false</code> if not
53      */

54     public void setCancelEnabled(boolean enabled);
55
56     /**
57      * Sets the error message text to be displayed on the status line.
58      * The image on the status line is cleared.
59      * <p>
60      * An error message overrides the current message until the error
61      * message is cleared (set to <code>null</code>).
62      * </p>
63      *
64      * @param message the error message, or <code>null</code> to clear
65      * the current error message.
66      */

67     public void setErrorMessage(String JavaDoc message);
68
69     /**
70      * Sets the image and error message to be displayed on the status line.
71      * <p>
72      * An error message overrides the current message until the error
73      * message is cleared (set to <code>null</code>).
74      * </p>
75      *
76      * @param image the image to use, or <code>null</code> for no image
77      * @param message the error message, or <code>null</code> to clear
78      * the current error message.
79      */

80     public void setErrorMessage(Image image, String JavaDoc message);
81
82     /**
83      * Sets the message text to be displayed on the status line.
84      * The image on the status line is cleared.
85      * <p>
86      * This method replaces the current message but does not affect the
87      * error message. That is, the error message, if set, will continue
88      * to be displayed until it is cleared (set to <code>null</code>).
89      * </p>
90      *
91      * @param message the message, or <code>null</code> for no message
92      */

93     public void setMessage(String JavaDoc message);
94
95     /**
96      * Sets the image and message to be displayed on the status line.
97      * <p>
98      * This method replaces the current message but does not affect the
99      * error message. That is, the error message, if set, will continue
100      * to be displayed until it is cleared (set to <code>null</code>).
101      * </p>
102      *
103      * @param image the image to use, or <code>null</code> for no image
104      * @param message the message, or <code>null</code> for no message
105      */

106     public void setMessage(Image image, String JavaDoc message);
107 }
108
Popular Tags