Statistics
| Revision:

svn-gvsig-desktop / tags / v10_RC2c / applications / appCatalogYNomenclatorClient / src / es / gva / cit / catalogClient / ui / search / SearchLowerPanel.java @ 8745

History | View | Annotate | Download (33.8 KB)

1

    
2
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
3
*
4
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
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
*  Generalitat Valenciana
23
*   Conselleria d'Infraestructures i Transport
24
*   Av. Blasco Ib??ez, 50
25
*   46010 VALENCIA
26
*   SPAIN
27
*
28
*      +34 963862235
29
*   gvsig@gva.es
30
*      www.gvsig.gva.es
31
*
32
*    or
33
*
34
*   IVER T.I. S.A
35
*   Salamanca 50
36
*   46005 Valencia
37
*   Spain
38
*
39
*   +34 963163400
40
*   dac@iver.es
41
*/
42
package es.gva.cit.catalogClient.ui.search;
43
import es.gva.cit.catalogClient.querys.Coordinates;
44
import es.gva.cit.catalogClient.schemas.Schemas;
45
import es.gva.cit.catalogClient.utils.Doubles;
46
import com.iver.utiles.swing.jcomboServer.ServerData;
47
import java.awt.Color;
48
import java.awt.FlowLayout;
49
import java.awt.GridLayout;
50
import java.text.SimpleDateFormat;
51
import javax.swing.BoxLayout;
52
import javax.swing.ButtonGroup;
53
import javax.swing.JComboBox;
54
import javax.swing.JFormattedTextField;
55
import javax.swing.JLabel;
56
import javax.swing.JPanel;
57
import javax.swing.JRadioButton;
58
import javax.swing.JTextField;
59
import javax.swing.border.TitledBorder;
60

    
61
import org.gvsig.i18n.Messages;
62

    
63
/**
64
 * 
65
 * 
66
 * 
67
 * @author Jorge Piera Llodra (piera_jor@gva.es)
68
 */
