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