Statistics
| Revision:

root / trunk / extensions / extWCS / src / com / iver / cit / gvsig / gui / Panels / WCSParamsPanel.java @ 1877

History | View | Annotate | Download (9.24 KB)

1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
*
3
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
4
*
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
*
19
* For more information, contact:
20
*
21
*  Generalitat Valenciana
22
*   Conselleria d'Infraestructures i Transport
23
*   Av. Blasco Ib??ez, 50
24
*   46010 VALENCIA
25
*   SPAIN
26
*
27
*      +34 963862235
28
*   gvsig@gva.es
29
*      www.gvsig.gva.es
30
*
31
*    or
32
*
33
*   IVER T.I. S.A
34
*   Salamanca 50
35
*   46005 Valencia
36
*   Spain
37
*
38
*   +34 963163400
39
*   dac@iver.es
40
*/
41
package com.iver.cit.gvsig.gui.Panels;
42

    
43
import javax.swing.JTabbedPane;
44
import javax.swing.JPanel;
45
import javax.swing.JList;
46
import javax.swing.JComboBox;
47
import javax.swing.JButton;
48

    
49
import com.iver.andami.PluginServices;
50
/**
51
 * @author jaume
52
 *
53
 * TODO To change the template for this generated type comment go to
54
 * Window - Preferences - Java - Code Style - Code Templates
55
 */