69
public class SearchLowerPanel extends JPanel {
70
/**
71
 * 
72
 * 
73
 */
74
    private JPanel panelBotones = null;
75
/**
76
 * 
77
 * 
78
 */
79
    private JRadioButton exactaButton = null;
80
/**
81
 * 
82
 * 
83
 */
84
    private JRadioButton cualquieraButton = null;
85
/**
86
 * 
87
 * 
88
 */
89
    private JRadioButton todasButton = null;
90
/**
91
 * 
92
 * 
93
 */
94
    private JComboBox categoriaCombo = null;
95
/**
96
 * 
97
 * 
98
 */
99
    private JComboBox escalaCombo = null;
100
/**
101
 * 
102
 * 
103
 */
104
    private JPanel panelLabCategoria = null;
105
/**
106
 * 
107
 * 
108
 */
109
    private JLabel categoriaLab = null;
110
/**
111
 * 
112
 * 
113
 */
114
    private JPanel panelLabEscala = null;
115
/**
116
 * 
117
 * 
118
 */
119
    private JLabel escalaLabel = null;
120
/**
121
 * 
122
 * 
123
 */
124
    private JPanel panelLabProveedor = null;
125
/**
126
 * 
127
 * 
128
 */
129
    private JLabel proveedorLabel = null;
130
/**
131
 * 
132
 * 
133
 */
134
    private JTextField providerText = null;
135
/**
136
 * 
137
 * 
138
 */
139
    private JPanel panelAjusteBotones = null;
140
/**
141
 * 
142
 * 
143
 */
144
    private JPanel lowerRightPanel = null;
145
/**
146
 * 
147
 * 
148
 */
149
    private JPanel panelLabFecha = null;
150
/**
151
 * 
152
 * 
153
 */
154
    private JPanel lowerLeftPanel = null;
155
/**
156
 * 
157
 * 
158
 */
159
    private JPanel panelDe = null;
160
/**
161
 * 
162
 * 
163
 */
164
    private JPanel panelHasta = null;
165
/**
166
 * 
167
 * 
168
 */
169
    private JLabel deLabel = null;
170
/**
171
 * 
172
 * 
173
 */
174
    private JFormattedTextField fromText = null;
175
/**
176
 * 
177
 * 
178
 */
179
    private JLabel ALabel = null;
180
/**
181
 * 
182
 * 
183
 */
184
    private JFormattedTextField toText = null;
185
/**
186
 * 
187
 * 
188
 */
189
    private JPanel jPanel3 = null;
190
/**
191
 * 
192
 * 
193
 */
194
    private JPanel panelSuperiores = null;
195
/**
196
 * 
197
 * 
198
 */
199
    private JPanel panelInferiores = null;
200
/**
201
 * 
202
 * 
203
 */
204
    private JLabel ULXLabel = null;
205
/**
206
 * 
207
 * 
208
 */
209
    private JTextField ULXText = null;
210
/**
211
 * 
212
 * 
213
 */
214
    private JLabel ULYLabel = null;
215
/**
216
 * 
217
 * 
218
 */
219
    private JTextField ULYText = null;
220
/**
221
 * 
222
 * 
223
 */
224
    private JLabel BRXLabel = null;
225
/**
226
 * 
227
 * 
228
 */
229
    private JTextField BRXText = null;
230
/**
231
 * 
232
 * 
233
 */
234
    private JLabel BRYLabel = null;
235
/**
236
 * 
237
 * 
238
 */
239
    private JTextField BRYText = null;
240
/**
241
 * 
242
 * 
243
 */
244
    private JPanel jPanel = null;
245
/**
246
 * 
247
 * 
248
 */
249
    private JPanel jPanel8 = null;
250
/**
251
 * 
252
 * 
253
 */
254
    private JPanel panelCategoriaCombo = null;
255
/**
256
 * 
257
 * 
258
 */
259
    private JPanel panelEscalaCombo = null;
260
/**
261
 * 
262
 * 
263
 */
264
    private JPanel panelProveedorText = null;
265
/**
266
 * 
267
 * 
268
 */
269
    private JPanel panelLabResumen = null;
270
/**
271
 * 
272
 * 
273
 */
274
    private JPanel panelTextResumen = null;
275
/**
276
 * 
277
 * 
278
 */
279
    private JPanel panelLabClave = null;
280
/**
281
 * 
282
 * 
283
 */
284
    private JPanel panelTextClave = null;
285
/**
286
 * 
287
 * 
288
 */
289
    private JLabel resumenLabel = null;
290
/**
291
 * 
292
 * 
293
 */
294
    private JLabel claveLabel = null;
295
/**
296
 * 
297
 * 
298
 */
299
    private JTextField resumenText = null;
300
/**
301
 * 
302
 * 
303
 */
304
    private JTextField keyWordText = null;
305
/**
306
 * 
307
 * 
308
 */
309
    private JComboBox coordenadasCombo = null;
310
/**
311
 * 
312
 * 
313
 */
314
    private JPanel panelCoordenadas = null;
315
/**
316
 * 
317
 * 
318
 */
319
    private JPanel lowerPanel = null;
320
    
321
/**
322
 * 
323
 * 
324
 */
325
    private String serverType = null;
326

    
327
/**
328
 * This method initializes
329
 * 
330
 * 
331
 * @param translator 
332
 * @param serverType 
333
 * @param serverProfile 
334
 */
335
    public  SearchLowerPanel(String serverType, String serverProfile) {        
336
        super();
337
        this.serverType = serverType;
338
        initialize();
339
        disableComponents(serverType,serverProfile);
340
    } 
341

    
342
/**
343
 * This method initializes this
344
 * 
345
 */
346
    private void initialize() {        
347
        this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
348
        this.setLocation(0, 0);
349
        this.setSize(565, 335);
350
        this.setPreferredSize(new java.awt.Dimension(565,335));
351
        this.add(getLowerPanel(), null);
352
    } 
353

    
354
/**
355
 * This method initializes jPanel
356
 * 
357
 * 
358
 * @return javax.swing.JPanel
359
 */
360
    private JPanel getPanelBotones() {        
361
        if (panelBotones == null) {
362
            panelBotones = new JPanel();
363
            panelBotones.setLayout(new BoxLayout(panelBotones, BoxLayout.Y_AXIS));
364
            panelBotones.setBorder(javax.swing.BorderFactory.createTitledBorder(
365
                    null, Messages.getText("concordancia"),
366
                    javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
367
                    javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
368
            panelBotones.add(getExactaButton(), null);
369
            panelBotones.add(getCualquieraButton(), null);
370
            panelBotones.add(getTodasButton(), null);
371
            ButtonGroup group = new ButtonGroup();
372
            group.add(getExactaButton());
373
            group.add(getCualquieraButton());
374
            group.add(getTodasButton());
375
        }
376
        return panelBotones;
377
    } 
378

    
379
/**
380
 * This method initializes jRadioButton
381
 * 
382
 * 
383
 * @return javax.swing.JRadioButton
384
 */
385
    private JRadioButton getExactaButton() {        
386
        if (exactaButton == null) {
387
            exactaButton = new JRadioButton();
388
            exactaButton.setText(Messages.getText("exactSentence"));
389
            exactaButton.setSelected(true);
390
        }
391
        return exactaButton;
392
    } 
393

    
394
/**
395
 * This method initializes jRadioButton1
396
 * 
397
 * 
398
 * @return javax.swing.JRadioButton
399
 */
400
    private JRadioButton getCualquieraButton() {        
401
        if (cualquieraButton == null) {
402
            cualquieraButton = new JRadioButton();
403
            cualquieraButton.setText(Messages.getText("anyWord"));
404
        }
405
        return cualquieraButton;
406
    } 
407

    
408
/**
409
 * This method initializes jRadioButton2
410
 * 
411
 * 
412
 * @return javax.swing.JRadioButton
413
 */
414
    private JRadioButton getTodasButton() {        
415
        if (todasButton == null) {
416
            todasButton = new JRadioButton();
417
            todasButton.setText(Messages.getText("allWords"));
418
        }
419
        return todasButton;
420
    } 
421

    
422
/**
423
 * This method initializes jComboBox
424
 * 
425
 * 
426
 * @return javax.swing.JComboBox
427
 */
428
    private JComboBox getCategoriaCombo() {        
429
        if (categoriaCombo == null) {
430
            String[] categorias = {
431
                    Messages.getText("cathegoryAny") ,
432
                    Messages.getText("cathegoryBiota") ,
433
                    Messages.getText("cathegoryBoundaries") ,
434
                    Messages.getText("cathegoryClimatologyMeteorologyAtmosphere") ,
435
                    Messages.getText("cathegoryEconomy") ,
436
                    Messages.getText("cathegoryElevation") ,
437
                    Messages.getText("cathegoryEnvironment") ,
438
                    Messages.getText("cathegoryFarming") ,
439
                    Messages.getText("cathegoryGeoscientificInformation") ,
440
                    Messages.getText("cathegoryHealth") ,
441
                    Messages.getText("cathegoryImageryBaseMapsEarthCover") ,
442
                    Messages.getText("cathegoryInlandWaters") ,
443
                    Messages.getText("cathegoryIntelligenceMilitary"),
444
                    Messages.getText("cathegoryLocation") ,
445
                    Messages.getText("cathegoryOceans"),
446
                    Messages.getText("cathegoryPlanningCadastre") ,
447
                    Messages.getText("cathegorySociety") ,
448
                    Messages.getText("cathegoryStructure") ,
449
                    Messages.getText("cathegoryTransportation") ,
450
                    Messages.getText("cathegoryUtilitiesCommunication")
451
                };
452
            categoriaCombo = new JComboBox(categorias);
453
            categoriaCombo.setPreferredSize(new java.awt.Dimension(250,20));
454
            categoriaCombo.setBackground(Color.white);
455
        }
456
        return categoriaCombo;
457
    } 
458

    
459
/**
460
 * This method initializes jComboBox
461
 * 
462
 * 
463
 * @return javax.swing.JComboBox
464
 */
465
    private JComboBox getEscalaCombo() {        
466
        if (escalaCombo == null) {
467
            String[] escalas = {
468
                    Messages.getText("scaleAny") ,
469
                    Messages.getText("scaleI") ,
470
                    Messages.getText("scaleII") ,
471
                    Messages.getText("scaleIII") ,
472
                    Messages.getText("scaleIV") ,
473
                    Messages.getText("scaleV") ,
474
                    Messages.getText("scaleVI")
475
                };
476
            escalaCombo = new JComboBox(escalas);
477
            escalaCombo.setPreferredSize(new java.awt.Dimension(250,20));
478
            escalaCombo.setBackground(Color.white);
479
        }
480
        return escalaCombo;
481
    } 
482

    
483
/**
484
 * This method initializes jPanel
485
 * 
486
 * 
487
 * @return javax.swing.JPanel
488
 */
489
    private JPanel getPanelLabCategoria() {        
490
        if (panelLabCategoria == null) {
491
            categoriaLab = new JLabel();
492
            GridLayout gridLayout5 = new GridLayout();
493
            panelLabCategoria = new JPanel();
494
            panelLabCategoria.setLayout(gridLayout5);
495
            categoriaLab.setText(Messages.getText("cathegory"));
496
            gridLayout5.setRows(1);
497
            panelLabCategoria.add(categoriaLab, null);
498
        }
499
        return panelLabCategoria;
500
    } 
501

    
502
/**
503
 * This method initializes jPanel
504
 * 
505
 * 
506
 * @return javax.swing.JPanel
507
 */
508
    private JPanel getPanelLabEscala() {        
509
        if (panelLabEscala == null) {
510
            escalaLabel = new JLabel();
511
            GridLayout gridLayout2 = new GridLayout();
512
            panelLabEscala = new JPanel();
513
            panelLabEscala.setLayout(gridLayout2);
514
            gridLayout2.setRows(1);
515
            escalaLabel.setText(Messages.getText("scale"));
516
            panelLabEscala.add(escalaLabel, null);
517
        }
518
        return panelLabEscala;
519
    } 
520

    
521
/**
522
 * This method initializes jPanel
523
 * 
524
 * 
525
 * @return javax.swing.JPanel
526
 */
527
    private JPanel getPanelLabProveedor() {        
528
        if (panelLabProveedor == null) {
529
            proveedorLabel = new JLabel();
530
            panelLabProveedor = new JPanel();
531
            GridLayout gridLayout2 = new GridLayout();
532
            panelLabProveedor.setLayout(gridLayout2);
533
            proveedorLabel.setText(Messages.getText("provider"));
534
            panelLabProveedor.add(proveedorLabel, null);
535
        }
536
        return panelLabProveedor;
537
    } 
538

    
539
/**
540
 * This method initializes jTextField
541
 * 
542
 * 
543
 * @return javax.swing.JTextField
544
 */
545
    private JTextField getProviderText() {        
546
        if (providerText == null) {
547
            providerText = new JTextField();
548
            providerText.setPreferredSize(new java.awt.Dimension(250,20));
549
        }
550
        return providerText;
551
    } 
552

    
553
/**
554
 * This method initializes jPanel
555
 * 
556
 * 
557
 * @return javax.swing.JPanel
558
 */
559
    private JPanel getPanelAjusteBotones() {        
560
        if (panelAjusteBotones == null) {
561
            GridLayout gridLayout6 = new GridLayout();
562
            panelAjusteBotones = new JPanel();
563
            panelAjusteBotones.setLayout(gridLayout6);
564
            gridLayout6.setRows(1);
565
            panelAjusteBotones.add(getPanelBotones(), null);
566
        }
567
        return panelAjusteBotones;
568
    } 
569

    
570
/**
571
 * This method initializes jPanel3
572
 * 
573
 * 
574
 * @return javax.swing.JPanel
575
 */
576
    private JPanel getJPanel3() {        
577
        if (lowerRightPanel == null) {
578
            lowerRightPanel = new JPanel();
579
            lowerRightPanel.setLayout(new BoxLayout(
580
                    lowerRightPanel, BoxLayout.Y_AXIS));
581
            lowerRightPanel.setPreferredSize(new java.awt.Dimension(250,330));
582
            lowerRightPanel.add(getPanelCoordenadas(), null);
583
            lowerRightPanel.add(getJPanel32(), null);
584
            lowerRightPanel.add(getJPanel37(), null);
585
            lowerRightPanel.add(getJPanel8(), null);
586
        }
587
        return lowerRightPanel;
588
    } 
589

    
590
/**
591
 * This method initializes jPanel3
592
 * 
593
 * 
594
 * @return javax.swing.JPanel
595
 */
596
    private JPanel getJPanel32() {        
597
        if (panelLabFecha == null) {
598
            TitledBorder titledBorder1 = javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.gray,5), Messages.getText("lastUpdateDate"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null);
599
            panelLabFecha = new JPanel();
600
            panelLabFecha.setLayout(new BoxLayout(panelLabFecha, BoxLayout.Y_AXIS));
601
            panelLabFecha.setBorder(titledBorder1);
602
            titledBorder1.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.gray,1));
603
            panelLabFecha.add(getJPanel34(), null);
604
            panelLabFecha.add(getJPanel35(), null);
605
        }
606
        return panelLabFecha;
607
    } 
