Revision 10786 branches/F2/extensions/extJCRS/src/org/gvsig/crs/gui/panels/TransformationManualPanel.java
TransformationManualPanel.java | ||
---|---|---|
40 | 40 |
|
41 | 41 |
package org.gvsig.crs.gui.panels; |
42 | 42 |
|
43 |
import java.awt.BorderLayout; |
|
43 | 44 |
import java.awt.Color; |
44 | 45 |
import java.awt.Component; |
45 | 46 |
import java.awt.Dimension; |
46 |
import java.awt.FlowLayout; |
|
47 | 47 |
import java.awt.GridLayout; |
48 | 48 |
|
49 | 49 |
import javax.swing.BorderFactory; |
... | ... | |
51 | 51 |
import javax.swing.JPanel; |
52 | 52 |
import javax.swing.JTextArea; |
53 | 53 |
import javax.swing.JTextField; |
54 |
import javax.swing.border.EmptyBorder; |
|
54 | 55 |
|
55 | 56 |
import org.gvsig.crs.CrsFactory; |
56 | 57 |
import org.gvsig.crs.CrsWkt; |
... | ... | |
63 | 64 |
* funcionamiento. |
64 | 65 |
* |
65 | 66 |
* @author Jos? Luis G?mez Mart?nez (jolugomar@gmail.com) |
67 |
* @author Luisa Marina Fern?ndez (luisam.fernandez@uclm.es) |
|
66 | 68 |
* |
67 | 69 |
*/ |
68 | 70 |
public class TransformationManualPanel extends JPanel { |
... | ... | |
91 | 93 |
private JLabel domainRotation; |
92 | 94 |
private JLabel domainScale; |
93 | 95 |
|
94 |
private JLabel wkt; |
|
96 |
//private JLabel wkt;
|
|
95 | 97 |
private JTextArea info; |
96 | 98 |
int codeEpsg; |
97 | 99 |
String targetAbrev = ""; |
... | ... | |
105 | 107 |
} |
106 | 108 |
|
107 | 109 |
private void initialize(){ |
108 |
setLayout(new GridLayout(0,3)); |
|
109 |
setLayout(new FlowLayout(FlowLayout.LEFT,10,20)); |
|
110 |
setBorder( |
|
111 |
BorderFactory.createCompoundBorder( |
|
112 |
BorderFactory.createCompoundBorder( |
|
113 |
BorderFactory.createTitledBorder(PluginServices.getText(this,"transformacion_manual")), |
|
114 |
BorderFactory.createEmptyBorder(2,2,2,2)), |
|
115 |
getBorder())); |
|
116 |
setPreferredSize(new Dimension(525,400)); |
|
117 |
add(getX_Translation(),null); |
|
118 |
add(getTx_Translation(),null); |
|
119 |
add(getDomainTranslation(), null); |
|
120 |
add(getY_Translation(),null); |
|
121 |
add(getTy_Translation(),null); |
|
122 |
add(getDomainTranslation(), null); |
|
123 |
add(getZ_Translation(),null); |
|
124 |
add(getTz_Translation(),null); |
|
125 |
add(getDomainTranslation(), null); |
|
126 |
add(getX_Rotation(),null); |
|
127 |
add(getTx_Rotation(),null); |
|
128 |
add(getDomainRotation(), null); |
|
129 |
add(getY_Rotation(),null); |
|
130 |
add(getTy_Rotation(),null); |
|
131 |
add(getDomainRotation(), null); |
|
132 |
add(getZ_Rotation(),null); |
|
133 |
add(getTz_Rotation(),null); |
|
134 |
add(getDomainRotation(), null); |
|
135 |
add(getScale(),null); |
|
136 |
add(getTscale(),null); |
|
137 |
add(getDomainScale(), null); |
|
138 |
//panel.add(getJPanelParams(), null); |
|
139 |
//panel.add(getButtonPane(), null); |
|
110 |
JPanel p=new JPanel(); |
|
111 |
p.setLayout(new GridLayout(7,3,10,10)); |
|
112 |
|
|
113 |
p.add(getX_Translation()); |
|
114 |
p.add(getTx_Translation()); |
|
115 |
p.add(getDomainTranslation()); |
|
116 |
|
|
117 |
p.add(getY_Translation()); |
|
118 |
p.add(getTy_Translation()); |
|
119 |
p.add(getDomainTranslation()); |
|
120 |
|
|
121 |
p.add(getZ_Translation()); |
|
122 |
p.add(getTz_Translation()); |
|
123 |
p.add(getDomainTranslation()); |
|
124 |
|
|
125 |
p.add(getX_Rotation()); |
|
126 |
p.add(getTx_Rotation()); |
|
127 |
p.add(getDomainRotation()); |
|
128 |
|
|
129 |
p.add(getY_Rotation()); |
|
130 |
p.add(getTy_Rotation()); |
|
131 |
p.add(getDomainRotation()); |
|
132 |
|
|
133 |
p.add(getZ_Rotation()); |
|
134 |
p.add(getTz_Rotation()); |
|
135 |
p.add(getDomainRotation()); |
|
136 |
|
|
137 |
p.add(getScale()); |
|
138 |
p.add(getTscale()); |
|
139 |
p.add(getDomainScale()); |
|
140 |
p.setBorder(new EmptyBorder(50,20,50,10)); |
|
141 |
this.setLayout(new BorderLayout(1,30)); |
|
142 |
this.setBorder( |
|
143 |
BorderFactory.createCompoundBorder( |
|
144 |
BorderFactory.createCompoundBorder( |
|
145 |
BorderFactory.createTitledBorder(PluginServices.getText(this,"transformacion_manual")), |
|
146 |
BorderFactory.createEmptyBorder(2,2,2,2)), |
|
147 |
getBorder())); |
|
148 |
this.add(p,BorderLayout.CENTER); |
|
140 | 149 |
} |
141 | 150 |
|
142 | 151 |
private JLabel getDomainTranslation(){ |
143 | 152 |
domainTranslation = new JLabel(); |
144 |
domainTranslation.setPreferredSize(new Dimension(150, 20)); |
|
145 | 153 |
domainTranslation.setText("[-1000.0, 1000.0]"); |
146 | 154 |
return domainTranslation; |
147 | 155 |
} |
148 | 156 |
|
149 | 157 |
private JLabel getDomainRotation(){ |
150 | 158 |
domainRotation = new JLabel(); |
151 |
domainRotation.setPreferredSize(new Dimension(150, 20)); |
|
152 | 159 |
domainRotation.setText("[-60.0, 60.0]"); |
153 | 160 |
return domainRotation; |
154 | 161 |
} |
155 | 162 |
|
156 | 163 |
private JLabel getDomainScale(){ |
157 | 164 |
domainScale = new JLabel(); |
158 |
domainScale.setPreferredSize(new Dimension(150, 20)); |
|
159 | 165 |
domainScale.setText("[-20.0, 20.0]"); |
160 | 166 |
return domainScale; |
161 | 167 |
} |
... | ... | |
163 | 169 |
private JLabel getX_Translation() { |
164 | 170 |
if(x_Translation == null ) { |
165 | 171 |
x_Translation = new JLabel(); |
166 |
x_Translation.setPreferredSize(new Dimension(120,20)); |
|
167 | 172 |
//x_Translation.setFont(new Font("x_Translation:",Font.BOLD,15)); |
168 |
x_Translation.setText(PluginServices.getText(this,"x_Translation")+":"); |
|
169 |
|
|
173 |
x_Translation.setText(PluginServices.getText(this,"x_Translation")+":"); |
|
170 | 174 |
} |
171 | 175 |
return x_Translation; |
172 | 176 |
} |
... | ... | |
174 | 178 |
private JLabel getY_Translation() { |
175 | 179 |
if(y_Translation == null ) { |
176 | 180 |
y_Translation = new JLabel(); |
177 |
y_Translation.setPreferredSize(new Dimension(120,20)); |
|
178 | 181 |
//y_Translation.setFont(new Font("y_Translation:",Font.BOLD,15)); |
179 | 182 |
y_Translation.setText(PluginServices.getText(this,"y_Translation")+":"); |
180 |
|
|
181 | 183 |
} |
182 | 184 |
return y_Translation; |
183 | 185 |
} |
... | ... | |
185 | 187 |
private JLabel getZ_Translation() { |
186 | 188 |
if(z_Translation == null ) { |
187 | 189 |
z_Translation = new JLabel(); |
188 |
z_Translation.setPreferredSize(new Dimension(120,20)); |
|
189 | 190 |
//z_Translation.setFont(new Font("z_Translation:",Font.BOLD,15)); |
190 | 191 |
z_Translation.setText(PluginServices.getText(this,"z_Translation")+":"); |
191 | 192 |
|
... | ... | |
196 | 197 |
private JLabel getX_Rotation() { |
197 | 198 |
if(x_Rotation == null ) { |
198 | 199 |
x_Rotation = new JLabel(); |
199 |
x_Rotation.setPreferredSize(new Dimension(120,20)); |
|
200 | 200 |
//x_Rotation.setFont(new Font("x_Rotation:",Font.BOLD,15)); |
201 | 201 |
x_Rotation.setText(PluginServices.getText(this,"x_Rotation")+":"); |
202 | 202 |
|
... | ... | |
207 | 207 |
private JLabel getY_Rotation() { |
208 | 208 |
if(y_Rotation == null ) { |
209 | 209 |
y_Rotation = new JLabel(); |
210 |
y_Rotation.setPreferredSize(new Dimension(120,20)); |
|
211 | 210 |
//y_Rotation.setFont(new Font("x_Rotation:",Font.BOLD,15)); |
212 | 211 |
y_Rotation.setText(PluginServices.getText(this,"y_Rotation")+":"); |
213 | 212 |
|
... | ... | |
218 | 217 |
private JLabel getZ_Rotation() { |
219 | 218 |
if(z_Rotation == null ) { |
220 | 219 |
z_Rotation = new JLabel(); |
221 |
z_Rotation.setPreferredSize(new Dimension(120,20)); |
|
222 | 220 |
//z_Rotation.setFont(new Font("x_Translation:",Font.BOLD,15)); |
223 | 221 |
z_Rotation.setText(PluginServices.getText(this,"z_Rotation")+":"); |
224 | 222 |
|
... | ... | |
229 | 227 |
private JLabel getScale() { |
230 | 228 |
if(scale == null ) { |
231 | 229 |
scale = new JLabel(); |
232 |
scale.setPreferredSize(new Dimension(120,20)); |
|
233 | 230 |
//scale.setFont(new Font("scale:",Font.BOLD,15)); |
234 | 231 |
scale.setText(PluginServices.getText(this,"scale")+":"); |
235 | 232 |
|
... | ... | |
240 | 237 |
public JTextField getTx_Translation() { |
241 | 238 |
if(tx_Translation == null ) { |
242 | 239 |
tx_Translation = new JTextField(); |
243 |
tx_Translation.setPreferredSize(new Dimension(120,20)); |
|
244 | 240 |
//tx_Translation.setFont(new Font("",Font.ITALIC,10)); |
245 | 241 |
tx_Translation.setText("0"); |
246 | 242 |
tx_Translation.setEditable(true); |
... | ... | |
252 | 248 |
public JTextField getTy_Translation() { |
253 | 249 |
if(ty_Translation == null ) { |
254 | 250 |
ty_Translation = new JTextField(); |
255 |
ty_Translation.setPreferredSize(new Dimension(120,20)); |
|
256 | 251 |
//ty_Translation.setFont(new Font("",Font.ITALIC,10)); |
257 | 252 |
ty_Translation.setText("0"); |
258 | 253 |
ty_Translation.setEditable(true); |
... | ... | |
264 | 259 |
public JTextField getTz_Translation() { |
265 | 260 |
if(tz_Translation == null ) { |
266 | 261 |
tz_Translation = new JTextField(); |
267 |
tz_Translation.setPreferredSize(new Dimension(120,20)); |
|
268 | 262 |
//tz_Translation.setFont(new Font("",Font.ITALIC,10)); |
269 | 263 |
tz_Translation.setText("0"); |
270 | 264 |
tz_Translation.setEditable(true); |
... | ... | |
276 | 270 |
public JTextField getTx_Rotation() { |
277 | 271 |
if(tx_Rotation == null ) { |
278 | 272 |
tx_Rotation = new JTextField(); |
279 |
tx_Rotation.setPreferredSize(new Dimension(120,20)); |
|
280 | 273 |
//tx_Rotation.setFont(new Font("",Font.ITALIC,10)); |
281 | 274 |
tx_Rotation.setText("0"); |
282 | 275 |
tx_Rotation.setEditable(true); |
... | ... | |
288 | 281 |
public JTextField getTy_Rotation() { |
289 | 282 |
if(ty_Rotation == null ) { |
290 | 283 |
ty_Rotation = new JTextField(); |
291 |
ty_Rotation.setPreferredSize(new Dimension(120,20)); |
|
292 | 284 |
//ty_Rotation.setFont(new Font("",Font.ITALIC,10)); |
293 | 285 |
ty_Rotation.setText("0"); |
294 | 286 |
ty_Rotation.setEditable(true); |
... | ... | |
300 | 292 |
public JTextField getTz_Rotation() { |
301 | 293 |
if(tz_Rotation == null ) { |
302 | 294 |
tz_Rotation = new JTextField(); |
303 |
tz_Rotation.setPreferredSize(new Dimension(120,20)); |
|
304 | 295 |
//tz_Rotation.setFont(new Font("",Font.ITALIC,10)); |
305 | 296 |
tz_Rotation.setText("0"); |
306 | 297 |
tz_Rotation.setEditable(true); |
... | ... | |
312 | 303 |
public JTextField getTscale() { |
313 | 304 |
if(tScale == null ) { |
314 | 305 |
tScale = new JTextField(); |
315 |
tScale.setPreferredSize(new Dimension(120,20)); |
|
316 | 306 |
//tScale.setFont(new Font("",Font.ITALIC,10)); |
317 | 307 |
tScale.setText("0"); |
318 | 308 |
tScale.setEditable(true); |
Also available in: Unified diff