root / trunk / extensions / extGeoProcessing / src / com / iver / cit / gvsig / geoprocess / core / gui / GeoProcessingOverlayPanel.java @ 5755
History | View | Annotate | Download (19.1 KB)
1 |
/*
|
---|---|
2 |
* Created on 04-jul-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.geoprocess.core.gui; |
45 |
|
46 |
import java.awt.Component; |
47 |
import java.awt.GridBagConstraints; |
48 |
import java.awt.GridBagLayout; |
49 |
import java.io.File; |
50 |
|
51 |
import javax.swing.DefaultComboBoxModel; |
52 |
import javax.swing.JButton; |
53 |
import javax.swing.JCheckBox; |
54 |
import javax.swing.JComboBox; |
55 |
import javax.swing.JFileChooser; |
56 |
import javax.swing.JLabel; |
57 |
import javax.swing.JPanel; |
58 |
import javax.swing.JTextField; |
59 |
|
60 |
import com.iver.andami.PluginServices; |
61 |
import com.iver.andami.ui.mdiManager.View; |
62 |
import com.iver.andami.ui.mdiManager.ViewInfo; |
63 |
import com.iver.cit.gvsig.fmap.DriverException; |
64 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
65 |
import com.iver.cit.gvsig.fmap.layers.FBitSet; |
66 |
import com.iver.cit.gvsig.fmap.layers.FLayers; |
67 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
68 |
import com.iver.cit.gvsig.fmap.layers.ReadableVectorial; |
69 |
import com.iver.cit.gvsig.fmap.layers.layerOperations.SingleLayer; |
70 |
import com.iver.utiles.GenericFileFilter; |
71 |
/**
|
72 |
* Panel that allows user to enter clip geoprocess params
|
73 |
* (input layers, etc).
|
74 |
*
|
75 |
* @author jmorell, azabala
|
76 |
*/
|
77 |
public class GeoProcessingOverlayPanel extends AbstractGeoprocessPanel |
78 |
implements OverlayPanelIF, View{ |
79 |
|
80 |
private static final long serialVersionUID = 1L; |
81 |
private JTextField filePathTextField = null; |
82 |
private JButton openFileDialogButton = null; |
83 |
private JCheckBox selectedFirstLayerCheckBox = null; |
84 |
private JComboBox secondLayerComboBox = null; |
85 |
private JCheckBox secondLayerSelectedCheckBox = null; |
86 |
private JLabel jLabel = null; |
87 |
/**
|
88 |
* Text that describes which type of overlay
|
89 |
* operation will launch this panel
|
90 |
*/
|
91 |
private String titleText; |
92 |
|
93 |
private ViewInfo viewInfo;
|
94 |
private JPanel resultLayerPanel = null; |
95 |
private JLabel jLabel7 = null; |
96 |
private JPanel clipLayerjPanel = null; |
97 |
private JLabel jLabel5 = null; |
98 |
private JLabel jLabel6 = null; |
99 |
private JLabel jLabel4 = null; |
100 |
private JPanel inputLayerPanel = null; |
101 |
private JLabel jLabel1 = null; |
102 |
private JLabel jLabel2 = null; |
103 |
private JLabel jLabel3 = null; |
104 |
|
105 |
/**
|
106 |
* This constructor initializes the set of layers
|
107 |
*/
|
108 |
public GeoProcessingOverlayPanel(FLayers layers, String titleText) { |
109 |
super();
|
110 |
this.layers = layers;
|
111 |
this.titleText = titleText;
|
112 |
initialize(); |
113 |
} |
114 |
/**
|
115 |
* This method initializes this
|
116 |
*
|
117 |
* @return void
|
118 |
*/
|
119 |
private void initialize() { |
120 |
jLabel = new JLabel(); |
121 |
this.setLayout(null); |
122 |
this.setBounds(new java.awt.Rectangle(0,0,486,377)); |
123 |
jLabel.setText(titleText); |
124 |
//this.add(getFirstLayerComboBox(), null);
|
125 |
jLabel.setBounds(new java.awt.Rectangle(8,20,423,26)); |
126 |
this.add(getInputLayerPanel(), null); |
127 |
this.add(jLabel, null); |
128 |
this.add(getResultLayerPanel(), null); |
129 |
this.add(getClipLayerjPanel(), null); |
130 |
changeSelectedItemsJCheckBox(); |
131 |
changeSelectedItemsJCheckBox1(); |
132 |
changeSelectedItemsNumberJLabel(); |
133 |
changeSelectedItemsNumberJLabel1(); |
134 |
} |
135 |
|
136 |
private void changeSelectedItemsJCheckBox() { |
137 |
FLyrVect inputSelectable = (FLyrVect)(layers.getLayer((String)layersComboBox.getSelectedItem()));
|
138 |
FBitSet fBitSet = null;
|
139 |
try {
|
140 |
fBitSet = inputSelectable.getRecordset().getSelection(); |
141 |
} catch (DriverException e) {
|
142 |
// TODO Auto-generated catch block
|
143 |
e.printStackTrace(); |
144 |
} |
145 |
if (fBitSet.cardinality()==0) { |
146 |
selectedFirstLayerCheckBox.setEnabled(false);
|
147 |
selectedFirstLayerCheckBox.setSelected(false);
|
148 |
} else {
|
149 |
selectedFirstLayerCheckBox.setEnabled(true);
|
150 |
selectedFirstLayerCheckBox.setSelected(true);
|
151 |
} |
152 |
} |
153 |
private void changeSelectedItemsJCheckBox1() { |
154 |
FLyrVect inputSelectable = (FLyrVect)(layers.getLayer((String)secondLayerComboBox.getSelectedItem()));
|
155 |
FBitSet fBitSet = null;
|
156 |
try {
|
157 |
fBitSet = inputSelectable.getRecordset().getSelection(); |
158 |
} catch (DriverException e) {
|
159 |
// TODO Auto-generated catch block
|
160 |
e.printStackTrace(); |
161 |
} |
162 |
if (fBitSet.cardinality()==0) { |
163 |
secondLayerSelectedCheckBox.setEnabled(false);
|
164 |
secondLayerSelectedCheckBox.setSelected(false);
|
165 |
} else {
|
166 |
secondLayerSelectedCheckBox.setEnabled(true);
|
167 |
secondLayerSelectedCheckBox.setSelected(true);
|
168 |
} |
169 |
} |
170 |
private void changeSelectedItemsNumberJLabel() { |
171 |
if (getOnlyFirstLayerSelectedCheckBox().isSelected()) {
|
172 |
FLyrVect inputSelectable = (FLyrVect)(layers.getLayer((String)layersComboBox.getSelectedItem()));
|
173 |
FBitSet fBitSet = null;
|
174 |
try {
|
175 |
fBitSet = inputSelectable.getRecordset().getSelection(); |
176 |
} catch (DriverException e) {
|
177 |
// TODO Auto-generated catch block
|
178 |
e.printStackTrace(); |
179 |
} |
180 |
jLabel3.setText(new Integer(fBitSet.cardinality()).toString()); |
181 |
} else {
|
182 |
ReadableVectorial va = ((SingleLayer)(layers. |
183 |
getLayer((String)layersComboBox.
|
184 |
getSelectedItem()))). |
185 |
getSource(); |
186 |
try {
|
187 |
jLabel3.setText(new Integer(va.getShapeCount()).toString()); |
188 |
} catch (DriverIOException e) {
|
189 |
// TODO Auto-generated catch block
|
190 |
e.printStackTrace(); |
191 |
} |
192 |
} |
193 |
} |
194 |
private void changeSelectedItemsNumberJLabel1() { |
195 |
if (getOnlySecondLayerSelectedCheckBox().isSelected()) {
|
196 |
FLyrVect inputSelectable = (FLyrVect)(layers.getLayer((String)secondLayerComboBox.getSelectedItem()));
|
197 |
FBitSet fBitSet = null;
|
198 |
try {
|
199 |
fBitSet = inputSelectable.getRecordset().getSelection(); |
200 |
} catch (DriverException e) {
|
201 |
// TODO Auto-generated catch block
|
202 |
e.printStackTrace(); |
203 |
} |
204 |
jLabel6.setText(new Integer(fBitSet.cardinality()).toString()); |
205 |
} else {
|
206 |
ReadableVectorial va = ((SingleLayer)(layers.getLayer( |
207 |
(String)secondLayerComboBox.getSelectedItem())))
|
208 |
.getSource(); |
209 |
try {
|
210 |
jLabel6.setText(new Integer(va.getShapeCount()).toString()); |
211 |
} catch (DriverIOException e) {
|
212 |
// TODO Auto-generated catch block
|
213 |
e.printStackTrace(); |
214 |
} |
215 |
} |
216 |
} |
217 |
/**
|
218 |
* This method initializes filePathTextField
|
219 |
*
|
220 |
* @return javax.swing.JTextField
|
221 |
*/
|
222 |
private JTextField getFilePathTextField() { |
223 |
if (filePathTextField == null) { |
224 |
filePathTextField = new JTextField(); |
225 |
} |
226 |
return filePathTextField;
|
227 |
} |
228 |
/**
|
229 |
*
|
230 |
* TODO
|
231 |
* El panel de seleccion de escritura esta metido a pelo en todas
|
232 |
* las pantallas. Hacer que sea generico, y vinculado a los IWriters
|
233 |
* cargados en el sistema.
|
234 |
*
|
235 |
*
|
236 |
*/
|
237 |
private JButton getOpenFileDialogButton() { |
238 |
if (openFileDialogButton == null) { |
239 |
openFileDialogButton = new JButton(); |
240 |
openFileDialogButton.setText(PluginServices.getText(this,"Abrir")); |
241 |
openFileDialogButton.addActionListener(new java.awt.event.ActionListener() {
|
242 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
243 |
openResultFileDialog(); |
244 |
} |
245 |
}); |
246 |
} |
247 |
return openFileDialogButton;
|
248 |
} |
249 |
|
250 |
/**
|
251 |
* This method initializes selectedFirstLayerCheckBox
|
252 |
*
|
253 |
* @return javax.swing.JCheckBox
|
254 |
*/
|
255 |
private JCheckBox getOnlyFirstLayerSelectedCheckBox() { |
256 |
if (selectedFirstLayerCheckBox == null) { |
257 |
selectedFirstLayerCheckBox = new JCheckBox(); |
258 |
selectedFirstLayerCheckBox.setText(PluginServices.getText(this,"Usar_solamente_los_elementos_seleccionados")); |
259 |
selectedFirstLayerCheckBox.addItemListener(new java.awt.event.ItemListener() {
|
260 |
public void itemStateChanged(java.awt.event.ItemEvent e) { |
261 |
changeSelectedItemsNumberJLabel(); |
262 |
} |
263 |
}); |
264 |
} |
265 |
return selectedFirstLayerCheckBox;
|
266 |
} |
267 |
/**
|
268 |
* This method initializes secondLayerComboBox
|
269 |
*
|
270 |
* @return javax.swing.JComboBox
|
271 |
*/
|
272 |
private JComboBox getSecondLayerComboBox() { |
273 |
if (secondLayerComboBox == null) { |
274 |
secondLayerComboBox = new JComboBox(); |
275 |
DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(getLayerNames()); |
276 |
secondLayerComboBox.setModel(defaultModel); |
277 |
secondLayerComboBox.addItemListener(new java.awt.event.ItemListener() {
|
278 |
public void itemStateChanged(java.awt.event.ItemEvent e) { |
279 |
changeSelectedItemsJCheckBox1(); |
280 |
changeSelectedItemsNumberJLabel1(); |
281 |
} |
282 |
}); |
283 |
} |
284 |
return secondLayerComboBox;
|
285 |
} |
286 |
/**
|
287 |
* This method initializes secondLayerSelectedCheckBox
|
288 |
*
|
289 |
* @return javax.swing.JCheckBox
|
290 |
*/
|
291 |
private JCheckBox getOnlySecondLayerSelectedCheckBox() { |
292 |
if (secondLayerSelectedCheckBox == null) { |
293 |
secondLayerSelectedCheckBox = new JCheckBox(); |
294 |
secondLayerSelectedCheckBox.setText(PluginServices.getText(this,"Usar_solamente_los_elementos_seleccionados")); |
295 |
secondLayerSelectedCheckBox.addItemListener(new java.awt.event.ItemListener() {
|
296 |
public void itemStateChanged(java.awt.event.ItemEvent e) { |
297 |
changeSelectedItemsNumberJLabel1(); |
298 |
} |
299 |
}); |
300 |
} |
301 |
return secondLayerSelectedCheckBox;
|
302 |
} |
303 |
|
304 |
|
305 |
public File getOutputFile() { |
306 |
String fileName = getFilePathTextField().getText();
|
307 |
if(! fileName.endsWith(".shp")){ |
308 |
if(! fileName.endsWith(".")) |
309 |
fileName += ".";
|
310 |
fileName += "shp";
|
311 |
} |
312 |
return new File(fileName); |
313 |
} |
314 |
|
315 |
|
316 |
|
317 |
public FLyrVect getSecondLayer() {
|
318 |
String clippingLayer =
|
319 |
(String) secondLayerComboBox.getSelectedItem();
|
320 |
try {
|
321 |
return (FLyrVect) layers.getLayer(clippingLayer);
|
322 |
} catch (Exception e) { |
323 |
return null; |
324 |
} |
325 |
} |
326 |
|
327 |
public boolean onlyFirstLayerSelected() { |
328 |
return selectedFirstLayerCheckBox.isSelected();
|
329 |
} |
330 |
|
331 |
public boolean onlySecondLayerSelected() { |
332 |
return secondLayerSelectedCheckBox.isSelected();
|
333 |
} |
334 |
|
335 |
|
336 |
//TODO Sustituir esto para que pueda trabajar
|
337 |
//con los IWriter que est?n registrados en el sistema
|
338 |
public void openResultFileDialog() { |
339 |
JFileChooser jfc = new JFileChooser(); |
340 |
jfc.addChoosableFileFilter( |
341 |
new GenericFileFilter("shp", "Ficheros SHP")); |
342 |
if (jfc.showSaveDialog((Component) PluginServices.getMainFrame()) == JFileChooser.APPROVE_OPTION) { |
343 |
File file = jfc.getSelectedFile();
|
344 |
if (!(file.getPath().endsWith(".shp") || file.getPath().endsWith(".SHP"))){ |
345 |
file = new File(file.getPath()+".shp"); |
346 |
} |
347 |
} |
348 |
if (jfc.getSelectedFile()!=null) |
349 |
getFilePathTextField().setText(jfc.getSelectedFile().getAbsolutePath()); |
350 |
} |
351 |
|
352 |
//TODO Rehacer esto
|
353 |
public void firstLayerSelectionChecked(boolean checked) { |
354 |
changeSelectedItemsJCheckBox(); |
355 |
changeSelectedItemsNumberJLabel(); |
356 |
} |
357 |
public void secondLayerSelectionChecked(boolean checked) { |
358 |
changeSelectedItemsJCheckBox1(); |
359 |
changeSelectedItemsNumberJLabel1(); |
360 |
} |
361 |
|
362 |
public ViewInfo getViewInfo() {
|
363 |
if (viewInfo == null) { |
364 |
viewInfo = new ViewInfo(ViewInfo.MODALDIALOG);
|
365 |
viewInfo.setTitle(PluginServices.getText(this,
|
366 |
"Operacion_de_overlay"));
|
367 |
} |
368 |
return viewInfo;
|
369 |
} |
370 |
/**
|
371 |
* This method initializes resultLayerPanel
|
372 |
*
|
373 |
* @return javax.swing.JPanel
|
374 |
*/
|
375 |
private JPanel getResultLayerPanel() { |
376 |
if (resultLayerPanel == null) { |
377 |
GridBagConstraints gridBagConstraints2 = new GridBagConstraints(); |
378 |
gridBagConstraints2.insets = new java.awt.Insets(9,7,7,34); |
379 |
gridBagConstraints2.gridy = 0;
|
380 |
gridBagConstraints2.ipadx = 12;
|
381 |
gridBagConstraints2.gridx = 2;
|
382 |
GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); |
383 |
gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; |
384 |
gridBagConstraints1.gridx = 1;
|
385 |
gridBagConstraints1.gridy = 0;
|
386 |
gridBagConstraints1.ipadx = 177;
|
387 |
gridBagConstraints1.ipady = 1;
|
388 |
gridBagConstraints1.weightx = 1.0;
|
389 |
gridBagConstraints1.insets = new java.awt.Insets(12,6,9,7); |
390 |
GridBagConstraints gridBagConstraints = new GridBagConstraints(); |
391 |
gridBagConstraints.insets = new java.awt.Insets(14,6,11,6); |
392 |
gridBagConstraints.gridy = 0;
|
393 |
gridBagConstraints.ipadx = 2;
|
394 |
gridBagConstraints.ipady = 1;
|
395 |
gridBagConstraints.gridx = 0;
|
396 |
jLabel7 = new JLabel(); |
397 |
jLabel7.setText(PluginServices.getText(this, "Cobertura_de_salida") + ":"); |
398 |
resultLayerPanel = new JPanel(); |
399 |
resultLayerPanel.setLayout(new GridBagLayout()); |
400 |
resultLayerPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED)); |
401 |
resultLayerPanel.add(jLabel7, gridBagConstraints); |
402 |
resultLayerPanel.add(getFilePathTextField(), gridBagConstraints1); |
403 |
resultLayerPanel.add(getOpenFileDialogButton(), gridBagConstraints2); |
404 |
resultLayerPanel.setBounds(new java.awt.Rectangle(9,295,445,42)); |
405 |
} |
406 |
return resultLayerPanel;
|
407 |
} |
408 |
/**
|
409 |
* This method initializes clipLayerjPanel
|
410 |
*
|
411 |
* @return javax.swing.JPanel
|
412 |
*/
|
413 |
private JPanel getClipLayerjPanel() { |
414 |
if (clipLayerjPanel == null) { |
415 |
GridBagConstraints gridBagConstraints12 = new GridBagConstraints(); |
416 |
gridBagConstraints12.insets = new java.awt.Insets(17,10,5,5); |
417 |
gridBagConstraints12.gridy = 0;
|
418 |
gridBagConstraints12.ipadx = 24;
|
419 |
gridBagConstraints12.ipady = 7;
|
420 |
gridBagConstraints12.gridx = 0;
|
421 |
GridBagConstraints gridBagConstraints11 = new GridBagConstraints(); |
422 |
gridBagConstraints11.fill = java.awt.GridBagConstraints.HORIZONTAL; |
423 |
gridBagConstraints11.gridwidth = 2;
|
424 |
gridBagConstraints11.gridx = 1;
|
425 |
gridBagConstraints11.gridy = 0;
|
426 |
gridBagConstraints11.ipadx = 216;
|
427 |
gridBagConstraints11.weightx = 1.0;
|
428 |
gridBagConstraints11.insets = new java.awt.Insets(16,5,4,24); |
429 |
GridBagConstraints gridBagConstraints10 = new GridBagConstraints(); |
430 |
gridBagConstraints10.insets = new java.awt.Insets(4,5,3,104); |
431 |
gridBagConstraints10.gridx = 0;
|
432 |
gridBagConstraints10.gridy = 1;
|
433 |
gridBagConstraints10.ipadx = 36;
|
434 |
gridBagConstraints10.gridwidth = 3;
|
435 |
GridBagConstraints gridBagConstraints9 = new GridBagConstraints(); |
436 |
gridBagConstraints9.insets = new java.awt.Insets(4,7,19,178); |
437 |
gridBagConstraints9.gridy = 2;
|
438 |
gridBagConstraints9.ipadx = 1;
|
439 |
gridBagConstraints9.gridx = 2;
|
440 |
GridBagConstraints gridBagConstraints8 = new GridBagConstraints(); |
441 |
gridBagConstraints8.insets = new java.awt.Insets(3,11,19,6); |
442 |
gridBagConstraints8.gridx = 0;
|
443 |
gridBagConstraints8.gridy = 2;
|
444 |
gridBagConstraints8.ipadx = 2;
|
445 |
gridBagConstraints8.ipady = 1;
|
446 |
gridBagConstraints8.gridwidth = 2;
|
447 |
jLabel4 = new JLabel(); |
448 |
jLabel4.setText(PluginServices.getText(this, "Cobertura_de_recorte") + ":"); |
449 |
jLabel6 = new JLabel(); |
450 |
jLabel6.setText("00");
|
451 |
jLabel5 = new JLabel(); |
452 |
jLabel5.setText(PluginServices.getText(this, "Numero_de_elementos_seleccionados") + ":"); |
453 |
clipLayerjPanel = new JPanel(); |
454 |
clipLayerjPanel.setLayout(new GridBagLayout()); |
455 |
clipLayerjPanel.setBounds(new java.awt.Rectangle(9,174,445,115)); |
456 |
clipLayerjPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED)); |
457 |
clipLayerjPanel.add(jLabel5, gridBagConstraints8); |
458 |
clipLayerjPanel.add(jLabel6, gridBagConstraints9); |
459 |
clipLayerjPanel.add(getOnlySecondLayerSelectedCheckBox(), gridBagConstraints10); |
460 |
clipLayerjPanel.add(getSecondLayerComboBox(), gridBagConstraints11); |
461 |
clipLayerjPanel.add(jLabel4, gridBagConstraints12); |
462 |
} |
463 |
return clipLayerjPanel;
|
464 |
} |
465 |
/**
|
466 |
* This method initializes inputLayerPanel
|
467 |
*
|
468 |
* @return javax.swing.JPanel
|
469 |
*/
|
470 |
private JPanel getInputLayerPanel() { |
471 |
if (inputLayerPanel == null) { |
472 |
GridBagConstraints gridBagConstraints7 = new GridBagConstraints(); |
473 |
gridBagConstraints7.fill = java.awt.GridBagConstraints.HORIZONTAL; |
474 |
gridBagConstraints7.gridwidth = 2;
|
475 |
gridBagConstraints7.gridx = 1;
|
476 |
gridBagConstraints7.gridy = 0;
|
477 |
gridBagConstraints7.ipadx = 223;
|
478 |
gridBagConstraints7.weightx = 1.0;
|
479 |
gridBagConstraints7.insets = new java.awt.Insets(17,7,0,28); |
480 |
GridBagConstraints gridBagConstraints6 = new GridBagConstraints(); |
481 |
gridBagConstraints6.insets = new java.awt.Insets(7,4,7,184); |
482 |
gridBagConstraints6.gridy = 2;
|
483 |
gridBagConstraints6.ipadx = 1;
|
484 |
gridBagConstraints6.ipady = 9;
|
485 |
gridBagConstraints6.gridx = 2;
|
486 |
GridBagConstraints gridBagConstraints5 = new GridBagConstraints(); |
487 |
gridBagConstraints5.insets = new java.awt.Insets(6,7,9,3); |
488 |
gridBagConstraints5.gridx = 0;
|
489 |
gridBagConstraints5.gridy = 2;
|
490 |
gridBagConstraints5.ipadx = 7;
|
491 |
gridBagConstraints5.ipady = 8;
|
492 |
gridBagConstraints5.gridwidth = 2;
|
493 |
GridBagConstraints gridBagConstraints4 = new GridBagConstraints(); |
494 |
gridBagConstraints4.insets = new java.awt.Insets(1,5,5,108); |
495 |
gridBagConstraints4.gridx = 0;
|
496 |
gridBagConstraints4.gridy = 1;
|
497 |
gridBagConstraints4.ipadx = 33;
|
498 |
gridBagConstraints4.gridwidth = 3;
|
499 |
GridBagConstraints gridBagConstraints3 = new GridBagConstraints(); |
500 |
gridBagConstraints3.insets = new java.awt.Insets(21,12,5,6); |
501 |
gridBagConstraints3.gridy = 0;
|
502 |
gridBagConstraints3.ipadx = 7;
|
503 |
gridBagConstraints3.gridx = 0;
|
504 |
jLabel3 = new JLabel(); |
505 |
jLabel3.setText("00");
|
506 |
jLabel2 = new JLabel(); |
507 |
jLabel2.setText(PluginServices.getText(this, "Numero_de_elementos_seleccionados") + ":"); |
508 |
jLabel1 = new JLabel(); |
509 |
jLabel1.setText(PluginServices.getText(this, "Cobertura_de_entrada") + ":"); |
510 |
inputLayerPanel = new JPanel(); |
511 |
inputLayerPanel.setLayout(new GridBagLayout()); |
512 |
inputLayerPanel.setBounds(new java.awt.Rectangle(8,56,446,111)); |
513 |
inputLayerPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED)); |
514 |
inputLayerPanel.add(jLabel1, gridBagConstraints3); |
515 |
inputLayerPanel.add(getOnlyFirstLayerSelectedCheckBox(), gridBagConstraints4); |
516 |
inputLayerPanel.add(jLabel2, gridBagConstraints5); |
517 |
inputLayerPanel.add(jLabel3, gridBagConstraints6); |
518 |
inputLayerPanel.add(getInputLayerComboBox(), gridBagConstraints7); |
519 |
} |
520 |
return inputLayerPanel;
|
521 |
} |
522 |
|
523 |
/**
|
524 |
* This method initializes inputLayerComboBox
|
525 |
*
|
526 |
* @return javax.swing.JComboBox
|
527 |
*/
|
528 |
private JComboBox getInputLayerComboBox() { |
529 |
if (layersComboBox == null) { |
530 |
layersComboBox = new JComboBox(); |
531 |
DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(getLayerNames()); |
532 |
layersComboBox.setModel(defaultModel); |
533 |
layersComboBox.addItemListener(new java.awt.event.ItemListener() {
|
534 |
public void itemStateChanged(java.awt.event.ItemEvent e) { |
535 |
changeSelectedItemsJCheckBox(); |
536 |
changeSelectedItemsNumberJLabel(); |
537 |
} |
538 |
}); |
539 |
} |
540 |
return layersComboBox;
|
541 |
} |
542 |
} // @jve:decl-index=0:visual-constraint="57,37"
|