608

    
609
/**
610
 * This method initializes jPanel3
611
 * 
612
 * 
613
 * @return javax.swing.JPanel
614
 */
615
    private JPanel getJPanel33() {        
616
        if (lowerLeftPanel == null) {
617
            lowerLeftPanel = new JPanel();
618
            lowerLeftPanel.setLayout(new BoxLayout(
619
                    lowerLeftPanel, BoxLayout.Y_AXIS));
620
            lowerLeftPanel.setPreferredSize(new java.awt.Dimension(250,330));
621
            lowerLeftPanel.add(getPanelAjusteBotones(), null);
622
            lowerLeftPanel.add(getPanelLabResumen(), null);
623
            lowerLeftPanel.add(getPanelTextResumen(), null);
624
            lowerLeftPanel.add(getPanelLabClave(), null);
625
            lowerLeftPanel.add(getPanelTextClave(), null);
626
            lowerLeftPanel.add(getPanelLabCategoria(), null);
627
            lowerLeftPanel.add(getPanelCategoriaCombo(), null);
628
            lowerLeftPanel.add(getPanelLabEscala(), null);
629
            lowerLeftPanel.add(getPanelEscalaCombo(), null);
630
            lowerLeftPanel.add(getPanelLabProveedor(), null);
631
            lowerLeftPanel.add(getPanelProveedorText(), null);
632
        }
633
        return lowerLeftPanel;
634
    } 
