29
29
30
30
package org .scijava .ui .swing ;
31
31
32
- import java .awt .BorderLayout ;
33
-
32
+ import javax .swing .JComponent ;
34
33
import javax .swing .JLabel ;
35
34
import javax .swing .JPanel ;
36
35
import javax .swing .JProgressBar ;
47
46
import org .scijava .ui .StatusBar ;
48
47
import org .scijava .ui .UIService ;
49
48
import org .scijava .ui .awt .AWTInputEventDispatcher ;
49
+ import org .scijava .ui .swing .task .SwingTaskMonitorComponent ;
50
+
51
+ import java .awt .BorderLayout ;
52
+ import java .awt .Dimension ;
50
53
51
54
/**
52
55
* Swing implementation of {@link StatusBar}.
@@ -72,14 +75,17 @@ public class SwingStatusBar extends JPanel implements StatusBar {
72
75
73
76
public SwingStatusBar (final Context context ) {
74
77
context .inject (this );
75
-
76
78
statusText = new JLabel (appService .getApp ().getInfo (false ));
77
79
statusText .setBorder (new BevelBorder (BevelBorder .LOWERED ));
78
80
progressBar = new JProgressBar ();
79
81
progressBar .setVisible (false );
80
82
setLayout (new BorderLayout ());
81
83
add (statusText , BorderLayout .CENTER );
82
- add (progressBar , BorderLayout .EAST );
84
+ add (progressBar , BorderLayout .WEST );
85
+ JComponent progress = new SwingTaskMonitorComponent (context , true , true ,300 , false ).getComponent ();
86
+ int h = getPreferredSize ().height ;
87
+ progress .setPreferredSize (new Dimension (h ,h ));
88
+ add (progress , BorderLayout .EAST );
83
89
}
84
90
85
91
// -- SwingStatusBar methods --
0 commit comments