Revision 11570

View differences:

branches/F2/extensions/extJCRS/src/org/gvsig/crs/gui/CRSMainTrPanel.java
127 127
	
128 128
	public CRSMainTrPanel(int target, CrsWkt crsWkttarget, ICrs proj) {			
129 129
		curProj = proj;
130
		crsMainPanel = new CRSMainPanel(target);		
130
		crsMainPanel = new CRSMainPanel(target, (ICrs) crsfirst);		
131 131
		viewPan = crsMainPanel;
132 132
		
133 133
		crs_target = target;
branches/F2/extensions/extJCRS/src/org/gvsig/crs/gui/panels/ProjChooserPanel.java
1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
1
/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
2 2
 *
3 3
 * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
4 4
 *
......
20 20
 *
21 21
 *  Generalitat Valenciana
22 22
 *   Conselleria d'Infraestructures i Transport
23
 *   Av. Blasco Ib??ez, 50
23
 *   Av. Blasco Ibez, 50
24 24
 *   46010 VALENCIA
25 25
 *   SPAIN
26 26
 *
......
125 125
				TRSelectionDialog trSelect = null;
126 126
				if (!isTransPanelActive()){
127 127
					okPressed = false;
128
					csSelect = new CSSelectionDialog();
128
					csSelect = new CSSelectionDialog((ICrs) curProj);
129 129
					csSelect.setProjection(curProj);
130 130
					csSelect.initRecents(curProj);
131 131
					//csSelect.setLayout(new GridLayout(0,1));
branches/F2/extensions/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefSistCoordenadas.java
6 6
import java.awt.GridLayout;
7 7
import java.awt.event.ActionEvent;
8 8
import java.awt.event.ActionListener;
9
import java.sql.ResultSet;
10
import java.sql.SQLException;
11
import java.util.ArrayList;
9 12

  
10 13
import javax.swing.BorderFactory;
11 14
import javax.swing.ButtonGroup;
......
20 23
import javax.swing.table.DefaultTableModel;
21 24
import javax.swing.table.TableColumn;
22 25

  
26
import org.gvsig.crs.ICrs;
27

  
23 28
import com.iver.andami.PluginServices;
24 29

  
30
import es.idr.teledeteccion.connection.EpsgConnection;
31
import es.idr.teledeteccion.connection.Query;
25 32

  
26 33

  
34

  
27 35
/**
28 36
 * Panel de Definici�n del Sistema de Coordenadas
29 37
 * 
......
46 54
	private JTable tableParametros;
47 55
	private JScrollPane scrollTable;
48 56
	
57
	private DefaultTableModel model = null;
58
	
49 59
	private int theigth=140;
50 60
	private int twidth=300;
51 61
	
......
168 178
		
169 179
		if(tableParametros==null){
170 180
			tableParametros = new JTable();
171
		    DefaultTableModel model = (DefaultTableModel)tableParametros.getModel();
181
		    model = (DefaultTableModel)tableParametros.getModel();
172 182
		    //Crea la tabla con 7 filas
173 183
		    Object[][] data = {
174 184
					{"", "", "Metros"},
......
220 230
	 */
221 231
	public JComboBox getCbProyeccion() {
222 232
		if (cbProyeccion==null){
223
			cbProyeccion=new JComboBox();
233
			ArrayList units = obtainProjections();
234
			String[] items = new String[units.size()];
235
			for (int i=0;i<units.size();i++){
236
				items[i] = units.get(i).toString();
237
			}
238
			cbProyeccion=new JComboBox(items);
224 239
			cbProyeccion.setEditable(false);
225 240
			cbProyeccion.setToolTipText(PluginServices.getText(this,"SistCoor_cbToolTip"));
226
			/*A�adir las opciones al combo*/
227
			cbProyeccion.addItem("uno");
228
			cbProyeccion.addItem("dos");
229
			cbProyeccion.addItem("tres");
230
			cbProyeccion.addItem("cuatro");
241
						
231 242
		}
232 243
		return cbProyeccion;
233 244
	}
245
	
246
	private ArrayList obtainProjections() {
247
		ArrayList items = new ArrayList();
248
		
249
		/*
250
		 * CREATE CACHED TABLE EPSG_COORDOPERATIONMETHOD(COORD_OP_METHOD_CODE INTEGER NOT NULL,
251
		 * COORD_OP_METHOD_NAME VARCHAR(50) NOT NULL,
252
		 * REVERSE_OP SMALLINT NOT NULL, 
253
		 */
254
		
255
		String sentence = "SELECT coord_op_method_name " +
256
		  				"FROM epsg_coordoperationmethod " +	                              
257
		  				"WHERE coord_op_method_code > 9800";
258
		EpsgConnection connect = new EpsgConnection();
259
		connect.setConnectionEPSG();
260
		ResultSet result = Query.select(sentence,connect.getConnection());
261
		try {
262
			while (result.next()) {
263
				items.add(result.getString("coord_op_method_name"));
264
			}
265
		} catch (SQLException e) {
266
			// TODO Auto-generated catch block
267
			e.printStackTrace();
268
		}
269
		return items;
270
	}
234 271
	/*
235 272
	 * Redimensiona el tama�o de las filas y columnas de la tabla
236 273
	 *
......
280 317
		}
281 318
		return geograficoPanel;
282 319
	}
320
	
321
	public void fillData(ICrs crs) {
322
		if (!crs.getCrsWkt().getProjcs().equals("")) {
323
			for (int i = 0; i < getCbProyeccion().getItemCount(); i++) {
324
				if (getCbProyeccion().getItemAt(i).equals(crs.getCrsWkt().getProjection())) {
325
					getCbProyeccion().setSelectedIndex(i);
326
					break;
327
				}
328
			}
329
			int numRow = model.getRowCount();
330
			while (numRow != 0) {
331
				numRow = numRow - 1;
332
				model.removeRow(numRow);
333
			}
334
			Object[] data = new Object[3];
335
			data[2] = "Metros";
336
			for (int i = 0; i < crs.getCrsWkt().getParam_name().length; i++) {
337
				data[0] = crs.getCrsWkt().getParam_name()[i];
338
				data[1] = crs.getCrsWkt().getParam_value()[i];
339
				model.addRow(data);
340
			}
341
		} else {
342
			
343
		}
344
	}
283 345

  
284 346
}
285 347

  
branches/F2/extensions/extJCRS/src/org/gvsig/crs/gui/panels/wizard/MainPanel.java
9 9
import javax.swing.JButton;
10 10
import javax.swing.JPanel;
11 11

  
12
import org.gvsig.crs.ICrs;
13

  
12 14
import com.iver.andami.PluginServices;
13 15
import com.iver.andami.ui.mdiManager.IWindow;
14 16
import com.iver.andami.ui.mdiManager.WindowInfo;
......
16 18

  
17 19
/**
18 20
 * 
19
 * @author Luisa Marina Fern?ndez (luisam.fernandez@uclm.es)
21
 * @author Luisa Marina Fernndez (luisam.fernandez@uclm.es)
20 22
 *
21 23
 */
22 24
public class MainPanel extends JPanel implements ActionListener,IWindow {
......
37 39
	 final static String CRSUSUARIOPANEL = "CrsUsuario";
38 40
	 final static String DEFINIRDATUMPANEL = "DefinirDatum"; 
39 41
	 final static String SISTEMACOORDENADASPANEL = "SistemaCoordenadas";
42
	 
43
	private ICrs currentCrs;
40 44
	
41
	public MainPanel() {
45
	public MainPanel(ICrs crs) {
42 46
		super();
47
		setCrs(crs);
43 48
		this.setLayout(new BorderLayout());
44 49
		this.add(getPCard(),BorderLayout.CENTER);
45 50
		this.add(getPSouth(),BorderLayout.SOUTH);
46 51
	}
47 52
	/**
48
	 * Inicilizar el bot?n Anterior
53
	 * Inicilizar el botn Anterior
49 54
	 * @return
50 55
	 */
51 56
	public JButton getBtnAnterior() {
......
58 63
		return btnAnterior;
59 64
	}
60 65
	/**
61
	 * Inicilizar el bot?n Cancelar
66
	 * Inicilizar el botn Cancelar
62 67
	 * @return
63 68
	 */
64 69
	public JButton getBtnCancelar() {
......
70 75
		return btnCancelar;
71 76
	}
72 77
	/**
73
	 * Inicilizar el bot?n Finalizar
78
	 * Inicilizar el botn Finalizar
74 79
	 * @return
75 80
	 */
76 81
	public JButton getBtnFinalizar() {
......
82 87
		return btnFinalizar;
83 88
	}
84 89
	/**
85
	 * Inicilizar el bot?n Siguiente
90
	 * Inicilizar el botn Siguiente
86 91
	 * @return
87 92
	 */
88 93
	public JButton getBtnSiguiente() {
......
128 133
	}
129 134
	public DefCrsUsr getPCrsUsr() {
130 135
		if(pCrsUsr==null){
131
			pCrsUsr=new DefCrsUsr();
136
			pCrsUsr=new DefCrsUsr(getCrs());
132 137
		}
133 138
		return pCrsUsr;
134 139
	}
......
151 156
		if(e.getSource().equals(getBtnAnterior())){
152 157
			
153 158
			if(getPCrsUsr().isShowing()){
154
				//Se est? mostrando el primer panel del Wizard
155
				
159
				//Se est mostrando el primer panel del Wizard
160
				getBtnAnterior().setVisible(false);
156 161
			}else{
157 162
				//Mostrar el panel anterior
158 163
				cl.previous(pCard);
......
163 168
				System.out.println("Dentro de botonAnterior");
164 169
			}
165 170
		}else if(e.getSource().equals(getBtnSiguiente())){
166
				cl.next(pCard);
171
			if (getPCrsUsr().isShowing() && getPCrsUsr().getRbCrsExistente().isSelected() ){
172
				String authority = getPCrsUsr().getLblCrs().getText();
173
				fillData(authority);
174
			}
175
			cl.next(pCard);
176
			getBtnAnterior().setVisible(true);
177
			//Si aparece el ultimo panel visualizar el botn finalizar
178
			if (getPSistCoord().isShowing()){
179
				getBtnFinalizar().setVisible(true);
180
				getBtnSiguiente().setVisible(false);
167 181
				getBtnAnterior().setVisible(true);
168
				//Si aparece el ultimo panel visualizar el bot?n finalizar
169
				if (getPSistCoord().isShowing()){
170
					getBtnFinalizar().setVisible(true);
171
					getBtnSiguiente().setVisible(false);
172
					getBtnAnterior().setVisible(true);
173 182
			}
183
				
184
				
174 185
		}else if(e.getSource().equals(getBtnFinalizar())){
175 186
			//Realizar las acciones de fin del Wizard
176 187
			System.out.println("Finalizar el Asistente");
......
190 201
   		m_viewinfo.setHeight(390);
191 202
		return m_viewinfo;
192 203
	}
204
	
205
	public ICrs getCrs () {
206
		return currentCrs;
207
	}
208
	
209
	public void setCrs (ICrs crs) {
210
		currentCrs = crs;
211
	}
212
	
213
	
214
	
215
	private void fillData(String authority) {
216
		getPDatum().fillData(getCrs());
217
		getPSistCoord().fillData(getCrs());
218
	}
193 219

  
194 220

  
195 221
}
branches/F2/extensions/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefinirDatum.java
7 7
import java.awt.Insets;
8 8
import java.awt.event.ActionEvent;
9 9
import java.awt.event.ActionListener;
10
import java.sql.ResultSet;
11
import java.sql.SQLException;
12
import java.util.ArrayList;
10 13

  
11 14
import javax.swing.BorderFactory;
12 15
import javax.swing.ButtonGroup;
......
17 20
import javax.swing.JRadioButton;
18 21
import javax.swing.JTextField;
19 22

  
23
import org.gvsig.crs.ICrs;
24

  
20 25
import com.iver.andami.PluginServices;
21 26
import com.iver.utiles.swing.JComboBox;
22 27

  
28
import es.idr.teledeteccion.connection.EpsgConnection;
29
import es.idr.teledeteccion.connection.Query;
30

  
23 31
/**
24
 * Panel de definici?n del Datum 
32
 * Panel de definicin del Datum 
25 33
 * 
26 34
 * @author Luisa Marina Fernandez Ruiz (luisam.fernandez@uclm.es)
27 35
 * 
......
191 199
		
192 200
	}
193 201
	/**
194
	 * Inicializa el bot?n Importar del datum
202
	 * Inicializa el botn Importar del datum
195 203
	 * @return
196 204
	 */
197 205
	public JButton getBtnImportDatum() {
......
204 212
		return btnImportDatum;
205 213
	}
206 214
	/**
207
	 * Inicializa el bot?n Importar del Elipsoide
215
	 * Inicializa el botn Importar del Elipsoide
208 216
	 * @return
209 217
	 */
210 218
	public JButton getBtnImportElipsoide() {
......
217 225
		return btnImportElipsoide;
218 226
	}
219 227
	/**
220
	 * Inicializa el bot?n Importar del Meridiano
228
	 * Inicializa el botn Importar del Meridiano
221 229
	 * @return
222 230
	 */
223 231
	public JButton getBtnImportMeridian() {
......
235 243
	 */
236 244
	public JComboBox getCbInvF() {
237 245
		if (cbInvF==null){
238
			cbInvF=new JComboBox(obtenerItemsUnidades());
246
			ArrayList units = obtenerItemsUnidades();
247
			String[] items = new String[units.size()];
248
			for (int i=0;i<units.size();i++){
249
				items[i] = units.get(i).toString();
250
			}
251
			cbInvF=new JComboBox(items);
239 252
			/*Seleccionar un item por defecto*/
240 253
			cbInvF.setSelectedIndex(0);
241 254
			cbInvF.addActionListener(this);
......
248 261
	 */
249 262
	public JComboBox getCbLong() {
250 263
		if (cbLong==null){
251
			cbLong=new JComboBox(obtenerItemsUnidades());
264
			ArrayList units = obtenerItemsUnidades();
265
			String[] items = new String[units.size()];
266
			for (int i=0;i<units.size();i++){
267
				items[i] = units.get(i).toString();
268
			}
269
			cbLong=new JComboBox(items);
252 270
			/*Seleccionar un item por defecto*/
253 271
			cbLong.setSelectedIndex(0);
254 272
			cbLong.addActionListener(this);
......
261 279
	 */
262 280
	public JComboBox getCbSemMay() {
263 281
		if (cbSemMay==null){
264
			cbSemMay=new JComboBox(obtenerItemsUnidades());
282
			ArrayList units = obtenerItemsUnidades();
283
			String[] items = new String[units.size()];
284
			for (int i=0;i<units.size();i++){
285
				items[i] = units.get(i).toString();
286
			}
287
			cbSemMay=new JComboBox(items);
265 288
			/*Seleccionar un item por defecto*/
266 289
			cbSemMay.setSelectedIndex(0);
267 290
			cbSemMay.addActionListener(this);
......
274 297
	 */
275 298
	public JComboBox getCbSemMen() {
276 299
		if (cbSemMen==null){
277
			cbSemMen=new JComboBox(obtenerItemsUnidades());
300
			ArrayList units = obtenerItemsUnidades();
301
			String[] items = new String[units.size()];
302
			for (int i=0;i<units.size();i++){
303
				items[i] = units.get(i).toString();
304
			}
305
			cbSemMen=new JComboBox(items);
278 306
			/*Seleccionar un item por defecto*/
279 307
			cbSemMen.setSelectedIndex(0);
280 308
			cbSemMen.addActionListener(this);
......
286 314
	 * los combobox
287 315
	 * @return
288 316
	 */
289
	private String[] obtenerItemsUnidades(){
317
	private ArrayList obtenerItemsUnidades(){ //unidades de longitud...
290 318
		//TODO: Obtener los items del combo de la base de datos
291
		String items[];
292
		items=new String[3];
293
		items[0]="Metros";
294
		items[1]="Grados";
295
		items[2]="degree, minute hemisphere";
296
		
319
		ArrayList items = new ArrayList();
320
				
321
		String sentence = "SELECT unit_of_meas_name " +
322
		  				"FROM epsg_unitofmeasure " +	                              
323
		  				"WHERE unit_of_meas_type = 'length'";
324
		EpsgConnection connect = new EpsgConnection();
325
		connect.setConnectionEPSG();
326
		ResultSet result = Query.select(sentence,connect.getConnection());
327
		try {
328
			while (result.next()) {
329
				items.add(result.getString("unit_of_meas_name"));
330
			}
331
		} catch (SQLException e) {
332
			// TODO Auto-generated catch block
333
			e.printStackTrace();
334
		}
297 335
		return items;
298 336
	}
299 337
	/**
......
387 425
	}
388 426

  
389 427
	/**
390
	 * Agrupa los Radio Button de los par?metros del elipsoide
428
	 * Agrupa los Radio Button de los parmetros del elipsoide
391 429
	 * 
392 430
	 */
393 431
	private void agruparRadioButtons() {
......
530 568
			System.out.println("Importar Meridiano");
531 569
		}else if(e.getSource().equals(getRbInvF())){
532 570
			System.out.println("opcion Inverse Flat");
533
			/*Si selecciona esta opci?n se fija este 
534
			par?metro y no se puede modificar el txt*/
571
			/*Si selecciona esta opcin se fija este 
572
			parmetro y no se puede modificar el txt*/
535 573
			getTxtSemMay().setEditable(true);
536 574
			getTxtSemMen().setEditable(true);
537 575
			getTxtInvF().setEditable(false);
538 576
			
539 577
		}else if(e.getSource().equals(getRbSemMay())){
540 578
			System.out.println("opcion Semieje Mayor");
541
			/*Si selecciona esta opci?n se fija este 
542
			par?metro y no se puede modificar el txt*/
579
			/*Si selecciona esta opcin se fija este 
580
			parmetro y no se puede modificar el txt*/
543 581
			getTxtSemMay().setEditable(false);
544 582
			getTxtSemMen().setEditable(true);
545 583
			getTxtInvF().setEditable(true);
546 584
		}else if(e.getSource().equals(getRbSemMen())){
547 585
			System.out.println("opcion Semieje Menor");
548
			/*Si selecciona esta opci?n se fija este 
549
			par?metro y no se puede modificar el txt*/
586
			/*Si selecciona esta opcin se fija este 
587
			parmetro y no se puede modificar el txt*/
550 588
			getTxtSemMay().setEditable(true);
551 589
			getTxtSemMen().setEditable(false);
552 590
			getTxtInvF().setEditable(true);
553 591
		}
554 592
		
555 593
	}
594
	
595
	public void fillData(ICrs crs){
596
		
597
		getTxtDatum().setText(crs.getCrsWkt().getDatumName());
598
		getTxtElipsoide().setText(crs.getCrsWkt().getSpheroid()[0]);
599
		String semMay = crs.getCrsWkt().getSpheroid()[1];
600
		String invF = crs.getCrsWkt().getSpheroid()[2];
601
		getTxtSemMay().setText(semMay);
602
		getTxtInvF().setText(invF);
603
		double semMen = calcularSemMen(Double.parseDouble(semMay), Double.parseDouble(invF));
604
		getTxtSemMen().setText(String.valueOf(semMen));
605
		getTxtMeridian().setText(crs.getCrsWkt().getPrimen()[0]);
606
		getTxtLong().setText(crs.getCrsWkt().getPrimen()[1]);		
607
	}
608
	
609
	private double calcularSemMen(double semMay, double invF) {
610
		if (invF != 0)
611
			return (semMay) / (invF);
612
		return 0;
613
	}
556 614

  
557 615

  
558 616
	
branches/F2/extensions/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefCrsUsr.java
16 16
import javax.swing.JRadioButton;
17 17
import javax.swing.JScrollPane;
18 18
import javax.swing.JTextArea;
19

  
20
import org.gvsig.crs.ICrs;
21

  
19 22
import com.iver.andami.PluginServices;
20 23

  
21 24

  
22 25
/**
23
 * Panel de definici?n del Crs por el usuario
26
 * Panel de definicin del Crs por el usuario
24 27
 * 
25 28
 *  @author Luisa Marina Fernandez Ruiz (luisam.fernandez@uclm.es)
26 29
 *
......
37 40
	private JTextArea txtAreaWkt;
38 41
	private JButton btnImportarWkt;
39 42
	private JScrollPane scrollWkt;
40
	
43
	private ICrs currentCrs;
41 44
	private int width=380;
42 45
	//290
43 46
	
44 47
	private static final long serialVersionUID = 1L;
45 48

  
46
	public DefCrsUsr() {
49
	public DefCrsUsr(ICrs crs) {
47 50
		super();
51
		currentCrs = crs;
48 52
		initialize();
49 53
		
50 54
	}
51 55

  
52 56
/*
53
 * Inicializa el panel de Definici?n del Crs por el usuario
57
 * Inicializa el panel de Definicin del Crs por el usuario
54 58
 */
55 59
	private void initialize() {
56 60
		this.setLayout(new BorderLayout());
......
100 104
			panel.add(getRbCadenaWkt(),c);
101 105
//			Agrupa los botones de opcion
102 106
			agruparRadioButtons();
103
			//Selecci?n por defecto
107
			//Seleccin por defecto
104 108
			getRbCrsExistente().setSelected(true);
105 109
			
106 110
			c.gridx=2;
......
125 129
	}
126 130
	
127 131
	/*
128
	 * Agrupa los botones de opci?n
132
	 * Agrupa los botones de opcin
129 133
	 */
130 134
	private void agruparRadioButtons() {
131 135
		if (crsGroup==null){
......
165 169

  
166 170
	public JLabel getLblCrs() {
167 171
		if (lblCrs==null){
168
			lblCrs=new JLabel("EPSG: 23030");
172
			lblCrs=new JLabel(currentCrs.getAbrev());
169 173
		}
170 174
		return lblCrs;
171 175
	}
172 176

  
173 177
    /**
174
     * Activa o desactiva el bot?n y el cuadro de texto
178
     * Activa o desactiva el botn y el cuadro de texto
175 179
     * @param b Si es False--> deshabilita
176 180
     */
177 181
	private void habilitarExistente(boolean b) {
......
223 227
	}
224 228
	/*
225 229
	 *Crea un panel de desplazamineto en el que se 
226
	 *agrega el area de texto para que ?ste tenga barras de desplazamiento 
230
	 *agrega el area de texto para que ste tenga barras de desplazamiento 
227 231
	 */
228 232
	public JScrollPane getScrollWkt() {
229 233
		if (scrollWkt==null){
branches/F2/extensions/extJCRS/src/org/gvsig/crs/gui/panels/NewCRSPanel.java
65 65
	public EpsgConnection connect = null;
66 66
	public int selectedRowTable = -1;	
67 67
	String cadWkt = "";
68
	private int codeCRS = -1;	
68
	private int codeCRS = -1;
69
	private ICrs currentCrs;
69 70
			
70
	public NewCRSPanel() {
71
	public NewCRSPanel(ICrs crs) {
71 72
		super();
73
		currentCrs = crs;
72 74
		initialize();
73 75
		//fijar los listener de todos los componentes
74 76
		setListener();
......
293 295
		}else if (e.getSource().equals(getBtnNuevo())){
294 296
			//mostrar el asistente de nuevo crs
295 297
		
296
			MainPanel wizard = new MainPanel();
298
			MainPanel wizard = new MainPanel(currentCrs);
297 299
			PluginServices.getMDIManager().addWindow(wizard);
298 300
			
299 301
		}else if (e.getSource().equals(getSearchButton())){
branches/F2/extensions/extJCRS/src/org/gvsig/crs/gui/CRSMainPanel.java
104 104
	private JButton jButtonAccept;
105 105
	private JButton jButonCancel;
106 106
	
107
	private ICrs viewCrs;
108
	
107 109
	String dataSource = "";
108 110

  
109
	public CRSMainPanel() {
111
	public CRSMainPanel(ICrs crs) {
112
		viewCrs = crs;
110 113
		crsRecentsPanel = new CrsRecentsPanel();
111 114
		epsgPanel = new EPSGpanel();
112 115
		esriPanel = new ESRIpanel();
113 116
		iauPanel = new IAU2000panel();
114
		newCrsPanel=new NewCRSPanel();
117
		newCrsPanel=new NewCRSPanel(viewCrs);
115 118
		
116 119
		this.add(vista(), BorderLayout.NORTH);		
117 120
		this.add(getJPanelButtons(), BorderLayout.SOUTH);
......
119 122
	    setDataSource(selection[0]);
120 123
	}
121 124
	
122
	public CRSMainPanel(int target) {
125
	public CRSMainPanel(int target, ICrs crs) {
126
		viewCrs = crs;
123 127
		crsRecentsPanel = new CrsRecentsPanel();
124 128
		epsgPanel = new EPSGpanel();
125 129
		esriPanel = new ESRIpanel();
126 130
		iauPanel = new IAU2000panel();
127
		newCrsPanel=new NewCRSPanel();
131
		newCrsPanel=new NewCRSPanel(viewCrs);
128 132
		
129 133
		setDataSource(selection[0]);
130 134
	}
branches/F2/extensions/extJCRS/src/org/gvsig/crs/gui/CRSSelectionDialog.java
71 71
	
72 72
	private boolean okPressed = false;
73 73
		
74
	public CRSSelectionDialog(){
75
		super();		
74
	public CRSSelectionDialog(ICrs curProj){
75
		super();
76
		lastProj = curProj;
76 77
		initialize();
77 78
	}
78 79
	
79 80
	public void initialize(){
80
		crsMainPanel = new CRSMainPanel();
81
		crsMainPanel = new CRSMainPanel((ICrs)lastProj);
81 82
		this.add(getContentPanel(), null);
82 83
		setListeners();	
83 84
		
branches/F2/extensions/extJCRS/src/org/gvsig/crs/gui/dialog/CSSelectionDialog.java
5 5

  
6 6
import java.awt.GridLayout;
7 7

  
8
import org.gvsig.crs.ICrs;
8 9
import org.gvsig.crs.gui.CRSSelectionDialog;
9 10

  
10 11

  
11 12
/**
12
 * Di?logo contenedor para la selecci?n de CRS. 
13
 * Dilogo contenedor para la seleccin de CRS. 
13 14
 * Incluye los controles para las transformaciones
14 15
 * para el CRS de la capa)
15 16
 * 
......
21 22
	/**
22 23
	 * 
23 24
	 */
24
	public CSSelectionDialog() {
25
		super();
25
	public CSSelectionDialog(ICrs curProj) {
26
		super(curProj);
26 27
		this.init();
27 28
	}
28 29
	/**

Also available in: Unified diff