Revision 4499 trunk/extensions/extRasterTools/src/com/iver/cit/gvsig/rasterTools/saveRaster/ui/info/EndInfoPanel.java
EndInfoPanel.java | ||
---|---|---|
18 | 18 |
private JButton jButton = null; |
19 | 19 |
private JPanel pCompression = null; |
20 | 20 |
private JLabel lFileNameTag = null; |
21 |
private JLabel lFileName = null; |
|
22 | 21 |
private JLabel lSize = null; |
23 | 22 |
private JLabel lSizeTag = null; |
24 | 23 |
private JLabel lTime = null; |
... | ... | |
26 | 25 |
private JLabel lCompress = null; |
27 | 26 |
private JPanel jPanel = null; |
28 | 27 |
private JPanel pMain = null; |
28 |
private JLabel lFile = null; |
|
29 | 29 |
/** |
30 | 30 |
* This is the default constructor |
31 | 31 |
*/ |
... | ... | |
60 | 60 |
*/ |
61 | 61 |
private JPanel getJPanel() { |
62 | 62 |
if (pFile == null) { |
63 |
lFile = new JLabel(); |
|
64 |
lFile.setText(""); |
|
65 |
lFile.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); |
|
66 |
lFile.setPreferredSize(new java.awt.Dimension(410,15)); |
|
63 | 67 |
FlowLayout flowLayout = new FlowLayout(); |
64 | 68 |
flowLayout.setAlignment(java.awt.FlowLayout.LEFT); |
65 |
flowLayout.setHgap(10);
|
|
69 |
flowLayout.setHgap(5);
|
|
66 | 70 |
pFile = new JPanel(); |
67 | 71 |
pFile.setLayout(flowLayout); |
68 | 72 |
pFile.setPreferredSize(new java.awt.Dimension(472,25)); |
69 |
lFileName = new JLabel(); |
|
70 |
lFileName.setPreferredSize(new Dimension(420, 15)); |
|
71 |
lFileName.setText(""); |
|
72 | 73 |
lFileNameTag = new JLabel(); |
73 | 74 |
lFileNameTag.setText("File:"); |
74 | 75 |
pFile.add(lFileNameTag, null); |
75 |
pFile.add(lFileName, null);
|
|
76 |
pFile.add(lFile, null); |
|
76 | 77 |
} |
77 | 78 |
return pFile; |
78 | 79 |
} |
... | ... | |
86 | 87 |
if (pTime == null) { |
87 | 88 |
lTime = new JLabel(); |
88 | 89 |
lTime.setText(""); |
89 |
lTime.setPreferredSize(new java.awt.Dimension(100,15)); |
|
90 |
lTime.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); |
|
91 |
lTime.setPreferredSize(new java.awt.Dimension(170,15)); |
|
90 | 92 |
lSizeTag = new JLabel(); |
91 | 93 |
lSizeTag.setText("Size: "); |
92 | 94 |
FlowLayout flowLayout1 = new FlowLayout(); |
93 | 95 |
flowLayout1.setAlignment(java.awt.FlowLayout.LEFT); |
94 |
flowLayout1.setHgap(10);
|
|
96 |
flowLayout1.setHgap(5);
|
|
95 | 97 |
lSize = new JLabel(); |
96 | 98 |
lSize.setText(""); |
97 |
lSize.setPreferredSize(new java.awt.Dimension(130,15)); |
|
99 |
lSize.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); |
|
100 |
lSize.setPreferredSize(new java.awt.Dimension(170,15)); |
|
98 | 101 |
lTimeTag = new JLabel(); |
99 | 102 |
lTimeTag.setText("Time:"); |
100 | 103 |
pTime = new JPanel(); |
... | ... | |
148 | 151 |
if (pCompression == null) { |
149 | 152 |
FlowLayout flowLayout3 = new FlowLayout(); |
150 | 153 |
flowLayout3.setAlignment(java.awt.FlowLayout.LEFT); |
151 |
flowLayout3.setHgap(10);
|
|
154 |
flowLayout3.setHgap(5);
|
|
152 | 155 |
lCompress = new JLabel(); |
153 | 156 |
lCompress.setText(""); |
157 |
lCompress.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); |
|
154 | 158 |
lCompress.setPreferredSize(new java.awt.Dimension(50,15)); |
155 | 159 |
lCompressTag = new JLabel(); |
156 | 160 |
lCompressTag.setText("Compression:"); |
... | ... | |
229 | 233 |
} |
230 | 234 |
|
231 | 235 |
public void setFileName(String fileName) { |
232 |
lFileName.setText(fileName);
|
|
236 |
lFile.setText(fileName); |
|
233 | 237 |
} |
234 | 238 |
|
235 | 239 |
/** |
... | ... | |
239 | 243 |
* @param size Longitud en bytes. |
240 | 244 |
*/ |
241 | 245 |
public void setSize(long size) { |
242 |
int bytes = 0, kBytes = 0, mBytes = 0, gBytes = 0; |
|
243 |
if(size < 1024) |
|
244 |
bytes = (int)size; |
|
245 |
else{ |
|
246 |
int bytes = (int)size, kBytes = 0, mBytes = 0, gBytes = 0; |
|
247 |
if(size >= 1024){ |
|
246 | 248 |
kBytes = (int)(size / 1024); |
247 | 249 |
bytes = (int)(size - (kBytes * 1024)); |
248 | 250 |
if(kBytes >= 1024){ |
... | ... | |
272 | 274 |
* @param time Tiempo en milisegundos |
273 | 275 |
*/ |
274 | 276 |
public void setTime(long time){ |
275 |
int days = 0, hours = 0, minuts = 0, seconds = 0; |
|
276 |
if(time < 60) |
|
277 |
seconds = (int)(time / 1000D); |
|
278 |
else{ |
|
277 |
int days = 0, hours = 0, minuts = 0, seconds = (int)(time / 1000D); |
|
278 |
if(seconds >= 60){ |
|
279 | 279 |
minuts = (int)(minuts / 60); |
280 | 280 |
seconds = (int)(time - (minuts * 60)); |
281 | 281 |
if(minuts >= 60){ |
282 | 282 |
hours = (int)(minuts / 1024); |
283 |
|
|
283 |
minuts = (int)(minuts - (hours * 60)); |
|
284 | 284 |
} |
285 | 285 |
} |
286 | 286 |
StringBuffer s = new StringBuffer(); |
287 |
if(days != 0) |
|
288 |
s.append(days+" D "); |
|
289 | 287 |
if(hours != 0) |
290 | 288 |
s.append(hours+" H "); |
291 | 289 |
if(minuts != 0) |
292 |
s.append(minuts+" min ");
|
|
290 |
s.append(minuts+" Min ");
|
|
293 | 291 |
if(seconds != 0) |
294 |
s.append(seconds+" sec ");
|
|
292 |
s.append(seconds+" Sec ");
|
|
295 | 293 |
lTime.setText(s.toString()); |
296 | 294 |
} |
297 | 295 |
|
296 |
/** |
|
297 |
* |
|
298 |
* @param comp |
|
299 |
*/ |
|
300 |
public void setCompression(boolean comp){ |
|
301 |
if(comp) |
|
302 |
lCompress.setText("Yes"); |
|
303 |
else |
|
304 |
lCompress.setText("No"); |
|
305 |
} |
|
298 | 306 |
|
299 | 307 |
} // @jve:decl-index=0:visual-constraint="10,10" |
Also available in: Unified diff