40
40
import java .util .Comparator ;
41
41
import java .util .Set ;
42
42
import java .util .TreeSet ;
43
- import javax .swing .BorderFactory ;
44
43
import javax .swing .ButtonGroup ;
45
44
import javax .swing .Icon ;
46
45
import javax .swing .JComponent ;
67
66
* @author Jiri Sedlacek
68
67
*/
69
68
@ NbBundle .Messages ({
70
- "HeapViewerComponent_LoadingProgress=Loading heap dump..."
69
+ "HeapViewerComponent_LoadingProgress=Opening heap dump..."
71
70
})
72
71
public final class HeapViewerComponent extends JPanel {
73
72
@@ -79,15 +78,11 @@ public final class HeapViewerComponent extends JPanel {
79
78
80
79
public HeapViewerComponent (HeapViewer heapViewer ) {
81
80
super (new BorderLayout ());
81
+ setOpaque (false );
82
82
83
83
this .heapViewer = heapViewer ;
84
84
85
- toolbar = ProfilerToolbar .create (true );
86
- add (toolbar .getComponent (), BorderLayout .NORTH );
87
-
88
- JLabel loading = new JLabel (Bundle .HeapViewerComponent_LoadingProgress ());
89
- loading .setBorder (BorderFactory .createEmptyBorder (0 , 5 , 0 , 5 ));
90
- toolbar .add (loading );
85
+ add (new JLabel (Bundle .HeapViewerComponent_LoadingProgress (), JLabel .CENTER ), BorderLayout .CENTER );
91
86
92
87
new RequestProcessor ("HPROF initializer for " + getName ()).post (new Runnable () { // NOI18N
93
88
public void run () { initImpl (); }
@@ -135,7 +130,7 @@ public int compare(HeapViewerFeature f1, HeapViewerFeature f2) {
135
130
}
136
131
features [i ] = featuresS .toArray (new HeapViewerFeature [0 ]);
137
132
}
138
-
133
+
139
134
SwingUtilities .invokeLater (new Runnable () {
140
135
public void run () { initComponents (); }
141
136
});
@@ -159,8 +154,10 @@ public int compare(HeapViewerFeature f1, HeapViewerFeature f2) {
159
154
private MainView mainView ;
160
155
161
156
private void initComponents () {
162
- // Remove the loading progress
163
- toolbar .remove (0 );
157
+ removeAll ();
158
+
159
+ toolbar = ProfilerToolbar .create (true );
160
+ add (toolbar .getComponent (), BorderLayout .NORTH );
164
161
165
162
// Reserve space for views toolbars
166
163
viewToolbar = ProfilerToolbar .create (false );
0 commit comments