Revision 7801
branches/v10/extensions/extDataLocator/src/com/iver/gvsig/datalocator/gui/DataSelectionPanel.java | ||
---|---|---|
43 | 43 |
*/ |
44 | 44 |
package com.iver.gvsig.datalocator.gui; |
45 | 45 |
|
46 |
import java.awt.FlowLayout; |
|
46 | 47 |
import java.awt.event.ItemListener; |
47 | 48 |
import java.io.IOException; |
48 |
|
|
49 | 49 |
import java.util.Comparator; |
50 | 50 |
import java.util.TreeSet; |
51 | 51 |
import java.util.Vector; |
52 | 52 |
import java.util.prefs.Preferences; |
53 | 53 |
|
54 |
import javax.swing.DefaultComboBoxModel; |
|
55 |
import javax.swing.JCheckBox; |
|
56 |
import javax.swing.JComboBox; |
|
57 |
import javax.swing.JDialog; |
|
58 |
import javax.swing.JLabel; |
|
54 | 59 |
import javax.swing.JPanel; |
55 | 60 |
|
61 |
import org.gvsig.gui.beans.swing.JButton; |
|
62 |
|
|
56 | 63 |
import com.hardcode.driverManager.DriverLoadException; |
57 | 64 |
import com.hardcode.gdbms.engine.data.DataSource; |
58 | 65 |
import com.hardcode.gdbms.engine.data.DataSourceFactory; |
... | ... | |
63 | 70 |
import com.hardcode.gdbms.engine.values.Value; |
64 | 71 |
import com.hardcode.gdbms.parser.ParseException; |
65 | 72 |
import com.iver.andami.PluginServices; |
66 |
import com.iver.andami.plugins.Extension; |
|
73 |
import com.iver.andami.ui.mdiManager.IWindow; |
|
74 |
import com.iver.andami.ui.mdiManager.IWindowListener; |
|
67 | 75 |
import com.iver.andami.ui.mdiManager.SingletonWindow; |
68 |
import com.iver.andami.ui.mdiManager.IWindow; |
|
69 | 76 |
import com.iver.andami.ui.mdiManager.WindowInfo; |
70 |
import com.iver.andami.ui.mdiManager.IWindowListener; |
|
71 | 77 |
import com.iver.cit.gvsig.fmap.DriverException; |
72 | 78 |
import com.iver.cit.gvsig.fmap.MapContext; |
73 | 79 |
import com.iver.cit.gvsig.fmap.layers.CancelationException; |
... | ... | |
83 | 89 |
import com.iver.cit.gvsig.fmap.layers.layerOperations.VectorialData; |
84 | 90 |
import com.iver.cit.gvsig.fmap.operations.strategies.SelectedZoomVisitor; |
85 | 91 |
import com.iver.cit.gvsig.fmap.operations.strategies.VisitException; |
86 |
import com.iver.gvsig.datalocator.DataLocatorExtension; |
|
87 | 92 |
|
88 |
import javax.swing.DefaultComboBoxModel; |
|
89 |
import javax.swing.JComboBox; |
|
90 |
import javax.swing.JDialog; |
|
91 |
import javax.swing.JLabel; |
|
92 |
import javax.swing.JButton; |
|
93 |
import javax.swing.JCheckBox; |
|
94 |
|
|
95 | 93 |
/** |
96 | 94 |
* @author jmorell |
97 | 95 |
*/ |
... | ... | |
118 | 116 |
private LayersListener layersListener = null; |
119 | 117 |
private Vector vectorialLayers = null; |
120 | 118 |
private JCheckBox jChkBoxOpenFirstTime = null; |
119 |
private JPanel jPanelButtons = null; |
|
121 | 120 |
|
122 | 121 |
/** |
123 | 122 |
* This method initializes |
... | ... | |
182 | 181 |
jLabel1 = new JLabel(); |
183 | 182 |
jLabel = new JLabel(); |
184 | 183 |
this.setLayout(null); |
185 |
this.setSize(286, 161);
|
|
186 |
jLabel.setBounds(6, 6, 43, 23);
|
|
184 |
this.setSize(350, 161);
|
|
185 |
jLabel.setBounds(6, 6, 80, 23);
|
|
187 | 186 |
jLabel.setText(PluginServices.getText(this,"Capa") + ":"); |
188 |
jLabel1.setBounds(6, 34, 43, 23);
|
|
187 |
jLabel1.setBounds(6, 34, 80, 23);
|
|
189 | 188 |
jLabel1.setText(PluginServices.getText(this,"Campo") + ":"); |
190 |
jLabel2.setBounds(6, 61, 43, 23);
|
|
189 |
jLabel2.setBounds(6, 61, 80, 23);
|
|
191 | 190 |
jLabel2.setText(PluginServices.getText(this,"Valor") + ":"); |
192 | 191 |
this.add(getJComboBox(), null); |
193 | 192 |
this.add(jLabel, null); |
... | ... | |
195 | 194 |
this.add(getJComboBox1(), null); |
196 | 195 |
this.add(jLabel2, null); |
197 | 196 |
this.add(getJComboBox2(), null); |
198 |
this.add(getJButton(), null); |
|
199 |
this.add(getJButton1(), null); |
|
197 |
|
|
198 |
jPanelButtons = new JPanel(); |
|
199 |
FlowLayout flowLayor = new FlowLayout(FlowLayout.RIGHT); |
|
200 |
flowLayor.setHgap(5); |
|
201 |
|
|
202 |
jPanelButtons.setLayout(flowLayor); |
|
203 |
jPanelButtons.setBounds(15,121,335,35); |
|
204 |
jPanelButtons.add(getJButton(), null); |
|
205 |
jPanelButtons.add(getJButton1(), null); |
|
206 |
|
|
207 |
this.add(jPanelButtons); |
|
208 |
|
|
200 | 209 |
this.add(getJChkBoxOpenFirstTime(), null); |
201 | 210 |
layersListener = new LayersListener(mapContext.getLayers()); |
202 | 211 |
mapContext.getLayers().addLayerCollectionListener(layersListener); |
... | ... | |
400 | 409 |
jComboBox = new JComboBox(); |
401 | 410 |
DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(getLayerNames()); |
402 | 411 |
jComboBox.setModel(defaultModel); |
403 |
jComboBox.setBounds(54, 6, 218, 23);
|
|
412 |
jComboBox.setBounds(90, 6, 250, 23);
|
|
404 | 413 |
jComboBox.setSelectedItem(layerToZoom.getName()); |
405 | 414 |
ChangeLayerToZoomItemListener changeLayerToZoomItemListener = new ChangeLayerToZoomItemListener(vectorialLayers); |
406 | 415 |
jComboBox.addItemListener(changeLayerToZoomItemListener); |
... | ... | |
447 | 456 |
jComboBox1 = new JComboBox(); |
448 | 457 |
DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(getFieldNames()); |
449 | 458 |
jComboBox1.setModel(defaultModel); |
450 |
jComboBox1.setBounds(54, 34, 218, 23);
|
|
459 |
jComboBox1.setBounds(90, 34, 250, 23);
|
|
451 | 460 |
jComboBox1.setSelectedIndex(fieldToZoomIndex); |
452 | 461 |
ChangeFieldItemListener changeFieldItemListener = new ChangeFieldItemListener(vectorialLayers); |
453 | 462 |
jComboBox1.addItemListener(changeFieldItemListener); |
... | ... | |
542 | 551 |
DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(getNewValues()); |
543 | 552 |
jComboBox2.setModel(defaultModel); |
544 | 553 |
jComboBox2.setSelectedIndex(-1); |
545 |
jComboBox2.setBounds(54, 61, 218, 23);
|
|
554 |
jComboBox2.setBounds(90, 61, 250, 23);
|
|
546 | 555 |
ChangeItemToZoomItemListener changeItemToZoomItemListener = new ChangeItemToZoomItemListener(vectorialLayers); |
547 | 556 |
jComboBox2.addItemListener(changeItemToZoomItemListener); |
548 | 557 |
} |
... | ... | |
571 | 580 |
private JButton getJButton() { |
572 | 581 |
if (jButton == null) { |
573 | 582 |
jButton = new JButton(); |
574 |
jButton.setBounds(8, 121, 128, 23); |
|
583 |
//jButton.setBounds(8, 121, 128, 23);
|
|
575 | 584 |
jButton.setText(PluginServices.getText(this,"Zoom")); |
576 | 585 |
jButton.addActionListener(new java.awt.event.ActionListener() { |
577 | 586 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
... | ... | |
628 | 637 |
private JButton getJButton1() { |
629 | 638 |
if (jButton1 == null) { |
630 | 639 |
jButton1 = new JButton(); |
631 |
jButton1.setBounds(141, 121, 128, 23);
|
|
640 |
//jButton1.setBounds(141, 121, 128, 23);
|
|
632 | 641 |
jButton1.setText(PluginServices.getText(this,"Salir")); |
633 | 642 |
jButton1.addActionListener(new java.awt.event.ActionListener() { |
634 | 643 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
... | ... | |
675 | 684 |
private JCheckBox getJChkBoxOpenFirstTime() { |
676 | 685 |
if (jChkBoxOpenFirstTime == null) { |
677 | 686 |
jChkBoxOpenFirstTime = new JCheckBox(); |
678 |
jChkBoxOpenFirstTime.setBounds(new java.awt.Rectangle(71,89,179,23));
|
|
687 |
jChkBoxOpenFirstTime.setBounds(new java.awt.Rectangle(90,89,179,23));
|
|
679 | 688 |
jChkBoxOpenFirstTime.setText(PluginServices.getText(this, "open_first_time")); |
680 | 689 |
jChkBoxOpenFirstTime.addActionListener(new java.awt.event.ActionListener() { |
681 | 690 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
Also available in: Unified diff