Revision 10786 branches/F2/extensions/extJCRS/src/org/gvsig/crs/gui/panels/TransformationNadgridsPanel.java

View differences:

TransformationNadgridsPanel.java
40 40

  
41 41
package org.gvsig.crs.gui.panels;
42 42

  
43
import java.awt.BorderLayout;
43 44
import java.awt.Component;
44 45
import java.awt.Dimension;
45 46
import java.awt.FlowLayout;
......
63 64
import javax.swing.JPanel;
64 65
import javax.swing.JRadioButton;
65 66
import javax.swing.JTextArea;
67
import javax.swing.border.EmptyBorder;
66 68
import javax.swing.filechooser.FileFilter;
67 69

  
68 70
import org.cresques.cts.IProjection;
......
86 88
 * 
87 89
 * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
88 90
 * @author Jos? Luis G?mez Mart?nez (jolugomar@gmail.com)
91
 * @author Luisa Marina Fern?ndez (luisam.fernandez@uclm.es)
89 92
 *
90 93
 */
91 94
public class TransformationNadgridsPanel extends JPanel implements IWindow, ActionListener {
......
131 134
	}
132 135
		
133 136
	private void initialize(){
134
			setLayout(new GridLayout(1,4));
135
			setLayout(new FlowLayout(FlowLayout.LEADING,5,10));
136
			setPreferredSize(new Dimension(525, 110));
137
			setBorder(
138
				    BorderFactory.createCompoundBorder(
139
							BorderFactory.createCompoundBorder(
140
									BorderFactory.createTitledBorder("+"+PluginServices.getText(this,"nadgrids")),
141
									BorderFactory.createEmptyBorder(2,2,2,2)),
142
									getBorder()));
143
			add(getJPanelOpen());
144
			setNadFile(restoreNadFileName());//nadFile = restoreNadFileName();
145
			add(getJPanelSelectNad());
146
			add(getJLabelChooser());
147
			add(getGroupRadioButton());
148
			initializeTree();
149
			add(getTreePanel());
137
		
138
		this.setLayout(new BorderLayout());
139
		this.setBorder(BorderFactory.createCompoundBorder(
140
				BorderFactory.createTitledBorder("+ "+PluginServices.getText(this,"nadgrids")),
141
				BorderFactory.createEmptyBorder(5,5,5,5)));
142
		JPanel pNorth=new JPanel();
143
		pNorth.setBorder(new EmptyBorder(1,10,1,10));
144
		pNorth.setLayout(new GridLayout(4,1));
145
		
146
		pNorth.add(getJPanelOpen());
147
		//label+combo
148
		pNorth.add(getJPanelSelectNad());
149
		JPanel lbl=new JPanel(new FlowLayout(FlowLayout.LEFT,0,10));
150
		lbl.add(getJLabelChooser());
151
		pNorth.add(lbl);
152
		//dos radio buttons
153
		pNorth.add(getGroupRadioButton());
154
		this.add(pNorth,BorderLayout.NORTH);
155
		this.add(getTreePanel(),BorderLayout.CENTER);
156
		
150 157
	}
151 158
	
152 159
	private JPanel getGroupRadioButton() {
153 160
		if (groupRadioButton == null) {
154 161
			groupRadioButton = new JPanel();
155
			groupRadioButton.setLayout(new GridLayout(1,0));
156
			groupRadioButton.setPreferredSize(new Dimension(400,30));			
162
			groupRadioButton.setLayout(new GridLayout(1,0));	
157 163
			groupRadioButton.add(getJRadioButtonSource());
158 164
			groupRadioButton.add(getJRadioButtonTarget());			
159 165
		}
......
183 189
	
184 190
	private JLabel getJLabelChooser(){
185 191
		jLabelChooser = new JLabel();
186
		jLabelChooser.setPreferredSize(new Dimension(400, 20));
187 192
		jLabelChooser.setText(PluginServices.getText(this, "seleccion_nadgrids")+":");
188 193
		return jLabelChooser;
189 194
	}
......
204 209
	private JPanel getJPanelOpen() {
205 210
		if(jPanelOpen == null) {
206 211
			jPanelOpen = new JPanel();
207
			jPanelOpen.setPreferredSize(new Dimension(525,30));
208
			jPanelOpen.setLayout(new GridLayout(2,2));
209 212
			jPanelOpen.setLayout(new FlowLayout(FlowLayout.LEFT,5,5));
210 213
			jPanelOpen.add(getJLabelOpenGsb(), null);
211 214
			jPanelOpen.add(getJButtonOpen(), null);			
......
337 340
	}
338 341

  
339 342
	public void actionPerformed(ActionEvent e) {
340
		// TODO Auto-generated method stub
341 343
		if (e.getSource() == this.getJRadioButtonSource()){
342 344
			jRadioButtonSource.setSelected(true);
343 345
			jRadioButtonTarget.setSelected(false);
......
426 428
		if (treePanel == null){
427 429
			treePanel = new TreePanel(PluginServices.getText(this,"grids_en")+": "+nadFile);
428 430
			treePanel.getTree().expandRow(0);
429
			treePanel.setPanelSize(530,200);
431
			treePanel.setPanelSize(530,150);
430 432
		}
431 433
		return treePanel;
432 434
	}
......
502 504
	public JPanel getJPanelSelectNad() {
503 505
		if (jPanelSelectNad == null){
504 506
			jPanelSelectNad = new JPanel();
505
			jPanelOpen.setPreferredSize(new Dimension(525,30));
506
			jPanelOpen.setLayout(new GridLayout(2,2));
507
			jPanelOpen.setLayout(new FlowLayout(FlowLayout.LEFT,5,5));		
507
			jPanelSelectNad.setLayout(new FlowLayout(FlowLayout.LEFT,5,5));		
508 508
			jPanelSelectNad.add(getJLabelSelectNad());
509 509
			jPanelSelectNad.add(getJComboNadFile());
510 510
		}

Also available in: Unified diff