1 /*
2 * The baseCode project
3 *
4 * Copyright (c) 2006 University of British Columbia
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 */
19 package ubic.basecode.util;
20
21 /**
22 * Intended use is to display 'status' information or other messages to users in a non-disruptive fashion (though the
23 * actual use is up to the implementer). Copyright (c) 2004 University of British Columbia
24 *
25 * @author Paul Pavlidis
26 *
27 */
28 public interface StatusViewer {
29
30 /**
31 * Clear the status display. Implementers that do not write to GUI elements probably don't need to do anything.
32 */
33 public abstract void clear();
34
35 /**
36 * Print an error status messge.
37 *
38 * @param s
39 */
40 public abstract void showError( String s );
41
42 /**
43 * @param e
44 */
45 public abstract void showError( String message, Throwable e );
46
47 /**
48 * @param e
49 */
50 public abstract void showError( Throwable e );
51
52 public void showProgress( String message );
53
54 /**
55 * Print the status to the location appropriate for this application.
56 *
57 * @param s
58 */
59 public abstract void showStatus( String s );
60
61 /**
62 * @param s
63 * @param callSuper set to false to suppress calling super.showStatus() (default is true)
64 */
65 public abstract void showStatus( String s, boolean callSuper );
66
67 /**
68 * @param s
69 */
70 public abstract void showWarning( String s );
71 }