svn-gvsig-desktop / branches / CqCMSDvp / libraries / libCq CMS for java.old / src / org / cresques / ui / raster / ProgressSaveRasterPanel.java @ 2312
History | View | Annotate | Download (3.06 KB)
1 |
/*
|
---|---|
2 |
* Cresques Mapping Suite. Graphic Library for constructing mapping applications.
|
3 |
*
|
4 |
* Copyright (C) 2004-5.
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
19 |
*
|
20 |
* For more information, contact:
|
21 |
*
|
22 |
* cresques@gmail.com
|
23 |
*/
|
24 |
package org.cresques.ui.raster; |
25 |
|
26 |
import java.awt.BorderLayout; |
27 |
|
28 |
import javax.swing.JLabel; |
29 |
import javax.swing.JPanel; |
30 |
import javax.swing.JProgressBar; |
31 |
|
32 |
/**
|
33 |
* Panel que contiene la barra de progreso para salvar a raster
|
34 |
* @author Nacho Brodin <brodin_ign@gva.es>
|
35 |
*/
|
36 |
public class ProgressSaveRasterPanel extends JPanel{ |
37 |
|
38 |
private JPanel jPanel = null; |
39 |
private JProgressBar jProgressBar = null; |
40 |
/**
|
41 |
* Label p?blico accesible para su traducci?n
|
42 |
*/
|
43 |
public JLabel wait = null; |
44 |
private JPanel jPanel2 = null; |
45 |
private JPanel jPanel1 = null; |
46 |
|
47 |
/**
|
48 |
* This method initializes
|
49 |
*
|
50 |
*/
|
51 |
public ProgressSaveRasterPanel() {
|
52 |
super();
|
53 |
initialize(); |
54 |
} |
55 |
/**
|
56 |
* This method initializes this
|
57 |
*
|
58 |
* @return void
|
59 |
*/
|
60 |
private void initialize() { |
61 |
this.setSize(369, 106); |
62 |
this.add(getJPanel(), null); |
63 |
|
64 |
} |
65 |
/**
|
66 |
* This method initializes jPanel
|
67 |
*
|
68 |
* @return javax.swing.JPanel
|
69 |
*/
|
70 |
private JPanel getJPanel() { |
71 |
if (jPanel == null) { |
72 |
wait = new JLabel(); |
73 |
jPanel = new JPanel(); |
74 |
jPanel.setLayout(new BorderLayout()); |
75 |
jPanel.setPreferredSize(new java.awt.Dimension(354,70)); |
76 |
wait.setText("Por favor, espere ...");
|
77 |
jPanel.add(wait, java.awt.BorderLayout.NORTH); |
78 |
jPanel.add(getJPanel2(), java.awt.BorderLayout.SOUTH); |
79 |
jPanel.add(getJPanel1(), java.awt.BorderLayout.CENTER); |
80 |
} |
81 |
return jPanel;
|
82 |
} |
83 |
/**
|
84 |
* This method initializes jProgressBar
|
85 |
*
|
86 |
* @return javax.swing.JProgressBar
|
87 |
*/
|
88 |
public JProgressBar getJProgressBar() { |
89 |
if (jProgressBar == null) { |
90 |
jProgressBar = new JProgressBar(); |
91 |
jProgressBar.setVisible(true);
|
92 |
jProgressBar.show(); |
93 |
jProgressBar.setValue(0);
|
94 |
jProgressBar.setPreferredSize(new java.awt.Dimension(350,25)); |
95 |
} |
96 |
return jProgressBar;
|
97 |
} |
98 |
/**
|
99 |
* This method initializes jPanel2
|
100 |
*
|
101 |
* @return javax.swing.JPanel
|
102 |
*/
|
103 |
private JPanel getJPanel2() { |
104 |
if (jPanel2 == null) { |
105 |
jPanel2 = new JPanel(); |
106 |
jPanel2.add(getJProgressBar(), null);
|
107 |
} |
108 |
return jPanel2;
|
109 |
} |
110 |
/**
|
111 |
* This method initializes jPanel1
|
112 |
*
|
113 |
* @return javax.swing.JPanel
|
114 |
*/
|
115 |
private JPanel getJPanel1() { |
116 |
if (jPanel1 == null) { |
117 |
jPanel1 = new JPanel(); |
118 |
} |
119 |
return jPanel1;
|
120 |
} |
121 |
} // @jve:decl-index=0:visual-constraint="10,10"
|