Mercurial > projects > dwt-addons
comparison dwtx/jface/action/IStatusLineManager.d @ 26:87d8cf0a3074
StatusLine
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 03 Apr 2008 05:03:09 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
25:ca63e2bea4bf | 26:87d8cf0a3074 |
---|---|
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 * Port to the D programming language: | |
11 * Frank Benoit <benoit@tionex.de> | |
12 *******************************************************************************/ | |
13 module dwtx.jface.action.IStatusLineManager; | |
14 | |
15 import dwtx.jface.action.IContributionManager; | |
16 | |
17 import dwt.graphics.Image; | |
18 import dwtx.core.runtime.IProgressMonitor; | |
19 | |
20 import dwt.dwthelper.utils; | |
21 | |
22 /** | |
23 * The <code>IStatusLineManager</code> interface provides protocol | |
24 * for displaying messages on a status line, for monitoring progress, | |
25 * and for managing contributions to the status line. | |
26 * <p> | |
27 * <b>Note:</b> An error message overrides the current message until | |
28 * the error message is cleared. | |
29 * </p><p> | |
30 * This package also provides a concrete status line manager implementation, | |
31 * {@link StatusLineManager <code>StatusLineManager</code>}. | |
32 * </p> | |
33 */ | |
34 public interface IStatusLineManager : IContributionManager { | |
35 /** | |
36 * Returns a progress monitor which reports progress | |
37 * in the status line. | |
38 * | |
39 * @return the progress monitor | |
40 * | |
41 * Note: There is a delay after a beginTask message before the monitor is shown. | |
42 * This may not be appropriate for all apps. | |
43 */ | |
44 public IProgressMonitor getProgressMonitor(); | |
45 | |
46 /** | |
47 * Returns whether the cancel button on the status line's progress monitor | |
48 * is enabled. | |
49 * | |
50 * @return <code>true</code> if the cancel button is enabled, or <code>false</code> if not | |
51 */ | |
52 public bool isCancelEnabled(); | |
53 | |
54 /** | |
55 * Sets whether the cancel button on the status line's progress monitor | |
56 * is enabled. | |
57 * | |
58 * @param enabled <code>true</code> if the cancel button is enabled, or <code>false</code> if not | |
59 */ | |
60 public void setCancelEnabled(bool enabled); | |
61 | |
62 /** | |
63 * Sets the error message text to be displayed on the status line. | |
64 * The image on the status line is cleared. | |
65 * <p> | |
66 * An error message overrides the current message until the error | |
67 * message is cleared (set to <code>null</code>). | |
68 * </p> | |
69 * | |
70 * @param message the error message, or <code>null</code> to clear | |
71 * the current error message. | |
72 */ | |
73 public void setErrorMessage(String message); | |
74 | |
75 /** | |
76 * Sets the image and error message to be displayed on the status line. | |
77 * <p> | |
78 * An error message overrides the current message until the error | |
79 * message is cleared (set to <code>null</code>). | |
80 * </p> | |
81 * | |
82 * @param image the image to use, or <code>null</code> for no image | |
83 * @param message the error message, or <code>null</code> to clear | |
84 * the current error message. | |
85 */ | |
86 public void setErrorMessage(Image image, String message); | |
87 | |
88 /** | |
89 * Sets the message text to be displayed on the status line. | |
90 * The image on the status line is cleared. | |
91 * <p> | |
92 * This method replaces the current message but does not affect the | |
93 * error message. That is, the error message, if set, will continue | |
94 * to be displayed until it is cleared (set to <code>null</code>). | |
95 * </p> | |
96 * | |
97 * @param message the message, or <code>null</code> for no message | |
98 */ | |
99 public void setMessage(String message); | |
100 | |
101 /** | |
102 * Sets the image and message to be displayed on the status line. | |
103 * <p> | |
104 * This method replaces the current message but does not affect the | |
105 * error message. That is, the error message, if set, will continue | |
106 * to be displayed until it is cleared (set to <code>null</code>). | |
107 * </p> | |
108 * | |
109 * @param image the image to use, or <code>null</code> for no image | |
110 * @param message the message, or <code>null</code> for no message | |
111 */ | |
112 public void setMessage(Image image, String message); | |
113 } |