Mercurial > projects > dwt-addons
annotate dwtx/jface/action/StatusLine.d @ 39:644f1334b451
fix anon classes
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Tue, 08 Apr 2008 22:05:42 +0200 |
parents | c884a1ab6db3 |
children | da5ad8eedf5d |
rev | line source |
---|---|
26 | 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 | |
14 module dwtx.jface.action.StatusLine; | |
15 | |
16 import dwtx.jface.action.StatusLineLayoutData; | |
17 | |
18 import dwt.DWT; | |
19 import dwt.custom.CLabel; | |
20 import dwt.events.DisposeEvent; | |
21 import dwt.events.DisposeListener; | |
22 import dwt.events.SelectionAdapter; | |
23 import dwt.events.SelectionEvent; | |
24 import dwt.graphics.Cursor; | |
25 import dwt.graphics.Font; | |
26 import dwt.graphics.Image; | |
27 import dwt.graphics.Point; | |
28 import dwt.graphics.Rectangle; | |
29 import dwt.layout.GridData; | |
30 import dwt.layout.GridLayout; | |
31 import dwt.widgets.Composite; | |
32 import dwt.widgets.Control; | |
33 import dwt.widgets.Display; | |
34 import dwt.widgets.Layout; | |
35 import dwt.widgets.ToolBar; | |
36 import dwt.widgets.ToolItem; | |
37 import dwtx.core.runtime.IProgressMonitor; | |
38 import dwtx.jface.dialogs.ProgressIndicator; | |
39 import dwtx.jface.resource.ImageDescriptor; | |
40 import dwtx.jface.resource.JFaceColors; | |
41 import dwtx.jface.resource.JFaceResources; | |
42 | |
43 import dwt.dwthelper.utils; | |
44 import dwt.dwthelper.Runnable; | |
45 | |
46 /** | |
47 * A StatusLine control is a DWT Composite with a horizontal layout which hosts | |
48 * a number of status indication controls. | |
49 * Typically it is situated below the content area of the window. | |
50 * <p> | |
51 * By default a StatusLine has two predefined status controls: a MessageLine and a | |
52 * ProgressIndicator and it provides API for easy access. | |
53 * </p> | |
54 * <p> | |
55 * This is an internal class, not intended to be used outside the JFace framework. | |
56 * </p> | |
57 */ | |
58 /* package */class StatusLine : Composite, IProgressMonitor { | |
59 | |
60 /** Horizontal gaps between items. */ | |
61 public static const int GAP = 3; | |
62 | |
63 /** Progress bar creation is delayed by this ms */ | |
64 public static const int DELAY_PROGRESS = 500; | |
65 | |
66 /** visibility state of the progressbar */ | |
67 protected bool fProgressIsVisible = false; | |
68 | |
69 /** visibility state of the cancle button */ | |
70 protected bool fCancelButtonIsVisible = false; | |
71 | |
72 /** enablement state of the cancle button */ | |
73 protected bool fCancelEnabled = false; | |
74 | |
75 /** name of the task */ | |
76 protected String fTaskName; | |
77 | |
78 /** is the task is cancled */ | |
79 protected bool fIsCanceled; | |
80 | |
81 /** the start time of the task */ | |
82 protected long fStartTime; | |
83 | |
84 private Cursor fStopButtonCursor; | |
85 | |
86 /** the message text */ | |
87 protected String fMessageText; | |
88 | |
89 /** the message image */ | |
90 protected Image fMessageImage; | |
91 | |
92 /** the error text */ | |
93 protected String fErrorText; | |
94 | |
95 /** the error image */ | |
96 protected Image fErrorImage; | |
97 | |
98 /** the message label */ | |
99 protected CLabel fMessageLabel; | |
100 | |
101 /** the composite parent of the progress bar */ | |
102 protected Composite fProgressBarComposite; | |
103 | |
104 /** the progress bar */ | |
105 protected ProgressIndicator fProgressBar; | |
106 | |
107 /** the toolbar */ | |
108 protected ToolBar fToolBar; | |
109 | |
110 /** the cancle button */ | |
111 protected ToolItem fCancelButton; | |
112 | |
113 /** stop image descriptor */ | |
114 protected static ImageDescriptor fgStopImage; | |
115 | |
116 static this() { | |
38
c884a1ab6db3
resource loading, fix type in image names
Frank Benoit <benoit@tionex.de>
parents:
26
diff
changeset
|
117 fgStopImage = ImageDescriptor.createFromFile( |
c884a1ab6db3
resource loading, fix type in image names
Frank Benoit <benoit@tionex.de>
parents:
26
diff
changeset
|
118 import("dwtx.jface.action.images.stop.gif"));//$NON-NLS-1$ |
39 | 119 //DWT Note: Not used in jface, but needs Display instance, which is not yet available. |
120 // JFaceResources.getImageRegistry().put( | |
121 // "dwtx.jface.parts.StatusLine.stopImage", fgStopImage);//$NON-NLS-1$ | |
26 | 122 } |
123 | |
124 /** | |
125 * Layout the contribution item controls on the status line. | |
126 */ | |
127 public class StatusLineLayout : Layout { | |
128 private const StatusLineLayoutData DEFAULT_DATA; | |
129 | |
130 this(){ | |
131 DEFAULT_DATA = new StatusLineLayoutData(); | |
132 } | |
133 | |
134 public Point computeSize(Composite composite, int wHint, int hHint, | |
135 bool changed) { | |
136 | |
137 if (wHint !is DWT.DEFAULT && hHint !is DWT.DEFAULT) { | |
138 return new Point(wHint, hHint); | |
139 } | |
140 | |
141 Control[] children = composite.getChildren(); | |
142 int totalWidth = 0; | |
143 int maxHeight = 0; | |
144 int totalCnt = 0; | |
145 for (int i = 0; i < children.length; i++) { | |
146 bool useWidth = true; | |
147 Control w = children[i]; | |
148 if (w is fProgressBarComposite && !fProgressIsVisible) { | |
149 useWidth = false; | |
150 } else if (w is fToolBar && !fCancelButtonIsVisible) { | |
151 useWidth = false; | |
152 } | |
153 StatusLineLayoutData data = cast(StatusLineLayoutData) w | |
154 .getLayoutData(); | |
155 if (data is null) { | |
156 data = DEFAULT_DATA; | |
157 } | |
158 Point e = w.computeSize(data.widthHint, data.heightHint, | |
159 changed); | |
160 if (useWidth) { | |
161 totalWidth += e.x; | |
162 totalCnt++; | |
163 } | |
164 maxHeight = Math.max(maxHeight, e.y); | |
165 } | |
166 if (totalCnt > 0) { | |
167 totalWidth += (totalCnt - 1) * GAP; | |
168 } | |
169 if (totalWidth <= 0) { | |
170 totalWidth = maxHeight * 4; | |
171 } | |
172 return new Point(totalWidth, maxHeight); | |
173 } | |
174 | |
175 public void layout(Composite composite, bool flushCache) { | |
176 | |
177 if (composite is null) { | |
178 return; | |
179 } | |
180 | |
181 // StatusLineManager skips over the standard status line widgets | |
182 // in its update method. There is thus a dependency | |
183 // between the layout of the standard widgets and the update method. | |
184 | |
185 // Make sure cancel button and progress bar are before contributions. | |
186 fMessageLabel.moveAbove(null); | |
187 fToolBar.moveBelow(fMessageLabel); | |
188 fProgressBarComposite.moveBelow(fToolBar); | |
189 | |
190 Rectangle rect = composite.getClientArea(); | |
191 Control[] children = composite.getChildren(); | |
192 int count = children.length; | |
193 | |
194 int ws[] = new int[count]; | |
195 | |
196 int h = rect.height; | |
197 int totalWidth = -GAP; | |
198 for (int i = 0; i < count; i++) { | |
199 Control w = children[i]; | |
200 if (w is fProgressBarComposite && !fProgressIsVisible) { | |
201 continue; | |
202 } | |
203 if (w is fToolBar && !fCancelButtonIsVisible) { | |
204 continue; | |
205 } | |
206 StatusLineLayoutData data = cast(StatusLineLayoutData) w | |
207 .getLayoutData(); | |
208 if (data is null) { | |
209 data = DEFAULT_DATA; | |
210 } | |
211 int width = w.computeSize(data.widthHint, h, flushCache).x; | |
212 ws[i] = width; | |
213 totalWidth += width + GAP; | |
214 } | |
215 | |
216 int diff = rect.width - totalWidth; | |
217 ws[0] += diff; // make the first StatusLabel wider | |
218 | |
219 // Check against minimum recommended width | |
220 final int msgMinWidth = rect.width / 3; | |
221 if (ws[0] < msgMinWidth) { | |
222 diff = ws[0] - msgMinWidth; | |
223 ws[0] = msgMinWidth; | |
224 } else { | |
225 diff = 0; | |
226 } | |
227 | |
228 // Take space away from the contributions first. | |
229 for (int i = count - 1; i >= 0 && diff < 0; --i) { | |
230 int min = Math.min(ws[i], -diff); | |
231 ws[i] -= min; | |
232 diff += min + GAP; | |
233 } | |
234 | |
235 int x = rect.x; | |
236 int y = rect.y; | |
237 for (int i = 0; i < count; i++) { | |
238 Control w = children[i]; | |
239 /* | |
240 * Workaround for Linux Motif: | |
241 * Even if the progress bar and cancel button are | |
242 * not set to be visible ad of width 0, they still | |
243 * draw over the first pixel of the editor | |
244 * contributions. | |
245 * | |
246 * The fix here is to draw the progress bar and | |
247 * cancel button off screen if they are not visible. | |
248 */ | |
249 if (w is fProgressBarComposite && !fProgressIsVisible | |
250 || w is fToolBar && !fCancelButtonIsVisible) { | |
251 w.setBounds(x + rect.width, y, ws[i], h); | |
252 continue; | |
253 } | |
254 w.setBounds(x, y, ws[i], h); | |
255 if (ws[i] > 0) { | |
256 x += ws[i] + GAP; | |
257 } | |
258 } | |
259 } | |
260 } | |
261 | |
262 /** | |
263 * Create a new StatusLine as a child of the given parent. | |
264 * | |
265 * @param parent the parent for this Composite | |
266 * @param style the style used to create this widget | |
267 */ | |
268 public this(Composite parent, int style) { | |
269 super(parent, style); | |
270 | |
271 addDisposeListener(new class DisposeListener { | |
272 public void widgetDisposed(DisposeEvent e) { | |
273 handleDispose(); | |
274 } | |
275 }); | |
276 | |
277 // StatusLineManager skips over the standard status line widgets | |
278 // in its update method. There is thus a dependency | |
279 // between this code defining the creation and layout of the standard | |
280 // widgets and the update method. | |
281 | |
282 setLayout(new StatusLineLayout()); | |
283 | |
284 fMessageLabel = new CLabel(this, DWT.NONE);//DWT.SHADOW_IN); | |
285 // Color[] colors = new Color[2]; | |
286 // colors[0] = parent.getDisplay().getSystemColor(DWT.COLOR_WIDGET_LIGHT_SHADOW); | |
287 // colors[1] = fMessageLabel.getBackground(); | |
288 // int[] gradient = new int[] {JFaceColors.STATUS_PERCENT}; | |
289 // fMessageLabel.setBackground(colors, gradient); | |
290 | |
291 fProgressIsVisible = false; | |
292 fCancelEnabled = false; | |
293 | |
294 fToolBar = new ToolBar(this, DWT.FLAT); | |
295 fCancelButton = new ToolItem(fToolBar, DWT.PUSH); | |
296 fCancelButton.setImage(fgStopImage.createImage()); | |
297 fCancelButton.setToolTipText(JFaceResources | |
298 .getString("Cancel_Current_Operation")); //$NON-NLS-1$ | |
299 fCancelButton.addSelectionListener(new class SelectionAdapter { | |
300 public void widgetSelected(SelectionEvent e) { | |
301 setCanceled(true); | |
302 } | |
303 }); | |
304 fCancelButton.addDisposeListener(new class DisposeListener { | |
305 public void widgetDisposed(DisposeEvent e) { | |
306 Image i = fCancelButton.getImage(); | |
307 if ((i !is null) && (!i.isDisposed())) { | |
308 i.dispose(); | |
309 } | |
310 } | |
311 }); | |
312 | |
313 // We create a composite to create the progress bar in | |
314 // so that it can be centered. See bug #32331 | |
315 fProgressBarComposite = new Composite(this, DWT.NONE); | |
316 GridLayout layout = new GridLayout(); | |
317 layout.horizontalSpacing = 0; | |
318 layout.verticalSpacing = 0; | |
319 layout.marginHeight = 0; | |
320 layout.marginWidth = 0; | |
321 fProgressBarComposite.setLayout(layout); | |
322 fProgressBar = new ProgressIndicator(fProgressBarComposite); | |
323 fProgressBar.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | |
324 | GridData.GRAB_VERTICAL)); | |
325 | |
326 fStopButtonCursor = new Cursor(getDisplay(), DWT.CURSOR_ARROW); | |
327 } | |
328 | |
329 /** | |
330 * Notifies that the main task is beginning. | |
331 * | |
332 * @param name the name (or description) of the main task | |
333 * @param totalWork the total number of work units into which | |
334 * the main task is been subdivided. If the value is 0 or UNKNOWN the | |
335 * implemenation is free to indicate progress in a way which doesn't | |
336 * require the total number of work units in advance. In general users | |
337 * should use the UNKNOWN value if they don't know the total amount of | |
338 * work units. | |
339 */ | |
340 public void beginTask(String name, int totalWork) { | |
341 long timestamp = System.currentTimeMillis(); | |
342 fStartTime = timestamp; | |
343 bool animated = (totalWork is UNKNOWN || totalWork is 0); | |
344 // make sure the progress bar is made visible while | |
345 // the task is running. Fixes bug 32198 for the non-animated case. | |
39 | 346 Runnable timer = new class(animated,timestamp) Runnable { |
26 | 347 bool animated_; |
348 long timestamp_; | |
39 | 349 this(bool a,long b){ |
350 animated_=a; | |
351 timestamp_=b; | |
26 | 352 } |
353 public void run() { | |
354 this.outer.startTask(timestamp_, animated_); | |
355 } | |
356 }; | |
357 if (fProgressBar is null) { | |
358 return; | |
359 } | |
360 | |
361 fProgressBar.getDisplay().timerExec(DELAY_PROGRESS, timer); | |
362 if (!animated) { | |
363 fProgressBar.beginTask(totalWork); | |
364 } | |
365 if (name is null) { | |
366 fTaskName = "";//$NON-NLS-1$ | |
367 } else { | |
368 fTaskName = name; | |
369 } | |
370 setMessage(fTaskName); | |
371 } | |
372 | |
373 /** | |
374 * Notifies that the work is done; that is, either the main task is completed or the | |
375 * user cancelled it. | |
376 * Done() can be called more than once; an implementation should be prepared to handle | |
377 * this case. | |
378 */ | |
379 public void done() { | |
380 | |
381 fStartTime = 0; | |
382 | |
383 if (fProgressBar !is null) { | |
384 fProgressBar.sendRemainingWork(); | |
385 fProgressBar.done(); | |
386 } | |
387 setMessage(null); | |
388 | |
389 hideProgress(); | |
390 } | |
391 | |
392 /** | |
393 * Returns the status line's progress monitor | |
394 * @return {@link IProgressMonitor} the progress monitor | |
395 */ | |
396 public IProgressMonitor getProgressMonitor() { | |
397 return this; | |
398 } | |
399 | |
400 /** | |
401 * @private | |
402 */ | |
403 protected void handleDispose() { | |
404 if (fStopButtonCursor !is null) { | |
405 fStopButtonCursor.dispose(); | |
406 fStopButtonCursor = null; | |
407 } | |
408 if (fProgressBar !is null) { | |
409 fProgressBar.dispose(); | |
410 fProgressBar = null; | |
411 } | |
412 } | |
413 | |
414 /** | |
415 * Hides the Cancel button and ProgressIndicator. | |
416 * @private | |
417 */ | |
418 protected void hideProgress() { | |
419 | |
420 if (fProgressIsVisible && !isDisposed()) { | |
421 fProgressIsVisible = false; | |
422 fCancelEnabled = false; | |
423 fCancelButtonIsVisible = false; | |
424 if (fToolBar !is null && !fToolBar.isDisposed()) { | |
425 fToolBar.setVisible(false); | |
426 } | |
427 if (fProgressBarComposite !is null | |
428 && !fProgressBarComposite.isDisposed()) { | |
429 fProgressBarComposite.setVisible(false); | |
430 } | |
431 layout(); | |
432 } | |
433 } | |
434 | |
435 /** | |
436 * @see IProgressMonitor#internalWorked(double) | |
437 */ | |
438 public void internalWorked(double work) { | |
439 if (!fProgressIsVisible) { | |
440 if (System.currentTimeMillis() - fStartTime > DELAY_PROGRESS) { | |
441 showProgress(); | |
442 } | |
443 } | |
444 | |
445 if (fProgressBar !is null) { | |
446 fProgressBar.worked(work); | |
447 } | |
448 } | |
449 | |
450 /** | |
451 * Returns true if the user does some UI action to cancel this operation. | |
452 * (like hitting the Cancel button on the progress dialog). | |
453 * The long running operation typically polls isCanceled(). | |
454 */ | |
455 public bool isCanceled() { | |
456 return fIsCanceled; | |
457 } | |
458 | |
459 /** | |
460 * Returns <code>true</true> if the ProgressIndication provides UI for canceling | |
461 * a long running operation. | |
462 * @return <code>true</true> if the ProgressIndication provides UI for canceling | |
463 */ | |
464 public bool isCancelEnabled() { | |
465 return fCancelEnabled; | |
466 } | |
467 | |
468 /** | |
469 * Sets the cancel status. This method is usually called with the | |
470 * argument false if a client wants to abort a cancel action. | |
471 */ | |
472 public void setCanceled(bool b) { | |
473 fIsCanceled = b; | |
474 if (fCancelButton !is null) { | |
475 fCancelButton.setEnabled(!b); | |
476 } | |
477 } | |
478 | |
479 /** | |
480 * Controls whether the ProgressIndication provides UI for canceling | |
481 * a long running operation. | |
482 * If the ProgressIndication is currently visible calling this method may have | |
483 * a direct effect on the layout because it will make a cancel button visible. | |
484 * | |
485 * @param enabled <code>true</true> if cancel should be enabled | |
486 */ | |
487 public void setCancelEnabled(bool enabled) { | |
488 fCancelEnabled = enabled; | |
489 if (fProgressIsVisible && !fCancelButtonIsVisible && enabled) { | |
490 showButton(); | |
491 layout(); | |
492 } | |
493 if (fCancelButton !is null && !fCancelButton.isDisposed()) { | |
494 fCancelButton.setEnabled(enabled); | |
495 } | |
496 } | |
497 | |
498 /** | |
499 * Sets the error message text to be displayed on the status line. | |
500 * The image on the status line is cleared. | |
501 * | |
502 * @param message the error message, or <code>null</code> for no error message | |
503 */ | |
504 public void setErrorMessage(String message) { | |
505 setErrorMessage(null, message); | |
506 } | |
507 | |
508 /** | |
509 * Sets an image and error message text to be displayed on the status line. | |
510 * | |
511 * @param image the image to use, or <code>null</code> for no image | |
512 * @param message the error message, or <code>null</code> for no error message | |
513 */ | |
514 public void setErrorMessage(Image image, String message) { | |
515 fErrorText = trim(message); | |
516 fErrorImage = image; | |
517 updateMessageLabel(); | |
518 } | |
519 | |
520 /** | |
521 * Applies the given font to this status line. | |
522 */ | |
523 public void setFont(Font font) { | |
524 super.setFont(font); | |
525 Control[] children = getChildren(); | |
526 for (int i = 0; i < children.length; i++) { | |
527 children[i].setFont(font); | |
528 } | |
529 } | |
530 | |
531 /** | |
532 * Sets the message text to be displayed on the status line. | |
533 * The image on the status line is cleared. | |
534 * | |
535 * @param message the error message, or <code>null</code> for no error message | |
536 */ | |
537 public void setMessage(String message) { | |
538 setMessage(null, message); | |
539 } | |
540 | |
541 /** | |
542 * Sets an image and a message text to be displayed on the status line. | |
543 * | |
544 * @param image the image to use, or <code>null</code> for no image | |
545 * @param message the message, or <code>null</code> for no message | |
546 */ | |
547 public void setMessage(Image image, String message) { | |
548 fMessageText = trim(message); | |
549 fMessageImage = image; | |
550 updateMessageLabel(); | |
551 } | |
552 | |
553 /** | |
554 * @see IProgressMonitor#setTaskName(java.lang.String) | |
555 */ | |
556 public void setTaskName(String name) { | |
557 fTaskName = name; | |
558 } | |
559 | |
560 /** | |
561 * Makes the Cancel button visible. | |
562 * @private | |
563 */ | |
564 protected void showButton() { | |
565 if (fToolBar !is null && !fToolBar.isDisposed()) { | |
566 fToolBar.setVisible(true); | |
567 fToolBar.setEnabled(true); | |
568 fToolBar.setCursor(fStopButtonCursor); | |
569 fCancelButtonIsVisible = true; | |
570 } | |
571 } | |
572 | |
573 /** | |
574 * Shows the Cancel button and ProgressIndicator. | |
575 * @private | |
576 */ | |
577 protected void showProgress() { | |
578 if (!fProgressIsVisible && !isDisposed()) { | |
579 fProgressIsVisible = true; | |
580 if (fCancelEnabled) { | |
581 showButton(); | |
582 } | |
583 if (fProgressBarComposite !is null | |
584 && !fProgressBarComposite.isDisposed()) { | |
585 fProgressBarComposite.setVisible(true); | |
586 } | |
587 layout(); | |
588 } | |
589 } | |
590 | |
591 /** | |
592 * @private | |
593 */ | |
594 void startTask(long timestamp, bool animated) { | |
595 if (!fProgressIsVisible && fStartTime is timestamp) { | |
596 showProgress(); | |
597 if (animated) { | |
598 if (fProgressBar !is null && !fProgressBar.isDisposed()) { | |
599 fProgressBar.beginAnimatedTask(); | |
600 } | |
601 } | |
602 } | |
603 } | |
604 | |
605 /** | |
606 * Notifies that a subtask of the main task is beginning. | |
607 * Subtasks are optional; the main task might not have subtasks. | |
608 * @param name the name (or description) of the subtask | |
609 * @see IProgressMonitor#subTask(String) | |
610 */ | |
611 public void subTask(String name) { | |
612 String text; | |
613 if (fTaskName.length is 0) { | |
614 text = name; | |
615 } else { | |
616 text = JFaceResources.format( | |
617 "Set_SubTask", [ fTaskName, name ]);//$NON-NLS-1$ | |
618 } | |
619 setMessage(text); | |
620 } | |
621 | |
622 /** | |
623 * Trims the message to be displayable in the status line. | |
624 * This just pulls out the first line of the message. | |
625 * Allows null. | |
626 */ | |
627 String trim(String message) { | |
628 if (message is null) { | |
629 return null; | |
630 } | |
631 int cr = message.indexOf('\r'); | |
632 int lf = message.indexOf('\n'); | |
633 if (cr is -1 && lf is -1) { | |
634 return message; | |
635 } | |
636 int len; | |
637 if (cr is -1) { | |
638 len = lf; | |
639 } else if (lf is -1) { | |
640 len = cr; | |
641 } else { | |
642 len = Math.min(cr, lf); | |
643 } | |
644 return message.substring(0, len); | |
645 } | |
646 | |
647 /** | |
648 * Updates the message label widget. | |
649 */ | |
650 protected void updateMessageLabel() { | |
651 if (fMessageLabel !is null && !fMessageLabel.isDisposed()) { | |
652 Display display = fMessageLabel.getDisplay(); | |
653 if ((fErrorText !is null && fErrorText.length > 0) | |
654 || fErrorImage !is null) { | |
655 fMessageLabel.setForeground(JFaceColors.getErrorText(display)); | |
656 fMessageLabel.setText(fErrorText); | |
657 fMessageLabel.setImage(fErrorImage); | |
658 } else { | |
659 fMessageLabel.setForeground(display | |
660 .getSystemColor(DWT.COLOR_WIDGET_FOREGROUND)); | |
661 fMessageLabel.setText(fMessageText is null ? "" : fMessageText); //$NON-NLS-1$ | |
662 fMessageLabel.setImage(fMessageImage); | |
663 } | |
664 } | |
665 } | |
666 | |
667 /** | |
668 * @see IProgressMonitor#worked(int) | |
669 */ | |
670 public void worked(int work) { | |
671 internalWorked(work); | |
672 } | |
673 } |