01: /*
02: * soapUI, copyright (C) 2004-2007 eviware.com
03: *
04: * soapUI is free software; you can redistribute it and/or modify it under the
05: * terms of version 2.1 of the GNU Lesser General Public License as published by
06: * the Free Software Foundation.
07: *
08: * soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
09: * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10: * See the GNU Lesser General Public License for more details at gnu.org.
11: */
12:
13: package com.eviware.soapui.support.components;
14:
15: import java.awt.Color;
16:
17: import javax.swing.BorderFactory;
18: import javax.swing.JProgressBar;
19:
20: public class JEditorStatusBarWithProgress extends JEditorStatusBar {
21: private JProgressBar progressBar;
22:
23: public JEditorStatusBarWithProgress() {
24: super ();
25:
26: initProgressBar();
27: }
28:
29: private void initProgressBar() {
30: progressBar = new JProgressBar();
31: progressBar.setBackground(Color.WHITE);
32: progressBar.setBorder(BorderFactory.createCompoundBorder(
33: BorderFactory.createEmptyBorder(2, 2, 2, 3),
34: BorderFactory.createMatteBorder(0, 0, 1, 1,
35: Color.LIGHT_GRAY)));
36:
37: setStatusComponent(progressBar);
38: }
39:
40: public JEditorStatusBarWithProgress(JEditorStatusBarTarget target) {
41: super (target);
42:
43: initProgressBar();
44: }
45:
46: public JProgressBar getProgressBar() {
47: return progressBar;
48: }
49:
50: public void setIndeterminate(boolean newValue) {
51: progressBar.setIndeterminate(newValue);
52: }
53:
54: public void setValue(int n) {
55: progressBar.setValue(n);
56: }
57: }
|