Revision 674 org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/task/DefaultJTasksStatus.java
DefaultJTasksStatus.java | ||
---|---|---|
22 | 22 |
package org.gvsig.tools.swing.impl.task; |
23 | 23 |
|
24 | 24 |
import java.awt.Dimension; |
25 |
import java.awt.FlowLayout; |
|
25 |
import java.awt.GridBagConstraints; |
|
26 |
import java.awt.GridBagLayout; |
|
26 | 27 |
import java.awt.LayoutManager; |
27 | 28 |
import java.awt.event.ActionEvent; |
28 | 29 |
import java.awt.event.ActionListener; |
... | ... | |
90 | 91 |
|
91 | 92 |
private void createComponents() { |
92 | 93 |
this.label = new JLabel(); |
93 |
this.label.setPreferredSize( new Dimension( 200, 16)); |
|
94 | 94 |
|
95 | 95 |
this.progressBar = new JProgressBar(1,100); |
96 |
this.progressBar.setPreferredSize(new Dimension( 40, 10));
|
|
96 |
this.progressBar.setPreferredSize(new Dimension(40, 10));
|
|
97 | 97 |
this.progressBar.setIndeterminate(true); |
98 | 98 |
this.progressBar.setBorderPainted(true); |
99 | 99 |
this.progressBar.setVisible(false); |
... | ... | |
111 | 111 |
} |
112 | 112 |
}); |
113 | 113 |
|
114 |
LayoutManager layout = new FlowLayout();
|
|
114 |
LayoutManager layout = new GridBagLayout();
|
|
115 | 115 |
this.setLayout(layout); |
116 |
GridBagConstraints c = new GridBagConstraints(); |
|
117 |
|
|
118 |
c.gridx = 0; |
|
119 |
c.fill = GridBagConstraints.VERTICAL; |
|
120 |
c.weightx = 0.0d; |
|
121 |
c.ipadx = 1; |
|
122 |
this.add(this.label, c); |
|
123 |
|
|
124 |
c.gridx = 1; |
|
125 |
c.fill = GridBagConstraints.BOTH; |
|
126 |
c.weightx = 1.0d; |
|
127 |
this.add(this.progressBar, c); |
|
116 | 128 |
|
117 |
this.add(this.label); |
|
118 |
this.add(this.progressBar); |
|
119 |
this.add(this.showAllTaskStatusButton); |
|
129 |
c.gridx = 2; |
|
130 |
c.fill = GridBagConstraints.VERTICAL; |
|
131 |
c.weightx = 0.0d; |
|
132 |
this.add(this.showAllTaskStatusButton); |
|
120 | 133 |
} |
121 | 134 |
|
122 | 135 |
private ImageIcon getIcon(String name) { |
Also available in: Unified diff