Statistics
| Revision:

svn-gvsig-desktop / tags / gvSIGv0_6_1RELEASE / libraries / libCq CMS for java.old / src / org / cresques / ui / raster / SharpeningPanel.java @ 5222

History | View | Annotate | Download (21.3 KB)

1
/*
2
 * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
3
 *
4
 * Copyright (C) 2004-5.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
19
 *
20
 * For more information, contact:
21
 *
22
 * cresques@gmail.com
23
 */
24
package org.cresques.ui.raster;
25

    
26
import java.awt.Component;
27
import java.awt.Dimension;
28
import java.awt.FlowLayout;
29
import java.awt.GridBagConstraints;
30
import java.awt.GridBagLayout;
31
import java.awt.event.ActionEvent;
32
import java.awt.event.ActionListener;
33
import java.awt.event.KeyEvent;
34
import java.awt.event.KeyListener;
35
import java.awt.image.DataBuffer;
36
import java.io.File;
37
import java.util.Vector;
38

    
39
import javax.swing.AbstractCellEditor;
40
import javax.swing.ButtonGroup;
41
import javax.swing.JCheckBox;
42
import javax.swing.JPanel;
43
import javax.swing.JRadioButton;
44
import javax.swing.JScrollPane;
45
import javax.swing.JSlider;
46
import javax.swing.JTable;
47
import javax.swing.JTextField;
48
import javax.swing.SwingConstants;
49
import javax.swing.SwingUtilities;
50
import javax.swing.event.ChangeEvent;
51
import javax.swing.event.ChangeListener;
52
import javax.swing.event.TableModelEvent;
53
import javax.swing.event.TableModelListener;
54
import javax.swing.table.DefaultTableModel;
55
import javax.swing.table.TableCellEditor;
56
import javax.swing.table.TableCellRenderer;
57
import javax.swing.table.TableColumn;
58

    
59
import org.cresques.io.GeoRasterFile;
60
/**
61
 * Selecciona las bandas visibles en un raster. Contiene una tabla con una fila por cada
62
 * banda de la imagen. Por medio de checkbox se selecciona para cada RGB que banda de la 
63
 * imagen ser? visualizada. 
64
 * @author Luis W. Sevilla (sevilla_lui@gva.es)
65
 * @author Nacho Brodin (brodin_ign@gva.es)
66
 */
67
public class SharpeningPanel extends JPanel implements TableModelListener,
68
                                                      KeyListener, ChangeListener,
