Statistics
| Revision:

svn-gvsig-desktop / trunk / extensions / extRasterTools / src / com / iver / cit / gvsig / rasterTools / saveRaster / pruebas2 / ButtonsPanel.java @ 4444

History | View | Annotate | Download (3.19 KB)

1
package com.iver.cit.gvsig.rasterTools.saveRaster.pruebas2;
2

    
3
import javax.swing.JPanel;
4
import java.awt.GridBagLayout;
5
import java.awt.GridBagConstraints;
6
import javax.swing.JLabel;
7
import javax.swing.JButton;
8
import java.awt.FlowLayout;
9

    
10
public class ButtonsPanel extends JPanel {
11

    
12
        private JPanel pFileName = null;
13
        private JPanel pButtons = null;
14
        private JLabel lFileTag = null;
15
        private JLabel lFileName = null;
16
        private JButton bSelect = null;
17
        private JButton bProperties = null;
18

    
19
        /**
20
         * This is the default constructor
21
         */
22
        public ButtonsPanel() {
23
                super();
24
                initialize();
25
        }
26

    
27
        /**
28
         * This method initializes this
29
         * 
30
         * @return void
31
         */
32
        private void initialize() {
33
                GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
34
                gridBagConstraints1.gridx = 0;
35
                gridBagConstraints1.insets = new java.awt.Insets(0,0,0,0);
36
                gridBagConstraints1.gridy = 1;
37
                GridBagConstraints gridBagConstraints = new GridBagConstraints();
38
                gridBagConstraints.gridx = 0;
39
                gridBagConstraints.gridy = 0;
40
                this.setLayout(new GridBagLayout());
41
                this.setSize(337, 50);
42
                this.add(getJPanel(), gridBagConstraints);
43
                this.add(getJPanel1(), gridBagConstraints1);
44
        }
45

    
46
        /**
47
         * This method initializes jPanel        
48
         *         
49
         * @return javax.swing.JPanel        
50
         */
51
        private JPanel getJPanel() {
52
                if (pFileName == null) {
53
                        FlowLayout flowLayout1 = new FlowLayout();
54
                        flowLayout1.setHgap(1);
55
                        flowLayout1.setAlignment(java.awt.FlowLayout.LEFT);
56
                        flowLayout1.setVgap(2);
57
                        lFileName = new JLabel();
58
                        lFileName.setText("");
59
                        lFileTag = new JLabel();
60
                        lFileTag.setText("File:");
61
                        pFileName = new JPanel();
62
                        pFileName.setLayout(flowLayout1);
63
                        pFileName.setPreferredSize(new java.awt.Dimension(337,20));
64
                        pFileName.add(lFileTag, null);
65
                        pFileName.add(lFileName, null);
66
                }
67
                return pFileName;
68
        }
69

    
70
        /**
71
         * This method initializes jPanel1        
72
         *         
73
         * @return javax.swing.JPanel        
74
         */
75
        public JPanel getJPanel1() {
76
                if (pButtons == null) {
77
                        FlowLayout flowLayout = new FlowLayout();
78
                        flowLayout.setAlignment(java.awt.FlowLayout.RIGHT);
79
                        flowLayout.setHgap(2);
80
                        flowLayout.setVgap(2);
81
                        pButtons = new JPanel();
82
                        pButtons.setLayout(flowLayout);
83
                        pButtons.setPreferredSize(new java.awt.Dimension(337,25));
84
                        pButtons.add(getBSelect(), null);
85
                        pButtons.add(getBProperties(), null);
86
                }
87
                return pButtons;
88
        }
89

    
90
        /**
91
         * This method initializes jButton        
92
         *         
93
         * @return javax.swing.JButton        
94
         */
95
        public JButton getBSelect() {
96
                if (bSelect == null) {
97
                        bSelect = new JButton();
98
                        bSelect.setPreferredSize(new java.awt.Dimension(110,20));
99
                        bSelect.setText("Seleccionar");
100
                }
101
                return bSelect;
102
        }
103

    
104
        /**
105
         * This method initializes jButton1        
106
         *         
107
         * @return javax.swing.JButton        
108
         */
109
        public JButton getBProperties() {
110
                if (bProperties == null) {
111
                        bProperties = new JButton();
112
                        bProperties.setPreferredSize(new java.awt.Dimension(160,20));
113
                        bProperties.setText("Propiedades GTiff");
114
                }
115
                return bProperties;
116
        }
117

    
118
        /**
119
         * Asigna el valor del texto de la etiqueta
120
         * @param text cadena con el texto
121
         */
122
        public void setLabelText(String text){
123
                lFileName.setText(text);
124
        }
125
        
126
        /**
127
         * Asigna el valor del texto de la etiqueta
128
         * @param text cadena con el texto
129
         */
130
        public void setTag(String tag){
131
                lFileTag.setText(tag);
132
        }
133
}