635

    
636
/**
637
 * This method initializes jPanel3
638
 * 
639
 * 
640
 * @return javax.swing.JPanel
641
 */
642
    private JPanel getJPanel34() {        
643
        if (panelDe == null) {
644
            deLabel = new JLabel();
645
            FlowLayout flowLayout11 = new FlowLayout();
646
            panelDe = new JPanel();
647
            panelDe.setLayout(flowLayout11);
648
            deLabel.setText(Messages.getText("from"));
649
            deLabel.setPreferredSize(new java.awt.Dimension(60,15));
650
            deLabel.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
651
            deLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
652
            panelDe.setComponentOrientation(java.awt.ComponentOrientation.LEFT_TO_RIGHT);
653
            flowLayout11.setAlignment(java.awt.FlowLayout.LEFT);
654
            panelDe.add(deLabel, null);
655
            panelDe.add(getFromText(), null);
656
        }
657
        return panelDe;
658
    } 
659

    
660
/**
661
 * This method initializes jPanel3
662
 * 
663
 * 
664
 * @return javax.swing.JPanel
665
 */
666
    private JPanel getJPanel35() {        
667
        if (panelHasta == null) {
668
            ALabel = new JLabel();
669
            FlowLayout flowLayout12 = new FlowLayout();
670
            panelHasta = new JPanel();
671
            panelHasta.setLayout(flowLayout12);
672
            ALabel.setText(Messages.getText("to"));
673
            ALabel.setPreferredSize(new java.awt.Dimension(60,16));
674
            ALabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
675
            flowLayout12.setAlignment(java.awt.FlowLayout.LEFT);
676
            panelHasta.add(ALabel, null);
677
            panelHasta.add(getToText(), null);
678
        }
679
        return panelHasta;
680
    } 
681

    
682
/**
683
 * This method initializes jTextField
684
 * 
685
 * 
686
 * @return javax.swing.JTextField
687
 */
688
    private JFormattedTextField getFromText() {        
689
        if (fromText == null) {
690
            fromText = new JFormattedTextField();
691
            fromText.setPreferredSize(new java.awt.Dimension(100, 20));
692
        }
693
        return fromText;
694
    } 
695

    
696
/**
697
 * This method initializes jTextField
698
 * 
699
 * 
700
 * @return javax.swing.JTextField
701
 */
702
    private JFormattedTextField getToText() {        
703
        if (toText == null) {
704
          toText = new JFormattedTextField();
705
            toText.setPreferredSize(new java.awt.Dimension(100, 20));
706
        }
707
        return toText;
708
    } 
709

    
710
/**
711
 * This method initializes jPanel3
712
 * 
713
 * 
714
 * @return javax.swing.JPanel
715
 */
