01: //The contents of this file are subject to the Mozilla Public License Version 1.1
02: //(the "License"); you may not use this file except in compliance with the
03: //License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
04: //
05: //Software distributed under the License is distributed on an "AS IS" basis,
06: //WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
07: //for the specific language governing rights and
08: //limitations under the License.
09: //
10: //The Original Code is "The Columba Project"
11: //
12: //The Initial Developers of the Original Code are Frederik Dietz and Timo Stich.
13: //Portions created by Frederik Dietz and Timo Stich are Copyright (C) 2003.
14: //
15: //All Rights Reserved.
16: package org.columba.api.command;
17:
18: /**
19: *
20: * Represents the clue between the gui and all the folders which want
21: * to notify the statusbar.
22: *
23: * <p>
24: * We want the folders to be independent from the gui code. So, the
25: * folders should communicate with the Observable, whereas the
26: * status observers with the Observable.
27: *
28: * <p>
29: * This makes it necessary of course to register as Observer.
30: *
31: * @author fdietz
32: */
33: public interface IStatusObservable {
34: /**
35: * Sets the current value of the progress bar.
36: * @param i New current value of progress bar
37: */
38: public void setCurrent(int i);
39:
40: /**
41: * Sets the maximum value for the progress bar.
42: * @param i New max. value for progress bar
43: */
44: public void setMax(int i);
45:
46: /**
47: * Sets the progress bar value to zero, i.e. clears the progress bar.
48: * This is the same as calling setCurrent(0)
49: */
50: public void resetCurrent();
51:
52: public boolean isCancelled();
53:
54: public void cancel(boolean b);
55:
56: /**
57: * Set the text to be displayed in the status bar
58: * @param string Text to display in status bar
59: */
60: public void setMessage(String string);
61:
62: /**
63: * Clears the text displayed in the status bar.
64: */
65: public void clearMessage();
66:
67: /**
68: * Clears the text displayed in the status bar - with a given delay.
69: * The delay used is 500 ms.
70: * <br>
71: * If a new text is set within this delay, the text is not cleared.
72: */
73: public void clearMessageWithDelay();
74: }
|