01: package jdepend.swingui;
02:
03: import javax.swing.JComponent;
04: import javax.swing.JPanel;
05: import javax.swing.BoxLayout;
06:
07: /**
08: * The <code>StatusPanel</code> class defines the status-related UI
09: * components.
10: * <p>
11: * This panel primarily contains either a text field or a progress bar.
12: *
13: * @author <b>Mike Clark</b>
14: * @author Clarkware Consulting, Inc.
15: */
16:
17: public class StatusPanel extends JPanel {
18:
19: /**
20: * Constructs a <code>StatusPanel</code>.
21: */
22: public StatusPanel() {
23: super ();
24: setLayout(new BoxLayout(this , BoxLayout.Y_AXIS));
25: }
26:
27: /**
28: * Sets the specified component as the current status component of this
29: * panel.
30: *
31: * @param component Status component.
32: */
33: public void setStatusComponent(JComponent component) {
34: removeAll();
35: add(component);
36: repaint();
37: validate();
38: }
39: }
|