56
public class WCSParamsPanel extends JPanel{
57

    
58
        private JTabbedPane jTabbedPane = null;  //  @jve:decl-index=0:visual-constraint="37,30"
59
        private JPanel panelFormato = null;
60
        private JPanel panelTemps = null;
61
        private JPanel panelParametres = null;
62
        private JList lstCRS = null;
63
        private JList lstTemps = null;
64
        private JComboBox cmbParam = null;
65
        private JList jList = null;
66
        private JButton btnAdd = null;
67
        private JButton jButton = null;
68
        private JList lstSelectedTimes = null;
69
        private JList lstFormats = null;
70
        private JPanel jPanel = null;
71
        private JPanel jPanel1 = null;
72
        private JPanel jPanel2 = null;
73
        private JPanel jPanel3 = null;
74
        /**
75
         * This method initializes jTabbedPane        
76
         *         
77
         * @return javax.swing.JTabbedPane        
78
         */    
79
        
80
        public WCSParamsPanel(){
81
                super();
82
                initialize();
83
        }
84
        /**
85
         * Devuelve el n?mero de solapas que tiene actualmente el WCSParamsPanel
86
         * 
87
         * @return int
88
         */
89
        public int getNumTabs(){
90
                return getJTabbedPane().getTabCount();
91
        }
92
        private void initialize(){
93
                this.setLayout(null);
94
                this.setPreferredSize(new java.awt.Dimension(750, 320));
95
                this.setVisible(true);
96
                this.setSize(477, 258);
97
                this.add(getJTabbedPane(), null);        
98
                
99
        }
100
        
101
        /**
102
         * Establece el foco en la solapa especificada en index
103
         * 
104
         * @param index
105
         */
106
        private void setTabFocus(int index){
107
                this.getJTabbedPane().setSelectedIndex(index);
108
        }
109
        
110
        /**
111
         * Enfoca a la solapa siguiente a la actualmente enfocada del TabbedPane
112
         *
113
         */
114
        public void avanzaTab(){
115
                if (this.getJTabbedPane().getTabCount() -1 > this.getJTabbedPane()
116
                                .getSelectedIndex())
117
                        this.getJTabbedPane().setSelectedIndex(
118
                                        this.getJTabbedPane().getSelectedIndex() + 1);
119
        }
120
        
121
        /**
122
         * Enfoca a la solapa anterior a la actualmente enfocada del TabbedPane
123
         * 
124
         */
125
        public void retrocedeTab(){
126
                this.getJTabbedPane().setSelectedIndex(this.getJTabbedPane().getSelectedIndex()-1);
127
        }
128
        
129
        /**
130
         * Devuelve el n?mero de solapa en que se encuentra
131
         * 
132
         * @return
133
         */
134
        public int getIndiceSolapaActual(){
135
                return this.getJTabbedPane().getSelectedIndex();
136
        }
137
        
138
        public JTabbedPane getJTabbedPane() {
139
                if (jTabbedPane == null) {
140
                        jTabbedPane = new JTabbedPane();
141
                        jTabbedPane.setSize(475, 256);
142
                        jTabbedPane.addTab(PluginServices.getText(this, "Formato"), null, getPanelFormato(), null);
143
                        jTabbedPane.addTab(PluginServices.getText(this, "Tiempo"), null, getPanelTemps(), null);
144
                        jTabbedPane.addTab(PluginServices.getText(this, "seleccionar_tiempo"), null, getPanelParametres(), null);
145
                }
146
                return jTabbedPane;
147
        }
148
        /**
149
         * This method initializes panelFormato        
150
         *         
151
         * @return javax.swing.JPanel        
152
         */    
153
        private JPanel getPanelFormato() {
154
                if (panelFormato == null) {
155
                        panelFormato = new JPanel();
156
                        panelFormato.setLayout(null);
157
                        panelFormato.add(getJPanel2(), null);
158
                        panelFormato.add(getJPanel3(), null);
159
                }
160
                return panelFormato;
161
        }
162
        /**
163
         * This method initializes panelTemps        
164
         *         
165
         * @return javax.swing.JPanel        
166
         */    
167
        private JPanel getPanelTemps() {
168
                if (panelTemps == null) {
169
                        panelTemps = new JPanel();
170
                        panelTemps.setLayout(null);
171
                        panelTemps.add(getJPanel(), null);
172
                }
173
                return panelTemps;
174
        }
175
        /**
176
         * This method initializes panelParametres        
177
         *         
178
         * @return javax.swing.JPanel        
179
         */    
180
        private JPanel getPanelParametres() {
181
                if (panelParametres == null) {
182
                        panelParametres = new JPanel();
183
                        panelParametres.setLayout(null);
184
                        panelParametres.add(getJPanel1(), null);
185
                }
186
                return panelParametres;
187
        }
188
        /**
189
         * This method initializes lstCRS        
190
         *         
191
         * @return javax.swing.JList        
192
         */    
193
        private JList getLstCRS() {
194
                if (lstCRS == null) {
195
                        lstCRS = new JList();
196
                        lstCRS.setBounds(10, 32, 186, 161);
197
                }
198
                return lstCRS;
199
        }
200
        /**
201
         * This method initializes lstTemps        
202
         *         
203
         * @return javax.swing.JList        
204
         */    
205
        private JList getLstTemps() {
206
                if (lstTemps == null) {
207
                        lstTemps = new JList();
208
                        lstTemps.setBounds(22, 25, 148, 174);
209
                }
210
                return lstTemps;
211
        }
212
        /**
213
         * This method initializes cmbParam        
214
         *         
215
         * @return javax.swing.JComboBox        
216
         */    
217
        private JComboBox getCmbParam() {
218
                if (cmbParam == null) {
219
                        cmbParam = new JComboBox();
220
                        cmbParam.setBounds(23, 26, 188, 24);
221
                }
222
                return cmbParam;
223
        }
224
        /**
225
         * This method initializes jList        
226
         *         
227
         * @return javax.swing.JList        
228
         */    
229
        private JList getJList() {
230
                if (jList == null) {
231
                        jList = new JList();
232
                        jList.setBounds(226, 26, 193, 155);
233
                }
234
                return jList;
235
        }
236
        /**
237
         * This method initializes btnAdd        
238
         *         
239
         * @return javax.swing.JButton        
240
         */    
241
        private JButton getBtnAdd() {
242
                if (btnAdd == null) {
243
                        btnAdd = new JButton();
244
                        btnAdd.setText(">");
245
                        btnAdd.setBounds(225, 97, 41, 26);
246
                }
247
                return btnAdd;
248
        }
249
        /**
250
         * This method initializes jButton        
251
         *         
252
         * @return javax.swing.JButton        
253
         */    
254
        private JButton getJButton() {
255
                if (jButton == null) {
256
                        jButton = new JButton();
257
                        jButton.setText("<");
258
                        jButton.setBounds(181, 97, 41, 26);
259
                }
260
                return jButton;
261
        }
262
        /**
263
         * This method initializes lstSelectedTimes        
264
         *         
265
         * @return javax.swing.JList        
266
         */    
267
        private JList getLstSelectedTimes() {
268
                if (lstSelectedTimes == null) {
269
                        lstSelectedTimes = new JList();
270
                        lstSelectedTimes.setBounds(275, 25, 148, 174);
271
                }
272
                return lstSelectedTimes;
273
        }
274
        /**
275
         * This method initializes lstFormats        
276
         *         
277
         * @return javax.swing.JList        
278
         */    
279
        private JList getLstFormats() {
280
                if (lstFormats == null) {
281
                        lstFormats = new JList();
282
                        lstFormats.setBounds(10, 32, 188, 160);
283
                }
284
                return lstFormats;
285
        }
286
        /**
287
         * This method initializes jPanel        
288
         *         
289
         * @return javax.swing.JPanel        
290
         */    
291
        private JPanel getJPanel() {
292
                if (jPanel == null) {
293
                        jPanel = new JPanel();
294
                        jPanel.setLayout(null);
295
                        jPanel.setBounds(5, 17, 441, 209);
296
                        jPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(
297
                                        null, PluginServices.getText(this, "seleccionar_tiempo"),
298
                                        javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
299
                                        javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
300
                        jPanel.add(getLstTemps(), null);
301
                        jPanel.add(getBtnAdd(), null);
302
                        jPanel.add(getJButton(), null);
303
                        jPanel.add(getLstSelectedTimes(), null);
304
                }
305
                return jPanel;
306
        }
307
        /**
308
         * This method initializes jPanel1        
309
         *         
310
         * @return javax.swing.JPanel        
311
         */    
312
        private JPanel getJPanel1() {
313
                if (jPanel1 == null) {
314
                        jPanel1 = new JPanel();
315
                        jPanel1.setLayout(null);
316
                        jPanel1.setBounds(5, 23, 447, 202);
317
                        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(
318
                                        null, PluginServices.getText(this, "seleccionar_parametros"),
319
                                        javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
320
                                        javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
321
                        jPanel1.add(getJList(), null);
322
                        jPanel1.add(getCmbParam(), null);
323
                }
324
                return jPanel1;
325
        }
326
        /**
327
         * This method initializes jPanel2        
328
         *         
329
         * @return javax.swing.JPanel        
330
         */    
331
        private JPanel getJPanel2() {
332
                if (jPanel2 == null) {
333
                        jPanel2 = new JPanel();
334
                        jPanel2.setLayout(null);
335
                        jPanel2.setBounds(12, 22, 207, 203);
336
                        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(
337
                                        null, PluginServices.getText(this, "seleccionar_CRS"),
338
                                        javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
339
                                        javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
340
                        jPanel2.add(getLstCRS(), null);
341
                }
342
                return jPanel2;
343
        }
344
        /**
345
         * This method initializes jPanel3        
346
         *         
347
         * @return javax.swing.JPanel        
348
         */    
349
        private JPanel getJPanel3() {
350
                if (jPanel3 == null) {
351
                        jPanel3 = new JPanel();
352
                        jPanel3.setLayout(null);
353
                        jPanel3.setBounds(251, 23, 207, 203);
354
                        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(
355
                                        null, PluginServices.getText(this, "seleccionar_formato"),
356
                                        javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
357
                                        javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
358
                        jPanel3.add(getLstFormats(), null);
359
                }
360
                return jPanel3;
361
        }
362
                }  //  @jve:decl-index=0:visual-constraint="10,10"