Revision 42251

View differences:

trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.datalocator.app/org.gvsig.datalocator.app.mainplugin/src/main/java/org/gvsig/datalocator/gui/DataSelectionPanel.java
23 23
 */
24 24
package org.gvsig.datalocator.gui;
25 25

  
26
import java.awt.Dimension;
27
import java.awt.FlowLayout;
26
import java.awt.*;
28 27
import java.awt.event.ActionEvent;
29 28
import java.awt.event.ActionListener;
30 29
import java.util.ArrayList;
......
38 37
import javax.swing.JComboBox;
39 38
import javax.swing.JLabel;
40 39
import javax.swing.JPanel;
40
import javax.swing.border.EmptyBorder;
41 41

  
42 42
import org.slf4j.Logger;
43 43
import org.slf4j.LoggerFactory;
......
111 111
        jLabel2 = new JLabel();
112 112
        jLabel1 = new JLabel();
113 113
        jLabel = new JLabel();
114
        this.setLayout(null);
115
        this.setSize(350, 161);
116
        jLabel.setBounds(6, 6, 80, 23);
114
        this.setLayout(new BorderLayout());
115
        this.setBorder(new EmptyBorder(new Insets(0,5,5,5)));
116
        this.setSize(275, 90);        
117 117
        jLabel.setText(PluginServices.getText(this,"Capa") + ":");
118
        jLabel1.setBounds(6, 34, 80, 23);
119 118
        jLabel1.setText(PluginServices.getText(this,"Campo") + ":");
120
        jLabel2.setBounds(6, 61, 80, 23);
121 119
        jLabel2.setText(PluginServices.getText(this,"Valor") + ":");
120

  
121
        // Panel Central
122
        GridBagLayout gbl = new GridBagLayout();
123
        JPanel centerPanelGrid = new JPanel(gbl);
124
        GridBagConstraints c = new GridBagConstraints();
125

  
126
        c.fill = GridBagConstraints.BOTH;
127
        c.anchor = GridBagConstraints.LINE_START;
128
        c.insets = new Insets(3,3,3,3);
129
        c.weightx = 0;
130

  
131
        c.gridx = 0;
132
        c.gridy = 0;
133
        centerPanelGrid.add(jLabel, c);
122 134
        
123
        this.add(jLabel, null);
124
        this.add(jLabel1, null);
125
        this.add(getFieldsComboBox(), null);
126
        this.add(jLabel2, null);
127
        this.add(getValuesComboBox(), null);
135
        c.gridx = 0;
136
        c.gridy = 1;
137
        centerPanelGrid.add(jLabel1, c);
128 138
        
129
        /*
130
         * Last to be added
131
         */
132
        this.add(getLayersComboBox(), null);
139
        c.gridx = 0;
140
        c.gridy = 2;
141
        centerPanelGrid.add(jLabel2, c);
142

  
143
        c.anchor = GridBagConstraints.CENTER;
144
        c.weightx = 1;
133 145
        
146
        c.gridx = 1;
147
        c.gridy = 0;
148
        centerPanelGrid.add(getLayersComboBox(), c);
149

  
150
        c.gridx = 1;
151
        c.gridy = 1;
152
        centerPanelGrid.add(getFieldsComboBox(), c);
153

  
154
        c.gridx = 1;
155
        c.gridy = 2;
156
        centerPanelGrid.add(getValuesComboBox(), c);
157
        
158
        this.add(centerPanelGrid, BorderLayout.CENTER);
159
        
160
        
161
        // Panel Sur
134 162
        jPanelButtons = new JPanel();
135
        FlowLayout flowLayor = new FlowLayout(FlowLayout.CENTER);
136
        flowLayor.setHgap(10);
137

  
163
        FlowLayout flowLayor = new FlowLayout(FlowLayout.RIGHT);
138 164
        jPanelButtons.setLayout(flowLayor);
139
        jPanelButtons.setBounds(0,95,360,35);
140 165
        jPanelButtons.add(getGoButton(), null);
141 166
        jPanelButtons.add(getCloseButton(), null);
142

  
143
        this.add(jPanelButtons);
167
        this.add(jPanelButtons, BorderLayout.SOUTH);
144 168
	}
145 169
	
146 170

  
......
222 246
        if (viewInfo == null) {
223 247
            viewInfo = new WindowInfo(WindowInfo.MODALDIALOG);
224 248
            viewInfo.setTitle(PluginServices.getText(this,"Localizador_por_atributo"));
225
            viewInfo.setHeight(105);
226
            viewInfo.setWidth(360);
249
            viewInfo.setHeight(this.getHeight());
250
            viewInfo.setWidth(this.getWidth());
227 251
        }
228 252
        return viewInfo;
229 253
    }
......
243 267
			}
244 268
            DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(items);
245 269
            layerComboBox.setModel(defaultModel);
246
			layerComboBox.setBounds(90, 6, 250, 23);
247 270
			layerComboBox.addActionListener(this);
248 271
			if (items.length > 0) {
249 272
			    layerComboBox.setSelectedIndex(0);
......
260 283
	private JComboBox getFieldsComboBox() {
261 284
		if (fieldNameComboBox == null) {
262 285
		    fieldNameComboBox = new JComboBox();
263
		    fieldNameComboBox.setBounds(90, 34, 250, 23);
264 286
		    fieldNameComboBox.addActionListener(this);
265 287
		    fieldNameComboBox.setEnabled(false);
266 288
		}
......
276 298
	private JComboBox getValuesComboBox() {
277 299
		if (fieldValueComboBox == null) {
278 300
		    fieldValueComboBox = new JComboBox();
279
		    fieldValueComboBox.setBounds(90, 61, 250, 23);
280 301
		    fieldValueComboBox.addActionListener(this);
281 302
		    fieldValueComboBox.setEnabled(false);
282 303
		}
......
294 315
	private JButton getGoButton() {
295 316
		if (goButton == null) {
296 317
		    goButton = new JButton();
297
		    goButton.setPreferredSize(new Dimension(80, 21));
318
		    goButton.setPreferredSize(new Dimension(80, 23));
298 319
		    goButton.setText(PluginServices.getText(this,"_Go"));
299 320
		    goButton.addActionListener(this);
300 321
		}
......
308 329
	private JButton getCloseButton() {
309 330
		if (closeButton == null) {
310 331
		    closeButton = new JButton();
311
		    closeButton.setPreferredSize(new Dimension(80, 21));
312
			//jButton1.setBounds(141, 121, 128, 23);
332
		    closeButton.setPreferredSize(new Dimension(80, 23));
313 333
		    closeButton.setText(PluginServices.getText(this,"_Close"));
314 334
		    closeButton.addActionListener(this);
315 335
		}

Also available in: Unified diff