KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > columba > api > command > IStatusObservable


1 //The contents of this file are subject to the Mozilla Public License Version 1.1
2
//(the "License"); you may not use this file except in compliance with the
3
//License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
4
//
5
//Software distributed under the License is distributed on an "AS IS" basis,
6
//WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
7
//for the specific language governing rights and
8
//limitations under the License.
9
//
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  *
21  * Represents the clue between the gui and all the folders which want
22  * to notify the statusbar.
23  *
24  * <p>
25  * We want the folders to be independent from the gui code. So, the
26  * folders should communicate with the Observable, whereas the
27  * status observers with the Observable.
28  *
29  * <p>
30  * This makes it necessary of course to register as Observer.
31  *
32  * @author fdietz
33  */

34 public interface IStatusObservable {
35     /**
36  * Sets the current value of the progress bar.
37  * @param i New current value of progress bar
38  */

39     public void setCurrent(int i);
40
41     /**
42  * Sets the maximum value for the progress bar.
43  * @param i New max. value for progress bar
44  */

45     public void setMax(int i);
46
47     /**
48  * Sets the progress bar value to zero, i.e. clears the progress bar.
49  * This is the same as calling setCurrent(0)
50  */

51     public void resetCurrent();
52
53     public boolean isCancelled();
54
55     public void cancel(boolean b);
56
57     /**
58  * Set the text to be displayed in the status bar
59  * @param string Text to display in status bar
60  */

61     public void setMessage(String JavaDoc string);
62
63     /**
64  * Clears the text displayed in the status bar.
65  */

66     public void clearMessage();
67
68     /**
69  * Clears the text displayed in the status bar - with a given delay.
70  * The delay used is 500 ms.
71  * <br>
72  * If a new text is set within this delay, the text is not cleared.
73  */

74     public void clearMessageWithDelay();
75 }
76
Popular Tags