root / trunk / applications / appCatalogYNomenclatorClient / src / es / gva / cit / catalogClient / ui / search / SearchLowerPanel.java @ 3486
History | View | Annotate | Download (33.9 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 es.gva.cit.catalogClient.ui.search; |
42 |
|
43 |
import es.gva.cit.catalogClient.profiles.Profile; |
44 |
import es.gva.cit.catalogClient.querys.Coordinates; |
45 |
import es.gva.cit.catalogClient.traductor.ITranslator; |
46 |
import es.gva.cit.catalogClient.traductor.Translator; |
47 |
import es.gva.cit.catalogClient.utils.Doubles; |
48 |
import es.gva.cit.catalogClient.utils.comboServer.ServerData; |
49 |
|
50 |
import java.awt.Color; |
51 |
import java.awt.FlowLayout; |
52 |
import java.awt.GridLayout; |
53 |
import java.text.SimpleDateFormat; |
54 |
|
55 |
import javax.swing.BoxLayout; |
56 |
import javax.swing.ButtonGroup; |
57 |
import javax.swing.JComboBox; |
58 |
import javax.swing.JFormattedTextField; |
59 |
import javax.swing.JLabel; |
60 |
import javax.swing.JPanel; |
61 |
import javax.swing.JRadioButton; |
62 |
import javax.swing.JTextField; |
63 |
|
64 |
import javax.swing.border.TitledBorder; |
65 |
/**
|
66 |
* @author Jorge Piera Llodra (piera_jor@gva.es)
|
67 |
*/
|
68 |
public class SearchLowerPanel extends JPanel{ |
69 |
private JPanel panelBotones = null; |
70 |
private JRadioButton exactaButton = null; |
71 |
private JRadioButton cualquieraButton = null; |
72 |
private JRadioButton todasButton = null; |
73 |
private JComboBox categoriaCombo = null; |
74 |
private JComboBox escalaCombo = null; |
75 |
private JPanel panelLabCategoria = null; |
76 |
private JLabel categoriaLab = null; |
77 |
private JPanel panelLabEscala = null; |
78 |
private JLabel escalaLabel = null; |
79 |
private JPanel panelLabProveedor = null; |
80 |
private JLabel proveedorLabel = null; |
81 |
private JTextField providerText = null; |
82 |
private JPanel panelAjusteBotones = null; |
83 |
private JPanel lowerRightPanel = null; |
84 |
private JPanel panelLabFecha = null; |
85 |
private JPanel lowerLeftPanel = null; |
86 |
private JPanel panelDe = null; |
87 |
private JPanel panelHasta = null; |
88 |
private JLabel deLabel = null; |
89 |
private JFormattedTextField fromText = null; |
90 |
private JLabel ALabel = null; |
91 |
private JFormattedTextField toText = null; |
92 |
private JPanel jPanel3 = null; |
93 |
private JPanel panelSuperiores = null; |
94 |
private JPanel panelInferiores = null; |
95 |
private JLabel ULXLabel = null; |
96 |
private JTextField ULXText = null; |
97 |
private JLabel jLabel4 = null; |
98 |
private JLabel ULYLabel = null; |
99 |
private JTextField ULYText = null; |
100 |
private JLabel BRXLabel = null; |
101 |
private JTextField BRXText = null; |
102 |
private JLabel jLabel5 = null; |
103 |
private JLabel BRYLabel = null; |
104 |
private JTextField BRYText = null; |
105 |
private JPanel jPanel = null; |
106 |
private JPanel jPanel8 = null; |
107 |
private JPanel panelCategoriaCombo = null; |
108 |
private JPanel panelEscalaCombo = null; |
109 |
private JPanel panelProveedorText = null; |
110 |
private JPanel panelLabResumen = null; |
111 |
private JPanel panelTextResumen = null; |
112 |
private JPanel panelLabClave = null; |
113 |
private JPanel panelTextClave = null; |
114 |
private JLabel resumenLabel = null; |
115 |
private JLabel claveLabel = null; |
116 |
private JTextField resumenText = null; |
117 |
private JTextField keyWordText = null; |
118 |
private JComboBox coordenadasCombo = null; |
119 |
private JPanel panelCoordenadas = null; |
120 |
private JPanel lowerPanel = null; |
121 |
private ITranslator translator = null; |
122 |
private String serverType = null; |
123 |
|
124 |
|
125 |
/**
|
126 |
* This method initializes
|
127 |
*
|
128 |
*/
|
129 |
public SearchLowerPanel(ITranslator translator,String serverType,String serverProfile) { |
130 |
super();
|
131 |
this.translator = translator;
|
132 |
this.serverType = serverType;
|
133 |
initialize(); |
134 |
disableComponents(serverType,serverProfile); |
135 |
} |
136 |
|
137 |
/**
|
138 |
* This method initializes this
|
139 |
*
|
140 |
* @return void
|
141 |
*/
|
142 |
private void initialize() { |
143 |
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); |
144 |
this.setLocation(0, 0); |
145 |
this.setSize(565, 335); |
146 |
this.setPreferredSize(new java.awt.Dimension(565,335)); |
147 |
this.add(getLowerPanel(), null); |
148 |
} |
149 |
|
150 |
/**
|
151 |
* This method initializes jPanel
|
152 |
*
|
153 |
* @return javax.swing.JPanel
|
154 |
*/
|
155 |
private JPanel getPanelBotones() { |
156 |
if (panelBotones == null) { |
157 |
panelBotones = new JPanel(); |
158 |
panelBotones.setLayout(new BoxLayout(panelBotones, BoxLayout.Y_AXIS)); |
159 |
panelBotones.setBorder(javax.swing.BorderFactory.createTitledBorder( |
160 |
null, Translator.getText(translator,"concordancia"), |
161 |
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, |
162 |
javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null)); |
163 |
panelBotones.add(getExactaButton(), null);
|
164 |
panelBotones.add(getCualquieraButton(), null);
|
165 |
panelBotones.add(getTodasButton(), null);
|
166 |
|
167 |
ButtonGroup group = new ButtonGroup(); |
168 |
group.add(getExactaButton()); |
169 |
group.add(getCualquieraButton()); |
170 |
group.add(getTodasButton()); |
171 |
} |
172 |
|
173 |
return panelBotones;
|
174 |
} |
175 |
|
176 |
/**
|
177 |
* This method initializes jRadioButton
|
178 |
*
|
179 |
* @return javax.swing.JRadioButton
|
180 |
*/
|
181 |
private JRadioButton getExactaButton() { |
182 |
if (exactaButton == null) { |
183 |
exactaButton = new JRadioButton(); |
184 |
exactaButton.setText(Translator.getText(translator,"exactSentence"));
|
185 |
exactaButton.setSelected(true);
|
186 |
} |
187 |
|
188 |
return exactaButton;
|
189 |
} |
190 |
|
191 |
/**
|
192 |
* This method initializes jRadioButton1
|
193 |
*
|
194 |
* @return javax.swing.JRadioButton
|
195 |
*/
|
196 |
private JRadioButton getCualquieraButton() { |
197 |
if (cualquieraButton == null) { |
198 |
cualquieraButton = new JRadioButton(); |
199 |
cualquieraButton.setText(Translator.getText(translator,"anyWord"));
|
200 |
} |
201 |
|
202 |
return cualquieraButton;
|
203 |
} |
204 |
|
205 |
/**
|
206 |
* This method initializes jRadioButton2
|
207 |
*
|
208 |
* @return javax.swing.JRadioButton
|
209 |
*/
|
210 |
private JRadioButton getTodasButton() { |
211 |
if (todasButton == null) { |
212 |
todasButton = new JRadioButton(); |
213 |
todasButton.setText(Translator.getText(translator,"allWords"));
|
214 |
} |
215 |
|
216 |
return todasButton;
|
217 |
} |
218 |
|
219 |
/**
|
220 |
* This method initializes jComboBox
|
221 |
*
|
222 |
* @return javax.swing.JComboBox
|
223 |
*/
|
224 |
private JComboBox getCategoriaCombo() { |
225 |
if (categoriaCombo == null) { |
226 |
String[] categorias = { |
227 |
Translator.getText(translator,"cathegoryAny") ,
|
228 |
Translator.getText(translator,"cathegoryBiota") ,
|
229 |
Translator.getText(translator,"cathegoryBoundaries") ,
|
230 |
Translator.getText(translator,"cathegoryClimatologyMeteorologyAtmosphere") ,
|
231 |
Translator.getText(translator,"cathegoryEconomy") ,
|
232 |
Translator.getText(translator,"cathegoryElevation") ,
|
233 |
Translator.getText(translator,"cathegoryEnvironment") ,
|
234 |
Translator.getText(translator,"cathegoryFarming") ,
|
235 |
Translator.getText(translator,"cathegoryGeoscientificInformation") ,
|
236 |
Translator.getText(translator,"cathegoryHealth") ,
|
237 |
Translator.getText(translator,"cathegoryImageryBaseMapsEarthCover") ,
|
238 |
Translator.getText(translator,"cathegoryInlandWaters") ,
|
239 |
Translator.getText(translator,"cathegoryIntelligenceMilitary"),
|
240 |
Translator.getText(translator,"cathegoryLocation") ,
|
241 |
Translator.getText(translator,"cathegoryOceans"),
|
242 |
Translator.getText(translator,"cathegoryPlanningCadastre") ,
|
243 |
Translator.getText(translator,"cathegorySociety") ,
|
244 |
Translator.getText(translator,"cathegoryStructure") ,
|
245 |
Translator.getText(translator,"cathegoryTransportation") ,
|
246 |
Translator.getText(translator,"cathegoryUtilitiesCommunication")
|
247 |
}; |
248 |
categoriaCombo = new JComboBox(categorias); |
249 |
categoriaCombo.setPreferredSize(new java.awt.Dimension(250,20)); |
250 |
categoriaCombo.setBackground(Color.white);
|
251 |
} |
252 |
|
253 |
return categoriaCombo;
|
254 |
} |
255 |
|
256 |
/**
|
257 |
* This method initializes jComboBox
|
258 |
*
|
259 |
* @return javax.swing.JComboBox
|
260 |
*/
|
261 |
private JComboBox getEscalaCombo() { |
262 |
if (escalaCombo == null) { |
263 |
String[] escalas = { |
264 |
Translator.getText(translator,"scaleAny") ,
|
265 |
Translator.getText(translator,"scaleI") ,
|
266 |
Translator.getText(translator,"scaleII") ,
|
267 |
Translator.getText(translator,"scaleIII") ,
|
268 |
Translator.getText(translator,"scaleIV") ,
|
269 |
Translator.getText(translator,"scaleV") ,
|
270 |
Translator.getText(translator,"scaleVI")
|
271 |
}; |
272 |
escalaCombo = new JComboBox(escalas); |
273 |
escalaCombo.setPreferredSize(new java.awt.Dimension(250,20)); |
274 |
escalaCombo.setBackground(Color.white);
|
275 |
} |
276 |
return escalaCombo;
|
277 |
} |
278 |
|
279 |
/**
|
280 |
* This method initializes jPanel
|
281 |
*
|
282 |
* @return javax.swing.JPanel
|
283 |
*/
|
284 |
private JPanel getPanelLabCategoria() { |
285 |
if (panelLabCategoria == null) { |
286 |
categoriaLab = new JLabel(); |
287 |
|
288 |
GridLayout gridLayout5 = new GridLayout(); |
289 |
panelLabCategoria = new JPanel(); |
290 |
panelLabCategoria.setLayout(gridLayout5); |
291 |
categoriaLab.setText(Translator.getText(translator,"cathegory"));
|
292 |
gridLayout5.setRows(1);
|
293 |
panelLabCategoria.add(categoriaLab, null);
|
294 |
} |
295 |
|
296 |
return panelLabCategoria;
|
297 |
} |
298 |
|
299 |
/**
|
300 |
* This method initializes jPanel
|
301 |
*
|
302 |
* @return javax.swing.JPanel
|
303 |
*/
|
304 |
private JPanel getPanelLabEscala() { |
305 |
if (panelLabEscala == null) { |
306 |
escalaLabel = new JLabel(); |
307 |
|
308 |
GridLayout gridLayout2 = new GridLayout(); |
309 |
panelLabEscala = new JPanel(); |
310 |
panelLabEscala.setLayout(gridLayout2); |
311 |
gridLayout2.setRows(1);
|
312 |
escalaLabel.setText(Translator.getText(translator,"scale"));
|
313 |
panelLabEscala.add(escalaLabel, null);
|
314 |
} |
315 |
|
316 |
return panelLabEscala;
|
317 |
} |
318 |
|
319 |
/**
|
320 |
* This method initializes jPanel
|
321 |
*
|
322 |
* @return javax.swing.JPanel
|
323 |
*/
|
324 |
private JPanel getPanelLabProveedor() { |
325 |
if (panelLabProveedor == null) { |
326 |
proveedorLabel = new JLabel(); |
327 |
panelLabProveedor = new JPanel(); |
328 |
|
329 |
GridLayout gridLayout2 = new GridLayout(); |
330 |
panelLabProveedor.setLayout(gridLayout2); |
331 |
proveedorLabel.setText(Translator.getText(translator,"provider"));
|
332 |
panelLabProveedor.add(proveedorLabel, null);
|
333 |
} |
334 |
|
335 |
return panelLabProveedor;
|
336 |
} |
337 |
|
338 |
/**
|
339 |
* This method initializes jTextField
|
340 |
*
|
341 |
* @return javax.swing.JTextField
|
342 |
*/
|
343 |
private JTextField getProviderText() { |
344 |
if (providerText == null) { |
345 |
providerText = new JTextField(); |
346 |
providerText.setPreferredSize(new java.awt.Dimension(250,20)); |
347 |
} |
348 |
|
349 |
return providerText;
|
350 |
} |
351 |
|
352 |
/**
|
353 |
* This method initializes jPanel
|
354 |
*
|
355 |
* @return javax.swing.JPanel
|
356 |
*/
|
357 |
private JPanel getPanelAjusteBotones() { |
358 |
if (panelAjusteBotones == null) { |
359 |
GridLayout gridLayout6 = new GridLayout(); |
360 |
panelAjusteBotones = new JPanel(); |
361 |
panelAjusteBotones.setLayout(gridLayout6); |
362 |
gridLayout6.setRows(1);
|
363 |
panelAjusteBotones.add(getPanelBotones(), null);
|
364 |
} |
365 |
|
366 |
return panelAjusteBotones;
|
367 |
} |
368 |
|
369 |
/**
|
370 |
* This method initializes jPanel3
|
371 |
*
|
372 |
* @return javax.swing.JPanel
|
373 |
*/
|
374 |
private JPanel getJPanel3() { |
375 |
if (lowerRightPanel == null) { |
376 |
lowerRightPanel = new JPanel(); |
377 |
lowerRightPanel.setLayout(new BoxLayout( |
378 |
lowerRightPanel, BoxLayout.Y_AXIS));
|
379 |
lowerRightPanel.setPreferredSize(new java.awt.Dimension(250,330)); |
380 |
lowerRightPanel.add(getPanelCoordenadas(), null);
|
381 |
lowerRightPanel.add(getJPanel32(), null);
|
382 |
lowerRightPanel.add(getJPanel37(), null);
|
383 |
lowerRightPanel.add(getJPanel8(), null);
|
384 |
} |
385 |
|
386 |
return lowerRightPanel;
|
387 |
} |
388 |
|
389 |
/**
|
390 |
* This method initializes jPanel3
|
391 |
*
|
392 |
* @return javax.swing.JPanel
|
393 |
*/
|
394 |
private JPanel getJPanel32() { |
395 |
if (panelLabFecha == null) { |
396 |
TitledBorder titledBorder1 = javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.gray,5), Translator.getText(translator,"lastUpdateDate"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null); |
397 |
panelLabFecha = new JPanel(); |
398 |
panelLabFecha.setLayout(new BoxLayout(panelLabFecha, BoxLayout.Y_AXIS)); |
399 |
panelLabFecha.setBorder(titledBorder1); |
400 |
titledBorder1.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.gray,1));
|
401 |
panelLabFecha.add(getJPanel34(), null);
|
402 |
panelLabFecha.add(getJPanel35(), null);
|
403 |
} |
404 |
|
405 |
return panelLabFecha;
|
406 |
} |
407 |
|
408 |
/**
|
409 |
* This method initializes jPanel3
|
410 |
*
|
411 |
* @return javax.swing.JPanel
|
412 |
*/
|
413 |
private JPanel getJPanel33() { |
414 |
if (lowerLeftPanel == null) { |
415 |
lowerLeftPanel = new JPanel(); |
416 |
lowerLeftPanel.setLayout(new BoxLayout( |
417 |
lowerLeftPanel, BoxLayout.Y_AXIS));
|
418 |
lowerLeftPanel.setPreferredSize(new java.awt.Dimension(250,330)); |
419 |
lowerLeftPanel.add(getPanelAjusteBotones(), null);
|
420 |
lowerLeftPanel.add(getPanelLabResumen(), null);
|
421 |
lowerLeftPanel.add(getPanelTextResumen(), null);
|
422 |
lowerLeftPanel.add(getPanelLabClave(), null);
|
423 |
lowerLeftPanel.add(getPanelTextClave(), null);
|
424 |
lowerLeftPanel.add(getPanelLabCategoria(), null);
|
425 |
lowerLeftPanel.add(getPanelCategoriaCombo(), null);
|
426 |
lowerLeftPanel.add(getPanelLabEscala(), null);
|
427 |
lowerLeftPanel.add(getPanelEscalaCombo(), null);
|
428 |
lowerLeftPanel.add(getPanelLabProveedor(), null);
|
429 |
lowerLeftPanel.add(getPanelProveedorText(), null);
|
430 |
} |
431 |
|
432 |
return lowerLeftPanel;
|
433 |
} |
434 |
|
435 |
/**
|
436 |
* This method initializes jPanel3
|
437 |
*
|
438 |
* @return javax.swing.JPanel
|
439 |
*/
|
440 |
private JPanel getJPanel34() { |
441 |
if (panelDe == null) { |
442 |
deLabel = new JLabel(); |
443 |
|
444 |
FlowLayout flowLayout11 = new FlowLayout(); |
445 |
panelDe = new JPanel(); |
446 |
panelDe.setLayout(flowLayout11); |
447 |
deLabel.setText(Translator.getText(translator,"from"));
|
448 |
deLabel.setPreferredSize(new java.awt.Dimension(60,15)); |
449 |
deLabel.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); |
450 |
deLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); |
451 |
panelDe.setComponentOrientation(java.awt.ComponentOrientation.LEFT_TO_RIGHT); |
452 |
flowLayout11.setAlignment(java.awt.FlowLayout.LEFT); |
453 |
panelDe.add(deLabel, null);
|
454 |
panelDe.add(getFromText(), null);
|
455 |
} |
456 |
|
457 |
return panelDe;
|
458 |
} |
459 |
|
460 |
/**
|
461 |
* This method initializes jPanel3
|
462 |
*
|
463 |
* @return javax.swing.JPanel
|
464 |
*/
|
465 |
private JPanel getJPanel35() { |
466 |
if (panelHasta == null) { |
467 |
ALabel = new JLabel(); |
468 |
|
469 |
FlowLayout flowLayout12 = new FlowLayout(); |
470 |
panelHasta = new JPanel(); |
471 |
panelHasta.setLayout(flowLayout12); |
472 |
ALabel.setText(Translator.getText(translator,"to"));
|
473 |
ALabel.setPreferredSize(new java.awt.Dimension(60,16)); |
474 |
ALabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); |
475 |
flowLayout12.setAlignment(java.awt.FlowLayout.LEFT); |
476 |
panelHasta.add(ALabel, null);
|
477 |
panelHasta.add(getToText(), null);
|
478 |
} |
479 |
|
480 |
return panelHasta;
|
481 |
} |
482 |
|
483 |
/**
|
484 |
* This method initializes jTextField
|
485 |
*
|
486 |
* @return javax.swing.JTextField
|
487 |
*/
|
488 |
private JFormattedTextField getFromText() { |
489 |
if (fromText == null) { |
490 |
fromText = new JFormattedTextField(new SimpleDateFormat("dd-MM-yyyy")); |
491 |
fromText.setPreferredSize(new java.awt.Dimension(100, 20)); |
492 |
} |
493 |
|
494 |
return fromText;
|
495 |
} |
496 |
|
497 |
/**
|
498 |
* This method initializes jTextField
|
499 |
*
|
500 |
* @return javax.swing.JTextField
|
501 |
*/
|
502 |
private JFormattedTextField getToText() { |
503 |
if (toText == null) { |
504 |
toText = new JFormattedTextField(new SimpleDateFormat("dd-MM-yyyy")); |
505 |
toText.setPreferredSize(new java.awt.Dimension(100, 20)); |
506 |
} |
507 |
|
508 |
return toText;
|
509 |
} |
510 |
|
511 |
/**
|
512 |
* This method initializes jPanel3
|
513 |
*
|
514 |
* @return javax.swing.JPanel
|
515 |
*/
|
516 |
private JPanel getJPanel37() { |
517 |
if (jPanel3 == null) { |
518 |
jPanel3 = new JPanel(); |
519 |
jPanel3.setPreferredSize(new java.awt.Dimension(10, 10)); |
520 |
} |
521 |
|
522 |
return jPanel3;
|
523 |
} |
524 |
|
525 |
/**
|
526 |
* This method initializes jPanel4
|
527 |
*
|
528 |
* @return javax.swing.JPanel
|
529 |
*/
|
530 |
private JPanel getPanelSuperiores() { |
531 |
if (panelSuperiores == null) { |
532 |
ULXLabel = new JLabel(); |
533 |
ULYLabel = new JLabel(); |
534 |
jLabel4 = new JLabel(); |
535 |
panelSuperiores = new JPanel(); |
536 |
panelSuperiores.setBorder(javax.swing.BorderFactory.createTitledBorder( |
537 |
null, Translator.getText(translator,"upperCoordinates"), |
538 |
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, |
539 |
javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null)); |
540 |
panelSuperiores.setPreferredSize(new java.awt.Dimension(213, 56)); |
541 |
ULXLabel.setText(Translator.getText(translator,"ULX"));
|
542 |
jLabel4.setText("");
|
543 |
jLabel4.setPreferredSize(new java.awt.Dimension(20, 0)); |
544 |
ULYLabel.setText(Translator.getText(translator,"ULY"));
|
545 |
panelSuperiores.add(ULXLabel, null);
|
546 |
panelSuperiores.add(getULXText(), null);
|
547 |
panelSuperiores.add(jLabel4, null);
|
548 |
panelSuperiores.add(ULYLabel, null);
|
549 |
panelSuperiores.add(getULYText(), null);
|
550 |
} |
551 |
|
552 |
return panelSuperiores;
|
553 |
} |
554 |
|
555 |
/**
|
556 |
* This method initializes jPanel4
|
557 |
*
|
558 |
* @return javax.swing.JPanel
|
559 |
*/
|
560 |
private JPanel getPanelInferiores() { |
561 |
if (panelInferiores == null) { |
562 |
BRXLabel = new JLabel(); |
563 |
BRYLabel = new JLabel(); |
564 |
jLabel5 = new JLabel(); |
565 |
panelInferiores = new JPanel(); |
566 |
panelInferiores.setBorder(javax.swing.BorderFactory.createTitledBorder( |
567 |
null, Translator.getText(translator,"lowerCoordinates"), |
568 |
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, |
569 |
javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null)); |
570 |
BRXLabel.setText(Translator.getText(translator,"BRX"));
|
571 |
jLabel5.setText("");
|
572 |
jLabel5.setPreferredSize(new java.awt.Dimension(20, 0)); |
573 |
BRYLabel.setText(Translator.getText(translator,"BRY"));
|
574 |
panelInferiores.add(BRXLabel, null);
|
575 |
panelInferiores.add(getBRXText(), null);
|
576 |
panelInferiores.add(jLabel5, null);
|
577 |
panelInferiores.add(BRYLabel, null);
|
578 |
panelInferiores.add(getBRYText(), null);
|
579 |
} |
580 |
|
581 |
return panelInferiores;
|
582 |
} |
583 |
|
584 |
/**
|
585 |
* This method initializes jTextField
|
586 |
*
|
587 |
* @return javax.swing.JTextField
|
588 |
*/
|
589 |
private JTextField getULXText() { |
590 |
if (ULXText == null) { |
591 |
ULXText = new JTextField(); |
592 |
ULXText.setPreferredSize(new java.awt.Dimension(65,20)); |
593 |
} |
594 |
|
595 |
return ULXText;
|
596 |
} |
597 |
|
598 |
/**
|
599 |
* This method initializes jTextField
|
600 |
*
|
601 |
* @return javax.swing.JTextField
|
602 |
*/
|
603 |
private JTextField getULYText() { |
604 |
if (ULYText == null) { |
605 |
ULYText = new JTextField(); |
606 |
ULYText.setPreferredSize(new java.awt.Dimension(65,20)); |
607 |
} |
608 |
|
609 |
return ULYText;
|
610 |
} |
611 |
|
612 |
/**
|
613 |
* This method initializes jTextField
|
614 |
*
|
615 |
* @return javax.swing.JTextField
|
616 |
*/
|
617 |
private JTextField getBRXText() { |
618 |
if (BRXText == null) { |
619 |
BRXText = new JTextField(); |
620 |
BRXText.setPreferredSize(new java.awt.Dimension(65,20)); |
621 |
} |
622 |
|
623 |
return BRXText;
|
624 |
} |
625 |
|
626 |
/**
|
627 |
* This method initializes jTextField
|
628 |
*
|
629 |
* @return javax.swing.JTextField
|
630 |
*/
|
631 |
private JTextField getBRYText() { |
632 |
if (BRYText == null) { |
633 |
BRYText = new JTextField(); |
634 |
BRYText.setPreferredSize(new java.awt.Dimension(65,20)); |
635 |
} |
636 |
|
637 |
return BRYText;
|
638 |
} |
639 |
|
640 |
/**
|
641 |
* This method initializes jPanel
|
642 |
*
|
643 |
* @return javax.swing.JPanel
|
644 |
*/
|
645 |
private JPanel getJPanel() { |
646 |
if (jPanel == null) { |
647 |
jPanel = new JPanel(); |
648 |
jPanel.add(getCoordenadasCombo(), null);
|
649 |
} |
650 |
|
651 |
return jPanel;
|
652 |
} |
653 |
|
654 |
/**
|
655 |
* This method initializes jPanel8
|
656 |
*
|
657 |
* @return javax.swing.JPanel
|
658 |
*/
|
659 |
private JPanel getJPanel8() { |
660 |
if (jPanel8 == null) { |
661 |
jPanel8 = new JPanel(); |
662 |
jPanel8.setPreferredSize(new java.awt.Dimension(10, 100)); |
663 |
} |
664 |
|
665 |
return jPanel8;
|
666 |
} |
667 |
|
668 |
/**
|
669 |
* This method initializes jPanel9
|
670 |
*
|
671 |
* @return javax.swing.JPanel
|
672 |
*/
|
673 |
private JPanel getPanelCategoriaCombo() { |
674 |
if (panelCategoriaCombo == null) { |
675 |
panelCategoriaCombo = new JPanel(); |
676 |
panelCategoriaCombo.add(getCategoriaCombo(), null);
|
677 |
} |
678 |
|
679 |
return panelCategoriaCombo;
|
680 |
} |
681 |
|
682 |
/**
|
683 |
* This method initializes jPanel9
|
684 |
*
|
685 |
* @return javax.swing.JPanel
|
686 |
*/
|
687 |
private JPanel getPanelEscalaCombo() { |
688 |
if (panelEscalaCombo == null) { |
689 |
panelEscalaCombo = new JPanel(); |
690 |
panelEscalaCombo.add(getEscalaCombo(), null);
|
691 |
} |
692 |
|
693 |
return panelEscalaCombo;
|
694 |
} |
695 |
|
696 |
/**
|
697 |
* This method initializes jPanel9
|
698 |
*
|
699 |
* @return javax.swing.JPanel
|
700 |
*/
|
701 |
private JPanel getPanelProveedorText() { |
702 |
if (panelProveedorText == null) { |
703 |
panelProveedorText = new JPanel(); |
704 |
panelProveedorText.add(getProviderText(), null);
|
705 |
} |
706 |
|
707 |
return panelProveedorText;
|
708 |
} |
709 |
|
710 |
/**
|
711 |
* This method initializes jPanel7
|
712 |
*
|
713 |
* @return javax.swing.JPanel
|
714 |
*/
|
715 |
private JPanel getPanelLabResumen() { |
716 |
if (panelLabResumen == null) { |
717 |
resumenLabel = new JLabel(); |
718 |
|
719 |
GridLayout gridLayout1 = new GridLayout(); |
720 |
panelLabResumen = new JPanel(); |
721 |
panelLabResumen.setLayout(gridLayout1); |
722 |
gridLayout1.setRows(1);
|
723 |
resumenLabel.setText(Translator.getText(translator,"abstract"));
|
724 |
panelLabResumen.add(resumenLabel, null);
|
725 |
} |
726 |
|
727 |
return panelLabResumen;
|
728 |
} |
729 |
|
730 |
/**
|
731 |
* This method initializes jPanel7
|
732 |
*
|
733 |
* @return javax.swing.JPanel
|
734 |
*/
|
735 |
private JPanel getPanelTextResumen() { |
736 |
if (panelTextResumen == null) { |
737 |
panelTextResumen = new JPanel(); |
738 |
panelTextResumen.add(getResumenText(), null);
|
739 |
} |
740 |
|
741 |
return panelTextResumen;
|
742 |
} |
743 |
|
744 |
/**
|
745 |
* This method initializes jPanel9
|
746 |
*
|
747 |
* @return javax.swing.JPanel
|
748 |
*/
|
749 |
private JPanel getPanelLabClave() { |
750 |
if (panelLabClave == null) { |
751 |
claveLabel = new JLabel(); |
752 |
|
753 |
GridLayout gridLayout21 = new GridLayout(); |
754 |
panelLabClave = new JPanel(); |
755 |
panelLabClave.setLayout(gridLayout21); |
756 |
gridLayout21.setRows(1);
|
757 |
claveLabel.setText(Translator.getText(translator,"keyWords"));
|
758 |
panelLabClave.add(claveLabel, null);
|
759 |
} |
760 |
|
761 |
return panelLabClave;
|
762 |
} |
763 |
|
764 |
/**
|
765 |
* This method initializes jPanel9
|
766 |
*
|
767 |
* @return javax.swing.JPanel
|
768 |
*/
|
769 |
private JPanel getPanelTextClave() { |
770 |
if (panelTextClave == null) { |
771 |
panelTextClave = new JPanel(); |
772 |
panelTextClave.add(getKeyWordText(), null);
|
773 |
} |
774 |
|
775 |
return panelTextClave;
|
776 |
} |
777 |
|
778 |
/**
|
779 |
* This method initializes jTextField
|
780 |
*
|
781 |
* @return javax.swing.JTextField
|
782 |
*/
|
783 |
private JTextField getResumenText() { |
784 |
if (resumenText == null) { |
785 |
resumenText = new JTextField(); |
786 |
resumenText.setPreferredSize(new java.awt.Dimension(250,20)); |
787 |
} |
788 |
|
789 |
return resumenText;
|
790 |
} |
791 |
|
792 |
/**
|
793 |
* This method initializes jTextField
|
794 |
*
|
795 |
* @return javax.swing.JTextField
|
796 |
*/
|
797 |
private JTextField getKeyWordText() { |
798 |
if (keyWordText == null) { |
799 |
keyWordText = new JTextField(); |
800 |
keyWordText.setPreferredSize(new java.awt.Dimension(250,20)); |
801 |
} |
802 |
|
803 |
return keyWordText;
|
804 |
} |
805 |
|
806 |
/**
|
807 |
* This method initializes jComboBox
|
808 |
*
|
809 |
* @return javax.swing.JComboBox
|
810 |
*/
|
811 |
private JComboBox getCoordenadasCombo() { |
812 |
if (coordenadasCombo == null) { |
813 |
String[] coordenadas; |
814 |
if (serverType.equals(ServerData.SERVER_SUBTYPE_CATALOG_Z3950)){
|
815 |
coordenadas = new String[4]; |
816 |
coordenadas[0] = Translator.getText(translator,"coordinatesContains"); |
817 |
coordenadas[1] = Translator.getText(translator,"coordinatesEqual"); |
818 |
coordenadas[2] = Translator.getText(translator,"coordinatesEnclose"); |
819 |
coordenadas[3] = Translator.getText(translator,"coordinatesFullyOutsideOf"); |
820 |
|
821 |
}else{
|
822 |
coordenadas = new String[2]; |
823 |
coordenadas[0] = Translator.getText(translator,"coordinatesContains"); |
824 |
coordenadas[1] = Translator.getText(translator,"coordinatesFullyOutsideOf"); |
825 |
} |
826 |
coordenadasCombo = new JComboBox(coordenadas); |
827 |
coordenadasCombo.setPreferredSize(new java.awt.Dimension(240,20)); |
828 |
coordenadasCombo.setBackground(Color.white);
|
829 |
} |
830 |
|
831 |
return coordenadasCombo;
|
832 |
} |
833 |
|
834 |
/**
|
835 |
* This method initializes jPanel4
|
836 |
*
|
837 |
* @return javax.swing.JPanel
|
838 |
*/
|
839 |
private JPanel getPanelCoordenadas() { |
840 |
if (panelCoordenadas == null) { |
841 |
panelCoordenadas = new JPanel(); |
842 |
panelCoordenadas.setLayout(new BoxLayout(panelCoordenadas, BoxLayout.Y_AXIS)); |
843 |
panelCoordenadas.setBorder(javax.swing.BorderFactory.createTitledBorder( |
844 |
null, Translator.getText(translator,"coordinates"), |
845 |
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, |
846 |
javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null)); |
847 |
panelCoordenadas.setPreferredSize(new java.awt.Dimension(315,180)); |
848 |
panelCoordenadas.add(getPanelSuperiores(), null);
|
849 |
panelCoordenadas.add(getPanelInferiores(), null);
|
850 |
panelCoordenadas.add(getJPanel(), null);
|
851 |
} |
852 |
|
853 |
return panelCoordenadas;
|
854 |
} |
855 |
|
856 |
/**
|
857 |
* This method initializes jPanel5
|
858 |
*
|
859 |
* @return javax.swing.JPanel
|
860 |
*/
|
861 |
private JPanel getLowerPanel() { |
862 |
if (lowerPanel == null) { |
863 |
lowerPanel = new JPanel(); |
864 |
lowerPanel.setPreferredSize(new java.awt.Dimension(565,335)); |
865 |
lowerPanel.add(getJPanel33(), null);
|
866 |
lowerPanel.add(getJPanel3(), null);
|
867 |
} |
868 |
|
869 |
return lowerPanel;
|
870 |
} |
871 |
|
872 |
|
873 |
/* (non-Javadoc)
|
874 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getTitleOption()
|
875 |
*/
|
876 |
public String getTitleOption() { |
877 |
if (getExactaButton().isSelected()) {
|
878 |
return "E"; |
879 |
} |
880 |
|
881 |
if (getCualquieraButton().isSelected()) {
|
882 |
return "Y"; |
883 |
} |
884 |
|
885 |
if (getTodasButton().isSelected()) {
|
886 |
return "A"; |
887 |
} |
888 |
|
889 |
return null; |
890 |
} |
891 |
|
892 |
/* (non-Javadoc)
|
893 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getAbstract()
|
894 |
*/
|
895 |
public String getAbstract() { |
896 |
if (getResumenText().getText().equals("")) { |
897 |
return null; |
898 |
} |
899 |
|
900 |
return getResumenText().getText();
|
901 |
} |
902 |
|
903 |
/* (non-Javadoc)
|
904 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getKeys()
|
905 |
*/
|
906 |
public String getKeys() { |
907 |
if (getKeyWordText().getText().equals("")) { |
908 |
return null; |
909 |
} |
910 |
|
911 |
return getKeyWordText().getText();
|
912 |
} |
913 |
|
914 |
/* (non-Javadoc)
|
915 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getCathegory()
|
916 |
*/
|
917 |
public String getCathegory() { |
918 |
return (String) getCategoriaCombo().getSelectedItem(); |
919 |
} |
920 |
|
921 |
/* (non-Javadoc)
|
922 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getScale()
|
923 |
*/
|
924 |
public String getScale() { |
925 |
return (String) getEscalaCombo().getSelectedItem(); |
926 |
} |
927 |
|
928 |
/* (non-Javadoc)
|
929 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getDateTo()
|
930 |
*/
|
931 |
public String getDateTo() { |
932 |
if (getToText().getText().equals("")) { |
933 |
return null; |
934 |
} |
935 |
|
936 |
return getToText().getText();
|
937 |
} |
938 |
|
939 |
/* (non-Javadoc)
|
940 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getDateFrom()
|
941 |
*/
|
942 |
public String getDateFrom() { |
943 |
if (getFromText().getText().equals("")) { |
944 |
return null; |
945 |
} |
946 |
|
947 |
return getFromText().getText();
|
948 |
} |
949 |
|
950 |
/* (non-Javadoc)
|
951 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getCoordinates()
|
952 |
*/
|
953 |
public Coordinates getCoordinates() {
|
954 |
return new Coordinates(getULXText().getText(), getULYText().getText(), |
955 |
getBRXText().getText(), getBRYText().getText()); |
956 |
} |
957 |
|
958 |
/**
|
959 |
* It sets the coordinates fields
|
960 |
* @param coordinates
|
961 |
*/
|
962 |
public void setCoordinates(Coordinates coordinates) { |
963 |
setULXText(Doubles.get5Decimals(coordinates.ulx)); |
964 |
setULYText(Doubles.get5Decimals(coordinates.uly)); |
965 |
setBRXText(Doubles.get5Decimals(coordinates.brx)); |
966 |
setBRYText(Doubles.get5Decimals(coordinates.bry)); |
967 |
} |
968 |
|
969 |
/* (non-Javadoc)
|
970 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getCoordinatesOption()
|
971 |
*/
|
972 |
public String getCoordinatesOption() { |
973 |
return (String) getCoordenadasCombo().getSelectedItem(); |
974 |
} |
975 |
|
976 |
/* (non-Javadoc)
|
977 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getProvider()
|
978 |
*/
|
979 |
public String getProvider() { |
980 |
if (getProviderText().getText().equals("")) { |
981 |
return null; |
982 |
} |
983 |
|
984 |
return getProviderText().getText();
|
985 |
} |
986 |
|
987 |
/* (non-Javadoc)
|
988 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getRestrictAreaClicked()
|
989 |
*/
|
990 |
public boolean getRestrictAreaClicked() { |
991 |
// TODO Auto-generated method stub
|
992 |
return false; |
993 |
} |
994 |
|
995 |
/**
|
996 |
* It sets a lower panel visible or not visible
|
997 |
* @param isMinimized
|
998 |
*/
|
999 |
public void setMinimized(boolean isMinimized){ |
1000 |
if (isMinimized){
|
1001 |
lowerPanel.setVisible(false);
|
1002 |
setSize(700,100); |
1003 |
}else{
|
1004 |
lowerPanel.setVisible(true);
|
1005 |
setSize(700,900); |
1006 |
} |
1007 |
this.repaint();
|
1008 |
} |
1009 |
|
1010 |
|
1011 |
/**
|
1012 |
* @param text The bRXText to set.
|
1013 |
*/
|
1014 |
public void setBRXText(String text) { |
1015 |
BRXText.setText(text); |
1016 |
} |
1017 |
/**
|
1018 |
* @param text The bRYText to set.
|
1019 |
*/
|
1020 |
public void setBRYText(String text) { |
1021 |
BRYText.setText(text); |
1022 |
} |
1023 |
/**
|
1024 |
* @param text The uLXText to set.
|
1025 |
*/
|
1026 |
public void setULXText(String text) { |
1027 |
ULXText.setText(text); |
1028 |
} |
1029 |
/**
|
1030 |
* @param text The uLYText to set.
|
1031 |
*/
|
1032 |
public void setULYText(String text) { |
1033 |
ULYText.setText(text); |
1034 |
} |
1035 |
|
1036 |
/**
|
1037 |
* This methos disables the components that are representing
|
1038 |
* fileds that the protocol used to do the search doesn't
|
1039 |
* support
|
1040 |
* @param type
|
1041 |
* Server type: Z3950, SRW or CSW
|
1042 |
* @param profile
|
1043 |
* Server Profile: DUBLINCORE, ISO19115, ebRIM
|
1044 |
*/
|
1045 |
private void disableComponents(String type,String profile){ |
1046 |
//System.out.println("TYPE: " + type);
|
1047 |
//System.out.println("SUBTYPE: " + profile);
|
1048 |
|
1049 |
if (type.equals(ServerData.SERVER_SUBTYPE_CATALOG_Z3950)){
|
1050 |
getCategoriaCombo().setEnabled(false);
|
1051 |
} |
1052 |
|
1053 |
if (type.equals(ServerData.SERVER_SUBTYPE_CATALOG_SRW) || profile.equals(Profile.DUBLINCORE)){
|
1054 |
getKeyWordText().setEnabled(false);
|
1055 |
getCategoriaCombo().setEnabled(false);
|
1056 |
getEscalaCombo().setEnabled(false);
|
1057 |
getULXText().setEnabled(false);
|
1058 |
getULYText().setEnabled(false);
|
1059 |
getBRXText().setEnabled(false);
|
1060 |
getBRYText().setEnabled(false);
|
1061 |
getCoordenadasCombo().setEnabled(false);
|
1062 |
getFromText().setEnabled(false);
|
1063 |
getToText().setEnabled(false);
|
1064 |
} |
1065 |
|
1066 |
if (profile.equals(Profile.EBRIM)){
|
1067 |
getEscalaCombo().setEnabled(false);
|
1068 |
getProviderText().setEnabled(false);
|
1069 |
getFromText().setEnabled(false);
|
1070 |
getToText().setEnabled(false);
|
1071 |
} |
1072 |
|
1073 |
if (profile.equals(Profile.ISO19115)){
|
1074 |
getKeyWordText().setEnabled(false);
|
1075 |
getCategoriaCombo().setEnabled(false);
|
1076 |
getEscalaCombo().setEnabled(false);
|
1077 |
getProviderText().setEnabled(false);
|
1078 |
getULXText().setEnabled(false);
|
1079 |
getULYText().setEnabled(false);
|
1080 |
getBRXText().setEnabled(false);
|
1081 |
getBRYText().setEnabled(false);
|
1082 |
getCoordenadasCombo().setEnabled(false);
|
1083 |
getFromText().setEnabled(false);
|
1084 |
getToText().setEnabled(false);
|
1085 |
} |
1086 |
|
1087 |
} |
1088 |
|
1089 |
|
1090 |
} // @jve:decl-index=0:visual-constraint="10,10"
|