69
                                                      ActionListener {
70
    final private static long                 serialVersionUID = -3370601314380922368L;
71

    
72
    private final static String[]         columnNames = { " ", "Band" };
73

    
74
    /**
75
     * Nombre del panel
76
     */
77
    private String                                         nom = "Pansharpening";
78
    private JTable                                         rgbTable = null;
79
    private JScrollPane                         rgbBandAssignPane = null;
80
    RGBBandAsignTableModel                         tableModel = null;
81
    private int                                         sizeX = 445;
82
    private int                                         sizeY = 174;
83
        private JPanel                                        activationPanel = null;
84
        
85
        private JCheckBox                                 cbActiveSharpening = null;
86
        private JPanel pSharpNorth = null;
87
        private JPanel pSharpSouth = null;
88
        private JRadioButton rbBrovey = null;
89
        private JRadioButton rbHSL = null;
90
        private JPanel pHSL = null;
91
        private JSlider jSlider = null;
92
        private JTextField jTextField = null;
93

    
94
        private JPanel pBrovey = null;
95

    
96
        private JSlider slBrovey = null;
97

    
98
        private JTextField jTextField1 = null;
99
    /**
100
     * This method initializes
101
     *
102
     */
103
    public SharpeningPanel() {
104
        super();
105
        initialize();
106
    }
107

    
108
    /**
109
     * This method initializes this
110
     *
111
     * @return void
112
     */
113
    void initialize() {
114
        this.setPreferredSize(new Dimension(sizeX, sizeY));
115
        this.setLayout(new FlowLayout());
116
        this.setLocation(0, 0);
117
        this.setSize(445, 239);
118
        this.add(getPSharpNorth(), null);
119
        this.setTableEnabled(false);
120
    }
121

    
122
    /**
123
     * Obtiene el nombre del panel
124
     * @return Cadena con el nombre del panel
125
     */
126
    public String getName(){
127
            return this.nom;
128
    }
129
    
130
    /**
131
     * Activa o desactiva la tabla de selecci?n de banda de refinado
132
     * @param enable
133
     */
134
    public void setTableEnabled(boolean enabled){
135
            this.getRGBBandAssignPane().setEnabled(enabled);
136
        this.getRGBTable().setEnabled(enabled);
137
        this.getJSlider().setEnabled(enabled);
138
        this.getJSlider1().setEnabled(enabled);
139
        this.getJTextField().setEnabled(enabled);
140
        this.getJTextField1().setEnabled(enabled);
141
        this.getRbBrovey().setEnabled(enabled);
142
        this.getRbHSL().setEnabled(enabled);
143
    }
144
    
145
    /**
146
     * A?ade la lista de georasterfiles a la tabla
147
     * @param files
148
     */
149
    public void addFiles(GeoRasterFile[] files) {
150
        for (int i = 0; i < files.length; i++) {
151
            String fName = files[i].getName();
152
      
153
            String bandName = new File(fName).getName();
154
            String bandType = "";
155

    
156
            switch (files[i].getDataType()) {
157
            case DataBuffer.TYPE_BYTE:
158
                bandType = "8U";
159
                break;
160
            case DataBuffer.TYPE_INT:
161
                bandType = "32";
162
                break;
163
            case DataBuffer.TYPE_DOUBLE:
164
                bandType = "64";
165
                break;
166
            case DataBuffer.TYPE_FLOAT:
167
                bandType = "32";
168
                break;
169
            case DataBuffer.TYPE_SHORT:
170
                bandType = "16";
171
                break;
172
            case DataBuffer.TYPE_USHORT:
173
                bandType = "16U";
174
                break;
175
            case DataBuffer.TYPE_UNDEFINED:
176
                bandType = "??";
177
                break;
178
            }
179

    
180
            if (files[i].getBandCount() > 1) {
181
                for (int b = 0; b < files[i].getBandCount(); b++)
182
                    addBand((b + 1) + " [" + bandType + "] " + bandName);
183
            } else {
184
                addBand("1 [" + bandType + "] " + bandName);
185
            }
186
        }
187
    }
188
    
189
    /**
190
     * Elimina un fichero de la lista
191
     * @param file Nombre del fichero a eliminar
192
     */
193
    public void removeFile(String file) {
194
        for (int i = 0; i < ((DefaultTableModel) rgbTable.getModel()).getRowCount(); i++) {
195
            if (((String) ((DefaultTableModel) rgbTable.getModel()).getValueAt(i, 1)).endsWith(file)) {
196
                ((DefaultTableModel) rgbTable.getModel()).removeRow(i);
197
                i--; //Ojo! que hemos eliminado una fila
198
            }
199
        }
200
    }
201

    
202
    /**
203
     * This method initializes jTable
204
     *
205
     * @return javax.swing.JTable
206
     */
207
    private JScrollPane getRGBBandAssignPane() {
208
        if (rgbBandAssignPane == null) {
209
            rgbBandAssignPane = new JScrollPane(getRGBTable());
210
            rgbBandAssignPane.setPreferredSize(new java.awt.Dimension(400,60));
211
            rgbBandAssignPane.setEnabled(true);
212
            TableColumn column = null;
213

    
214
            for (int i = 0; i < 1; i++) {
215
                column = rgbTable.getColumnModel().getColumn(i);
216
                column.setCellRenderer(new RadioColumnRenderer());
217
                column.setCellEditor(new RadioColumnEditor());
218
                column.setMaxWidth(22);
219
                column.setMinWidth(22);
220
            }
221
        }
222
        return rgbBandAssignPane;
223
    }
224

    
225
    /**
226
     * Obtiene la Tabla
227
     * @return Tabla de bandas de la imagen
228
     */
229
    public JTable getRGBTable() {
230
        if (rgbTable == null) {
231
            tableModel = new RGBBandAsignTableModel();
232
            tableModel.addTableModelListener(this);
233
            rgbTable = new JTable(tableModel);
234
            rgbTable.setPreferredScrollableViewportSize(new Dimension(300, 60));
235
        }
236
        return rgbTable;
237
    }
238

    
239

    
240
    /**
241
     * A?ade una banda a la tabla  bandas de la imagen asignandole un
242
     * nombre y valor a los checkbox
243
     * @param bandName        Nombre de la banda
244
     */
245
    private void addBand(String bandName) {
246
        Vector v = new Vector();
247
        v.add(new Boolean(false));
248
        v.add(bandName);
249
        ((DefaultTableModel) rgbTable.getModel()).addRow(v);
250
    }
251

    
252
    /**
253
     * Obtiene el n?mero de bandas de la lista
254
     * @return
255
     */
256
    public int getNBands() {
257
        return ((DefaultTableModel) rgbTable.getModel()).getRowCount();
258
    }
259

    
260
    /**
261
     * Obtiene el nombre de la banda de la posici?n i de la tabla
262
     * @param i
263
     * @return
264
     */
265
    public String getBandName(int i) {
266
        String s = (String) ((DefaultTableModel) rgbTable.getModel()).getValueAt(i, 1);
267
        return s.substring(s.lastIndexOf("[8U]") + 5, s.length());
268
    }
269

    
270
    /**
271
     * Selecciona una banda de la tabla.
272
     * @param i
273
     */
274
    public void selectRow(int i){
275
            ((DefaultTableModel) rgbTable.getModel()).setValueAt(new Boolean(true),i,0);
276
    }
277
    
278
    /**
279
     * Elimina todas las filas seleccionadas
280
     */
281
    public void removeSelections(){
282
            for(int i=0;i<((DefaultTableModel) rgbTable.getModel()).getRowCount();i++){
283
                    ((DefaultTableModel) rgbTable.getModel()).setValueAt(new Boolean(false),i,0);
284
            }
285
    }
286
    
287
    /* (non-Javadoc)
288
     * @see javax.swing.event.TableModelListener#tableChanged(javax.swing.event.TableModelEvent)
289
     */
290
    public void tableChanged(TableModelEvent e) {
291
        rgbTable.revalidate();
292
        rgbBandAssignPane.revalidate();
293
        revalidate();
294
    }
295

    
296
    /* (non-Javadoc)
297
     * @see java.awt.event.KeyListener#keyPressed(java.awt.event.KeyEvent)
298
     */
299
    public void keyPressed(KeyEvent arg0) {
300
        // TODO Auto-generated method stub
301
    }
302

    
303
    /* (non-Javadoc)
304
     * @see java.awt.event.KeyListener#keyReleased(java.awt.event.KeyEvent)
305
     */
306
    public void keyReleased(KeyEvent arg0) {
307
        // TODO Auto-generated method stub
308
    }
309

    
310
    /* (non-Javadoc)
311
     * @see java.awt.event.KeyListener#keyTyped(java.awt.event.KeyEvent)
312
     */
313
    public void keyTyped(KeyEvent arg0) {
314
        // TODO Auto-generated method stub
315
    }
316

    
317
    /**
318
     * 
319
     */
320
    public void actionPerformed(ActionEvent e) {
321
        if(e.getSource() == this.cbActiveSharpening){
322
                if(this.cbActiveSharpening.isSelected()){
323
                        this.setTableEnabled(true);
324
                }else{
325
                        this.setTableEnabled(false);
326
                }
327
        }
328
    }
329

    
330
    class RadioColumnEditor extends AbstractCellEditor
331
        implements TableCellEditor {
332
        final private static long serialVersionUID = -3370601314380922368L;
333
        public JRadioButton theRadioButton;
334

    
335
        public RadioColumnEditor() {
336
            super();
337
            theRadioButton = new JRadioButton();
338
            theRadioButton.addActionListener(new ActionListener() {
339
                    public void actionPerformed(ActionEvent event) {
340
                        fireEditingStopped();
341
                    }
342
                });
343
        }
344

    
345
        public Component getTableCellEditorComponent(JTable table, Object obj,
346
                                                     boolean isSelected,
347
                                                     int row, int col) {
348
            theRadioButton.setHorizontalAlignment(SwingUtilities.CENTER);
349

    
350
            Boolean lValueAsBoolean = (Boolean) obj;
351
            theRadioButton.setSelected(lValueAsBoolean.booleanValue());
352

    
353
            return theRadioButton;
354
        }
355

    
356
        public Object getCellEditorValue() {
357
            return new Boolean(theRadioButton.isSelected());
358
        }
359
    }
360

    
361
    class RadioColumnRenderer extends JRadioButton implements TableCellRenderer {
362
        final private static long serialVersionUID = -3370601314380922368L;
363

    
364
        public Component getTableCellRendererComponent(JTable table,
365
                                                       Object value,
366
                                                       boolean isSelected,
367
                                                       boolean hasFocus,
368
                                                       int row, int column) {
369
            if (value == null) {
370
                this.setSelected(false);
371
            }
372

    
373
            Boolean ValueAsBoolean = (Boolean) value;
374
            this.setSelected(ValueAsBoolean.booleanValue());
375
            this.setHorizontalAlignment(SwingConstants.CENTER);
376

    
377
            return this;
378
        }
379
    }
380

    
381
    class RGBBandAsignTableModel extends DefaultTableModel {
382
        final private static long serialVersionUID = -3370601314380922368L;
383

    
384
        public RGBBandAsignTableModel() {
385
            super(new Object[0][2], columnNames);
386
        }
387

    
388
        public Class getColumnClass(int c) {
389
            if (c < 1) {
390
                return Boolean.class;
391
            }
392

    
393
            return String.class;
394
        }
395

    
396
        public void setValueAt(Object value, int row, int col) {
397
            if ((col < 1) && ((Boolean) value).booleanValue()) {
398
                for (int i = 0; i < getRowCount(); i++) {
399
                    if (i != row) {
400
                        setValueAt(new Boolean(false), i, col);
401
                    }
402
                }
403
            }
404

    
405
            super.setValueAt(value, row, col);
406
        }
407

    
408
        public void addNew() {
409
            super.addRow(new Object[] {
410
                             new Boolean(false), ""
411
                         });
412
        }
413
    }
414
        /**
415
         * This method initializes jPanel        
416
         *         
417
         * @return javax.swing.JPanel        
418
         */    
419
        private JPanel getActivationPanel() {
420
                if (activationPanel == null) {
421
                        FlowLayout flowLayout = new FlowLayout();
422
                        flowLayout.setAlignment(java.awt.FlowLayout.LEFT);
423
                        flowLayout.setVgap(0);
424
                        flowLayout.setHgap(0);
425
                        activationPanel = new JPanel();
426
                        activationPanel.setLayout(flowLayout);
427
                        activationPanel.setPreferredSize(new java.awt.Dimension(340,30));
428
                        activationPanel.add(getCbActiveSharpening(), null);
429
                }
430
                return activationPanel;
431
        }
432
        /**
433
         * This method initializes jCheckBox        
434
         *         
435
         * @return javax.swing.JCheckBox        
436
         */    
437
        public JCheckBox getCbActiveSharpening() {
438
                if (cbActiveSharpening == null) {
439
                        cbActiveSharpening = new JCheckBox();
440
                        cbActiveSharpening.setText("Activar Pansharpening");
441
                        cbActiveSharpening.setPreferredSize(new java.awt.Dimension(150,23));
442
                        cbActiveSharpening.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
443
                        cbActiveSharpening.addActionListener(this);
444
                }
445
                return cbActiveSharpening;
446
        }
447
        /**
448
         * This method initializes jPanel        
449
         *         
450
         * @return javax.swing.JPanel        
451
         */    
452
        public JPanel getPSharpNorth() {
453
                if (pSharpNorth == null) {
454
                        GridBagConstraints gridBagConstraints10 = new GridBagConstraints();
455
                        gridBagConstraints10.gridx = 0;
456
                        gridBagConstraints10.gridy = 1;
457
                        GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
458
                        GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
459
                        pSharpNorth = new JPanel();
460
                        pSharpNorth.setLayout(new GridBagLayout());
461
                        pSharpNorth.setPreferredSize(new java.awt.Dimension(440,225));
462
                        pSharpNorth.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Selector de banda de refinado", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
463
                        gridBagConstraints2.gridx = 0;
464
                        gridBagConstraints2.gridy = 0;
465
                        gridBagConstraints2.anchor = java.awt.GridBagConstraints.WEST;
466
                        gridBagConstraints2.gridwidth = 0;
467
                        gridBagConstraints2.gridheight = 1;
468
                        gridBagConstraints3.gridx = 0;
469
                        gridBagConstraints3.gridy = 2;
470
                        gridBagConstraints3.weightx = 0.0D;
471
                        gridBagConstraints3.weighty = 0.0D;
472
                        gridBagConstraints3.fill = java.awt.GridBagConstraints.NONE;
473
                        gridBagConstraints3.ipadx = 0;
474
                        gridBagConstraints3.ipady = 0;
475
                        gridBagConstraints3.insets = new java.awt.Insets(0,0,0,0);
476
                        gridBagConstraints3.gridheight = 0;
477
                        gridBagConstraints3.gridwidth = 0;
478
                        pSharpNorth.add(getActivationPanel(), gridBagConstraints2);
479
                        pSharpNorth.add(getRGBBandAssignPane(), gridBagConstraints3);
480
                        pSharpNorth.add(getPSharpSouth(), gridBagConstraints10);
481
                }
482
                return pSharpNorth;
483
        }
484
   
485
        private JPanel getPSharpSouth() {
486
                if (pSharpSouth == null) {
487
                        GridBagConstraints gridBagConstraints8 = new GridBagConstraints();
488
                        GridBagConstraints gridBagConstraints9 = new GridBagConstraints();
489
                        pSharpSouth = new JPanel();
490
                        pSharpSouth.setLayout(new GridBagLayout());
491
                        pSharpSouth.setPreferredSize(new java.awt.Dimension(410,62));
492
                        gridBagConstraints9.gridy = 1;
493
                        gridBagConstraints8.gridy = 0;
494
                        pSharpSouth.add(getJPanel(), gridBagConstraints8);
495
                        ButtonGroup group = new ButtonGroup();
496
                        group.add(getRbBrovey());
497
                        group.add(getRbHSL());
498
                        gridBagConstraints9.ipadx = 0;
499
                        pSharpSouth.add(getPKernel(), gridBagConstraints9);
500
                }
501
                return pSharpSouth;
502
        }
503
        /**
504
         * This method initializes jRadioButton        
505
         *         
506
         * @return javax.swing.JRadioButton        
507
         */    
508
        public JRadioButton getRbBrovey() {
509
                if (rbBrovey == null) {
510
                        rbBrovey = new JRadioButton();
511
                        rbBrovey.setText("Brovey");
512
                        rbBrovey.setPreferredSize(new java.awt.Dimension(70,23));
513
                        rbBrovey.setSelected(true);
514
                }
515
                return rbBrovey;
516
        }
517
        /**
518
         * This method initializes jRadioButton        
519
         *         
520
         * @return javax.swing.JRadioButton        
521
         */    
522
        public JRadioButton getRbHSL() {
523
                if (rbHSL == null) {
524
                        rbHSL = new JRadioButton();
525
                        rbHSL.setText("HSL");
526
                        rbHSL.setPreferredSize(new java.awt.Dimension(70,23));
527
                }
528
                return rbHSL;
529
        }
530
        /**
531
         * This method initializes jPanel        
532
         *         
533
         * @return javax.swing.JPanel        
534
         */    
535
        private JPanel getPKernel() {
536
                if (pHSL == null) {
537
                        GridBagConstraints gridBagConstraints7 = new GridBagConstraints();
538
                        GridBagConstraints gridBagConstraints6 = new GridBagConstraints();
539
                        GridBagConstraints gridBagConstraints5 = new GridBagConstraints();
540
                        pHSL = new JPanel();
541
                        pHSL.setLayout(new GridBagLayout());
542
                        pHSL.setPreferredSize(new java.awt.Dimension(400,30));
543
                        gridBagConstraints5.gridx = 0;
544
                        gridBagConstraints5.gridy = 0;
545
                        gridBagConstraints5.insets = new java.awt.Insets(0,0,0,0);
546
                        gridBagConstraints5.gridheight = 0;
547
                        gridBagConstraints6.gridx = 1;
548
                        gridBagConstraints6.gridwidth = 1;
549
                        gridBagConstraints6.gridy = 0;
550
                        gridBagConstraints6.weightx = 1.0;
551
                        gridBagConstraints6.fill = java.awt.GridBagConstraints.HORIZONTAL;
552
                        gridBagConstraints6.insets = new java.awt.Insets(0,0,0,0);
553
                        gridBagConstraints6.gridheight = 0;
554
                        gridBagConstraints7.weightx = 1.0D;
555
                        gridBagConstraints7.weighty = 1.0D;
556
                        gridBagConstraints7.gridwidth = 1;
557
                        gridBagConstraints7.fill = java.awt.GridBagConstraints.HORIZONTAL;
558
                        gridBagConstraints7.gridheight = 1;
559
                        gridBagConstraints7.gridy = 0;
560
                        gridBagConstraints7.gridx = 2;
561
                        pHSL.add(getJTextField(), gridBagConstraints7);
562
                        pHSL.add(getRbHSL(), gridBagConstraints5);
563
                        pHSL.add(getJSlider(), gridBagConstraints6);
564
                        this.getJSlider().setValue(0);
565
                }
566
                return pHSL;
567
        }
568
        /**
569
         * This method initializes jSlider        
570
         *         
571
         * @return javax.swing.JSlider        
572
         */    
573
        public JSlider getJSlider() {
574
                if (jSlider == null) {
575
                        jSlider = new JSlider();
576
                        jSlider.setMinimum(0);
577
                        jSlider.setPreferredSize(new java.awt.Dimension(180,16));
578
                        jSlider.setMaximum(100);
579
                        jSlider.addChangeListener(this);
580
                }
581
                return jSlider;
582
        }
583
        /**
584
         * This method initializes jTextField        
585
         *         
586
         * @return javax.swing.JTextField        
587
         */    
588
        public JTextField getJTextField() {
589
                if (jTextField == null) {
590
                        jTextField = new JTextField();
591
                        jTextField.setPreferredSize(new java.awt.Dimension(20,19));
592
                        jTextField.setText("0.0");
593
                }
594
                return jTextField;
595
        }
596

    
597
        public void stateChanged(ChangeEvent e) {
598
                //Ponemos el valor del texto del coeficiente 
599
        if (e.getSource().equals(this.getJSlider())) {
600
            this.getJTextField().setText(String.valueOf((getJSlider().getValue()/200.0)));
601
        }
602
        
603
        if (e.getSource().equals(this.getJSlider1())) {
604
            this.getJTextField1().setText(String.valueOf((getJSlider1().getValue()/2)));
605
        }
606
                
607
        }
608

    
609
        /**
610
         * This method initializes jPanel        
611
         *         
612
         * @return javax.swing.JPanel        
613
         */
614
        private JPanel getJPanel() {
615
                if (pBrovey == null) {
616
                        GridBagConstraints gridBagConstraints11 = new GridBagConstraints();
617
                        gridBagConstraints11.fill = java.awt.GridBagConstraints.HORIZONTAL;
618
                        gridBagConstraints11.gridx = 2;
619
                        gridBagConstraints11.gridy = 0;
620
                        gridBagConstraints11.weighty = 1.0D;
621
                        gridBagConstraints11.weightx = 1.0;
622
                        GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
623
                        gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL;
624
                        gridBagConstraints1.gridheight = 0;
625
                        gridBagConstraints1.gridx = 1;
626
                        gridBagConstraints1.gridy = 0;
627
                        gridBagConstraints1.weightx = 1.0;
628
                        GridBagConstraints gridBagConstraints = new GridBagConstraints();
629
                        gridBagConstraints.anchor = java.awt.GridBagConstraints.CENTER;
630
                        gridBagConstraints.gridy = 0;
631
                        gridBagConstraints.gridheight = 0;
632
                        gridBagConstraints.gridx = 0;
633
                        pBrovey = new JPanel();
634
                        pBrovey.setLayout(new GridBagLayout());
635
                        pBrovey.setPreferredSize(new java.awt.Dimension(400,30));
636
                        pBrovey.add(getRbBrovey(), gridBagConstraints);
637
                        pBrovey.add(getJSlider1(), gridBagConstraints1);
638
                        this.getJSlider1().setValue(0);
639
                        pBrovey.add(getJTextField1(), gridBagConstraints11);
640
                }
641
                return pBrovey;
642
        }
643

    
644
        /**
645
         * This method initializes jSlider1        
646
         *         
647
         * @return javax.swing.JSlider        
648
         */
649
        public JSlider getJSlider1() {
650
                if (slBrovey == null) {
651
                        slBrovey = new JSlider();
652
                        slBrovey.setMaximum(100);
653
                        slBrovey.setPreferredSize(new java.awt.Dimension(180,16));
654
                        slBrovey.addChangeListener(this);
655
                }
656
                return slBrovey;
657
        }
658

    
659
        /**
660
         * This method initializes jTextField1        
661
         *         
662
         * @return javax.swing.JTextField        
663
         */
664
        public JTextField getJTextField1() {
665
                if (jTextField1 == null) {
666
                        jTextField1 = new JTextField();
667
                        jTextField1.setPreferredSize(new java.awt.Dimension(20,19));
668
                        jTextField1.setText("0");
669
                }
670
                return jTextField1;
671
        }
672
   } //  @jve:decl-index=0:visual-constraint="10,10"