716
    private JPanel getJPanel37() {        
717
        if (jPanel3 == null) {
718
            jPanel3 = new JPanel();
719
            jPanel3.setPreferredSize(new java.awt.Dimension(10, 10));
720
        }
721
        return jPanel3;
722
    } 
723

    
724
/**
725
 * This method initializes jPanel4
726
 * 
727
 * 
728
 * @return javax.swing.JPanel
729
 */
730
    private JPanel getPanelSuperiores() {        
731
        if (panelSuperiores == null) {
732
            ULXLabel = new JLabel();
733
            ULYLabel = new JLabel();
734
            panelSuperiores = new JPanel();
735
            panelSuperiores.setBorder(javax.swing.BorderFactory.createTitledBorder(
736
                    null, Messages.getText("upperCoordinates"),
737
                    javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
738
                    javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
739
            panelSuperiores.setPreferredSize(new java.awt.Dimension(213, 56));
740
            ULXLabel.setText(Messages.getText("ULX"));
741
            ULYLabel.setText(Messages.getText("ULY"));
742
            panelSuperiores.add(ULXLabel, null);
743
            panelSuperiores.add(getULXText(), null);
744
            panelSuperiores.add(ULYLabel, null);
745
            panelSuperiores.add(getULYText(), null);
746
        }
747
        return panelSuperiores;
748
    } 
749

    
750
/**
751
 * This method initializes jPanel4
752
 * 
753
 * 
754
 * @return javax.swing.JPanel
755
 */
756
    private JPanel getPanelInferiores() {        
757
        if (panelInferiores == null) {
758
            BRXLabel = new JLabel();
759
            BRYLabel = new JLabel();
760
            panelInferiores = new JPanel();
761
            panelInferiores.setBorder(javax.swing.BorderFactory.createTitledBorder(
762
                    null, Messages.getText("lowerCoordinates"),
763
                    javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
764
                    javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
765
            BRXLabel.setText(Messages.getText("BRX"));
766
            BRYLabel.setText(Messages.getText("BRY"));
767
            panelInferiores.add(BRXLabel, null);
768
            panelInferiores.add(getBRXText(), null);
769
            panelInferiores.add(BRYLabel, null);
770
            panelInferiores.add(getBRYText(), null);
771
        }
772
        return panelInferiores;
773
    } 
774

    
775
/**
776
 * This method initializes jTextField
777
 * 
778
 * 
779
 * @return javax.swing.JTextField
780
 */
781
    private JTextField getULXText() {        
782
        if (ULXText == null) {
783
            ULXText = new JTextField();
784
            ULXText.setPreferredSize(new java.awt.Dimension(65,20));
785
        }
786
        return ULXText;
787
    } 
788

    
789
/**
790
 * This method initializes jTextField
791
 * 
792
 * 
793
 * @return javax.swing.JTextField
794
 */
795
    private JTextField getULYText() {        
796
        if (ULYText == null) {
797
            ULYText = new JTextField();
798
            ULYText.setPreferredSize(new java.awt.Dimension(65,20));
799
        }
800
        return ULYText;
801
    } 
802

    
803
/**
804
 * This method initializes jTextField
805
 * 
806
 * 
807
 * @return javax.swing.JTextField
808
 */
809
    private JTextField getBRXText() {        
810
        if (BRXText == null) {
811
            BRXText = new JTextField();
812
            BRXText.setPreferredSize(new java.awt.Dimension(65,20));
813
        }
814
        return BRXText;
815
    } 
816

    
817
/**
818
 * This method initializes jTextField
819
 * 
820
 * 
821
 * @return javax.swing.JTextField
822
 */
823
    private JTextField getBRYText() {        
824
        if (BRYText == null) {
825
            BRYText = new JTextField();
826
            BRYText.setPreferredSize(new java.awt.Dimension(60,20));
827
        }
828
        return BRYText;
829
    } 
830

    
831
/**
832
 * This method initializes jPanel
833
 * 
834
 * 
835
 * @return javax.swing.JPanel
836
 */
837
    private JPanel getJPanel() {        
838
        if (jPanel == null) {
839
            jPanel = new JPanel();
840
            jPanel.add(getCoordenadasCombo(), null);
841
        }
842
        return jPanel;
843
    } 
844

    
845
/**
846
 * This method initializes jPanel8
847
 * 
848
 * 
849
 * @return javax.swing.JPanel
850
 */
851
    private JPanel getJPanel8() {        
852
        if (jPanel8 == null) {
853
            jPanel8 = new JPanel();
854
            jPanel8.setPreferredSize(new java.awt.Dimension(10, 100));
855
        }
856
        return jPanel8;
857
    } 
858

    
859
/**
860
 * This method initializes jPanel9
861
 * 
862
 * 
863
 * @return javax.swing.JPanel
864
 */
865
    private JPanel getPanelCategoriaCombo() {        
866
        if (panelCategoriaCombo == null) {
867
            panelCategoriaCombo = new JPanel();
868
            panelCategoriaCombo.setPreferredSize(new java.awt.Dimension(260,25));
869
            panelCategoriaCombo.add(getCategoriaCombo(), null);
870
        }
871
        return panelCategoriaCombo;
872
    } 
873

    
874
/**
875
 * This method initializes jPanel9
876
 * 
877
 * 
878
 * @return javax.swing.JPanel
879
 */
880
    private JPanel getPanelEscalaCombo() {        
881
        if (panelEscalaCombo == null) {
882
            panelEscalaCombo = new JPanel();
883
            panelEscalaCombo.setPreferredSize(new java.awt.Dimension(260,25));
884
            panelEscalaCombo.add(getEscalaCombo(), null);
885
        }
886
        return panelEscalaCombo;
887
    } 
888

    
889
/**
890
 * This method initializes jPanel9
891
 * 
892
 * 
893
 * @return javax.swing.JPanel
894
 */
895
    private JPanel getPanelProveedorText() {        
896
        if (panelProveedorText == null) {
897
            panelProveedorText = new JPanel();
898
            panelProveedorText.setPreferredSize(new java.awt.Dimension(260,25));
899
            panelProveedorText.add(getProviderText(), null);
900
        }
901
        return panelProveedorText;
902
    } 
903

    
904
/**
905
 * This method initializes jPanel7
906
 * 
907
 * 
908
 * @return javax.swing.JPanel
909
 */
910
    private JPanel getPanelLabResumen() {        
911
        if (panelLabResumen == null) {
912
            resumenLabel = new JLabel();
913
            GridLayout gridLayout1 = new GridLayout();
914
            panelLabResumen = new JPanel();
915
            panelLabResumen.setLayout(gridLayout1);
916
            gridLayout1.setRows(1);
917
            resumenLabel.setText(Messages.getText("abstract"));
918
            panelLabResumen.add(resumenLabel, null);
919
        }
920
        return panelLabResumen;
921
    } 
922

    
923
/**
924
 * This method initializes jPanel7
925
 * 
926
 * 
927
 * @return javax.swing.JPanel
928
 */
929
    private JPanel getPanelTextResumen() {        
930
        if (panelTextResumen == null) {
931
            panelTextResumen = new JPanel();
932
            panelTextResumen.setPreferredSize(new java.awt.Dimension(260,25));
933
            panelTextResumen.add(getResumenText(), null);
934
        }
935
        return panelTextResumen;
936
    } 
937

    
938
/**
939
 * This method initializes jPanel9
940
 * 
941
 * 
942
 * @return javax.swing.JPanel
943
 */
944
    private JPanel getPanelLabClave() {        
945
        if (panelLabClave == null) {
946
            claveLabel = new JLabel();
947
            GridLayout gridLayout21 = new GridLayout();
948
            panelLabClave = new JPanel();
949
            panelLabClave.setLayout(gridLayout21);
950
            gridLayout21.setRows(1);
951
            claveLabel.setText(Messages.getText("keyWords"));
952
            panelLabClave.add(claveLabel, null);
953
        }
954
        return panelLabClave;
955
    } 
956

    
957
/**
958
 * This method initializes jPanel9
959
 * 
960
 * 
961
 * @return javax.swing.JPanel
962
 */
963
    private JPanel getPanelTextClave() {        
964
        if (panelTextClave == null) {
965
            panelTextClave = new JPanel();
966
            panelTextClave.setPreferredSize(new java.awt.Dimension(260,25));
967
            panelTextClave.add(getKeyWordText(), null);
968
        }
969
        return panelTextClave;
970
    } 
971

    
972
/**
973
 * This method initializes jTextField
974
 * 
975
 * 
976
 * @return javax.swing.JTextField
977
 */
978
    private JTextField getResumenText() {        
979
        if (resumenText == null) {
980
            resumenText = new JTextField();
981
            resumenText.setPreferredSize(new java.awt.Dimension(250,20));
982
        }
983
        return resumenText;
984
    } 
985

    
986
/**
987
 * This method initializes jTextField
988
 * 
989
 * 
990
 * @return javax.swing.JTextField
991
 */
992
    private JTextField getKeyWordText() {        
993
        if (keyWordText == null) {
994
            keyWordText = new JTextField();
995
            keyWordText.setPreferredSize(new java.awt.Dimension(250,20));
996
        }
997
        return keyWordText;
998
    } 
999

    
1000
/**
1001
 * This method initializes jComboBox
1002
 * 
1003
 * 
1004
 * @return javax.swing.JComboBox
1005
 */
1006
    private JComboBox getCoordenadasCombo() {        
1007
        if (coordenadasCombo == null) {
1008
            String[] coordenadas;
1009
            if (serverType.equals(ServerData.SERVER_SUBTYPE_CATALOG_Z3950)){
1010
                coordenadas = new String[4];
1011
                coordenadas[0] = Messages.getText("coordinatesContains");
1012
                coordenadas[1] = Messages.getText("coordinatesEqual");
1013
                coordenadas[2] = Messages.getText("coordinatesEnclose");
1014
                coordenadas[3] = Messages.getText("coordinatesFullyOutsideOf");
1015
                
1016
            }else{
1017
                coordenadas = new String[2];
1018
                coordenadas[0] = Messages.getText("coordinatesContains");
1019
                coordenadas[1] = Messages.getText("coordinatesFullyOutsideOf");
1020
            }
1021
            coordenadasCombo = new JComboBox(coordenadas);
1022
            coordenadasCombo.setPreferredSize(new java.awt.Dimension(240,20));
1023
            coordenadasCombo.setBackground(Color.white);
1024
        }
1025
        return coordenadasCombo;
1026
    } 
1027

    
1028
/**
1029
 * This method initializes jPanel4
1030
 * 
1031
 * 
1032
 * @return javax.swing.JPanel
1033
 */
1034
    private JPanel getPanelCoordenadas() {        
1035
        if (panelCoordenadas == null) {
1036
            panelCoordenadas = new JPanel();
1037
            panelCoordenadas.setLayout(new BoxLayout(panelCoordenadas, BoxLayout.Y_AXIS));
1038
            panelCoordenadas.setBorder(javax.swing.BorderFactory.createTitledBorder(
1039
                    null, Messages.getText("coordinates"),
1040
                    javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
1041
                    javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
1042
            panelCoordenadas.setPreferredSize(new java.awt.Dimension(315,180));
1043
            panelCoordenadas.add(getPanelSuperiores(), null);
1044
            panelCoordenadas.add(getPanelInferiores(), null);
1045
            panelCoordenadas.add(getJPanel(), null);
1046
        }
1047
        return panelCoordenadas;
1048
    } 
1049

    
1050
/**
1051
 * This method initializes jPanel5
1052
 * 
1053
 * 
1054
 * @return javax.swing.JPanel
1055
 */
1056
    private JPanel getLowerPanel() {        
1057
        if (lowerPanel == null) {
1058
            lowerPanel = new JPanel();
1059
            lowerPanel.setPreferredSize(new java.awt.Dimension(565,330));
1060
            lowerPanel.add(getJPanel33(), null);
1061
            lowerPanel.add(getJPanel3(), null);
1062
        }
1063
        return lowerPanel;
1064
    } 
1065
/* (non-Javadoc)
1066
     * @see es.gva.cit.catalogClient.ui.ISearchPanel#getTitleOption()
1067
     */
1068

    
1069
/**
1070
 * 
1071
 * 
1072
 * 
1073
 * @return 
1074
 */
1075
    public String getTitleOption() {        
1076
        if (getExactaButton().isSelected()) {
1077
            return "E";
1078
        }
1079
        if (getCualquieraButton().isSelected()) {
1080
            return "Y";
1081
        }
1082
        if (getTodasButton().isSelected()) {
1083
            return "A";
1084
        }
1085
        return null;
1086
    } 
1087
/* (non-Javadoc)
1088
     * @see es.gva.cit.catalogClient.ui.ISearchPanel#getAbstract()
1089
     */
1090

    
1091
/**
1092
 * 
1093
 * 
1094
 * 
1095
 * @return 
1096
 */
1097
    public String getAbstract() {        
1098
        if (getResumenText().getText().equals("")) {
1099
            return null;
1100
        }
1101
        return getResumenText().getText();
1102
    } 
1103
/* (non-Javadoc)
1104
     * @see es.gva.cit.catalogClient.ui.ISearchPanel#getKeys()
1105
     */
1106

    
1107
/**
1108
 * 
1109
 * 
1110
 * 
1111
 * @return 
1112
 */
1113
    public String getKeys() {        
1114
        if (getKeyWordText().getText().equals("")) {
1115
            return null;
1116
        }
1117
        return getKeyWordText().getText();
1118
    } 
1119
/* (non-Javadoc)
1120
     * @see es.gva.cit.catalogClient.ui.ISearchPanel#getCathegory()
1121
     */
1122

    
1123
/**
1124
 * 
1125
 * 
1126
 * 
1127
 * @return 
1128
 */
1129
    public String getCathegory() {        
1130
        return (String) getCategoriaCombo().getSelectedItem();
1131
    } 
1132
/* (non-Javadoc)
1133
     * @see es.gva.cit.catalogClient.ui.ISearchPanel#getScale()
1134
     */
1135

    
1136
/**
1137
 * 
1138
 * 
1139
 * 
1140
 * @return 
1141
 */
1142
    public String getScale() {        
1143
        return (String) getEscalaCombo().getSelectedItem();
1144
    } 
1145
/* (non-Javadoc)
1146
     * @see es.gva.cit.catalogClient.ui.ISearchPanel#getDateTo()
1147
     */
1148

    
1149
/**
1150
 * 
1151
 * 
1152
 * 
1153
 * @return 
1154
 */
1155
    public String getDateTo() {        
1156
        if (getToText().getText().equals("")) {
1157
            return null;
1158
        }
1159
        return getToText().getText();
1160
    } 
1161
/* (non-Javadoc)
1162
     * @see es.gva.cit.catalogClient.ui.ISearchPanel#getDateFrom()
1163
     */
1164

    
1165
/**
1166
 * 
1167
 * 
1168
 * 
1169
 * @return 
1170
 */
1171
    public String getDateFrom() {        
1172
        if (getFromText().getText().equals("")) {
1173
            return null;
1174
        }
1175
        return getFromText().getText();
1176
    } 
1177
/* (non-Javadoc)
1178
     * @see es.gva.cit.catalogClient.ui.ISearchPanel#getCoordinates()
1179
     */
1180

    
1181
/**
1182
 * 
1183
 * 
1184
 * 
1185
 * @return 
1186
 */
1187
    public Coordinates getCoordinates() {        
1188
        return new Coordinates(getULXText().getText(), getULYText().getText(),
1189
                getBRXText().getText(), getBRYText().getText());
1190
    } 
1191

    
1192
/**
1193
 * It sets the coordinates fields
1194
 * 
1195
 * 
1196
 * @param coordinates 
1197
 */
1198
    public void setCoordinates(Coordinates coordinates) {        
1199
        setULXText(Doubles.get5Decimals(coordinates.ulx));
1200
        setULYText(Doubles.get5Decimals(coordinates.uly));
1201
        setBRXText(Doubles.get5Decimals(coordinates.brx));
1202
        setBRYText(Doubles.get5Decimals(coordinates.bry));
1203
    } 
1204
/* (non-Javadoc)
1205
     * @see es.gva.cit.catalogClient.ui.ISearchPanel#getCoordinatesOption()
1206
     */
1207

    
1208
/**
1209
 * 
1210
 * 
1211
 * 
1212
 * @return 
1213
 */
1214
    public String getCoordinatesOption() {        
1215
        return (String) getCoordenadasCombo().getSelectedItem();
1216
    } 
1217
/* (non-Javadoc)
1218
     * @see es.gva.cit.catalogClient.ui.ISearchPanel#getProvider()
1219
     */
1220

    
1221
/**
1222
 * 
1223
 * 
1224
 * 
1225
 * @return 
1226
 */
1227
    public String getProvider() {        
1228
        if (getProviderText().getText().equals("")) {
1229
            return null;
1230
        }
1231
        return getProviderText().getText();
1232
    } 
1233
/* (non-Javadoc)
1234
     * @see es.gva.cit.catalogClient.ui.ISearchPanel#getRestrictAreaClicked()
1235
     */
1236

    
1237
/**
1238
 * 
1239
 * 
1240
 * 
1241
 * @return 
1242
 */
1243
    public boolean getRestrictAreaClicked() {        
1244
        // TODO Auto-generated method stub
1245
        return false;
1246
    } 
1247

    
1248
/**
1249
 * It sets a lower panel visible or not visible
1250
 * 
1251
 * 
1252
 * @param isMinimized 
1253
 */
1254
    public void setMinimized(boolean isMinimized) {        
1255
            if (isMinimized){
1256
                lowerPanel.setVisible(false);
1257
                setSize(700,100);
1258
            }else{
1259
                lowerPanel.setVisible(true);
1260
                setSize(700,900);
1261
            }
1262
            this.repaint();
1263
    } 
1264

    
1265
/**
1266
 * 
1267
 * 
1268
 * 
1269
 * @param text The bRXText to set.
1270
 */
1271
    public void setBRXText(String text) {        
1272
        BRXText.setText(text);
1273
    } 
1274

    
1275
/**
1276
 * 
1277
 * 
1278
 * 
1279
 * @param text The bRYText to set.
1280
 */
1281
    public void setBRYText(String text) {        
1282
        BRYText.setText(text);
1283
    } 
1284

    
1285
/**
1286
 * 
1287
 * 
1288
 * 
1289
 * @param text The uLXText to set.
1290
 */
1291
    public void setULXText(String text) {        
1292
        ULXText.setText(text);
1293
    } 
1294

    
1295
/**
1296
 * 
1297
 * 
1298
 * 
1299
 * @param text The uLYText to set.
1300
 */
1301
    public void setULYText(String text) {        
1302
        ULYText.setText(text);
1303
    } 
1304

    
1305
/**
1306
 * This methos disables the components that are representing
1307
 * fileds that the protocol used to do the search doesn't
1308
 * support
1309
 * 
1310
 * 
1311
 * @param type Server type: Z3950, SRW or CSW
1312
 * @param profile Server Profile: DUBLINCORE, ISO19115, ebRIM
1313
 */
1314
    private void disableComponents(String type, String profile) {        
1315
        if (type.equals(ServerData.SERVER_SUBTYPE_CATALOG_Z3950)){
1316
            getCategoriaCombo().setEnabled(false);
1317
        }
1318
        
1319
        if (type.equals(ServerData.SERVER_SUBTYPE_CATALOG_SRW) || profile.equals(Schemas.DUBLINCORE)){
1320
            getKeyWordText().setEnabled(false);
1321
            getCategoriaCombo().setEnabled(false);
1322
            getEscalaCombo().setEnabled(false);
1323
            getULXText().setEnabled(false);
1324
            getULYText().setEnabled(false);
1325
            getBRXText().setEnabled(false);
1326
            getBRYText().setEnabled(false);
1327
            getCoordenadasCombo().setEnabled(false);
1328
            getFromText().setEnabled(false);
1329
            getToText().setEnabled(false);
1330
        }        
1331
        
1332
        if (profile.equals(Schemas.EBRIM)){
1333
            getEscalaCombo().setEnabled(false);
1334
            getProviderText().setEnabled(false);
1335
            getFromText().setEnabled(false);
1336
            getToText().setEnabled(false);
1337
        }
1338
        
1339
        if (profile.equals(Schemas.ISO19115)){
1340
            getKeyWordText().setEnabled(false);
1341
            getCategoriaCombo().setEnabled(false);
1342
            getEscalaCombo().setEnabled(false);
1343
            getProviderText().setEnabled(false);
1344
            getULXText().setEnabled(false);
1345
            getULYText().setEnabled(false);
1346
            getBRXText().setEnabled(false);
1347
            getBRYText().setEnabled(false);
1348
            getCoordenadasCombo().setEnabled(false);
1349
            getFromText().setEnabled(false);
1350
            getToText().setEnabled(false);
1351
        }
1352
        
1353
    } 
1354
 }
1355
//  @jve:decl-index=0:visual-constraint="10,10"