Clover coverage report - baseCode - 0.2.5 Coverage timestamp: Tue Apr 12 2005 11:31:58 EDT FRAMES NO FRAMES |
file stats: | LOC: | 69 |  | Methods: | 4
| NCLOC: | 32 |  | Classes: | 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
Source file | Conditionals | Statements | Methods | TOTAL
StatusJlabel.java | - | 0% | 0% | 0% |

1 |  |
     package baseCode.gui;
2 |  |
3 |  |
     import javax.swing.Icon;
4 |  |
     import javax.swing.ImageIcon;
5 |  |
     import javax.swing.JLabel;
6 |  |
7 |  |
     import baseCode.util.StatusViewer;
8 |  |
9 |  |
     /**
10 |  |
      * <p>
11 |  |
      * Title:
12 |  |
      * </p>
13 |  |
      * <p>
14 |  |
      * Description:
15 |  |
      * </p>
16 |  |
      * <p>
17 |  |
      * Copyright: Copyright (c) 2003
18 |  |
      * </p>
19 |  |
      * <p>
20 |  |
      * Company:
21 |  |
      * </p>
22 |  |
      *
23 |  |
      * @author Paul Pavlidis
24 |  |
      * @version $Id: StatusJlabel.java,v 1.4 2004/07/27 03:18:58 pavlidis Exp $
25 |  |
      */
26 |  |
27 |  |
     public class StatusJlabel implements StatusViewer {
28 |  |
        private JLabel jlabel;
29 |  |
30 |  |
        Icon errorIcon = null;
31 |  |
32 | 0 |
        public StatusJlabel( JLabel l ) {
33 | 0 |
           errorIcon = new ImageIcon( StatusJlabel.class
34 |  |
                 .getResource( "resources/alert.gif" ) );
35 | 0 |
           this.jlabel = l;
36 |  |
        }
37 |  |
38 | 0 |
        public void setStatus( String s ) {
39 | 0 |
           final String message = s;
40 | 0 |
           System.err.println( s );
41 | 0 |
           jlabel.setText( message );
42 | 0 |
           jlabel.setIcon( null );
43 | 0 |
           jlabel.repaint();
44 |  |
        }
45 |  |
46 |  |
        /*
47 |  |
         * (non-Javadoc)
48 |  |
         *
49 |  |
         * @see baseCode.util.StatusViewer#setError(java.lang.String)
50 |  |
         */
51 | 0 |
        public void setError( String s ) {
52 | 0 |
           final String message = s;
53 | 0 |
           System.err.println( s );
54 | 0 |
           jlabel.setText( message );
55 | 0 |
           jlabel.setIcon( errorIcon );
56 | 0 |
           jlabel.repaint();
57 |  |
        }
58 |  |
59 |  |
        /*
60 |  |
         * (non-Javadoc)
61 |  |
         *
62 |  |
         * @see baseCode.util.StatusViewer#clear()
63 |  |
         */
64 | 0 |
        public void clear() {
65 | 0 |
           jlabel.setText( "" );
66 | 0 |
           jlabel.setIcon( null );
67 | 0 |
           jlabel.repaint();
68 |  |
        }
69 |  |
     }