root / trunk / applications / appgvSIG / src / com / iver / cit / gvsig / gui / thememanager / scalemanager / FPanelScaleManager.java @ 2502
History | View | Annotate | Download (21.5 KB)
1 |
/*
|
---|---|
2 |
* Created on 31-ene-2005
|
3 |
*
|
4 |
* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
5 |
*
|
6 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
7 |
*
|
8 |
* This program is free software; you can redistribute it and/or
|
9 |
* modify it under the terms of the GNU General Public License
|
10 |
* as published by the Free Software Foundation; either version 2
|
11 |
* of the License, or (at your option) any later version.
|
12 |
*
|
13 |
* This program is distributed in the hope that it will be useful,
|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16 |
* GNU General Public License for more details.
|
17 |
*
|
18 |
* You should have received a copy of the GNU General Public License
|
19 |
* along with this program; if not, write to the Free Software
|
20 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
21 |
*
|
22 |
* For more information, contact:
|
23 |
*
|
24 |
* Generalitat Valenciana
|
25 |
* Conselleria d'Infraestructures i Transport
|
26 |
* Av. Blasco Ib??ez, 50
|
27 |
* 46010 VALENCIA
|
28 |
* SPAIN
|
29 |
*
|
30 |
* +34 963862235
|
31 |
* gvsig@gva.es
|
32 |
* www.gvsig.gva.es
|
33 |
*
|
34 |
* or
|
35 |
*
|
36 |
* IVER T.I. S.A
|
37 |
* Salamanca 50
|
38 |
* 46005 Valencia
|
39 |
* Spain
|
40 |
*
|
41 |
* +34 963163400
|
42 |
* dac@iver.es
|
43 |
*/
|
44 |
package com.iver.cit.gvsig.gui.thememanager.scalemanager; |
45 |
|
46 |
import java.awt.BorderLayout; |
47 |
import java.text.NumberFormat; |
48 |
|
49 |
import javax.swing.ButtonGroup; |
50 |
import javax.swing.DefaultComboBoxModel; |
51 |
import javax.swing.JComboBox; |
52 |
import javax.swing.JLabel; |
53 |
import javax.swing.JPanel; |
54 |
import javax.swing.JRadioButton; |
55 |
import javax.swing.JScrollPane; |
56 |
import javax.swing.JTextArea; |
57 |
import javax.swing.JTextField; |
58 |
|
59 |
import org.apache.log4j.Logger; |
60 |
|
61 |
import com.hardcode.gdbms.engine.data.DataSource; |
62 |
import com.iver.andami.PluginServices; |
63 |
import com.iver.andami.messages.NotificationManager; |
64 |
import com.iver.cit.gvsig.fmap.DriverException; |
65 |
import com.iver.cit.gvsig.fmap.FMap; |
66 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
67 |
import com.iver.cit.gvsig.fmap.layers.layerOperations.AlphanumericData; |
68 |
import com.iver.cit.gvsig.fmap.rendering.Legend; |
69 |
import com.iver.cit.gvsig.fmap.rendering.VectorialUniqueValueLegend; |
70 |
import com.iver.cit.gvsig.gui.thememanager.legendmanager.panels.AbstractPanel; |
71 |
import com.iver.cit.gvsig.gui.thememanager.legendmanager.panels.FPanelLegendValues; |
72 |
import com.iver.cit.gvsig.project.ProjectView; |
73 |
/**
|
74 |
* @author jmorell
|
75 |
*
|
76 |
* TODO To change the template for this generated type comment go to
|
77 |
* Window - Preferences - Java - Code Style - Code Templates
|
78 |
*/
|
79 |
public class FPanelScaleManager extends AbstractPanel { |
80 |
|
81 |
private static final long serialVersionUID = 1L; |
82 |
private static Logger logger = Logger.getLogger(FPanelLegendValues.class.getName()); |
83 |
private FLayer layer;
|
84 |
//private ComandosListener actionListener = new ComandosListener(this);
|
85 |
private ProjectView view;
|
86 |
private NumberFormat nf = NumberFormat.getInstance(); |
87 |
|
88 |
private JPanel jPanel = null; |
89 |
private JPanel jPanel1 = null; |
90 |
private JPanel jPanel2 = null; |
91 |
private JPanel jPanel4 = null; |
92 |
private JPanel jPanel5 = null; |
93 |
private JLabel jLabel = null; |
94 |
private JTextField txtLayerName = null; |
95 |
private JLabel jLabel1 = null; |
96 |
private JTextField jTextField1 = null; |
97 |
private JLabel jLabel2 = null; |
98 |
private JTextArea jTextArea = null; |
99 |
private JScrollPane jScrollPane = null; |
100 |
private ButtonGroup buttonGroup = null; |
101 |
private JRadioButton jRadioButton = null; |
102 |
private JRadioButton jRadioButton1 = null; |
103 |
private JLabel jLabel3 = null; |
104 |
private JTextField jTextField2 = null; |
105 |
private JLabel jLabel4 = null; |
106 |
private JPanel jPanel3 = null; |
107 |
private JPanel jPanel6 = null; |
108 |
private JPanel jPanel7 = null; |
109 |
private JPanel jPanel8 = null; |
110 |
private JLabel jLabel5 = null; |
111 |
private JComboBox jComboBox = null; |
112 |
private JLabel jLabel6 = null; |
113 |
private JTextField jTextField = null; |
114 |
private JLabel jLabel7 = null; |
115 |
private JComboBox jComboBox1 = null; |
116 |
/**
|
117 |
* This is the default constructor
|
118 |
*/
|
119 |
public FPanelScaleManager() {
|
120 |
super();
|
121 |
initialize(); |
122 |
} |
123 |
/**
|
124 |
* This method initializes this
|
125 |
*
|
126 |
* @return void
|
127 |
*/
|
128 |
private void initialize() { |
129 |
//setView();
|
130 |
this.setLayout(null); |
131 |
//this.setLayer(null);
|
132 |
this.setBounds(0, 0, 589, 332); |
133 |
this.add(getJPanel(), null); |
134 |
this.add(getJPanel1(), null); |
135 |
this.add(getJPanel2(), null); |
136 |
this.add(getJPanel3(), null); |
137 |
} |
138 |
|
139 |
|
140 |
/**
|
141 |
* Inicializa el ProjectView view. Es necesario para implementar el control de
|
142 |
* escalas y para hiperenlazar documentos.
|
143 |
* @return
|
144 |
*/
|
145 |
/*private void setView() {
|
146 |
View vista = (View) PluginServices.getMDIManager().getActiveView();
|
147 |
view = vista.getModel();
|
148 |
}*/
|
149 |
|
150 |
/**
|
151 |
* En esta funci?n se coge el primer tema activo del TOC y se usa su
|
152 |
* renderer para inicializar. Hay que llamarla SIEMPRE que se abra el
|
153 |
* cuadro de di?logo, en el openLegendManager() de la vista.
|
154 |
*
|
155 |
* @param mapContext TOC que abre este cuadro de di?logo.
|
156 |
* @throws DriverException
|
157 |
*/
|
158 |
public void setMapContext(FMap mapContext) throws DriverException { |
159 |
layer = getFirstActiveLayerVect(mapContext.getLayers()); |
160 |
/*try {
|
161 |
ClassifiableVectorial aux = (ClassifiableVectorial) layer;
|
162 |
renderer = (Legend) aux.getLegend().cloneLegend();
|
163 |
} catch (XMLException e) {
|
164 |
// TODO Auto-generated catch block
|
165 |
e.printStackTrace();
|
166 |
}*/
|
167 |
actualizar(); |
168 |
} |
169 |
|
170 |
/**
|
171 |
* DOCUMENT ME!
|
172 |
*/
|
173 |
private void actualizar() { |
174 |
// Avisar si no es Vectorial
|
175 |
//FLayer lyrSelected = getFirstActiveLayerVect(mapContext.getLayers());
|
176 |
|
177 |
/*m_defaultLegendPanel.setLayer(lyrSelected, renderer);
|
178 |
m_valuesLegendPanel.setLayer(lyrSelected, renderer);
|
179 |
m_breaksLegendPanel.setLayer(lyrSelected, renderer);
|
180 |
m_labelsLegendPanel.setLayer(lyrSelected, renderer);*/
|
181 |
|
182 |
/*CardLayout cl = (CardLayout)(cards.getLayout());
|
183 |
if (renderer instanceof SingleSymbolLegend) {
|
184 |
//organizador.setSelectedIndex(0);
|
185 |
cl.show(cards, "symbol");
|
186 |
}
|
187 |
if (renderer instanceof UniqueValueLegend) {
|
188 |
//organizador.setSelectedIndex(1);
|
189 |
cl.show(cards, "values");
|
190 |
}
|
191 |
if (renderer instanceof IntervalLegend) {
|
192 |
//organizador.setSelectedIndex(2);
|
193 |
cl.show(cards, "intervals");
|
194 |
}*/
|
195 |
|
196 |
/* switch (m_Renderer.getLegendType()) {
|
197 |
case FConstant.LEGEND_TYPE_DEFAULT:
|
198 |
organizador.setSelectedIndex(0);
|
199 |
|
200 |
break;
|
201 |
|
202 |
case FConstant.LEGEND_TYPE_VALUE:
|
203 |
organizador.setSelectedIndex(1);
|
204 |
|
205 |
break;
|
206 |
|
207 |
case FConstant.LEGEND_TYPE_BREAK:
|
208 |
organizador.setSelectedIndex(2);
|
209 |
|
210 |
break;
|
211 |
} */
|
212 |
} |
213 |
|
214 |
private void fillFieldNames() { |
215 |
DataSource rs;
|
216 |
try {
|
217 |
rs = ((AlphanumericData)layer).getRecordset(); |
218 |
logger.debug("rs.start()");
|
219 |
rs.start(); |
220 |
String[] nomFields = new String[rs.getFieldCount()]; |
221 |
for (int i = 0; i < rs.getFieldCount(); i++) { |
222 |
nomFields[i] = rs.getFieldName(i).trim(); |
223 |
} |
224 |
rs.stop(); |
225 |
// fieldsListValor.setSelectedIndex(0);
|
226 |
} catch (com.hardcode.gdbms.engine.data.driver.DriverException e) {
|
227 |
// TODO Auto-generated catch block
|
228 |
e.printStackTrace(); |
229 |
} catch (DriverException e) {
|
230 |
e.printStackTrace(); |
231 |
} |
232 |
} |
233 |
|
234 |
public void setLayer(FLayer lyr, Legend r) { |
235 |
if (layer.getMinScale() != -1) |
236 |
getJTextField1().setText(nf.format(layer.getMinScale())); |
237 |
if (layer.getMaxScale() != -1) |
238 |
getJTextField2().setText(nf.format(layer.getMaxScale())); |
239 |
if (layer.getMinScale() == -1 && layer.getMaxScale() == -1) { |
240 |
getJRadioButton().setSelected(true);
|
241 |
jLabel1.setEnabled(false);
|
242 |
jTextField1.setEnabled(false);
|
243 |
jLabel2.setEnabled(false);
|
244 |
jLabel3.setEnabled(false);
|
245 |
jTextField2.setEnabled(false);
|
246 |
jLabel4.setEnabled(false);
|
247 |
} else {
|
248 |
getJRadioButton1().setSelected(true);
|
249 |
jLabel1.setEnabled(true);
|
250 |
jTextField1.setEnabled(true);
|
251 |
jLabel2.setEnabled(true);
|
252 |
jLabel3.setEnabled(true);
|
253 |
jTextField2.setEnabled(true);
|
254 |
jLabel4.setEnabled(true);
|
255 |
} |
256 |
fillFieldNames(); |
257 |
//getJComboBox().getModel().setSelectedItem(renderer.getFieldName());
|
258 |
layer = lyr; |
259 |
txtLayerName.setText(layer.getName()); |
260 |
try {
|
261 |
getJTextArea().setText(PluginServices.getText(this,"Extent") + "\n\t" + PluginServices.getText(this,"Superior") + ":\t" + layer.getFullExtent().getMaxY() + "\n\t" + PluginServices.getText(this,"Inferior") + ":\t" + layer.getFullExtent().getMinY() + "\n\t" + PluginServices.getText(this,"Izquierda") + ":\t" + layer.getFullExtent().getMinX() + "\n\t" + PluginServices.getText(this,"Derecha") + ":\t" + layer.getFullExtent().getMaxX() + "\n\n" + PluginServices.getText(this,"Origen de datos") + ": " + layer.getName()); |
262 |
} catch (DriverException e) {
|
263 |
// TODO Auto-generated catch block
|
264 |
e.printStackTrace(); |
265 |
} |
266 |
|
267 |
// Me parece que es aqu? donde hay que montar el jComboBox ...
|
268 |
if (PluginServices.getMDIManager().getActiveView() instanceof com.iver.cit.gvsig.gui.View ){ |
269 |
com.iver.cit.gvsig.gui.View theView = (com.iver.cit.gvsig.gui.View)PluginServices.getMDIManager().getActiveView(); |
270 |
view = theView.getModel(); |
271 |
try {
|
272 |
if (layer instanceof AlphanumericData) { |
273 |
AlphanumericData ad = (AlphanumericData) layer; |
274 |
DataSource ds;
|
275 |
ds = ad.getRecordset(); |
276 |
String[] names = new String[ds.getFieldCount()]; |
277 |
for (int i = 0; i < ds.getFieldCount(); i++) { |
278 |
names[i] = ds.getFieldName(i); |
279 |
} |
280 |
//jComboBox = new javax.swing.JComboBox(names);
|
281 |
DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(names); |
282 |
jComboBox.setModel(defaultModel); |
283 |
if (view.getSelectedField() != null) { |
284 |
jComboBox.setSelectedItem(view.getSelectedField()); |
285 |
} |
286 |
}else{
|
287 |
jComboBox = new javax.swing.JComboBox();
|
288 |
} |
289 |
} catch (DriverException e) {
|
290 |
NotificationManager.addError("No se pudo obtener la tabla", e);
|
291 |
} catch (com.hardcode.gdbms.engine.data.driver.DriverException e) {
|
292 |
NotificationManager.addError("No se pudo obtener la tabla", e);
|
293 |
} |
294 |
//
|
295 |
|
296 |
// y aqu? el jTextField ...
|
297 |
if (view.getSelectedField() != null) { |
298 |
getJTextField2().setText(view.getExtLink()); |
299 |
} |
300 |
//
|
301 |
|
302 |
// y aqu? el jComboBox1 ...
|
303 |
//jComboBox1 = new javax.swing.JComboBox();
|
304 |
getJComboBox1().addItem(PluginServices.getText(this,
|
305 |
"Enlazar_a_ficheros_de_imagen"));
|
306 |
getJComboBox1().addItem(PluginServices.getText(this,
|
307 |
"Enlazar_a_fichero_de_texto"));
|
308 |
if (view.getSelectedField() != null) { |
309 |
getJComboBox1().setSelectedIndex(view.getTypeLink()); |
310 |
} |
311 |
//
|
312 |
} |
313 |
// Si es de valor ?nico, rellenamos la tabla
|
314 |
// y seleccionamos el campo que estamos usando
|
315 |
//m_symbolTable.removeAllItems();
|
316 |
if (r instanceof VectorialUniqueValueLegend) |
317 |
{ |
318 |
//renderer = (VectorialUniqueValueLegend) r;
|
319 |
//m_cboFields.getModel().setSelectedItem(m_Renderer.getFieldName());
|
320 |
//m_symbolTable.fillTableFromSymbolList(m_Renderer.getSymbols(),
|
321 |
//m_Renderer.getValues(), m_Renderer.getDescriptions());
|
322 |
} |
323 |
/*else
|
324 |
{
|
325 |
try {
|
326 |
// Si la capa viene con otro tipo de leyenda, creamos
|
327 |
// una nueva del tipo que maneja este panel
|
328 |
renderer = new VectorialUniqueValueLegend(layer.getShapeType());
|
329 |
} catch (com.iver.cit.gvsig.fmap.DriverException e) {
|
330 |
// TODO Auto-generated catch block
|
331 |
e.printStackTrace();
|
332 |
}
|
333 |
}*/
|
334 |
} |
335 |
|
336 |
/*public void setLayerName(String layerName)
|
337 |
{
|
338 |
this.layerName = layerName;
|
339 |
}*/
|
340 |
|
341 |
/**
|
342 |
* This method initializes jPanel
|
343 |
*
|
344 |
* @return javax.swing.JPanel
|
345 |
*/
|
346 |
private JPanel getJPanel() { |
347 |
if (jPanel == null) { |
348 |
jLabel = new JLabel(); |
349 |
jPanel = new JPanel(); |
350 |
jPanel.setLayout(null);
|
351 |
jLabel.setText(PluginServices.getText(this,"Nombre") + ":"); |
352 |
jLabel.setComponentOrientation(java.awt.ComponentOrientation.UNKNOWN); |
353 |
jLabel.setBounds(0, 3, 78, 15); |
354 |
jPanel.setComponentOrientation(java.awt.ComponentOrientation.UNKNOWN); |
355 |
jPanel.setLocation(5, 6); |
356 |
jPanel.setSize(357, 20); |
357 |
jPanel.add(jLabel, null);
|
358 |
jPanel.add(getTxtLayerName(), null);
|
359 |
} |
360 |
return jPanel;
|
361 |
} |
362 |
/**
|
363 |
* This method initializes jPanel1
|
364 |
*
|
365 |
* @return javax.swing.JPanel
|
366 |
*/
|
367 |
private JPanel getJPanel1() { |
368 |
if (jPanel1 == null) { |
369 |
jPanel1 = new JPanel(); |
370 |
jPanel1.setLayout(null);
|
371 |
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, PluginServices.getText(this,"rango_de_escalas"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null)); |
372 |
jPanel1.setBounds(5, 32, 432, 131); |
373 |
jPanel1.add(getJPanel4(), null);
|
374 |
jPanel1.add(getJPanel5(), null);
|
375 |
} |
376 |
return jPanel1;
|
377 |
} |
378 |
/**
|
379 |
* This method initializes jPanel2
|
380 |
*
|
381 |
* @return javax.swing.JPanel
|
382 |
*/
|
383 |
private JPanel getJPanel2() { |
384 |
if (jPanel2 == null) { |
385 |
jPanel2 = new JPanel(); |
386 |
jPanel2.setLayout(null);
|
387 |
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Propiedades", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null)); |
388 |
jPanel2.setBounds(5, 170, 303, 155); |
389 |
jPanel2.add(getJScrollPane(), null);
|
390 |
} |
391 |
return jPanel2;
|
392 |
} |
393 |
/**
|
394 |
* This method initializes jPanel4
|
395 |
*
|
396 |
* @return javax.swing.JPanel
|
397 |
*/
|
398 |
private JPanel getJPanel4() { |
399 |
if (jPanel4 == null) { |
400 |
jPanel4 = new JPanel(); |
401 |
jPanel4.setLayout(null);
|
402 |
jPanel4.setBounds(6, 21, 398, 46); |
403 |
jPanel4.add(getJRadioButton(), null);
|
404 |
jPanel4.add(getJRadioButton1(), null);
|
405 |
buttonGroup = new ButtonGroup(); |
406 |
buttonGroup.add(getJRadioButton()); |
407 |
buttonGroup.add(getJRadioButton1()); |
408 |
} |
409 |
return jPanel4;
|
410 |
} |
411 |
/**
|
412 |
* This method initializes jPanel5
|
413 |
*
|
414 |
* @return javax.swing.JPanel
|
415 |
*/
|
416 |
private JPanel getJPanel5() { |
417 |
if (jPanel5 == null) { |
418 |
jLabel4 = new JLabel(); |
419 |
jLabel3 = new JLabel(); |
420 |
jLabel2 = new JLabel(); |
421 |
jLabel1 = new JLabel(); |
422 |
jPanel5 = new JPanel(); |
423 |
jPanel5.setLayout(null);
|
424 |
jLabel1.setText(PluginServices.getText(this,"este_por_debajo_de_")); |
425 |
jLabel1.setBounds(6, 6, 138, 20); |
426 |
jLabel1.setEnabled(false);
|
427 |
jLabel2.setText("(" + PluginServices.getText(this,"escala_minima") + ")"); |
428 |
jLabel2.setBounds(302, 6, 111, 20); |
429 |
jLabel2.setEnabled(false);
|
430 |
jPanel5.setBounds(15, 69, 414, 53); |
431 |
jLabel3.setBounds(6, 31, 138, 20); |
432 |
jLabel3.setText(PluginServices.getText(this,"este_por_encima_de")); |
433 |
jLabel3.setEnabled(false);
|
434 |
jLabel4.setBounds(302, 31, 111, 20); |
435 |
jLabel4.setText("(" + PluginServices.getText(this,"escala_maxima") + ")"); |
436 |
jLabel4.setEnabled(false);
|
437 |
jPanel5.add(jLabel1, null);
|
438 |
jPanel5.add(getJTextField1(), null);
|
439 |
jPanel5.add(jLabel2, null);
|
440 |
jPanel5.add(jLabel3, null);
|
441 |
jPanel5.add(getJTextField2(), null);
|
442 |
jPanel5.add(jLabel4, null);
|
443 |
} |
444 |
return jPanel5;
|
445 |
} |
446 |
/**
|
447 |
* This method initializes jTextField
|
448 |
*
|
449 |
* @return javax.swing.JTextField
|
450 |
*/
|
451 |
private JTextField getTxtLayerName() { |
452 |
if (txtLayerName == null) { |
453 |
//System.out.println("getJTestField(): layer = " + layer);
|
454 |
//layerName = layer.getName();
|
455 |
txtLayerName = new JTextField(); |
456 |
//jTextField.setText(layerName);
|
457 |
txtLayerName.setEditable(true);
|
458 |
txtLayerName.setBounds(80, 0, 229, 20); |
459 |
} |
460 |
return txtLayerName;
|
461 |
} |
462 |
/**
|
463 |
* This method initializes jTextField1
|
464 |
*
|
465 |
* @return javax.swing.JTextField
|
466 |
*/
|
467 |
public JTextField getJTextField1() { |
468 |
if (jTextField1 == null) { |
469 |
jTextField1 = new JTextField(); |
470 |
jTextField1.setBounds(147, 6, 152, 20); |
471 |
jTextField1.setEnabled(false);
|
472 |
} |
473 |
return jTextField1;
|
474 |
} |
475 |
/**
|
476 |
* This method initializes jTextArea
|
477 |
*
|
478 |
* @return javax.swing.JTextArea
|
479 |
*/
|
480 |
private JTextArea getJTextArea() { |
481 |
if (jTextArea == null) { |
482 |
jTextArea = new JTextArea(); |
483 |
jTextArea.setEditable(false);
|
484 |
jTextArea.setBackground(java.awt.SystemColor.control); |
485 |
//jTextArea.setText("Extent\n\tSuperior\n\tInferior\n\tIzquierda\n\tDerecha\n\nOrigen de datos\n\n... y movidas ...");
|
486 |
} |
487 |
return jTextArea;
|
488 |
} |
489 |
|
490 |
/*public void setLayer(FLayer layer) {
|
491 |
this.layer = layer;
|
492 |
}*/
|
493 |
/**
|
494 |
* This method initializes jScrollPane
|
495 |
*
|
496 |
* @return javax.swing.JScrollPane
|
497 |
*/
|
498 |
private JScrollPane getJScrollPane() { |
499 |
if (jScrollPane == null) { |
500 |
jScrollPane = new JScrollPane(); |
501 |
jScrollPane.setViewportView(getJTextArea()); |
502 |
jScrollPane.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); |
503 |
jScrollPane.setPreferredSize(new java.awt.Dimension(100,100)); |
504 |
jScrollPane.setBounds(6, 21, 283, 120); |
505 |
} |
506 |
return jScrollPane;
|
507 |
} |
508 |
/**
|
509 |
* This method initializes jRadioButton
|
510 |
*
|
511 |
* @return javax.swing.JRadioButton
|
512 |
*/
|
513 |
public JRadioButton getJRadioButton() { |
514 |
if (jRadioButton == null) { |
515 |
jRadioButton = new JRadioButton(); |
516 |
jRadioButton.setText(PluginServices.getText(this,"Mostrar_siempre")); |
517 |
jRadioButton.setBounds(0, 0, 301, 23); |
518 |
jRadioButton.setSelected(true);
|
519 |
jRadioButton.addActionListener(new java.awt.event.ActionListener() {
|
520 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
521 |
//jPanel5.setEnabled(false);
|
522 |
jLabel1.setEnabled(false);
|
523 |
jTextField1.setEnabled(false);
|
524 |
jLabel2.setEnabled(false);
|
525 |
jLabel3.setEnabled(false);
|
526 |
jTextField2.setEnabled(false);
|
527 |
jLabel4.setEnabled(false);
|
528 |
} |
529 |
}); |
530 |
} |
531 |
return jRadioButton;
|
532 |
} |
533 |
/**
|
534 |
* This method initializes jRadioButton1
|
535 |
*
|
536 |
* @return javax.swing.JRadioButton
|
537 |
*/
|
538 |
public JRadioButton getJRadioButton1() { |
539 |
if (jRadioButton1 == null) { |
540 |
jRadioButton1 = new JRadioButton(); |
541 |
jRadioButton1.setText(PluginServices.getText(this,"No_mostrar_la_capa_cuando_la_escala")); |
542 |
jRadioButton1.setBounds(0, 23, 301, 23); |
543 |
jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
|
544 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
545 |
//jPanel5.setEnabled(true);
|
546 |
jLabel1.setEnabled(true);
|
547 |
jTextField1.setEnabled(true);
|
548 |
jLabel2.setEnabled(true);
|
549 |
jLabel3.setEnabled(true);
|
550 |
jTextField2.setEnabled(true);
|
551 |
jLabel4.setEnabled(true);
|
552 |
} |
553 |
}); |
554 |
} |
555 |
return jRadioButton1;
|
556 |
} |
557 |
/**
|
558 |
* This method initializes jTextField2
|
559 |
*
|
560 |
* @return javax.swing.JTextField
|
561 |
*/
|
562 |
public JTextField getJTextField2() { |
563 |
if (jTextField2 == null) { |
564 |
jTextField2 = new JTextField(); |
565 |
jTextField2.setBounds(147, 31, 152, 20); |
566 |
jTextField2.setEnabled(false);
|
567 |
} |
568 |
return jTextField2;
|
569 |
} |
570 |
public String getLayerName(){ |
571 |
return txtLayerName.getText().toString();
|
572 |
} |
573 |
/**
|
574 |
* This method initializes jPanel3
|
575 |
*
|
576 |
* @return javax.swing.JPanel
|
577 |
*/
|
578 |
private JPanel getJPanel3() { |
579 |
if (jPanel3 == null) { |
580 |
jPanel3 = new JPanel(); |
581 |
jPanel3.setLayout(null);
|
582 |
jPanel3.setBounds(315, 170, 266, 154); |
583 |
jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.LOWERED), PluginServices.getText(this, "Hiperenlace"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null)); |
584 |
jPanel3.add(getJPanel6(), null);
|
585 |
} |
586 |
return jPanel3;
|
587 |
} |
588 |
/**
|
589 |
* This method initializes jPanel6
|
590 |
*
|
591 |
* @return javax.swing.JPanel
|
592 |
*/
|
593 |
private JPanel getJPanel6() { |
594 |
if (jPanel6 == null) { |
595 |
jPanel6 = new JPanel(); |
596 |
jPanel6.setLayout(new BorderLayout()); |
597 |
jPanel6.setBounds(7, 22, 245, 119); |
598 |
jPanel6.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); |
599 |
jPanel6.add(getJPanel7(), java.awt.BorderLayout.NORTH); |
600 |
jPanel6.add(getJPanel8(), java.awt.BorderLayout.CENTER); |
601 |
} |
602 |
return jPanel6;
|
603 |
} |
604 |
/**
|
605 |
* This method initializes jPanel7
|
606 |
*
|
607 |
* @return javax.swing.JPanel
|
608 |
*/
|
609 |
private JPanel getJPanel7() { |
610 |
if (jPanel7 == null) { |
611 |
jLabel6 = new JLabel(); |
612 |
jLabel6.setText(PluginServices.getText(this,"extension")); |
613 |
jLabel5 = new JLabel(); |
614 |
jLabel5.setText(PluginServices.getText(this, "Campo") + " "); |
615 |
jPanel7 = new JPanel(); |
616 |
jPanel7.add(jLabel5, null);
|
617 |
jPanel7.add(getJComboBox(), null);
|
618 |
jPanel7.add(jLabel6, null);
|
619 |
jPanel7.add(getJTextField(), null);
|
620 |
} |
621 |
return jPanel7;
|
622 |
} |
623 |
/**
|
624 |
* This method initializes jPanel8
|
625 |
*
|
626 |
* @return javax.swing.JPanel
|
627 |
*/
|
628 |
private JPanel getJPanel8() { |
629 |
if (jPanel8 == null) { |
630 |
jLabel7 = new JLabel(); |
631 |
jLabel7.setText(PluginServices.getText(this, "Accion_Predefinida") + " "); |
632 |
jPanel8 = new JPanel(); |
633 |
jPanel8.add(jLabel7, null);
|
634 |
jPanel8.add(getJComboBox1(), null);
|
635 |
} |
636 |
return jPanel8;
|
637 |
} |
638 |
/**
|
639 |
* This method initializes jComboBox
|
640 |
*
|
641 |
* @return javax.swing.JComboBox
|
642 |
*/
|
643 |
private JComboBox getJComboBox() { |
644 |
if (jComboBox == null) { |
645 |
jComboBox = new JComboBox(); |
646 |
} |
647 |
return jComboBox;
|
648 |
} |
649 |
/**
|
650 |
* This method initializes jTextField
|
651 |
*
|
652 |
* @return javax.swing.JTextField
|
653 |
*/
|
654 |
private JTextField getJTextField() { |
655 |
if (jTextField == null) { |
656 |
jTextField = new JTextField(); |
657 |
jTextField.setPreferredSize(new java.awt.Dimension(40,20)); |
658 |
} |
659 |
return jTextField;
|
660 |
} |
661 |
/**
|
662 |
* This method initializes jComboBox1
|
663 |
*
|
664 |
* @return javax.swing.JComboBox
|
665 |
*/
|
666 |
private JComboBox getJComboBox1() { |
667 |
if (jComboBox1 == null) { |
668 |
jComboBox1 = new JComboBox(); |
669 |
} |
670 |
return jComboBox1;
|
671 |
} |
672 |
/**
|
673 |
* @return Returns the view.
|
674 |
*/
|
675 |
public ProjectView getView() {
|
676 |
return view;
|
677 |
} |
678 |
} // @jve:decl-index=0:visual-constraint="10,10"
|