Revision 4216 trunk/extensions/extRasterTools/src/com/iver/cit/gvsig/rasterTools/saveRaster/gui/ProgressSaveRasterPanel.java

View differences:

ProgressSaveRasterPanel.java
28 28
import javax.swing.JLabel;
29 29
import javax.swing.JPanel;
30 30
import javax.swing.JProgressBar;
31
import java.awt.GridBagLayout;
32
import java.awt.GridBagConstraints;
33
import java.awt.FlowLayout;
34
import javax.swing.JButton;
31 35

  
32 36

  
33 37
/**
......
36 40
 */
37 41
public class ProgressSaveRasterPanel extends JPanel {
38 42
    final private static long serialVersionUID = -3370601314380922368L;
39
    private JPanel jPanel = null;
43
    private JPanel pGeneral = null;
40 44
    private JProgressBar jProgressBar = null;
41 45

  
46
    private JPanel pBar = null;
47
    private JPanel pCancel = null;
48
	private JPanel pCurrentElement = null;
49
	private JPanel pWait = null;
50
	private JLabel lWait = null;
51
	private JButton bCancel = null;
52
	private JLabel lCurrentElement = null;
53
	private JPanel pPercent = null;
54
	private JLabel lPercent = null;
55
	
42 56
    /**
43
     * Variable accesible para la traducci?n
44
     */
45
    public JLabel lwait = null;
46
    private JPanel jPanel2 = null;
47
    private JPanel jPanel1 = null;
48

  
49
    /**
50 57
     * This method initializes
51 58
     *
52 59
     */
......
61 68
     * @return void
62 69
     */
63 70
    private void initialize() {
64
        this.setSize(369, 106);
65
        this.add(getJPanel(), null);
71
        this.setSize(375, 130);
72
        this.setPreferredSize(new java.awt.Dimension(364,125));
73
        this.add(getPGeneral(), null);
66 74
    }
67 75

  
68 76
    /**
......
70 78
     *
71 79
     * @return javax.swing.JPanel
72 80
     */
73
    private JPanel getJPanel() {
74
        if (jPanel == null) {
75
            lwait = new JLabel();
76
            jPanel = new JPanel();
77
            jPanel.setLayout(new BorderLayout());
78
            jPanel.setPreferredSize(new java.awt.Dimension(354, 70));
79
            lwait.setText("Por favor, espere ...");
80
            jPanel.add(lwait, java.awt.BorderLayout.NORTH);
81
            jPanel.add(getJPanel2(), java.awt.BorderLayout.SOUTH);
82
            jPanel.add(getJPanel1(), java.awt.BorderLayout.CENTER);
81
    private JPanel getPGeneral() {
82
        if (pGeneral == null) {
83
            GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
84
            gridBagConstraints3.gridx = 0;
85
            gridBagConstraints3.gridy = 0;
86
            GridBagConstraints gridBagConstraints21 = new GridBagConstraints();
87
            gridBagConstraints21.gridx = 0;
88
            gridBagConstraints21.gridy = 2;
89
            GridBagConstraints gridBagConstraints11 = new GridBagConstraints();
90
            gridBagConstraints11.gridx = 0;
91
            gridBagConstraints11.gridy = 3;
92
            GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
93
            gridBagConstraints1.gridx = 0;
94
            gridBagConstraints1.ipadx = -6;
95
            gridBagConstraints1.gridy = 1;
96
            pGeneral = new JPanel();
97
            pGeneral.setLayout(new GridBagLayout());
98
            pGeneral.setPreferredSize(new java.awt.Dimension(360,120));
99
            pGeneral.add(getPBar(), gridBagConstraints1);
100
            pGeneral.add(getPCancel(), gridBagConstraints11);
101
            pGeneral.add(getPCurrentElement(), gridBagConstraints21);
102
            pGeneral.add(getPWait(), gridBagConstraints3);
83 103
        }
84 104

  
85
        return jPanel;
105
        return pGeneral;
86 106
    }
87 107

  
88 108
    /**
......
107 127
     *
108 128
     * @return javax.swing.JPanel
109 129
     */
110
    private JPanel getJPanel2() {
111
        if (jPanel2 == null) {
112
            jPanel2 = new JPanel();
113
            jPanel2.add(getJProgressBar(), null);
130
    private JPanel getPBar() {
131
        if (pBar == null) {
132
            pBar = new JPanel();
133
            pBar.add(getJProgressBar(), null);
114 134
        }
115 135

  
116
        return jPanel2;
136
        return pBar;
117 137
    }
118 138

  
119 139
    /**
120
     * This method initializes jPanel1
121
     *
122
     * @return javax.swing.JPanel
123
     */
124
    private JPanel getJPanel1() {
125
        if (jPanel1 == null) {
126
            jPanel1 = new JPanel();
127
        }
140
	 * This method initializes jPanel	
141
	 * 	
142
	 * @return javax.swing.JPanel	
143
	 */
144
	private JPanel getPCancel() {
145
		if (pCancel == null) {
146
			FlowLayout flowLayout1 = new FlowLayout();
147
			flowLayout1.setAlignment(java.awt.FlowLayout.CENTER);
148
			pCancel = new JPanel();
149
			pCancel.setLayout(flowLayout1);
150
			pCancel.setPreferredSize(new java.awt.Dimension(350,30));
151
			pCancel.add(getBCancel(), null);
152
		}
153
		return pCancel;
154
	}
128 155

  
129
        return jPanel1;
130
    }
156
	/**
157
	 * This method initializes jPanel	
158
	 * 	
159
	 * @return javax.swing.JPanel	
160
	 */
161
	private JPanel getPCurrentElement() {
162
		if (pCurrentElement == null) {
163
			lCurrentElement = new JLabel();
164
			lCurrentElement.setText("");
165
			lCurrentElement.setPreferredSize(new java.awt.Dimension(340,15));
166
			FlowLayout flowLayout2 = new FlowLayout();
167
			flowLayout2.setAlignment(java.awt.FlowLayout.LEFT);
168
			pCurrentElement = new JPanel();
169
			pCurrentElement.setLayout(flowLayout2);
170
			pCurrentElement.setPreferredSize(new java.awt.Dimension(350,25));
171
			pCurrentElement.add(lCurrentElement, null);
172
		}
173
		return pCurrentElement;
174
	}
175

  
176
	/**
177
	 * This method initializes jPanel	
178
	 * 	
179
	 * @return javax.swing.JPanel	
180
	 */
181
	private JPanel getPWait() {
182
		if (pWait == null) {
183
			GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
184
			gridBagConstraints2.gridx = 1;
185
			gridBagConstraints2.gridy = 0;
186
			GridBagConstraints gridBagConstraints = new GridBagConstraints();
187
			gridBagConstraints.insets = new java.awt.Insets(2,2,2,2);
188
			gridBagConstraints.gridy = 0;
189
			gridBagConstraints.gridx = 0;
190
			lWait = new JLabel();
191
			lWait.setText("Por favor, espere,...");
192
			pWait = new JPanel();
193
			pWait.setLayout(new GridBagLayout());
194
			pWait.setPreferredSize(new java.awt.Dimension(350,25));
195
			pWait.add(lWait, gridBagConstraints);
196
			pWait.add(getPPercent(), gridBagConstraints2);
197
		}
198
		return pWait;
199
	}
200

  
201
	/**
202
	 * This method initializes jButton	
203
	 * 	
204
	 * @return javax.swing.JButton	
205
	 */
206
	public JButton getBCancel() {
207
		if (bCancel == null) {
208
			bCancel = new JButton();
209
			bCancel.setPreferredSize(new java.awt.Dimension(110,20));
210
			bCancel.setText("Cancelar");
211
		}
212
		return bCancel;
213
	}
214

  
215
	/**
216
	 * This method initializes jPanel	
217
	 * 	
218
	 * @return javax.swing.JPanel	
219
	 */
220
	private JPanel getPPercent() {
221
		if (pPercent == null) {
222
			lPercent = new JLabel();
223
			lPercent.setText("0%");
224
			lPercent.setPreferredSize(new java.awt.Dimension(35,15));
225
			FlowLayout flowLayout = new FlowLayout();
226
			flowLayout.setAlignment(java.awt.FlowLayout.RIGHT);
227
			pPercent = new JPanel();
228
			pPercent.setLayout(flowLayout);
229
			pPercent.setPreferredSize(new java.awt.Dimension(230,25));
230
			pPercent.add(lPercent, null);
231
		}
232
		return pPercent;
233
	}
234
	
235
	/**
236
	 * Obtiene la etiqueta del mensaje de espera
237
	 * @return JLabel que representa la etiqueta del mensaje de espera
238
	 */
239
	public JLabel getLabelWait(){
240
		return lWait;
241
	}
242
	
243
	/**
244
	 * Obtiene la etiqueta que marca el porcentaje
245
	 * @return JLabel que representa la etiqueta que marca el porcentaje
246
	 */
247
	public JLabel getLabelPercent(){
248
		return lPercent;
249
	}
250
	
251
	/**
252
	 * Obtiene la etiqueta del elemento actualmente analizado
253
	 * @return JLabel que representa la etiqueta del elemento actualmente analizado
254
	 */
255
	public JLabel getLabelCurrentElement(){
256
		return lCurrentElement;
257
	}
258
	
131 259
} //  @jve:decl-index=0:visual-constraint="10,10"

Also available in: Unified diff