Statistics
| Revision:

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

History | View | Annotate | Download (3.99 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.JTextField;
8
import javax.swing.JComboBox;
9
import java.awt.FlowLayout;
10

    
11
public class InputScaleDataPanel extends JPanel {
12

    
13
        private JPanel pScale = null;
14
        private JPanel pResolution = null;
15
        private JPanel pMtsPixel = null;
16
        private JLabel lScale = null;
17
        private JLabel lResolution = null;
18
        private JLabel lMtsPixel = null;
19
        private JTextField tScale = null;
20
        private JTextField tMtsPixel = null;
21
        private JComboBox cResolution = null;
22
        /**
23
         * This is the default constructor
24
         */
25
        public InputScaleDataPanel() {
26
                super();
27
                initialize();
28
        }
29

    
30
        /**
31
         * This method initializes this
32
         * 
33
         * @return void
34
         */
35
        private void initialize() {
36
                GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
37
                gridBagConstraints2.gridx = 0;
38
                gridBagConstraints2.gridy = 2;
39
                GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
40
                gridBagConstraints1.gridx = 0;
41
                gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST;
42
                gridBagConstraints1.gridy = 1;
43
                GridBagConstraints gridBagConstraints = new GridBagConstraints();
44
                gridBagConstraints.gridx = 0;
45
                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
46
                gridBagConstraints.gridy = 0;
47
                this.setLayout(new GridBagLayout());
48
                this.setSize(180, 92);
49
                this.setPreferredSize(new java.awt.Dimension(180,92));
50
                this.add(getPScale(), gridBagConstraints);
51
                this.add(getPResolution(), gridBagConstraints1);
52
                this.add(getPMtsPixel(), gridBagConstraints2);
53
        }
54

    
55
        /**
56
         * This method initializes jPanel        
57
         *         
58
         * @return javax.swing.JPanel        
59
         */
60
        private JPanel getPScale() {
61
                if (pScale == null) {
62
                        FlowLayout flowLayout2 = new FlowLayout();
63
                        flowLayout2.setAlignment(java.awt.FlowLayout.RIGHT);
64
                        lScale = new JLabel();
65
                        lScale.setText("Escala:");
66
                        pScale = new JPanel();
67
                        pScale.setLayout(flowLayout2);
68
                        pScale.setPreferredSize(new java.awt.Dimension(180,29));
69
                        pScale.add(lScale, null);
70
                        pScale.add(getTScale(), null);
71
                }
72
                return pScale;
73
        }
74

    
75
        /**
76
         * This method initializes jPanel1        
77
         *         
78
         * @return javax.swing.JPanel        
79
         */
80
        private JPanel getPResolution() {
81
                if (pResolution == null) {
82
                        FlowLayout flowLayout1 = new FlowLayout();
83
                        flowLayout1.setAlignment(java.awt.FlowLayout.RIGHT);
84
                        lResolution = new JLabel();
85
                        lResolution.setText("Resoluci?n:");
86
                        pResolution = new JPanel();
87
                        pResolution.setLayout(flowLayout1);
88
                        pResolution.setPreferredSize(new java.awt.Dimension(180,34));
89
                        pResolution.add(lResolution, null);
90
                        pResolution.add(getCResolution(), null);
91
                }
92
                return pResolution;
93
        }
94

    
95
        /**
96
         * This method initializes jPanel2        
97
         *         
98
         * @return javax.swing.JPanel        
99
         */
100
        private JPanel getPMtsPixel() {
101
                if (pMtsPixel == null) {
102
                        FlowLayout flowLayout = new FlowLayout();
103
                        flowLayout.setAlignment(java.awt.FlowLayout.RIGHT);
104
                        lMtsPixel = new JLabel();
105
                        lMtsPixel.setText("Mts/Pixel:");
106
                        pMtsPixel = new JPanel();
107
                        pMtsPixel.setLayout(flowLayout);
108
                        pMtsPixel.setPreferredSize(new java.awt.Dimension(180,29));
109
                        pMtsPixel.add(lMtsPixel, null);
110
                        pMtsPixel.add(getTMtsPixel(), null);
111
                }
112
                return pMtsPixel;
113
        }
114

    
115
        /**
116
         * This method initializes jTextField        
117
         *         
118
         * @return javax.swing.JTextField        
119
         */
120
        private JTextField getTScale() {
121
                if (tScale == null) {
122
                        tScale = new JTextField();
123
                        tScale.setPreferredSize(new java.awt.Dimension(80,19));
124
                }
125
                return tScale;
126
        }
127

    
128
        /**
129
         * This method initializes jTextField2        
130
         *         
131
         * @return javax.swing.JTextField        
132
         */
133
        private JTextField getTMtsPixel() {
134
                if (tMtsPixel == null) {
135
                        tMtsPixel = new JTextField();
136
                        tMtsPixel.setPreferredSize(new java.awt.Dimension(80,19));
137
                }
138
                return tMtsPixel;
139
        }
140

    
141
        /**
142
         * This method initializes jComboBox        
143
         *         
144
         * @return javax.swing.JComboBox        
145
         */
146
        private JComboBox getCResolution() {
147
                if (cResolution == null) {
148
                        cResolution = new JComboBox();
149
                        cResolution.setPreferredSize(new java.awt.Dimension(80,24));
150
                }
151
                return cResolution;
152
        }
153

    
154
}