1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.xmlhammer.gui.status;
23
24 import java.awt.BorderLayout;
25
26 import javax.swing.JPanel;
27 import javax.swing.border.EmptyBorder;
28
29 import org.bounce.CardPanel;
30 import org.xmlhammer.gui.ProjectView;
31
32 /***
33 * Input Panel.
34 *
35 * Allows to select either one URI, multiple URIs or
36 * a range of files.
37 *
38 * @version $Revision: 1.3 $, $Date: 2007/07/04 19:42:51 $
39 * @author Edwin Dankert <edankert@gmail.com>
40 */
41
42 public class StatusPanel extends JPanel {
43 private static final long serialVersionUID = -7486036209301795423L;
44 private CardPanel<StatusBar> statusPanel = null;
45 private StatusBar base = null;
46
47 /***
48 * Constructs a new Input Panel.
49 */
50 public StatusPanel() {
51 super( new BorderLayout());
52
53 statusPanel = new CardPanel<StatusBar>();
54 setBorder( new EmptyBorder( 2, 2, 2, 2));
55
56 add( statusPanel, BorderLayout.CENTER);
57 base = new StatusBar();
58
59 statusPanel.add(base);
60 }
61
62 public void showView( ProjectView view) {
63 if (view == null) {
64 statusPanel.show( base);
65 } else {
66 statusPanel.show( view.getStatusBar());
67 }
68 }
69
70 public void addView( ProjectView view){
71 statusPanel.add( view.getStatusBar());
72 }
73
74 public void removeView( ProjectView view){
75 statusPanel.remove( view.getStatusBar());
76 }
77
78 public StatusBar getBase() {
79 return base;
80 }
81 }