Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/CRSMainPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/CRSMainPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/CRSMainPanel.java	(revision 25287)
@@ -0,0 +1,342 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui;
+
+import java.awt.BorderLayout;
+import java.awt.CardLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.panels.CrsAndTransformationRecentsPanel;
+import org.gvsig.crs.gui.panels.CrsRecentsPanel;
+import org.gvsig.crs.gui.panels.EPSGpanel;
+import org.gvsig.crs.gui.panels.ESRIpanel;
+import org.gvsig.crs.gui.panels.IAU2000panel;
+import org.gvsig.crs.gui.panels.NewCRSPanel;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+
+/**
+ * Clase que genera el panel principal para la seleccin de CRS 
+ * 
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ * @author Luisa Marina Fernandez (luisam.fernandez@uclm.es)
+ *
+ */
+public class CRSMainPanel extends JPanel implements IWindow {
+		
+	private static final long serialVersionUID = 1L;
+	
+	private JComboBox jComboOptions = null;	
+	private JPanel Combopanel = null;	
+	private JPanel USGSpanel = null;	
+	
+	final String recientes = PluginServices.getText(this,"recientes");
+	final String epsg = PluginServices.getText(this,"EPSG"); 
+	final String usgs = PluginServices.getText(this,"USGS");
+	final String esri = PluginServices.getText(this,"ESRI");
+	final String iau2000 = PluginServices.getText(this,"IAU2000");
+	final String newCRS = PluginServices.getText(this,"newCRS");
+	
+	//String[] selection = {recientes, epsg, usgs, esri, iau2000, newCRS};
+	String[] selection = {recientes, epsg, esri, iau2000, newCRS};//, esri};
+	
+	boolean inAnApplet = true;	
+	public CrsRecentsPanel crsRecentsPanel = null;
+	public CrsAndTransformationRecentsPanel crsAndTransformationRecentsPanel = null;
+	public EPSGpanel epsgPanel = null;
+	public ESRIpanel esriPanel = null;
+	public IAU2000panel iauPanel = null;
+	public NewCRSPanel newCrsPanel=null;
+	
+	private JPanel jPanelMain = null;	
+	
+	private JPanel jPanelButtons;
+	private JButton jButtonAccept;
+	private JButton jButonCancel;
+	
+	private ICrs viewCrs;
+	
+	String dataSource = "";
+
+	public CRSMainPanel(ICrs crs) {
+		viewCrs = crs;
+		crsRecentsPanel = new CrsRecentsPanel();
+		epsgPanel = new EPSGpanel();
+		esriPanel = new ESRIpanel();
+		iauPanel = new IAU2000panel();
+		newCrsPanel=new NewCRSPanel(viewCrs);
+		
+		this.add(vista(), BorderLayout.NORTH);		
+		this.add(getJPanelButtons(), BorderLayout.SOUTH);
+		
+	    setDataSource(selection[0]);
+	}
+	
+	public CRSMainPanel(int target, ICrs crs) {
+		viewCrs = crs;
+		crsAndTransformationRecentsPanel = new CrsAndTransformationRecentsPanel();
+		epsgPanel = new EPSGpanel();
+		esriPanel = new ESRIpanel();
+		iauPanel = new IAU2000panel();
+		newCrsPanel=new NewCRSPanel(viewCrs);
+		
+		setDataSource(selection[0]);
+	}
+	
+	/**
+	 * Panel con los controles necesarios para visualizarlo en el panel de 
+	 * seleccin de CRS y transformacin de la capa a aadir
+	 * @return
+	 */
+	public JPanel capa(){
+		JPanel p = new JPanel();
+		//**p.setPreferredSize(new Dimension(550, 320));
+		//**p.setLayout(new GridLayout(0,1));
+		//p.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
+		p.setLayout(new BorderLayout());
+		//p.setBorder(BorderFactory.createTitledBorder(PluginServices.getText(this,"seleccione_crs_capa")));//,
+								/*BorderFactory.createEmptyBorder(1,1,1,1)),
+								p.getBorder()));*/
+		p.add(getCombopanel(),BorderLayout.NORTH);
+		p.add(getJPanelLayerMain(),BorderLayout.CENTER);
+		return p;
+	}
+	
+	public JPanel vista(){
+		JPanel p = new JPanel();
+		//p.setPreferredSize(new Dimension(550, 320));
+		//p.setLayout(new GridLayout(0,1));
+		//p.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
+		/*p.setBorder(
+			    BorderFactory.createCompoundBorder(
+						BorderFactory.createCompoundBorder(
+								BorderFactory.createTitledBorder(PluginServices.getText(this,"seleccione_crs_vista")),
+								BorderFactory.createEmptyBorder(2,2,2,2)),
+								p.getBorder()));*/
+		p.setLayout(new BorderLayout());
+		p.add(getCombopanel(),BorderLayout.NORTH);
+		p.add(getJPanelMain(),BorderLayout.CENTER);
+		return p;
+	}
+	
+	public JPanel getJPanelMain(){
+		if (jPanelMain == null){
+			jPanelMain = new JPanel();
+			jPanelMain.setLayout(new CardLayout());
+			jPanelMain.setPreferredSize(new Dimension(525, 230));	
+			jPanelMain.add(recientes, crsRecentsPanel);
+			jPanelMain.add(epsg, epsgPanel);
+			jPanelMain.add(newCRS,newCrsPanel);
+			jPanelMain.add(esri, esriPanel);
+			jPanelMain.add(usgs, getJPanelUSGS());
+			jPanelMain.add(iau2000, iauPanel);
+		}
+		
+		return jPanelMain;		
+	}
+	
+	public JPanel getJPanelLayerMain(){
+		if (jPanelMain == null){
+			jPanelMain = new JPanel();
+			jPanelMain.setLayout(new CardLayout());
+			jPanelMain.setPreferredSize(new Dimension(525, 230));	
+			jPanelMain.add(recientes, crsAndTransformationRecentsPanel);
+			jPanelMain.add(epsg, epsgPanel);
+			jPanelMain.add(newCRS,newCrsPanel);
+			jPanelMain.add(esri, esriPanel);
+			jPanelMain.add(usgs, getJPanelUSGS());
+			jPanelMain.add(iau2000, iauPanel);
+		}
+		
+		return jPanelMain;		
+	}
+	
+	public JPanel getCombopanel(){
+		if (Combopanel == null){
+			Combopanel = new JPanel();
+			Combopanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,5));
+			Combopanel.add(getJLabelTipo());
+			Combopanel.add(getJComboOptions());
+		}
+		
+		return Combopanel;
+	}
+	
+	private JLabel getJLabelTipo(){
+		JLabel jLabelTipo = new JLabel();
+		jLabelTipo.setPreferredSize(new Dimension(50,25));
+		jLabelTipo.setText(PluginServices.getText(this,"tipo")+":");
+		return jLabelTipo;
+	}
+	
+	public JComboBox getJComboOptions(){
+		if (jComboOptions == null){
+			jComboOptions = new JComboBox(selection);
+			jComboOptions.setPreferredSize(new Dimension(100,25));			
+			jComboOptions.setEditable(false);
+			jComboOptions.setSelectedIndex(0);					
+		}
+		return jComboOptions;
+	}
+			
+	public JPanel getJPanelUSGS() {	
+		if (USGSpanel == null){
+			USGSpanel = new JPanel();
+			USGSpanel.setLayout(new GridLayout(3,4));
+			USGSpanel.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
+			USGSpanel.setPreferredSize(new Dimension(525, 400));			
+		}	
+		return USGSpanel;
+	}			
+	
+	private JPanel getJPanelButtons() {
+		if(jPanelButtons == null) {
+			jPanelButtons = new JPanel();
+			jPanelButtons.setLayout(new FlowLayout(FlowLayout.RIGHT));
+			//jPanelButtons.setPreferredSize(new Dimension(525,50));
+			jPanelButtons.add(getJButtonCancel(),null);
+			jPanelButtons.add(getJButtonAccept(),null);			
+		}
+		return jPanelButtons;
+	}
+	
+	public JButton getJButtonCancel() {
+		if(jButonCancel == null) {
+			jButonCancel = new JButton();
+			jButonCancel.setText(PluginServices.getText(this,"cancel"));
+			jButonCancel.setPreferredSize(new Dimension(100,25));
+			jButonCancel.setMnemonic('C');
+			jButonCancel.setToolTipText("Cancel");			
+		}
+		return jButonCancel;
+	}
+	
+	public void cancelButton_actionPerformed(ActionEvent e) {		
+		 PluginServices.getMDIManager().closeWindow(this);
+	}
+	
+	public JButton getJButtonAccept() {
+		if(jButtonAccept == null) {
+			jButtonAccept = new JButton();
+			jButtonAccept.setText(PluginServices.getText(this,"ok"));
+			jButtonAccept.setPreferredSize(new Dimension(100,25));
+			jButtonAccept.setEnabled(false);
+			jButtonAccept.setMnemonic('A');
+			jButtonAccept.setToolTipText(PluginServices.getText(this,"ok"));			
+		}
+		return jButtonAccept;
+	}
+	
+	public ICrs getProjection() {
+		if (getDataSource().equals(PluginServices.getText(this,"EPSG"))){
+			return epsgPanel.getProjection();
+		}
+		else if (getDataSource().equals(PluginServices.getText(this,"IAU2000"))) {
+			return iauPanel.getProjection();
+		}
+		else if (getDataSource().equals(PluginServices.getText(this,"recientes"))) {
+			return crsRecentsPanel.getProjection();
+		}
+		else if (getDataSource().equals(PluginServices.getText(this,"ESRI"))) {
+			return esriPanel.getProjection();
+		}
+		else if (getDataSource().equals(PluginServices.getText(this,"newCRS"))) {
+			return newCrsPanel.getProjection();
+		}
+		return null;
+	}
+	
+	public void setProjection(IProjection crs) {
+		//setCrs((ICrs) crs);
+	}
+	
+	public void setDataSource(String sour){
+		dataSource = sour;
+	}
+	
+	public String getDataSource(){
+		return dataSource;
+	}
+
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle(PluginServices.getText(this, "seleccionar_crs"));
+		return m_viewinfo;
+	}
+
+	public EPSGpanel getEpsgPanel() {
+		return epsgPanel;
+	}
+
+	
+
+	public ESRIpanel getEsriPanel() {
+		return esriPanel;
+	}
+	public IAU2000panel getIauPanel() {
+		return iauPanel;
+	}
+
+	public CrsRecentsPanel getRecentsPanel() {
+		return crsRecentsPanel;
+	}
+	
+	public CrsAndTransformationRecentsPanel getCrsAndTransformationRecentsPanel() {
+		return crsAndTransformationRecentsPanel;
+	}
+
+	public NewCRSPanel getNewCrsPanel() {
+		return newCrsPanel;
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/CRSMainPanel.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/CRSSelectionDialog.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/CRSSelectionDialog.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/CRSSelectionDialog.java	(revision 25287)
@@ -0,0 +1,192 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui;
+
+import javax.swing.JPanel;
+import javax.swing.ListSelectionModel;
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.listeners.CRSSelectionDialogListener;
+import org.gvsig.crs.persistence.CrsData;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+
+/**
+ * Dilogo contenedor del panel para la seleccin de CRS. 
+ * (para el CRS de la vista)
+ * 
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ */
+public class CRSSelectionDialog extends JPanel implements  IWindow {
+	
+	private static final long serialVersionUID = 1L;	
+	
+	JPanel contentPane = null;
+	private CRSMainPanel crsMainPanel = null;
+	private IProjection lastProj = null;
+	int code = 0;
+	String dataSource = "";
+	
+	private boolean okPressed = false;
+		
+	public CRSSelectionDialog(ICrs curProj){
+		super();
+		lastProj = curProj;
+		initialize();
+	}
+	
+	public void initialize(){
+		crsMainPanel = new CRSMainPanel((ICrs)lastProj);
+		this.add(getContentPanel(), null);
+		setListeners();	
+		
+	}
+	
+	public void initRecents(ICrs proj) {
+		CrsData crsData = new CrsData(proj.getCrsWkt().getAuthority()[0], proj.getCode(),proj.getCrsWkt().getName());
+		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+		persistence.addCrsData(crsData);
+		
+		crsMainPanel.getRecentsPanel().loadRecents();
+	}
+	
+	public boolean isOkPressed() { return okPressed; }
+			
+    public CRSMainPanel getProjPanel() {
+        return (CRSMainPanel) getContentPanel();
+    }
+
+	public JPanel getContentPanel() {
+	    if (contentPane == null) {
+        	contentPane = crsMainPanel;
+        	
+       }
+      return contentPane;
+    }	
+	
+	public void setListeners(){
+		
+		CRSSelectionDialogListener listener = new CRSSelectionDialogListener(this); 
+		
+		ListSelectionModel rowSM = crsMainPanel.getEpsgPanel().getJTable().getSelectionModel();
+		rowSM.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMiau = crsMainPanel.getIauPanel().getJTable().getSelectionModel();
+		rowSMiau.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMrecents = crsMainPanel.getRecentsPanel().getJTable().getSelectionModel();
+		rowSMrecents.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMesri = crsMainPanel.getEsriPanel().getJTable().getSelectionModel();
+		rowSMesri.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMusr = crsMainPanel.getNewCrsPanel().getJTable().getSelectionModel();
+		rowSMusr.addListSelectionListener(listener);
+		
+		crsMainPanel.getJComboOptions().addItemListener(listener);
+		crsMainPanel.getJButtonAccept().addActionListener(listener);
+        crsMainPanel.getJButtonCancel().addActionListener(listener);
+        crsMainPanel.getEsriPanel().getJTable().addMouseListener(listener);
+        crsMainPanel.getEpsgPanel().getJTable().addMouseListener(listener);
+        crsMainPanel.getRecentsPanel().getJTable().addMouseListener(listener);
+        crsMainPanel.getIauPanel().getJTable().addMouseListener(listener);
+        crsMainPanel.getNewCrsPanel().getJTable().addMouseListener(listener);
+	}
+
+	public void setCode(int cod){
+		code = cod;
+	}
+	
+	public int getCode(){
+		return code;
+	}
+	
+	public IProjection getProjection() {
+		return (IProjection) getProjPanel().getProjection();
+	}
+	/**
+	 * @param proj
+	 */
+	public void setProjection(IProjection proj) {
+		lastProj = proj;
+		getProjPanel().setProjection(proj);
+	}
+	
+	public String getProjectionAbrev(){
+		return (String) getProjPanel().getProjection().getAbrev();
+	}
+
+	
+	
+	public void setDataSource(String sour){
+		dataSource = sour;
+	}
+	
+	public String getDataSource(){
+		return dataSource;
+	}
+	
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle(PluginServices.getText(this, "nuevo_crs"));
+		return m_viewinfo;
+	}
+
+	public IProjection getLastProj() {
+		return lastProj;
+	}
+
+	public void setLastProj(IProjection lastProj) {
+		this.lastProj = lastProj;
+	}
+
+	public void setOkPressed(boolean okPressed) {
+		this.okPressed = okPressed;
+	}
+
+	public CRSMainPanel getCrsMainPanel() {
+		return crsMainPanel;
+	}
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/CRSSelectionDialog.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/package.html
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/package.html	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/package.html	(revision 25287)
@@ -0,0 +1,4 @@
+<html>
+	<body>Clases relacionadas con la interfaz de usuario de la extensi�n CRS.
+</body>
+</html>

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/package.html
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/dialog/CSSelectionDialog.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/dialog/CSSelectionDialog.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/dialog/CSSelectionDialog.java	(revision 25287)
@@ -0,0 +1,54 @@
+/*
+ * Created on 26-ene-2005
+ */
+package org.gvsig.crs.gui.dialog;
+
+import java.awt.GridLayout;
+
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.CRSSelectionDialog;
+
+
+/**
+ * Dilogo contenedor para la seleccin de CRS. 
+ * Incluye los controles para las transformaciones
+ * para el CRS de la capa)
+ * 
+ * @author Luis W. Sevilla (sevilla_lui@gva.es)
+ */
+public class CSSelectionDialog extends CRSSelectionDialog{
+	
+	private static final long serialVersionUID = 1L;
+	/**
+	 * 
+	 */
+	public CSSelectionDialog(ICrs curProj) {
+		super(curProj);
+		this.init();
+	}
+	/**
+	 * This method initializes this
+	 * 
+	 * @return void
+	 */
+	private void init() {
+		this.setBounds(0, 0, 600, 400);
+		this.setLayout(new GridLayout(0,1));
+//		this.setLayout(new FlowLayout(FlowLayout.CENTER,10,10));
+		
+	}
+	
+	
+	/*public IProjection getProjection() {
+		return (IProjection) getProjPanel().getProjection();
+	}
+	
+	public void setProjection(IProjection proj) {
+		lastProj = proj;
+		getProjPanel().setProjection(proj);
+	}
+	
+	public String getProjectionAbrev(){
+		return  (String) getProjPanel().getProjection().getAbrev();
+	}*/	
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/dialog/CSSelectionDialog.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/dialog/TRSelectionDialog.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/dialog/TRSelectionDialog.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/dialog/TRSelectionDialog.java	(revision 25287)
@@ -0,0 +1,85 @@
+/*
+ * Created on 26-ene-2005
+ */
+package org.gvsig.crs.gui.dialog;
+
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.CRSSelectionTrDialog;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+
+/**
+ * @author Luis W. Sevilla (sevilla_lui@gva.es)
+ */
+public class TRSelectionDialog
+	extends CRSSelectionTrDialog implements IWindow {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	private boolean okPressed = false;
+	private IProjection lastProj = null;
+	boolean targetNad = false;
+	
+	/**
+	 * 
+	 */
+	public TRSelectionDialog(ICrs curproj) {
+		super(curproj);
+		this.init();		
+	}
+	/**
+	 * This method initializes this
+	 * 
+	 * @return void
+	 */
+	private void init() {		
+		this.setBounds(0, 0, 600, 500);
+		this.setLayout(new GridLayout(0,1));
+		this.setLayout(new FlowLayout(FlowLayout.CENTER,10,10));
+		
+				
+	}
+	
+	public boolean isOkPressed() { return okPressed; }
+	
+	public void setTargetNad(boolean tarNad){
+		targetNad = tarNad;
+	}
+	
+	public boolean getTargetNad(){
+		return targetNad;
+	}
+	
+	/**
+	 * @return
+	 */
+	public IProjection getProjection() {
+		return (IProjection) getProjPanel().getProjection();
+	}
+	/**
+	 * @param proj
+	 */
+	public void setProjection(IProjection proj) {
+		lastProj = proj;
+		getProjPanel().setProjection(proj);
+	}
+	
+	public String getProjectionName(){
+		return (String) getProjPanel().getProjection().getCrsWkt().getName();				
+	}
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle(PluginServices.getText(this, "crsAndTransformation"));
+   		//definir anchura y altura
+   		m_viewinfo.setWidth(650);
+   		m_viewinfo.setHeight(350);
+		return m_viewinfo;
+	}
+}
\ No newline at end of file

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/dialog/TRSelectionDialog.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/dialog/ImportNewCrsDialog.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/dialog/ImportNewCrsDialog.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/dialog/ImportNewCrsDialog.java	(revision 25287)
@@ -0,0 +1,187 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.dialog;
+
+import java.awt.BorderLayout;
+import java.awt.CardLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+
+import javax.swing.JButton;
+import javax.swing.JPanel;
+import javax.swing.ListSelectionModel;
+
+import org.gvsig.crs.gui.listeners.ImportNewCrsDialogListener;
+import org.gvsig.crs.gui.panels.EPSGpanel;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+
+/**
+ *  Clase que sirve para ir importando partes de un CRS en la creacion de
+ *  un crs definido por el usuario
+ *  
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ *
+ */
+
+public class ImportNewCrsDialog extends JPanel implements IWindow {
+
+	final String epsg = PluginServices.getText(this,"EPSG");	
+	private EPSGpanel epsgPanel = null;
+	private int crsCode = -1;
+	
+	private JPanel jPanelMain = null;	
+		
+	private JPanel jPanelButtons;
+	private JButton jButtonAccept;
+	private JButton jButonCancel;
+	
+	private String option = "";
+	
+	public ImportNewCrsDialog(String opt) {
+		epsgPanel = new EPSGpanel();
+		epsgPanel.connection();
+		setOption(opt);
+		initialize();
+		setListeners();
+	}
+	
+	public void initialize() {
+		this.setLayout(new GridLayout(0,1));
+		this.add(getJPanelMain(), BorderLayout.CENTER);
+		this.add(getJPanelButtons(), BorderLayout.SOUTH);
+	}
+	
+	public JPanel getJPanelMain(){
+		if (jPanelMain == null){
+			jPanelMain = new JPanel();
+			jPanelMain.setLayout(new CardLayout());
+			jPanelMain.setPreferredSize(new Dimension(525, 230));			
+			jPanelMain.add(epsg, epsgPanel);			
+		}
+		
+		return jPanelMain;		
+	}
+	
+	private JPanel getJPanelButtons() {
+		if(jPanelButtons == null) {
+			jPanelButtons = new JPanel();
+			jPanelButtons.setLayout(new FlowLayout(FlowLayout.RIGHT));
+			//jPanelButtons.setPreferredSize(new Dimension(525,50));
+			jPanelButtons.add(getJButtonCancel(),null);
+			jPanelButtons.add(getJButtonAccept(),null);			
+		}
+		return jPanelButtons;
+	}
+	
+	public JButton getJButtonCancel() {
+		if(jButonCancel == null) {
+			jButonCancel = new JButton();
+			jButonCancel.setText(PluginServices.getText(this,"cancel"));
+			jButonCancel.setPreferredSize(new Dimension(100,25));
+			jButonCancel.setMnemonic('C');
+			jButonCancel.setToolTipText("Cancel");			
+		}
+		return jButonCancel;
+	}
+	
+	public void cancelButton_actionPerformed(ActionEvent e) {		
+		 PluginServices.getMDIManager().closeWindow(this);
+	}
+	
+	public JButton getJButtonAccept() {
+		if(jButtonAccept == null) {
+			jButtonAccept = new JButton();
+			jButtonAccept.setText(PluginServices.getText(this,"ok"));
+			jButtonAccept.setPreferredSize(new Dimension(100,25));
+			jButtonAccept.setEnabled(false);
+			jButtonAccept.setMnemonic('A');
+			jButtonAccept.setToolTipText(PluginServices.getText(this,"ok"));			
+		}
+		return jButtonAccept;
+	}
+	
+	private void setListeners() {
+		ImportNewCrsDialogListener listener = new ImportNewCrsDialogListener(this);
+		
+		getJButtonCancel().addActionListener(listener);
+		getJButtonAccept().addActionListener(listener);
+		
+		ListSelectionModel rowSM = getEpsgPanel().getJTable().getSelectionModel();
+		rowSM.addListSelectionListener(listener);
+		
+		getEpsgPanel().getJTable().addMouseListener(listener);
+        
+	}
+	
+	public void setOption(String opt){
+		this.option = opt;
+	}
+	
+	public String getOption() {
+		return option;
+	}
+	
+	public EPSGpanel getEpsgPanel() {
+		return epsgPanel;
+	}
+	
+	public void setCode(int code) {
+		this.crsCode = code;
+	}
+	
+	public int getCode() {
+		return this.crsCode;
+	}
+		
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle(PluginServices.getText(this, "Importar")+" "+option);
+   		m_viewinfo.setWidth(525);
+   		m_viewinfo.setHeight(320);
+   		return m_viewinfo;
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/dialog/ImportNewCrsDialog.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/CRSMainTrPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/CRSMainTrPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/CRSMainTrPanel.java	(revision 25287)
@@ -0,0 +1,565 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui;
+
+import java.awt.BorderLayout;
+import java.awt.CardLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.ListSelectionModel;
+import javax.swing.border.EmptyBorder;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.CrsWkt;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.listeners.CRSMainTrPanelListener;
+import org.gvsig.crs.gui.panels.TransformationCapaPanel;
+import org.gvsig.crs.gui.panels.TransformationEpsgPanel;
+import org.gvsig.crs.gui.panels.TransformationManualPanel;
+import org.gvsig.crs.gui.panels.TransformationNadgridsPanel;
+import org.gvsig.crs.gui.panels.TransformationRecentsPanel;
+import org.gvsig.crs.gui.panels.TransformationVistaPanel;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+
+/**
+ * Clase que genera el panel de transformacin, en el que se incluye la
+ * eleccin del CRS de la capa, as como el de la posibilidad de poder
+ * asignarle una transformacin.
+ * 
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ * @author Luisa Marina Fernandez (luisam.fernandez@uclm.es)
+ *
+ */
+
+public class CRSMainTrPanel extends JPanel implements IWindow{
+
+	private static final long serialVersionUID = 1L;
+	
+	/*
+	 * Para mostrar los parametros si tenemos seleccionada transformacion
+	 */
+	boolean tra = false; 
+	boolean inAnApplet = true;
+	private boolean cancelYes = false;
+	private JButton jButtonCancel = null;
+	private JButton jButtonNext = null;
+	private JButton jButtonAccept = null;
+	private JButton jButtonBefore = null;
+	private JPanel jPanelButtons = null;
+	private JLabel jLabelTrans=null;
+	
+	boolean targetNad = false;	
+	
+	String crs_target = null;
+	CrsWkt crsWkt_target = null;
+		
+	int transformation_code = 0;	
+	
+	//**private JPanel panel = null;
+	CRSMainPanel viewPan = null;
+	
+	private JPanel jPanelMain = null;
+	private TransformationManualPanel manualTrPanel = null;
+	private boolean manual_tr = false;
+	private TransformationEpsgPanel epsgTrPanel = null;
+	private boolean epsg_tr = false;
+	private TransformationNadgridsPanel nadsTrPanel = null;
+	private boolean nads_tr = false;
+	private TransformationRecentsPanel recentsTrPanel = null;
+	private boolean recents_tr = false;
+	private TransformationVistaPanel vistaTrPanel=null;
+	private boolean vista_tr=false;
+	private TransformationCapaPanel capaTrPanel=null;
+	private boolean capa_tr=false;
+	private boolean compuesta_tr=false;
+	
+	
+	private boolean sin_tr = false;
+	private JPanel jPanelCombo = null;
+	private JComboBox jComboOptions = null;
+	
+	private IProjection crsfirst;
+	
+	private CRSMainPanel crsMainPanel;
+	private String newSelection;
+	String dataSource = "";
+	ICrs curProj = null;
+	
+	public CRSMainTrPanel(int target, CrsWkt crsWkttarget, ICrs proj) {			
+		curProj = proj;
+		crsMainPanel = new CRSMainPanel(target, curProj);		
+		viewPan = crsMainPanel;
+		
+		crs_target = crsWkttarget.getAuthority()[0]+":"+crsWkttarget.getAuthority()[1];
+		setCrsWkt_target(crsWkttarget);			
+		//Construir todos los paneles de transformaciones
+		manualTrPanel = new TransformationManualPanel();
+		epsgTrPanel = new TransformationEpsgPanel(crs_target);
+		nadsTrPanel = new TransformationNadgridsPanel(true);
+		recentsTrPanel = new TransformationRecentsPanel();
+		capaTrPanel=new TransformationCapaPanel(crs_target, this);
+		vistaTrPanel=new TransformationVistaPanel(crs_target, this);
+		
+		
+		/*
+		 * esta variable contendr tanto el panel utilizado en CRSViewPanel, como los paneles
+		 * que seran necesarios para realizar las transformaciones
+		 */
+		jPanelMain = new JPanel();
+		jPanelMain.setLayout(new CardLayout());		
+		jPanelMain.add("primero", viewPanel());
+		jPanelMain.add("manual", manualTrPanel);
+		jPanelMain.add("epsg", epsgTrPanel);
+		jPanelMain.add("nad", nadsTrPanel);
+		jPanelMain.add("recents", recentsTrPanel);
+		jPanelMain.add("vista",vistaTrPanel);
+		jPanelMain.add("capa",capaTrPanel);
+		
+		this.setLayout(new BorderLayout());	
+		this.add(jPanelMain, BorderLayout.CENTER);
+		this.add(getButtons(), BorderLayout.SOUTH);
+		
+		setListeners();
+		
+		setDataSource(crsMainPanel.getDataSource());
+		crsMainPanel.getCrsAndTransformationRecentsPanel().loadRecents(crsWkttarget, proj);
+	}
+	
+	/**
+	 * Este mtodo cargar todo el panel utilizado en dicho panel el
+	 *  CRSViewPanel y el combobox de las transformaciones
+	 */
+	private JPanel viewPanel(){
+		JPanel integro = new JPanel();
+		integro.setLayout(new BorderLayout());
+		integro.setBorder(BorderFactory.createTitledBorder(PluginServices.getText(this,"crsAndTransformation")));
+	
+		integro.add(viewPan.capa(),BorderLayout.CENTER);
+		//**integro.add(getJPanel(), null);
+		integro.add(getCombopanel(),BorderLayout.SOUTH);
+		return integro;
+	}
+	
+	/**
+	 * Define el panel en el que se integran el label y el combobox 
+	 * de transformaciones
+	 */
+	public JPanel getCombopanel(){
+		if (jPanelCombo == null){
+			jPanelCombo = new JPanel();
+			jPanelCombo.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
+			jPanelCombo.add(getJLabelTrans());
+			jPanelCombo.add(getJComboOptions());
+		}
+		
+		return jPanelCombo;
+	}
+	/**
+	 * Inicializa la etiqueta 'Seleccione Transformacion'
+	 * @return
+	 */
+	private JLabel getJLabelTrans(){
+		if (jLabelTrans==null){
+			jLabelTrans = new JLabel();
+			jLabelTrans.setPreferredSize(new Dimension(180, 25));
+			jLabelTrans.setText(PluginServices.getText(this, "seleccione_transformacion")+":");
+		}
+		return jLabelTrans;
+	}
+	/**
+	 * Inicializa el comboBox de Tansformaciones
+	 * @return
+	 */
+	public JComboBox getJComboOptions(){
+		if (jComboOptions == null){
+			String[] selection = {PluginServices.getText(this, "sin_transformacion"),
+					PluginServices.getText(this, "recents_transformation"),
+					PluginServices.getText(this, "transformacion_epsg"),
+					PluginServices.getText(this, "transformacion_manual"),
+					PluginServices.getText(this, "transformacion_compuesta"),
+					PluginServices.getText(this, "nadgrids")}; 
+			jComboOptions = new JComboBox(selection);
+			jComboOptions.setPreferredSize(new Dimension(180,25));	
+			jComboOptions.setEnabled(false);
+			jComboOptions.setEditable(false);			
+			jComboOptions.setSelectedIndex(0);
+			newSelection = (String) jComboOptions.getSelectedItem();			
+		}
+		return jComboOptions;
+	}
+	/**
+	 * Agrega los botones: Aceptar, cancelar, siguiente y finalizar
+	 * @return
+	 */
+	private JPanel getButtons() {
+		if(jPanelButtons == null) {
+			jPanelButtons = new JPanel();
+			jPanelButtons.setLayout(new FlowLayout(FlowLayout.RIGHT,10,10));
+			jPanelButtons.add(getJButtonCancel());
+			jPanelButtons.add(getJButtonBefore());
+			jPanelButtons.add(getJButtonNext());
+			jPanelButtons.add(getJButtonAccept());
+		}
+		return jPanelButtons;
+	}
+	/**
+	 * Inicializa el botn 'Anterior'
+	 * @return
+	 */
+	public JButton getJButtonBefore(){
+		if(jButtonBefore == null) {
+			jButtonBefore = new JButton();
+			jButtonBefore.setText(PluginServices.getText(this,"anterior"));
+			jButtonBefore.setMnemonic('B');			
+			jButtonBefore.setPreferredSize(new Dimension(100,25));			
+			jButtonBefore.setEnabled(false);
+		}
+		return jButtonBefore;
+	}
+	/**
+	 * Inicializa el botn 'Finalizar'
+	 * @return
+	 */
+	public JButton getJButtonAccept() {
+		if(jButtonAccept == null) {
+			jButtonAccept = new JButton();
+			jButtonAccept.setText(PluginServices.getText(this,"finalizar"));
+			jButtonAccept.setMnemonic('O');
+			jButtonAccept.setVisible(true);
+			jButtonAccept.setEnabled(false);
+			jButtonAccept.setPreferredSize(new Dimension(100,25));
+		}
+		return jButtonAccept;
+	}
+	/**
+	 * Inicializa el botn 'Siguiente'
+	 * @return
+	 */
+	public JButton getJButtonNext() {
+		if(jButtonNext == null) {
+			jButtonNext = new JButton();
+			jButtonNext.setText(PluginServices.getText(this,"siguiente"));
+			jButtonNext.setMnemonic('S');
+			jButtonNext.setVisible(true);
+			jButtonNext.setPreferredSize(new Dimension(100,25));
+		}
+		return jButtonNext;
+	}
+	/**
+	 * Inicializa el botn 'Cancelar'
+	 * @return
+	 */
+	public JButton getJButtonCancel() {
+		if(jButtonCancel == null) {
+			jButtonCancel = new JButton();
+			jButtonCancel.setText(PluginServices.getText(this,"cancel"));
+			jButtonCancel.setMnemonic('C');
+			jButtonCancel.setPreferredSize(new Dimension(100,25));
+		}
+		return jButtonCancel;
+	}
+	
+	public void setTargetNad(boolean tarNad){
+		targetNad = tarNad;
+	}
+	
+	public boolean getTargetNad(){
+		return targetNad;
+	}
+	
+	/*
+	 * revisar esta solucion
+	 */
+	public ICrs getProjection() {
+		if (sin_tr) {
+			ICrs crs;
+			try {
+				if (getDataSource().equals(PluginServices.getText(this,"EPSG"))){
+					//crs = new CrsFactory().getCRS(crsMainPanel.getEpsgPanel().getCodeCRS(),crsMainPanel.getEpsgPanel().getWKT());
+					crs = new CrsFactory().getCRS("EPSG:"+crsMainPanel.getEpsgPanel().getCodeCRS());
+				}
+				else if (getDataSource().equals(PluginServices.getText(this,"IAU2000"))){
+					//crs = new CrsFactory().getCRS(crsMainPanel.getIauPanel().getCodeCRS(),crsMainPanel.getIauPanel().getWKT());
+					crs = new CrsFactory().getCRS("IAU2000:"+crsMainPanel.getIauPanel().getCodeCRS());
+				} 
+				else if (getDataSource().equals(PluginServices.getText(this,"recientes"))){
+					//crs = new CrsFactory().getCRS(crsMainPanel.getRecentsPanel().getCodeCRS(),crsMainPanel.getRecentsPanel().getCrs().getWKT());
+					crs = new CrsFactory().getCRS(crsMainPanel.getCrsAndTransformationRecentsPanel().getAuthority());
+				} 
+				else if (getDataSource().equals(PluginServices.getText(this,"ESRI"))){
+					//crs = new CrsFactory().getCRS(crsMainPanel.getEsriPanel().getCodeCRS(),crsMainPanel.getEsriPanel().getWKT());
+					crs = new CrsFactory().getCRS("ESRI:"+crsMainPanel.getEsriPanel().getCodeCRS());
+				} 
+				else if (getDataSource().equals(PluginServices.getText(this,"newCRS"))){
+					crs = new CrsFactory().getCRS("USR:"+crsMainPanel.getNewCrsPanel().getCodeCRS());
+				}
+				else {
+					sin_tr = false;
+					return null;
+				}
+				sin_tr = false;
+				return crs;
+			} catch (CrsException e) {
+				e.printStackTrace();
+			}
+			return null;
+		}		
+		return (ICrs) crsfirst;		
+	}
+	
+	public void setProjection(IProjection proj) {
+		crsfirst = proj;
+	}
+	
+	/**
+	 * Mtodo para aplicarle los eventos necesarios en el panel actual. La
+	 * definicin de estos listeners estarn en la clase CRSMainTrPanelListener
+	 *
+	 */
+	private void setListeners(){
+
+		CRSMainTrPanelListener listener = new CRSMainTrPanelListener(this);
+		
+		jButtonAccept.addActionListener(listener);
+		jButtonBefore.addActionListener(listener);
+		jButtonCancel.addActionListener(listener);
+		jButtonNext.addActionListener(listener);
+		crsMainPanel.getJComboOptions().addItemListener(listener);
+		getJComboOptions().addActionListener(listener);
+		getRecentsTrPanel().getJButtonInfo().addActionListener(listener);
+		
+		ListSelectionModel rowSM = crsMainPanel.getEpsgPanel().getJTable().getSelectionModel();
+		rowSM.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMiau = crsMainPanel.getIauPanel().getJTable().getSelectionModel();
+		rowSMiau.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMrecents = crsMainPanel.getCrsAndTransformationRecentsPanel().getJTable().getSelectionModel();
+		rowSMrecents.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMesri = crsMainPanel.getEsriPanel().getJTable().getSelectionModel();
+		rowSMesri.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMusr = crsMainPanel.getNewCrsPanel().getJTable().getSelectionModel();
+		rowSMusr.addListSelectionListener(listener);
+		
+		crsMainPanel.getEsriPanel().getJTable().addMouseListener(listener);
+		crsMainPanel.getEpsgPanel().getJTable().addMouseListener(listener);
+        crsMainPanel.getCrsAndTransformationRecentsPanel().getJTable().addMouseListener(listener);
+        crsMainPanel.getIauPanel().getJTable().addMouseListener(listener);
+        crsMainPanel.getNewCrsPanel().getJTable().addMouseListener(listener);
+        getEpsgTrPanel().getJTable().addMouseListener(listener);
+        getRecentsTrPanel().getJTable().addMouseListener(listener);
+        
+        ListSelectionModel rowSMEpsgTr = getEpsgTrPanel().getJTable().getSelectionModel();
+		rowSMEpsgTr.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMRecentsTr = getRecentsTrPanel().getJTable().getSelectionModel();
+		rowSMRecentsTr.addListSelectionListener(listener);
+		
+		getNadsTrPanel().getJComboNadFile().addItemListener(listener);
+		
+		getManualTrPanel().getTx_Translation().addKeyListener(listener);
+		getManualTrPanel().getTy_Translation().addKeyListener(listener);
+		getManualTrPanel().getTz_Translation().addKeyListener(listener);
+		getManualTrPanel().getTx_Rotation().addKeyListener(listener);
+		getManualTrPanel().getTy_Rotation().addKeyListener(listener);
+		getManualTrPanel().getTz_Rotation().addKeyListener(listener);
+		getManualTrPanel().getTscale().addKeyListener(listener);
+	}
+		
+	public void setDataSource(String sour){
+		dataSource = sour;
+	}
+	
+	public String getDataSource(){
+		return crsMainPanel.getDataSource();
+	}
+	
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle(PluginServices.getText(this,"crsview"));
+		return m_viewinfo;
+	}
+
+	public CRSMainPanel getCrsMainPanel() {
+		return crsMainPanel;
+	}
+
+	public TransformationEpsgPanel getEpsgTrPanel() {
+		return epsgTrPanel;
+	}
+
+	public TransformationManualPanel getManualTrPanel() {
+		return manualTrPanel;
+	}
+
+	public TransformationNadgridsPanel getNadsTrPanel() {
+		return nadsTrPanel;
+	}
+	
+	public TransformationRecentsPanel getRecentsTrPanel() {
+		return recentsTrPanel;
+	}
+
+	public boolean isEpsg_tr() {
+		return epsg_tr;
+	}
+
+	public boolean isManual_tr() {
+		return manual_tr;
+	}
+
+	public boolean isNads_tr() {
+		return nads_tr;
+	}
+	
+	public boolean isRecents_tr() {
+		return recents_tr;
+	}
+
+	public boolean isSin_tr() {
+		return sin_tr;
+	}
+
+	public void setEpsg_tr(boolean epsg_tr) {
+		this.epsg_tr = epsg_tr;
+	}
+
+	public void setManual_tr(boolean manual_tr) {
+		this.manual_tr = manual_tr;
+	}
+
+	public void setNads_tr(boolean nads_tr) {
+		this.nads_tr = nads_tr;
+	}
+	
+	public void setRecents_tr(boolean recents_tr) {
+		this.recents_tr = recents_tr;
+	}
+
+	public void setSin_tr(boolean sin_tr) {
+		this.sin_tr = sin_tr;
+	}
+
+	public boolean isCancelYes() {
+		return cancelYes;
+	}
+
+	public void setCancelYes(boolean cancelYes) {
+		this.cancelYes = cancelYes;
+	}
+
+	public IProjection getCrsfirst() {
+		return crsfirst;
+	}
+
+	public JPanel getJPanelMain() {
+		return jPanelMain;
+	}
+
+	public String getNewSelection() {
+		return newSelection;
+	}
+
+	public void setNewSelection(String newSelection) {
+		this.newSelection = newSelection;
+	}
+	
+	public CrsWkt getCrsWkt_target() {
+		return crsWkt_target;
+	}
+	
+	public void setCrsWkt_target(CrsWkt crsWkt_target) {
+		this.crsWkt_target = crsWkt_target;
+	}
+
+	public TransformationVistaPanel getVistaTrPanel() {
+		return vistaTrPanel;
+	}
+
+	public TransformationCapaPanel getCapaTrPanel() {
+		return capaTrPanel;
+	}
+
+	public boolean isVista_tr() {
+		return vista_tr;
+	}
+
+	public boolean isCapa_tr() {
+		return capa_tr;
+	}
+
+	public boolean isCompuesta_tr() {
+		return compuesta_tr;
+	}
+
+	public void setCapa_tr(boolean capa_tr) {
+		this.capa_tr = capa_tr;
+	}
+
+	public void setCompuesta_tr(boolean compuesta_tr) {
+		this.compuesta_tr = compuesta_tr;
+	}
+
+	public void setVista_tr(boolean vista_tr) {
+		this.vista_tr = vista_tr;
+	}
+
+	/*public EpsgConnection getConnection() {
+		return connection;
+	}
+
+	public void setConnection(EpsgConnection connect) {
+		this.connection = connect;
+	}*/
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/CRSMainTrPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/CrsAndTransformationRecentsPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/CrsAndTransformationRecentsPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/CrsAndTransformationRecentsPanel.java	(revision 25287)
@@ -0,0 +1,391 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
+import java.util.Date;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.ListSelectionModel;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.CrsWkt;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.persistence.CrsData;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+import org.gvsig.crs.persistence.RecentTrsPersistence;
+import org.gvsig.crs.persistence.TrData;
+
+import com.iver.andami.PluginServices;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+public class CrsAndTransformationRecentsPanel extends JPanel implements ActionListener {
+
+	/**
+	 * Panel para la selección del CRS de la vista y la transformacion si hubiera
+	 * alguna entre el crs elegido para la capa con algun crs de destino que
+	 * haya sido utilizada recientemente
+	 * 
+	 * @author Jos� Luis G�mez Mart�nez (JoseLuis.Gomez@uclm.es)
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	
+	public JTable jTable = null;
+	private JScrollPane jScrollPane = null;
+	private JButton infoCrs=null;
+	public DefaultTableModel dtm = null;
+	public TableSorter sorter = null;
+	private CrsData crsDataArray[] = null;
+	private TrData crsTrDataArray[] = null;
+	
+	public int selectedRowTable = -1;
+	private String authority = null;
+	private int codeCRS = -1;
+	private ICrs crs = null;
+	private ArrayList recents = null;
+		
+	public CrsAndTransformationRecentsPanel() {
+		super();
+		initialize();
+	}
+	
+	private void initialize(){
+		this.setLayout(new BorderLayout());
+		JPanel p=new JPanel(new FlowLayout(FlowLayout.LEFT,15,15));
+		p.add(getJLabel());
+		this.add(p, BorderLayout.NORTH);
+		this.add(getJScrollPane(), BorderLayout.CENTER);
+		JPanel pSouth=new JPanel(new FlowLayout(FlowLayout.RIGHT,5,5));
+		pSouth.add(getInfoCrs());
+		this.add(pSouth,BorderLayout.SOUTH);
+	}
+	
+	private JLabel getJLabel(){
+		JLabel label = new JLabel();
+		label.setText(PluginServices.getText(this, "ultimos_crs_utilizados")+":");
+		return label;
+	}
+	/**
+	 * Inicializa el panel que contiene la tabla con los crs
+	 * @return
+	 */
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane();
+			jScrollPane.setBorder(
+				    BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(3,3,3,3),jScrollPane.getBorder()));
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+	/**
+	 * Inicializa la tabla que contiene los crs
+	 * @return
+	 */
+	public JTable getJTable() {
+		if (jTable == null) {
+			String[] columnNames= {PluginServices.getText(this,"fuente"),
+					PluginServices.getText(this,"codigo"),
+					PluginServices.getText(this,"nombre"),
+					PluginServices.getText(this,"transformation")};
+			Object[][]data = {};			
+			dtm = new DefaultTableModel(data, columnNames)
+			 {
+				private static final long serialVersionUID = 1L;
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}
+				/*
+				 * metodo necesario para cuando utilizamos tablas ordenadas
+				 * ya que sino al ordenar por algun campo no se queda con el orden
+				 * actual al seleccionar una fila (non-Javadoc)
+				 * @see javax.swing.table.TableModel#getColumnClass(int)
+				 */
+				public Class getColumnClass(int column)
+				{
+					return getValueAt(0, column).getClass();
+				}
+				};
+			sorter = new TableSorter(dtm);			
+
+			jTable = new JTable(sorter);
+			sorter.setTableHeader(jTable.getTableHeader());
+			jTable.setCellSelectionEnabled(false);
+			jTable.setRowSelectionAllowed(true);
+			jTable.setColumnSelectionAllowed(false);
+			jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			TableColumn column = null;
+			for (int i = 0; i < columnNames.length; i++) {
+			    column = jTable.getColumnModel().getColumn(i);
+			    if (i == 0) {
+			        column.setPreferredWidth(60); //code column is shorter			     	
+			    }else if (i == 1) {
+			    	column.setPreferredWidth(60);
+			    }
+			    else {			    
+			        column.setPreferredWidth(240);
+			    }
+			}	
+		}
+		return jTable;		
+	}
+	
+	/**
+	 * Inicializa el botn que obtiene la informacin del CRS
+	 * @return
+	 */
+	public JButton getInfoCrs() {
+		if(infoCrs == null) {
+			infoCrs = new JButton();
+			infoCrs.setPreferredSize(new Dimension(85,20));
+			infoCrs.setText(PluginServices.getText(this,"infocrs"));
+			infoCrs.setMnemonic('I');
+			infoCrs.setEnabled(false);
+			infoCrs.setToolTipText(PluginServices.getText(this,"more_info"));
+			infoCrs.addActionListener(this);
+		}
+		return infoCrs;
+	}
+	public ICrs getProjection() {		
+		return crs;
+	}
+	
+	public void setCodeCRS(int code) {
+		codeCRS = code;
+	}
+	
+	public int getCodeCRS() {
+		return codeCRS;
+	}
+	
+	public void setProjection(IProjection crs) {
+		//setCrs((ICrs) crs);
+	}
+	
+	/**
+	 * Carga en la tabla los CRSs leidos del sistema de persistencia.
+	 */
+	public void loadRecents(CrsWkt crsWkttarget, ICrs curCrs){
+		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+		crsTrDataArray = trPersistence.getArrayOfTrData();
+		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+		CrsData crsData = new CrsData(curCrs.getCrsWkt().getAuthority()[0], curCrs.getCode(),curCrs.getCrsWkt().getName());
+		if (curCrs.getSourceTransformationParams() == null && curCrs.getTargetTransformationParams() == null)
+			persistence.addCrsData(crsData);
+		crsDataArray = persistence.getArrayOfCrsData();	
+		boolean available = true;
+		
+		// Eliminar filas en cada nueva bsqueda
+		int numRow = dtm.getRowCount();
+		while (numRow != 0) {
+			numRow = numRow - 1;
+			dtm.removeRow(numRow);
+		}
+		
+		/**
+		 * Tendremos que hacer la distincion de si lleva o no transformacion
+		 * para la persistencia de la misma.
+		 */
+		int initialCrsTr = crsTrDataArray.length-1;
+		int initialCrs = crsDataArray.length-1;
+		
+		if (curCrs.getSourceTransformationParams() != null || curCrs.getTargetTransformationParams() != null) {
+			initialCrsTr = crsTrDataArray.length-1;
+			Object first[] ={crsTrDataArray[initialCrsTr].getCrsSource().split(":")[0],crsTrDataArray[initialCrsTr].getCrsSource().split(":")[1],crsTrDataArray[initialCrsTr].getName(),crsTrDataArray[initialCrsTr].getAuthority()+":"+crsTrDataArray[initialCrsTr].getCode()+" <--> "+crsTrDataArray[initialCrsTr].getDetails()};
+			if (crsTrDataArray[initialCrsTr].getAuthority().equals(PluginServices.getText(this, "USR"))) {
+				available = isUSR(crsTrDataArray[initialCrsTr].getCode());
+			}
+			if (available) {
+				dtm.addRow(first);
+				initialCrsTr = crsTrDataArray.length-2;
+			} else {
+				available = true;
+			}
+		}		
+		else {
+			initialCrs = crsDataArray.length-1;
+			Object first[] ={crsDataArray[initialCrs].getAuthority(),Integer.toString(crsDataArray[initialCrs].getCode()),crsDataArray[initialCrs].getName(),PluginServices.getText(this, "sin_transformacion")};
+			if (crsDataArray[initialCrs].getAuthority().equals(PluginServices.getText(this, "USR"))) {
+				available = isUSR(crsDataArray[initialCrs].getCode());
+			}
+			if (available) {
+				dtm.addRow(first);			
+				initialCrs =crsDataArray.length-2;
+			} else {
+				available = true;
+			}
+		}			
+		
+		int iRowCrs = initialCrs;
+		int iRowTr = initialCrsTr;
+		
+		while (iRowCrs>=0 && iRowTr>=0) {
+			if (crsDataArray[iRowCrs].getDate().after(crsTrDataArray[iRowTr].getDate())){
+				if (crsDataArray[iRowCrs].getAuthority().equals(PluginServices.getText(this, "USR"))) {
+					available = isUSR(crsDataArray[iRowCrs].getCode());
+				}
+				if (available) {
+					Object row[] ={crsDataArray[iRowCrs].getAuthority(),Integer.toString(crsDataArray[iRowCrs].getCode()),crsDataArray[iRowCrs].getName(),PluginServices.getText(this, "sin_transformacion")};
+					dtm.addRow(row);
+				} else {
+					available = true;
+				}
+				iRowCrs--;
+			} else {
+				String target = crsWkttarget.getAuthority()[0]+":"+crsWkttarget.getAuthority()[1];
+				String crsSource = ((String)crsTrDataArray[iRowTr].getCrsSource());			
+				String crsTarget = ((String)crsTrDataArray[iRowTr].getCrsTarget());			
+				if(target.equals(crsTarget)){
+					if (crsTrDataArray[iRowTr].getAuthority().equals(PluginServices.getText(this, "USR"))) {
+						available = isUSR(crsTrDataArray[iRowTr].getCode());
+					}
+					if (available) {
+						Object row[] = {crsSource.split(":")[0],crsSource.split(":")[1],crsTrDataArray[iRowTr].getName(),crsTrDataArray[iRowTr].getAuthority()+":"+crsTrDataArray[iRowTr].getCode()+" <--> "+crsTrDataArray[iRowTr].getDetails()};
+						dtm.addRow(row);
+					} else {
+						available = true;
+					}
+				}
+				iRowTr--;
+			}
+		}
+		if (iRowTr>=0) {
+			for (;iRowTr>=0;iRowTr--){
+				String target = crsWkttarget.getAuthority()[0]+":"+crsWkttarget.getAuthority()[1];
+				String crsSource = ((String)crsTrDataArray[iRowTr].getCrsSource());			
+				String crsTarget = ((String)crsTrDataArray[iRowTr].getCrsTarget());			
+				if(target.equals(crsTarget)){					
+					if (crsTrDataArray[iRowTr].getAuthority().equals(PluginServices.getText(this, "USR"))) {
+						available = isUSR(crsTrDataArray[iRowTr].getCode());
+					}
+					if (available) {
+						Object row[] = {crsSource.split(":")[0],crsSource.split(":")[1],crsTrDataArray[iRowTr].getName(),crsTrDataArray[iRowTr].getAuthority()+":"+crsTrDataArray[iRowTr].getCode()+" <--> "+crsTrDataArray[iRowTr].getDetails()};
+						dtm.addRow(row);
+					} else {
+						available = true;
+					}
+				}
+			}
+		}
+		else {
+			for (;iRowCrs>=0;iRowCrs--){
+				if (crsDataArray[iRowCrs].getAuthority().equals(PluginServices.getText(this, "USR"))) {
+					available = isUSR(crsDataArray[iRowCrs].getCode());
+				}
+				if (available) {
+					Object row[] ={crsDataArray[iRowCrs].getAuthority(),Integer.toString(crsDataArray[iRowCrs].getCode()),crsDataArray[iRowCrs].getName(),PluginServices.getText(this, "sin_transformacion")};
+					dtm.addRow(row);
+				} else {
+					available = true;
+				}
+			}
+		}
+						
+		/*
+		/*Seleccionar el primer registro.
+		 */
+		int numr = dtm.getRowCount();
+		if (numr != 0 )
+			this.getJTable().setRowSelectionInterval(0,0);
+	}
+	
+	/**
+	 * metodo que nos indica si un crs de usuario esta o no en la base de datos de usuario
+	 * @param code
+	 * @return
+	 */
+	public boolean isUSR(int code) {
+		NewCRSPanel usr = new NewCRSPanel();		
+		return usr.isInBD(code);
+	}
+
+	public ICrs getCrs() {
+		return crs;
+	}
+	
+	public void initCrs(){
+		
+		selectedRowTable = getJTable().getSelectedRow();		        			        	
+    	Integer.parseInt((String)sorter.getValueAt(selectedRowTable,1));
+		setAuthority((String)sorter.getValueAt(selectedRowTable,0)+":"+(String)sorter.getValueAt(selectedRowTable,1));
+    	
+		codeCRS = Integer.parseInt((String)sorter.getValueAt(selectedRowTable,1));
+		try {
+			crs = new CrsFactory().getCRS(getAuthority());
+		} catch (CrsException e) {
+			e.printStackTrace();
+		}
+	}
+	
+	public String getAuthority() {
+		return authority;
+	}
+	
+	public void setAuthority(String aut) {
+		this.authority = aut;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		/*Si el objeto que genera el evento es el JButton 'InfoCrs'
+		se muestra la informacin ralicionada con el Crs seleccionado en la tabla*/
+		if (e.getSource() == this.getInfoCrs()) {
+			String[] aut = getAuthority().split(":");			
+			InfoCRSPanel info = new InfoCRSPanel(aut[0], getCodeCRS(), (String)getJTable().getValueAt(getJTable().getSelectedRow(), 3));
+			PluginServices.getMDIManager().addWindow(info);
+		}
+		
+	}	
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/CrsAndTransformationRecentsPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationEpsgPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationEpsgPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationEpsgPanel.java	(revision 25287)
@@ -0,0 +1,729 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+
+import javax.swing.BorderFactory;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextArea;
+import javax.swing.ListSelectionModel;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.persistence.RecentTrsPersistence;
+import org.gvsig.crs.persistence.TrData;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+import es.idr.teledeteccion.connection.EpsgConnection;
+import es.idr.teledeteccion.connection.Query;
+
+/**
+ * Clase para la creacin y el manejo del panel de transformacin
+ * para el caso de la EPSG
+ * 
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ * @author Luisa Marina Fernndez (luisam.fernandez@uclm.es)
+ *
+ */
+public class TransformationEpsgPanel extends JPanel  {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	private IProjection firstProj;
+	
+	String[] transformations = {"9603", "9606", "9607", "9613", "9615", "9633"};
+	
+	private int transformation_code = -1;
+	private String[] values;
+	private String params = "+towgs84=";
+	
+	private JTable transformationTable;	
+	private JScrollPane jScrollPane = null;
+	public boolean inverseTranformation = false;
+	
+	public EpsgConnection connect = null;	
+	public int crs_target = -1;
+	
+	public DefaultTableModel dtm = null;
+	
+	private int crs_source_code;
+	private String cadWKT = "";
+	private ListSelectionModel lsm2 = null;
+	public int selectedRowTable = -1;
+	boolean tra = false;
+	int real_target;
+	String authority_target = "";
+	
+	private JTextArea info;	
+	public TableSorter sorter = null;
+	
+	public TransformationEpsgPanel(String aut_target) {
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		String[] authority_target = aut_target.split(":");
+		setAuthorityTarget(authority_target[0]);
+		int target = Integer.parseInt(authority_target[1]);			
+		real_target = target;
+		String sentence = "SELECT source_geogcrs_code, coord_ref_sys_kind " +
+			"FROM epsg_coordinatereferencesystem " +
+			"WHERE coord_ref_sys_code = "+ target ;
+		ResultSet result = Query.select(sentence,connect.getConnection());		
+		try {
+			result.next();
+			String kind = result.getString("coord_ref_sys_kind");
+			if (kind.equals("projected"))
+				target = result.getInt("source_geogcrs_code");
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}        
+		crs_target = target;
+		initialize();
+	}
+	
+	private void initialize(){
+			setLayout(new BorderLayout(1,50));
+			setBorder(
+				    BorderFactory.createCompoundBorder(
+							BorderFactory.createCompoundBorder(
+									BorderFactory.createTitledBorder("Transformacion EPSG"),
+									BorderFactory.createEmptyBorder(12,2,80,2)),
+									getBorder()));
+			add(getJScrollPane(),BorderLayout.CENTER);
+	}
+	
+	private Component getInfo() {
+		if (info == null){
+			info = new JTextArea();
+			info.setLineWrap(true);
+			info.setWrapStyleWord(true);
+			info.setPreferredSize(new Dimension(400, 240));
+			info.setEditable(false);
+			info.append(getWKT());
+		}
+		info.setText(getWKT());
+		return info;
+	}
+	
+	public JTable getJTable() {
+		if (transformationTable == null) {
+			String[] columnNames= {PluginServices.getText(this,"code_transformation"),
+					PluginServices.getText(this,"name_transformation"),
+					PluginServices.getText(this,"type_transformation"),
+					PluginServices.getText(this,"source_crs"),
+					PluginServices.getText(this,"target_crs"),
+					PluginServices.getText(this,"description_area")};
+			Object[][]data = {};
+			dtm = new DefaultTableModel(data, columnNames)
+			{
+				private static final long serialVersionUID = 1L;
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}
+				/*
+				 * metodo necesario para cuando utilizamos tablas ordenadas
+				 * ya que sino al ordenar por algun campo no se queda con el orden
+				 * actual al seleccionar una fila (non-Javadoc)
+				 * @see javax.swing.table.TableModel#getColumnClass(int)
+				 */
+				public Class getColumnClass(int column)
+				{
+					return getValueAt(0, column).getClass();
+				}
+			};
+			sorter = new TableSorter(dtm);			
+
+			transformationTable = new JTable(sorter);
+			sorter.setTableHeader(transformationTable.getTableHeader());	
+			transformationTable.setCellSelectionEnabled(false);
+			transformationTable.setRowSelectionAllowed(true);
+			transformationTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
+			transformationTable.setColumnSelectionAllowed(false);
+			transformationTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			TableColumn column = null;
+			for (int i = 0; i < columnNames.length; i++) {
+			    column = transformationTable.getColumnModel().getColumn(i);
+			    if (i == 0 || i == 3 || i == 4) {
+			        column.setPreferredWidth(40);			     	
+			    }else if (i == 2) {
+			    	column.setPreferredWidth(80);
+			    }
+			    else {			    
+			        column.setPreferredWidth(160);
+			    }
+			}			
+		}
+		return transformationTable;
+	}
+	
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane();
+			jScrollPane.setPreferredSize(new Dimension(525,200));
+			jScrollPane.setBorder(
+				    BorderFactory.createCompoundBorder(
+					BorderFactory.createCompoundBorder(
+							BorderFactory.createTitledBorder(PluginServices.getText(this,"transformations")),
+							BorderFactory.createEmptyBorder(5,5,5,5)),
+							jScrollPane.getBorder()));
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+		
+	/**
+	 * Busca las tranformaciones directas entre el CRS de la capa y el CRS de la
+	 * vista.
+	 * @param crsCode
+	 */
+	private void callTransformation(int crsCode){		
+        
+        
+        String sentence = "SELECT source_geogcrs_code " +
+						"FROM epsg_coordinatereferencesystem " +
+						"WHERE coord_ref_sys_code = "+ crsCode ;
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		int source = 0;
+		try {
+			result.next();
+			source = result.getInt("source_geogcrs_code");
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}
+		
+        ResultSet result2 = null;
+        ResultSet result3 = null;
+        if (source != 0){
+        		crsCode = source;		            	
+        }
+        
+        ArrayList codecs = new ArrayList();
+        codecs.add(String.valueOf(crsCode));		
+		
+		for (int j=0; j< codecs.size(); j++){
+			sentence = "SELECT coord_op_code, coord_op_name, coord_op_type, source_crs_code, target_crs_code, area_of_use_code, coord_op_method_code " +
+					"FROM epsg_coordoperation " +                        
+					"WHERE source_crs_code = " + codecs.get(j) + "AND target_crs_code = " + crs_target;
+
+            result = Query.select(sentence,connect.getConnection());	
+            
+            try {
+            	while(result.next()) {
+            		Object[]data = new Object[6];				            		
+            		data[0] = String.valueOf(result.getInt("coord_op_code"));
+            		data[1] = result.getString("coord_op_name");
+            		data[2] = result.getString("coord_op_type");
+            		data[3] = String.valueOf(result.getInt("source_crs_code"));
+            		data[4] = String.valueOf(result.getInt("target_crs_code"));
+            		/*codecs.add(data[4]);
+            		codecs = deleteItems(codecs);*/
+            		
+            		int aouc = Integer.parseInt(result.getString("area_of_use_code"));
+					
+					sentence = "SELECT area_of_use FROM epsg_area " +
+									"WHERE area_code = "+ aouc ;
+					
+					result2 = Query.select(sentence,connect.getConnection());
+            		while (result2.next())
+            			data[5] = result2.getString("area_of_use");
+            		
+            		String coord_op_method = result.getString("coord_op_method_code");				            		
+	            		
+            		sentence = "SELECT reverse_op FROM epsg_coordoperationmethod "+
+            					"WHERE coord_op_method_code LIKE " + coord_op_method;
+            		result3 = Query.select(sentence,connect.getConnection());
+            		
+            		while(result3.next()){
+            			if (Integer.parseInt(result3.getString("reverse_op")) == 1){
+            				for (int i=0; i< transformations.length; i++){
+            					if (coord_op_method.equals(transformations[i])){
+            						dtm.addRow(data);
+            					}
+            				}            				
+            			}
+            		}
+            	}
+            } 	
+            catch (SQLException e1) {
+            	e1.printStackTrace();
+            }
+		}
+	}
+	
+	/**
+	 * Mtodo auxiliar para eliminar valores repetidos dentro del ArrayList
+	 * de codecs.
+	 * @param codecs
+	 * @return
+	 */
+	private ArrayList deleteItems(ArrayList codecs) {
+		ArrayList cod = new ArrayList();
+		boolean equal = false;
+		for (int i = 0; i< codecs.size(); i++){
+			String c = (String) codecs.get(i);
+			for (int j = 0; j<cod.size(); j++){
+				if (cod.get(j).equals(c)){
+					equal = true;
+				}
+			}
+			if (!equal){
+				cod.add(c);				
+			}
+			equal = false;
+		}
+		return cod;
+	}
+	
+	/**
+	 * Busca las tranformaciones inversas entre el CRS de la capa y el CRS de la
+	 * vista. Aquellas cuyo valor de reverse_op sean iguales a uno.
+	 * @param crsCode
+	 */
+	private void callInverseTransformation(int crsCode){
+		//inverseTranformation = true;
+        
+        String sentence = "SELECT source_geogcrs_code " +
+						"FROM epsg_coordinatereferencesystem " +
+						"WHERE coord_ref_sys_code = "+ crsCode ;
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		int source = 0;
+		try {
+			result.next();
+			source = result.getInt("source_geogcrs_code");
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}
+		
+        ResultSet result2 = null;
+        ResultSet result3 = null;
+        if (source != 0){
+        		crsCode = source;		            	
+        }
+        
+        ArrayList codecs = new ArrayList();
+        codecs.add(String.valueOf(crsCode));
+       
+		codecs = deleteItems(codecs);
+		
+		for (int j=0; j< codecs.size(); j++){
+			sentence = "SELECT coord_op_code, coord_op_name, coord_op_type, source_crs_code, target_crs_code, area_of_use_code, coord_op_method_code " +
+					"FROM epsg_coordoperation " +                        
+					"WHERE source_crs_code = " + codecs.get(j) + "AND target_crs_code = " + crs_target;
+
+            result = Query.select(sentence,connect.getConnection());	
+            
+            try {
+            	while(result.next()) {
+            		Object[]data = new Object[6];				            		
+            		data[0] = String.valueOf(result.getInt("coord_op_code"));
+            		data[1] = result.getString("coord_op_name");
+            		data[2] = result.getString("coord_op_type");
+            		data[4] = String.valueOf(result.getInt("source_crs_code"));
+            		data[3] = String.valueOf(result.getInt("target_crs_code"));
+            		/*codecs.add(data[4]);
+            		codecs = deleteItems(codecs);*/
+            		
+            		int aouc = Integer.parseInt(result.getString("area_of_use_code"));
+					
+					sentence = "SELECT area_of_use FROM epsg_area " +
+									"WHERE area_code = "+ aouc ;
+					
+					result2 = Query.select(sentence,connect.getConnection());
+            		while (result2.next())
+            			data[5] = result2.getString("area_of_use");
+            		
+            		String coord_op_method = result.getString("coord_op_method_code");				            		
+	            		
+            		sentence = "SELECT reverse_op FROM epsg_coordoperationmethod "+
+            					"WHERE coord_op_method_code LIKE " + coord_op_method;
+            		result3 = Query.select(sentence,connect.getConnection());
+            		
+            		while(result3.next()){
+            			if (Integer.parseInt(result3.getString("reverse_op")) == 1){
+            				for (int i=0; i< transformations.length; i++){
+            					if (coord_op_method.equals(transformations[i])){
+            						dtm.addRow(data);
+            					}
+            				}
+            			}
+            		}
+            	}
+            } 	
+            catch (SQLException e1) {
+            	e1.printStackTrace();
+            }
+		}
+	}
+	
+	/**
+	 * 
+	 * @param val
+	 */
+	public void setValues(String[] val) {
+		values = val;
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public String[] getValues() {
+		return values;
+	}
+	
+	/**
+	 * 
+	 * @param t_cod
+	 */
+	public void setTrasformation_code(int t_cod) {
+		transformation_code = t_cod;
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public int getTransformation_code() {
+		return transformation_code;
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public ICrs getProjection() {
+		params += values[0];
+		for(int i = 1; i < values.length; i++)
+			params +=","+values[i];
+		try {
+			//ICrs crs = new CrsFactory().getCRS(crs_source_code,cadWKT,params);
+			ICrs crs = new CrsFactory().getCRS("EPSG:"+crs_source_code);
+			crs.setTransformationParams(params,null);
+			return crs;
+		} catch (org.gvsig.crs.CrsException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	/**
+	 * 
+	 * @param proj
+	 */
+	public void setProjection(IProjection proj) {
+		firstProj = proj;
+	}
+	
+	/**
+	 * 
+	 * @param cad
+	 */
+	public void setWKT(String cad){
+		cadWKT = cad;
+		getInfo();
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public String getWKT(){
+		return cadWKT;
+	}
+	
+	/**
+	 * Indica el CRS que se utilizar en la capa y busca las transformaciones
+	 * directas e inversas que pueda tener
+	 * @param code
+	 */
+	public void setSource(String fuente, int code){
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		inverseTranformation = false;
+		crs_source_code = code;
+		int numRow = dtm.getRowCount();
+		
+        while (numRow != 0) {
+			numRow = numRow - 1;
+			dtm.removeRow(numRow);
+		}
+		if (PluginServices.getText(this, fuente).equals(PluginServices.getText(this, "EPSG")) && PluginServices.getText(this, getAuthorityTarget()).equals(PluginServices.getText(this, "EPSG"))) {
+			callTransformation(crs_source_code);
+			
+			int new_target = crs_target;
+			int base_target = code;
+			String sentence = "SELECT source_geogcrs_code, coord_ref_sys_kind " +
+						"FROM epsg_coordinatereferencesystem " +
+						"WHERE coord_ref_sys_code = "+ code;
+			ResultSet result = Query.select(sentence,connect.getConnection());		
+			try {
+				result.next();
+				String kind = result.getString("coord_ref_sys_kind");
+				if (kind.equals("projected"))
+					base_target = result.getInt("source_geogcrs_code");
+			} catch (SQLException e1) {
+				e1.printStackTrace();
+			}        
+			crs_target = base_target;
+			
+			crs_source_code = new_target;
+			callInverseTransformation(crs_source_code);
+			crs_target = new_target;
+			crs_source_code = code;
+		    
+			int numr = dtm.getRowCount();
+			if (numr > 0 ){
+				this.getJTable().setRowSelectionInterval(0,0);
+			}
+		}
+	}
+	
+	/**
+	 * Indica el CRS que se utilizar en la capa y busca las transformaciones
+	 * directas e inversas que pueda tener para las transformaciones compuestas
+	 * @param code
+	 */
+	public void setSourceCompuesta(String aut){
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		inverseTranformation = false;
+		String[] authority = aut.split(":");
+		int code = Integer.parseInt(authority[1]);
+		crs_source_code = code;
+		int numRow = dtm.getRowCount();
+		
+        while (numRow != 0) {
+			numRow = numRow - 1;
+			dtm.removeRow(numRow);
+		}
+		if (PluginServices.getText(this,authority[0]).equals(PluginServices.getText(this, "EPSG"))) {
+			callTransformationCompuesta(crs_source_code);
+			
+			int new_target = crs_target;
+			int base_target = code;
+			String sentence = "SELECT source_geogcrs_code, coord_ref_sys_kind " +
+						"FROM epsg_coordinatereferencesystem " +
+						"WHERE coord_ref_sys_code = "+ code;
+			ResultSet result = Query.select(sentence,connect.getConnection());		
+			try {
+				result.next();
+				String kind = result.getString("coord_ref_sys_kind");
+				if (kind.equals("projected"))
+					base_target = result.getInt("source_geogcrs_code");
+			} catch (SQLException e1) {
+				e1.printStackTrace();
+			}        
+			crs_target = base_target;
+			
+			crs_source_code = new_target;
+			callInverseTransformation(crs_source_code);
+			crs_target = new_target;
+			crs_source_code = code;
+		    
+			int numr = dtm.getRowCount();
+			if (numr > 0 ){
+				this.getJTable().setRowSelectionInterval(0,0);
+			}
+		}
+	}
+	
+	/**
+	 * Busca las tranformaciones directas entre el CRS de la capa y el CRS de la
+	 * vista.
+	 * @param crsCode
+	 */
+	private void callTransformationCompuesta(int crsCode){		
+        int numRow = dtm.getRowCount();
+		
+        while (numRow != 0) {
+			numRow = numRow - 1;
+			dtm.removeRow(numRow);
+		}
+        
+        String sentence = "SELECT source_geogcrs_code " +
+						"FROM epsg_coordinatereferencesystem " +
+						"WHERE coord_ref_sys_code = "+ crsCode ;
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		int source = 0;
+		try {
+			result.next();
+			source = result.getInt("source_geogcrs_code");
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}
+		
+        ResultSet result2 = null;
+        ResultSet result3 = null;
+        if (source != 0){
+        		crsCode = source;		            	
+        }
+        
+        ArrayList codecs = new ArrayList();
+        codecs.add(String.valueOf(crsCode));		
+		
+		for (int j=0; j< codecs.size(); j++){
+			sentence = "SELECT coord_op_code, coord_op_name, coord_op_type, source_crs_code, target_crs_code, area_of_use_code, coord_op_method_code " +
+					"FROM epsg_coordoperation " +                        
+					"WHERE source_crs_code = " + codecs.get(j) + " OR target_crs_code = "+ codecs.get(j);
+
+            result = Query.select(sentence,connect.getConnection());	
+            
+            try {
+            	while(result.next()) {
+            		Object[]data = new Object[6];				            		
+            		data[0] = String.valueOf(result.getInt("coord_op_code"));
+            		data[1] = result.getString("coord_op_name");
+            		data[2] = result.getString("coord_op_type");
+            		data[3] = String.valueOf(result.getInt("source_crs_code"));
+            		data[4] = String.valueOf(result.getInt("target_crs_code"));
+            		/*codecs.add(data[4]);
+            		codecs = deleteItems(codecs);*/
+            		
+            		int aouc = Integer.parseInt(result.getString("area_of_use_code"));
+					
+					sentence = "SELECT area_of_use FROM epsg_area " +
+									"WHERE area_code = "+ aouc ;
+					
+					result2 = Query.select(sentence,connect.getConnection());
+            		while (result2.next())
+            			data[5] = result2.getString("area_of_use");
+            		
+            		String coord_op_method = result.getString("coord_op_method_code");				            		
+	            		
+            		sentence = "SELECT reverse_op FROM epsg_coordoperationmethod "+
+            					"WHERE coord_op_method_code LIKE " + coord_op_method;
+            		result3 = Query.select(sentence,connect.getConnection());
+            		
+            		while(result3.next()){
+            			if (Integer.parseInt(result3.getString("reverse_op")) == 1){
+            				for (int i=0; i< transformations.length; i++){
+            					if (coord_op_method.equals(transformations[i])){
+            						dtm.addRow(data);
+            					}
+            				}            				
+            			}
+            		}
+            	}
+            } 	
+            catch (SQLException e1) {
+            	e1.printStackTrace();
+            }
+		}
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public int getSource(){
+		return crs_source_code;
+	}
+	
+	public int getTarget(){
+		return real_target;
+	}
+	
+	public void setAuthorityTarget(String aut_target) {
+		authority_target = aut_target;
+	}
+	
+	public String getAuthorityTarget() {
+		return authority_target;
+	}
+	
+	/**
+	 * cuando utilizamos crs+transformacion, cargamos los paneles para que
+	 * el usuario pueda consultar la transformacion utilizada...
+	 * @param details
+	 */
+	public void fillData(String details) {
+		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+		TrData crsTrDataArray[] = trPersistence.getArrayOfTrData();
+		
+		for (int iRow = crsTrDataArray.length-1; iRow >= 0; iRow--) {
+			if (details.equals(crsTrDataArray[iRow].getAuthority()+":"+crsTrDataArray[iRow].getCode()+" <--> "+crsTrDataArray[iRow].getDetails()) && crsTrDataArray[iRow].getAuthority().equals(PluginServices.getText(this, "EPSG"))) {
+				String code = String.valueOf(crsTrDataArray[iRow].getCode());
+				
+				for (int i=0; i< getJTable().getRowCount(); i++) {
+					if (code.equals((String)getJTable().getValueAt(i, 0))) {
+						//seleccionarlo						
+						this.getJTable().setRowSelectionInterval(i,i);
+						break;						
+					}
+				}
+				break;
+			}
+		}
+	}
+	
+	/**
+	 * metodo que resetea el formulario
+	 * @return
+	 */
+	public void resetData() {
+		if (dtm.getRowCount()>0) {
+			this.getJTable().setRowSelectionInterval(0,0);
+		}
+		
+        
+	}
+	
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle("Transformation EPSG");
+		return m_viewinfo;
+	}	
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationEpsgPanel.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/InfoTransformationsRecentsPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/InfoTransformationsRecentsPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/InfoTransformationsRecentsPanel.java	(revision 25287)
@@ -0,0 +1,246 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.ListSelectionModel;
+import javax.swing.table.DefaultTableModel;
+
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+import es.idr.teledeteccion.connection.EpsgConnection;
+import es.idr.teledeteccion.connection.Query;
+
+/**
+ * Panel con la informacin de la transformacin seleccionada
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ * @author Luisa Marina Fernndez (luisam.fernandez@uclm.es)
+ *
+ */
+public class InfoTransformationsRecentsPanel extends JPanel implements IWindow, ActionListener{
+
+	private static final long serialVersionUID = 1L;
+
+	private JTable jTable;
+	public DefaultTableModel dtm = null;
+	private JScrollPane jScrollPane1 = null;
+	private JPanel jPanelbuttons;
+	private JButton jButtonOk;
+	public TableSorter sorter = null;
+	String[] data = null;
+	
+	//Ancho y alto del panel
+	private int v_height=200;
+	private int v_width=420;
+	
+	public InfoTransformationsRecentsPanel(String[] data) {
+		super();
+		this.data = data;
+		inicializate();
+	}
+	
+	private void inicializate() {
+		setLayout(new BorderLayout());
+		add(getJScrollPane1(), BorderLayout.CENTER);
+		add(getJPanelButtons(), BorderLayout.SOUTH);
+		
+	}
+
+	private JPanel getJPanelButtons() {
+		if(jPanelbuttons == null) {
+			jPanelbuttons = new JPanel();
+			jPanelbuttons.setLayout(new FlowLayout(FlowLayout.RIGHT,10,10));
+			jPanelbuttons.add(getJButtonOk(),null);
+		}
+		return jPanelbuttons;
+	}
+	
+	private JButton getJButtonOk() {
+		if(jButtonOk == null) {
+			jButtonOk = new JButton();
+			jButtonOk.setText(PluginServices.getText(this,"ok"));
+			jButtonOk.setPreferredSize(new Dimension(100,25));
+			jButtonOk.setMnemonic('O');
+			jButtonOk.setToolTipText(PluginServices.getText(this,"ok"));
+			jButtonOk.addActionListener(this);
+		}
+		return jButtonOk;
+	}
+		
+	private JScrollPane getJScrollPane1() {
+		if(jScrollPane1 == null) {
+			jScrollPane1 = new JScrollPane();
+			jScrollPane1.setPreferredSize(new Dimension(400,150));	
+			jScrollPane1.setBorder(
+				    BorderFactory.createCompoundBorder(
+					BorderFactory.createCompoundBorder(
+							BorderFactory.createTitledBorder(PluginServices.getText(this,"info_transformations")),
+							BorderFactory.createEmptyBorder(5,5,5,5)),
+							jScrollPane1.getBorder()));
+			jScrollPane1.setViewportView(getJTable());
+		}
+		return jScrollPane1;
+	}
+	
+	private JTable getJTable() {
+		if(jTable == null) {
+			String[] columnNames = {PluginServices.getText(this,"nombre")
+					,PluginServices.getText(this,"valor")};
+			Object[][] datos = obtainData();
+			dtm = new DefaultTableModel(datos, columnNames)
+			 {
+				private static final long serialVersionUID = 1L;
+
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}		
+			};
+			sorter = new TableSorter(dtm);			
+
+			jTable = new JTable(sorter);
+
+			jTable.setCellSelectionEnabled(false);
+			jTable.setRowSelectionAllowed(true);
+			jTable.setColumnSelectionAllowed(false);
+			jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			
+		}
+		return jTable;
+	}
+	
+	/**
+	 * Mtodo que recuperar la informacin a mostrar en el panel
+	 * de las transformaciones recientes
+	 * @return
+	 */
+	private String[][] obtainData(){	
+		String[][] valid = null;
+		String[] transformation = data[0].split(":");
+		if (transformation[0].equals("EPSG")){
+			valid = new String[6][2];
+			valid[0][0] = PluginServices.getText(this,"source_crs");
+			valid[0][1] = data[2];
+			valid[1][0] = PluginServices.getText(this,"target_crs");
+			valid[1][1] = data[3];
+			EpsgConnection conn = new EpsgConnection();
+			conn.setConnectionEPSG();
+			String sentence = "SELECT area_of_use_code " +
+							"FROM epsg_coordoperation " +                        
+							"WHERE coord_op_code = " + transformation[1] ;
+		    ResultSet result = Query.select(sentence,conn.getConnection());		   
+			try {
+				result.next();				
+				valid[2][0] =  PluginServices.getText(this,"transformation_code");
+				valid[2][1] = transformation[1];				
+				sentence = "SELECT area_of_use FROM epsg_area " +
+								"WHERE area_code = "+ Integer.parseInt(result.getString("area_of_use_code"));
+				
+			} catch (SQLException e) {
+				e.printStackTrace();
+			}
+			valid[3][0] = PluginServices.getText(this,"transformation_name");
+			valid[3][1] = data[1];
+			valid[4][0] = PluginServices.getText(this,"details");
+			result = Query.select(sentence, conn.getConnection());
+			try {
+				result.next();
+				valid[4][1] = result.getString("area_of_use");
+			} catch (SQLException e) {
+				e.printStackTrace();
+			}
+		}
+		else if (transformation[0].equals("USR")){
+			valid = new String[3][2];
+			valid[0][0] = PluginServices.getText(this,"source_crs");
+			valid[0][1] = data[2];
+			valid[1][0] = PluginServices.getText(this,"target_crs");
+			valid[1][1] = data[3];
+			valid[2][0] = PluginServices.getText(this,"details");
+			valid[2][1] = data[4];			
+		} else {
+			valid = new String[4][2];
+			String[] partes = data[4].split("\\(");
+			String nadFile = partes[0];		
+			String codigoNad = partes[1].substring(0,partes[1].length()-1);
+			valid[0][0] = PluginServices.getText(this,"source_crs");
+			valid[0][1] = data[2];
+			valid[1][0] =PluginServices.getText(this,"target_crs");
+			valid[1][1] = data[3];
+			valid[2][0] = PluginServices.getText(this,"nadgrids_file");
+			valid[2][1] = nadFile;	
+			valid[3][0] = PluginServices.getText(this,"calculated_in");
+			valid[3][1] = codigoNad;
+		}
+		return valid;
+	}
+
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle("Info");//PluginServices.getText(this,proj.getCrsWkt().getName()));
+   		//Define el ancho y el alto del panel
+   		m_viewinfo.setHeight(v_height);
+   		m_viewinfo.setWidth(v_width);
+		return m_viewinfo;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		if (e.getSource() == getJButtonOk()){
+			PluginServices.getMDIManager().closeWindow(this);
+		}
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/InfoTransformationsRecentsPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationRecentsPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationRecentsPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationRecentsPanel.java	(revision 25287)
@@ -0,0 +1,516 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.FlowLayout;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.ListSelectionModel;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.ogr.TransEPSG;
+import org.gvsig.crs.persistence.CompTrData;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+import org.gvsig.crs.persistence.RecentTrsPersistence;
+import org.gvsig.crs.persistence.TrData;
+
+import com.iver.andami.PluginServices;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+import es.idr.teledeteccion.connection.EpsgConnection;
+
+/**
+ * Panel para la gestin de las transformaciones recientes
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ * @author Luisa Marina Fernndez (luisam.fernandez@uclm.es)
+ *
+ */
+public class TransformationRecentsPanel extends JPanel {
+
+	private static final long serialVersionUID = 1L;
+	int code = 0;
+	private JTable transformationTable;	
+	private JScrollPane jScrollPane = null;
+	public DefaultTableModel dtm = null;
+	public TableSorter sorter = null;
+	JButton JButtonInfo = null;
+	public int selectedRowTable = -1;
+	private TrData[] trDataArray;
+	
+	private String cadWKT = "";
+	private String params ="";
+	public EpsgConnection connect = null;
+	boolean inverseTransformation = false;
+	int trCode;
+	boolean targetNad = false;
+	String sourceAbrev = null;
+
+	public TransformationRecentsPanel() {
+		initialize();
+	}
+	
+	/**
+	 * Genera el panel contenedor de las transformaciones recientes
+	 * @return
+	 */
+	private void initialize(){
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+			//**setLayout(new GridLayout(2,1));
+			//**setLayout(new FlowLayout(FlowLayout.LEADING,5,10));
+			//**setPreferredSize(new Dimension(525, 100));
+		setLayout(new BorderLayout());
+		setBorder(
+				    BorderFactory.createCompoundBorder(
+							BorderFactory.createCompoundBorder(
+									BorderFactory.createTitledBorder(PluginServices.getText(this,"recents_transformation")),
+									BorderFactory.createEmptyBorder(2,2,2,2)),
+									getBorder()));
+		JPanel p=new JPanel();
+		p.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
+		p.add(getJButtonInfo());
+		add(p,BorderLayout.NORTH);
+		add(getJScrollPane(),BorderLayout.CENTER);	
+			//loadRecents();
+	}
+	
+	public JTable getJTable() {
+		if (transformationTable == null) {
+			String[] columnNames= {PluginServices.getText(this,"transformation"),
+					PluginServices.getText(this,"name"),
+					PluginServices.getText(this,"source_crs"),
+					PluginServices.getText(this,"target_crs"),
+					PluginServices.getText(this,"detalles"),};					
+			Object[][]data = {};
+			dtm = new DefaultTableModel(data, columnNames)
+			{
+				private static final long serialVersionUID = 1L;
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}
+				/*
+				 * metodo necesario para cuando utilizamos tablas ordenadas
+				 * ya que sino al ordenar por algun campo no se queda con el orden
+				 * actual al seleccionar una fila
+				 * @see javax.swing.table.TableModel#getColumnClass(int)
+				 */
+				public Class getColumnClass(int column)
+				{
+					return getValueAt(0, column).getClass();
+				}
+			};
+			sorter = new TableSorter(dtm);			
+
+			transformationTable = new JTable(sorter);
+			sorter.setTableHeader(transformationTable.getTableHeader());	
+			transformationTable.setCellSelectionEnabled(false);
+			transformationTable.setRowSelectionAllowed(true);
+			transformationTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
+			transformationTable.setColumnSelectionAllowed(false);
+			transformationTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			TableColumn column = null;
+			for (int i = 0; i < columnNames.length; i++) {
+			    column = transformationTable.getColumnModel().getColumn(i);
+			    if (i == 0) {
+			    	column.setPreferredWidth(80);
+			    }
+			    else if(i == 4) {
+			    	column.setPreferredWidth(200);
+			    }
+			    else {			    
+			        column.setPreferredWidth(100);
+			    }
+			}			
+		}
+		return transformationTable;
+	}
+	
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane();
+			//jScrollPane.setPreferredSize(new Dimension(525,200));
+			jScrollPane.setBorder(
+				    BorderFactory.createCompoundBorder(
+					BorderFactory.createCompoundBorder(
+							BorderFactory.createTitledBorder(PluginServices.getText(this,"transformations")),
+							BorderFactory.createEmptyBorder(12,5,70,5)),
+							jScrollPane.getBorder()));
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+	
+	public JButton getJButtonInfo() {
+		if(JButtonInfo == null) {
+			JButtonInfo = new JButton();
+			//Poner: JButtonInfo.setPreferredSize(new Dimension(100,20));			
+			JButtonInfo.setText(PluginServices.getText(this,"info_transformations"));			
+			JButtonInfo.setMnemonic('I');
+			JButtonInfo.setEnabled(false);			
+		}
+		return JButtonInfo;
+	}
+	
+	/**
+	 * Consigue el crs elegido de las transformaciones
+	 * recientes cuando el se utiliza transformacin EPSG o manual
+	 * @return
+	 */
+	public ICrs getProjection() {
+		ICrs crs = null;
+		try {
+			String[] sourceAuthority = getSourceAbrev().split(":");
+			//crs = new CrsFactory().getCRS(getCode(), getWKT(),getParams());
+			crs = new CrsFactory().getCRS(sourceAuthority[0]+":"+getCode());
+			crs.setTransformationParams(getParams(),null);
+		} catch (CrsException e) {
+			e.printStackTrace();
+		}
+		return crs;
+	}
+	
+	/**
+	 * Consigue el crs elegido de las transformaciones recientes compuestas
+	 * cuando se utiliza una transformacion compuesta
+	 * @param info
+	 * @return
+	 */
+	public ICrs getProjectionComplex(String details) {
+		ICrs crs = null;
+		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+		TrData crsTrDataArray[] = trPersistence.getArrayOfTrData();
+		CompTrData comp = null;
+		String sourceTransformation = null;
+		String targetTransformation = null;
+		for (int iRow = crsTrDataArray.length-1; iRow >= 0; iRow--) {
+			if (details.equals(crsTrDataArray[iRow].getDetails())) {
+				if (crsTrDataArray[iRow] instanceof CompTrData) {
+					comp = (CompTrData) crsTrDataArray[iRow];
+					break;
+				}
+			}
+		}
+		
+		if (comp.getFirstTr().getAuthority().equals(PluginServices.getText(this, "EPSG"))) {
+			TransEPSG epsgParams = new TransEPSG(comp.getFirstTr().getCode(),connect, getInverseTransformation());
+			setParamsEPGS(epsgParams.getParamValue());
+			sourceTransformation = getParams();
+		} else if (comp.getFirstTr().getAuthority().equals(PluginServices.getText(this, "USR"))) {
+			//mirar si funciona y lleva los [  ]
+			setParamsManual(comp.getFirstTr().getDetails());
+			sourceTransformation = getParams();
+		} else if (comp.getFirstTr().getAuthority().equals(PluginServices.getText(this, "NADGR"))) {
+			String info = comp.getFirstTr().getDetails();
+			String[] partes = info.split("\\(");
+			String nadFile = partes[0];		
+			sourceTransformation = "+nadgrids="+nadFile;			
+		}
+		
+		if (comp.getSecondTr().getAuthority().equals(PluginServices.getText(this, "EPSG"))) {
+			TransEPSG epsgParams = new TransEPSG(comp.getSecondTr().getCode(),connect, getInverseTransformation());
+			setParamsEPGS(epsgParams.getParamValue());
+			targetTransformation = getParams();
+		} else if (comp.getSecondTr().getAuthority().equals(PluginServices.getText(this, "USR"))) {
+			//mirar si funciona y lleva los [  ]
+			setParamsManual(comp.getSecondTr().getDetails());
+			targetTransformation = getParams();
+		} else if (comp.getSecondTr().getAuthority().equals(PluginServices.getText(this, "NADGR"))) {
+			String info = comp.getSecondTr().getDetails();
+			String[] partes = info.split("\\(");
+			String nadFile = partes[0];		
+			targetTransformation = "+nadgrids="+nadFile;			
+		}
+		
+		try {
+			crs = new CrsFactory().getCRS(getSourceAbrev());
+			crs.setTransformationParams(sourceTransformation,targetTransformation);//nadFile);
+			return crs;
+		} catch (org.gvsig.crs.CrsException e) {
+			e.printStackTrace();
+		}
+				
+		return crs;
+	}
+	
+	/**
+	 * Consigue el crs elegido de las transformaciones
+	 * recientes cuando se utiliza transformacin de rejillas
+	 * @param info
+	 * @return
+	 */
+	public ICrs getProjectionNad(String info) {
+		String[] partes = info.split("\\(");
+		String nadFile = partes[0];		
+		int codigoNad = Integer.parseInt((partes[1].substring(0,partes[1].length()-1)).split(":")[1]);
+		ICrs crs;
+		String[] sourceAuthority = getSourceAbrev().split(":");
+		
+		if (getCode() == codigoNad){
+			try {
+				setNad(false);
+				//Siempre EPSG porque solo permitimos transformaciones
+				//en el caso en que source y target sean de la EPSG
+				crs = new CrsFactory().getCRS(sourceAuthority[0]+":"+getCode());
+				crs.setTransformationParams("+nadgrids="+nadFile,null);//nadFile);
+				return crs;
+			} catch (org.gvsig.crs.CrsException e) {
+				e.printStackTrace();
+			}
+			return null;
+		}
+		else {	
+			setNad(true);
+			try {
+				crs = new CrsFactory().getCRS(sourceAuthority[0]+":"+getCode());
+				crs.setTransformationParams(null,"+nadgrids="+nadFile);//nadFile);
+				
+				return crs;
+			} catch (CrsException e) {				
+				e.printStackTrace();
+			}
+			return null;
+		}	
+	}
+	
+	/**
+	 * 
+	 * @param nadg Define si el fichero rejillas se calcula en el crs fuente o destino
+	 */
+	public void setNad(boolean nadg){
+		targetNad = nadg;		
+	}
+	
+	/**
+	 * 
+	 * @return Devuelve si el fichero de rejillas se calcula en el crs fuente o destino
+	 */
+	public boolean getNad(){
+		return targetNad;		
+	}
+	
+	/**
+	 * 
+	 * @param cod Cdigo del CRS elegido
+	 */
+	public void setCode(int cod){
+		code = cod;
+	}
+	
+	/**
+	 * 
+	 * @return Devuelve el cdigo del CRS elegido
+	 */
+	public int getCode(){
+		return code;
+	}
+	
+	/**
+	 * 
+	 * @param cad Cadena wkt del crs fuente
+	 */
+	public void setWKT(String cad){
+		cadWKT = cad;		
+	}	
+	
+	/**
+	 * 
+	 * @return Devuelve la cadena wkt del crs fuente
+	 */
+	public String getWKT(){
+		return cadWKT;
+	}
+	
+	/**
+	 * 
+	 * @param param Hacemos la cadena con los parmetros de la transformacin manual
+	 */
+	public void setParamsManual(String param){
+		params = "+towgs84="+param.substring(1,param.length()-1)+" ";
+	}
+	
+	/**
+	 * 
+	 * @param values Hacemos la cadena con los parmetros de la transformacin EPSG
+	 */
+	public void setParamsEPGS(String[] values){
+		params = "+towgs84="+values[0];
+		for(int i = 1; i < values.length; i++)
+			params +=","+values[i];
+		params += " ";
+	}
+	
+	/**
+	 * 
+	 * @param nadfile
+	 */
+	public void setParamsNads(String nadfile){
+		
+	}
+	
+	/**
+	 * 
+	 * @return Deuelve una cadena con los parmetros de la transformacin
+	 */
+	public String getParams(){
+		return params;
+	}
+	
+	/**
+	 * 
+	 * @param inverse Parmetro que define si la transformacin es directa o inversa
+	 */
+	public void setInverseTransformation(boolean inverse){
+		inverseTransformation = inverse;
+	}
+	
+	/**
+	 * 
+	 * @return Devuelve si es una transformacin directa o inversa
+	 */
+	public boolean getInverseTransformation(){
+		return inverseTransformation;
+	}
+	
+	/**
+	 * 
+	 * @param code Cdigo de la transformacin EPGS elegida
+	 */
+	public void setTrCode(int code){
+		trCode = code;
+	}
+	
+	/**
+	 * 
+	 * @return Devuelve el cdigo de la transformacin
+	 */
+	public int getTrCode(){
+		return trCode;
+	}
+	
+	/**
+	 * Carga en la tabla los CRSs leidos del sistema de persistencia.
+	 */
+	public void loadRecents(String source, String target){
+		setSourceAbrev(source);
+		//		Eliminar filas en cada nueva bsqueda
+		int numRow = dtm.getRowCount();
+		while (numRow != 0) {
+			numRow = numRow - 1;
+			dtm.removeRow(numRow);
+		}
+		RecentTrsPersistence persistence = new RecentTrsPersistence();
+		trDataArray = persistence.getArrayOfTrData();
+		
+
+		for (int iRow = trDataArray.length-1;iRow>=0;iRow--){
+			String crsSource = ((String)trDataArray[iRow].getCrsSource());
+			String crsTarget = ((String)trDataArray[iRow].getCrsTarget());
+			if(source.equals(crsSource) && target.equals(crsTarget)){
+				Object row[] ={trDataArray[iRow].getAuthority()+":"+trDataArray[iRow].getCode(),trDataArray[iRow].getName(),trDataArray[iRow].getCrsSource(),
+					trDataArray[iRow].getCrsTarget(),trDataArray[iRow].getDetails()};
+				dtm.addRow(row);
+			}
+		}
+		
+		/*
+		/*Seleccionar el primer registro.
+		 */
+		int numr = dtm.getRowCount();
+		if (numr != 0 )
+			this.getJTable().setRowSelectionInterval(0,0);
+	}
+	
+	/**
+	 * Carga en la tabla los CRSs leidos del sistema de persistencia, para
+	 * las transformaciones compuestas
+	 */
+	public void loadRecentsCompuesta(String source){
+		
+		//		Eliminar filas en cada nueva bsqueda
+		int numRow = dtm.getRowCount();
+		while (numRow != 0) {
+			numRow = numRow - 1;
+			dtm.removeRow(numRow);
+		}
+		RecentTrsPersistence persistence = new RecentTrsPersistence();
+		trDataArray = persistence.getArrayOfTrData();
+		
+
+		for (int iRow = trDataArray.length-1;iRow>=0;iRow--){
+			if (trDataArray[iRow] instanceof CompTrData) {
+				continue;
+			} else {
+				String crsSource = ((String)trDataArray[iRow].getCrsSource());
+				String crsTarget = ((String)trDataArray[iRow].getCrsTarget());
+				if(source.equals(crsSource) || source.equals(crsTarget)){
+					Object row[] ={trDataArray[iRow].getAuthority()+":"+trDataArray[iRow].getCode(),trDataArray[iRow].getName(),trDataArray[iRow].getCrsSource(),
+						trDataArray[iRow].getCrsTarget(),trDataArray[iRow].getDetails()};
+					dtm.addRow(row);
+				}
+			}
+		}
+		
+		/*
+		/*Seleccionar el primer registro.
+		 */
+		int numr = dtm.getRowCount();
+		if (numr != 0 )
+			this.getJTable().setRowSelectionInterval(0,0);
+	}
+	
+	public void setSourceAbrev(String source) {
+		sourceAbrev = source;
+	}
+	
+	public String getSourceAbrev() {
+		return sourceAbrev;
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationRecentsPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationCapaPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationCapaPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationCapaPanel.java	(revision 25287)
@@ -0,0 +1,424 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.CardLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.ListSelectionModel;
+
+import org.gvsig.crs.gui.CRSMainTrPanel;
+import org.gvsig.crs.gui.listeners.TransformationCompuestaPanelListener;
+import org.gvsig.crs.ogr.TransEPSG;
+import org.gvsig.crs.persistence.CompTrData;
+import org.gvsig.crs.persistence.RecentTrsPersistence;
+import org.gvsig.crs.persistence.TrData;
+
+import com.iver.andami.PluginServices;
+
+
+/**
+ * Clase que define la trandformacion de la capa en una transformacion compuesta 
+ *
+ * @author Jose Luis Gomez Martinez (JoseLuis.Gomez@uclm.es)
+ * @author Luisa Marina Fernandez (luisam.fernandez@uclm.es)
+ *
+ */
+public class TransformationCapaPanel extends JPanel implements ActionListener, ItemListener{
+
+	private static final long serialVersionUID = 1L;
+	private JLabel lblTransCapa=null;
+	private JComboBox jComboOptions=null;
+	private JPanel pNorth=null;
+	private TransformationManualPanel manualTrPanel = null;
+	private TransformationEpsgPanel epsgTrPanel = null;
+	private TransformationNadgridsPanel nadsTrPanel = null;
+	private TransformationRecentsPanel recentsTrPanel = null;
+	private JPanel pCenter=null;
+	private JLabel lblCrsCapa = null;
+	private JLabel lblCrsCapaCode = null;
+	
+	String crs_target = null;
+	String crs_source = null;
+	String sourceTransformation = null;
+	CRSMainTrPanel crsMainTrPanel = null;
+	
+	boolean recentCompTransformation = false;
+	
+	public TransformationCapaPanel(String target, CRSMainTrPanel p) {
+		super();
+		crsMainTrPanel = p;
+		setCrs_target(target);
+		manualTrPanel = new TransformationManualPanel();
+		epsgTrPanel = new TransformationEpsgPanel(target);
+		nadsTrPanel = new TransformationNadgridsPanel(false);
+		recentsTrPanel = new TransformationRecentsPanel();
+			
+		setListeners();
+	
+		this.setLayout(new BorderLayout());
+		//Aadir al norte el panel que contiene las diferentes opciones de transformacion
+		this.add(getPNorth(),BorderLayout.NORTH);
+		this.add(getPCenter(),BorderLayout.CENTER);
+	}
+	
+	public JPanel getPCenter() {
+		if (pCenter == null) {
+			pCenter = new JPanel();
+			pCenter.setLayout(new CardLayout());		
+		
+			pCenter.add("recents", recentsTrPanel);
+			pCenter.add("manual", manualTrPanel);
+			pCenter.add("epsg", epsgTrPanel);
+			pCenter.add("nad", nadsTrPanel);
+		}
+		
+		return pCenter;
+	}
+
+	
+	public JLabel getLblTransCapa() {
+		if(lblTransCapa==null){
+			lblTransCapa=new JLabel(PluginServices.getText(this,"transformacion_capa"));
+		}
+		return lblTransCapa;
+	}
+	
+	public JLabel getLblCrsCapa() {
+		if(lblCrsCapa==null){
+			lblCrsCapa=new JLabel(PluginServices.getText(this,"crs_layer")+":");
+		}
+		return lblCrsCapa;
+	}
+	
+	public JLabel getLblCrsCapaCode() {
+		if(lblCrsCapaCode==null){
+			lblCrsCapaCode=new JLabel();
+		}
+		return lblCrsCapaCode;
+	}
+	/**
+	 * Definicion del panel que contiene el Label y el Combo de 
+	 * las transformaciones de la capa
+	 * @return
+	 */
+	public JPanel getPNorth() {
+		if (pNorth==null){
+			pNorth=new JPanel();
+			pNorth.setLayout(new GridLayout(2,1));
+			JPanel p1=new JPanel(new FlowLayout(FlowLayout.LEFT,10,3));
+			p1.add(getLblCrsCapa());
+			p1.add(getLblCrsCapaCode());
+			JPanel p2=new JPanel(new FlowLayout(FlowLayout.LEFT,10,3));
+			p2.add(getLblTransCapa());
+			p2.add(getJComboOptions());
+			
+			pNorth.add(p1);
+			pNorth.add(p2);
+		}
+		return pNorth;
+	}
+	/**
+	 * Definicin del ComboBox que contiene las diferentes transformaciones 
+	 * aplicables a la capa
+	 * @return
+	 */
+
+	public JComboBox getJComboOptions() {
+		if (jComboOptions == null){
+			String[] selection = {PluginServices.getText(this, "recents_transformation"),
+					PluginServices.getText(this, "transformacion_epsg"),
+					PluginServices.getText(this, "transformacion_manual"), 
+					PluginServices.getText(this, "nadgrids")}; 
+			jComboOptions = new JComboBox(selection);
+			jComboOptions.setPreferredSize(new Dimension(180,25));
+			jComboOptions.addActionListener(this);
+			jComboOptions.addItemListener(this);
+			jComboOptions.setSelectedItem(PluginServices.getText(this,"recents_transformation"));
+		}
+		
+		return jComboOptions;
+	}
+	
+	/**
+	 * Mtodo para aplicarle los eventos necesarios en el panel actual. La
+	 * definicin de estos listeners estarn en la clase CRSMainTrPanelListener
+	 *
+	 */
+	private void setListeners(){
+
+		TransformationCompuestaPanelListener listener = new TransformationCompuestaPanelListener(this, crsMainTrPanel);
+		
+		getJComboOptions().addActionListener(listener);
+		getRecentsTrPanel().getJButtonInfo().addActionListener(listener);
+				
+        ListSelectionModel rowSMEpsgTr = getEpsgTrPanel().getJTable().getSelectionModel();
+		rowSMEpsgTr.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMRecentsTr = getRecentsTrPanel().getJTable().getSelectionModel();
+		rowSMRecentsTr.addListSelectionListener(listener);
+		
+		getNadsTrPanel().getJComboNadFile().addItemListener(listener);
+				
+		getManualTrPanel().getTx_Translation().addKeyListener(listener);
+		getManualTrPanel().getTy_Translation().addKeyListener(listener);
+		getManualTrPanel().getTz_Translation().addKeyListener(listener);
+		getManualTrPanel().getTx_Rotation().addKeyListener(listener);
+		getManualTrPanel().getTy_Rotation().addKeyListener(listener);
+		getManualTrPanel().getTz_Rotation().addKeyListener(listener);
+		getManualTrPanel().getTscale().addKeyListener(listener);
+	}
+
+		
+		
+	public void actionPerformed(ActionEvent e) {
+			
+	}
+	
+	public TransformationEpsgPanel getEpsgTrPanel() {
+		return epsgTrPanel;
+	}
+
+	public TransformationManualPanel getManualTrPanel() {
+		return manualTrPanel;
+	}
+
+	public TransformationNadgridsPanel getNadsTrPanel() {
+		return nadsTrPanel;
+	}
+	
+	public TransformationRecentsPanel getRecentsTrPanel() {
+		return recentsTrPanel;
+	}
+	
+	public void setCrs_target(String cod) {
+		crs_target = cod;
+	}
+	
+	public String getCrs_target() {
+		return crs_target;
+	}
+	
+	public void setCrs_source(String authority) {
+		crs_source = authority;
+		getLblCrsCapaCode().setText(authority);
+	}
+	
+	public String getCrs_source() {
+		return crs_source;
+	}
+	
+	public void fillData() {
+		String[] source = getCrs_source().split(":");
+		String[] target = getCrs_target().split(":");		
+		recentsTrPanel.loadRecentsCompuesta(getCrs_source());
+		epsgTrPanel.setSourceCompuesta(getCrs_source());
+		nadsTrPanel.setCode(Integer.parseInt(source[1]));
+		nadsTrPanel.setSourceAbrev(PluginServices.getText(this, source[0]), source[1]);
+		nadsTrPanel.setTargetAbrev(PluginServices.getText(this, target[0]), target[1]);
+		nadsTrPanel.getJComboNadFile().setSelectedIndex(0);
+		manualTrPanel.setCode(Integer.parseInt(source[1]));
+		manualTrPanel.setSourceAbrev(PluginServices.getText(this, source[0]), source[1]);
+		manualTrPanel.setTargetAbrev(PluginServices.getText(this, target[0]), target[1]);
+		getJComboOptions().setSelectedIndex(0);
+		/*
+		 * Se dice que no es una transformacion cogida de las recientes compuestas
+		 * para un correcto funcionamiento de los botones.
+		 */
+		setRecentCompTransformation(false);
+	}
+		
+	public void setSourceTransformation(String trans) {
+		sourceTransformation = trans;
+	}
+	
+	public String getSourceTransformation() {
+		return sourceTransformation;
+	}
+	
+	public String getParamsEpsg(String [] values) {
+		String params = "+towgs84=";
+		params += values[0];
+		for(int i = 1; i < values.length; i++)
+			params +=","+values[i];
+		return params;
+	}
+	
+	public String getManualParams() {
+		if(getManualTrPanel().getTx_Translation().getText().equals("")){
+			getManualTrPanel().getTx_Translation().setText("0");
+		}
+		else if (getManualTrPanel().getTy_Translation().getText().equals("")){
+			getManualTrPanel().getTy_Translation().setText("0");
+		}
+		else if (getManualTrPanel().getTz_Translation().getText().equals("")){
+			getManualTrPanel().getTz_Translation().setText("0");
+		}
+		else if (getManualTrPanel().getTx_Rotation().getText().equals("")){
+			getManualTrPanel().getTx_Rotation().setText("0");
+		}
+		else if (getManualTrPanel().getTy_Rotation().getText().equals("")){
+			getManualTrPanel().getTy_Rotation().setText("0");
+		}
+		else if (getManualTrPanel().getTz_Rotation().getText().equals("")){
+			getManualTrPanel().getTz_Rotation().setText("0");
+		}
+		else if (getManualTrPanel().getTscale().getText().equals("")){
+			getManualTrPanel().getTscale().setText("0");
+		}		
+		String param = "+towgs84="+ getManualTrPanel().getTx_Translation().getText()+","+
+						getManualTrPanel().getTy_Translation().getText()+","+
+						getManualTrPanel().getTz_Translation().getText()+","+
+						getManualTrPanel().getTx_Rotation().getText()+","+
+						getManualTrPanel().getTy_Rotation().getText()+","+
+						getManualTrPanel().getTz_Rotation().getText()+","+
+						getManualTrPanel().getTscale().getText() + " ";
+		return param;		
+	}
+	
+	public String getNadsParams(String info) {
+		String[] partes = info.split("\\(");
+		String nadFile = partes[0];		
+		return "+nadgrids="+nadFile;
+	}
+	
+	/**
+	 * cuando utilizamos crs+transformacion, cargamos los paneles para que
+	 * el usuario pueda consultar la transformacion utilizada...
+	 * @param details
+	 */
+	public void fillData(String details) {
+		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+		TrData crsTrDataArray[] = trPersistence.getArrayOfTrData();
+		CompTrData comp = null;
+		
+		for (int iRow = crsTrDataArray.length-1; iRow >= 0; iRow--) {
+			if (details.equals(crsTrDataArray[iRow].getAuthority()+":"+crsTrDataArray[iRow].getCode()+" <--> "+crsTrDataArray[iRow].getDetails()) && crsTrDataArray[iRow].getAuthority().equals(PluginServices.getText(this, "COMP"))) {
+				comp = (CompTrData) crsTrDataArray[iRow];				
+				break;
+			}
+		}
+		if (comp.getFirstTr().getAuthority().equals(PluginServices.getText(this, "EPSG"))) {
+			getJComboOptions().setSelectedIndex(1);
+			int cod = Integer.parseInt(comp.getFirstTr().getCrsSource().split(":")[1]);
+			String code = String.valueOf(comp.getFirstTr().getCode());
+			//getEpsgTrPanel().setSource(PluginServices.getText(this, "EPSG"), cod);
+			for (int i=0; i< getEpsgTrPanel().getJTable().getRowCount(); i++) {
+				if (code.equals((String)getEpsgTrPanel().getJTable().getValueAt(i, 0))) {
+					//seleccionarlo						
+					getEpsgTrPanel().getJTable().setRowSelectionInterval(i,i);
+					break;						
+				}
+			}
+		} else if (comp.getFirstTr().getAuthority().equals(PluginServices.getText(this, "USR"))) {
+			getJComboOptions().setSelectedIndex(2);
+			String data = comp.getFirstTr().getDetails();
+			data = data.trim().substring(1, data.length()-1);
+			String values[] = data.split(",");
+			getManualTrPanel().getTx_Translation().setText(values[0]);
+			getManualTrPanel().getTy_Translation().setText(values[1]);
+			getManualTrPanel().getTz_Translation().setText(values[2]);
+			getManualTrPanel().getTx_Rotation().setText(values[3]);
+			getManualTrPanel().getTy_Rotation().setText(values[4]);
+			getManualTrPanel().getTz_Rotation().setText(values[5]);
+			getManualTrPanel().getTscale().setText(values[6]);
+			
+		} else if (comp.getFirstTr().getAuthority().equals(PluginServices.getText(this, "NADGR"))) {
+			getJComboOptions().setSelectedIndex(3);
+			String data[] = comp.getFirstTr().getDetails().split(" ");
+			String fichero = data[0];
+			String[] authority = data[1].substring(1,data[1].length()-1).split(":");
+			//Mirar como indicarle el CRS al que se le aplica...			
+			getNadsTrPanel().setSourceAbrev(authority[0], authority[1]);
+			
+			for (int i = 0; i< getNadsTrPanel().getJComboNadFile().getItemCount(); i++) {
+				if (fichero.equals((String)getNadsTrPanel().getJComboNadFile().getItemAt(i))) {
+					getNadsTrPanel().getJComboNadFile().setSelectedIndex(i);
+					break;
+				}
+			}			
+		}
+		/*
+		 * Por aquí solo pasa cuando se ha seleccionado una transformación compuesta de recientes.
+		 * Pondremos el valor de que es un crs compuesto reciente a true para que el botón de siguiente
+		 * salga habilitado.
+		 */
+		setRecentCompTransformation(true);
+	}
+	
+	public void setRecentCompTransformation(boolean state) {
+		recentCompTransformation = state;
+	}
+	
+	public boolean getRecentCompTransformation() {
+		return recentCompTransformation;
+	}
+	
+	public void resetData() {
+		fillData();
+	}
+	
+	public boolean isSthSelected() {
+		if (getRecentsTrPanel().selectedRowTable == -1)
+			return false;
+		return true;
+	}
+
+	public void itemStateChanged(ItemEvent e) {
+		/*
+		 * Cambio en la seleccion del tipo de transformacion en la capa dentro de una transformacion
+		 * compuesta. Se podria utilizar para conocer si hay algo seleccionado o no para el correcto
+		 * funcionamiento del panel de botones... De momento vacio porque funciona bien.
+		 */		
+	}
+	
+	
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationCapaPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/ProjChooserPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/ProjChooserPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/ProjChooserPanel.java	(revision 25287)
@@ -0,0 +1,252 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+package org.gvsig.crs.gui.panels;
+
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionListener;
+
+import org.gvsig.gui.beans.swing.JButton;
+import javax.swing.JLabel;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.dialog.CSSelectionDialog;
+import org.gvsig.crs.gui.dialog.TRSelectionDialog;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.cit.gvsig.project.documents.gui.FOpenDialog;
+import com.iver.cit.gvsig.gui.panels.CRSSelectPanel;
+import com.iver.cit.gvsig.project.documents.view.gui.View;
+
+/**
+ * @author Luis W. Sevilla (sevilla_lui@gva.es)
+ */
+public class ProjChooserPanel extends CRSSelectPanel {
+    
+	private static final long serialVersionUID = 1L;
+	
+	public  ICrs curProj = null; //(IProjection) new CRSFactory().getCRS("EPSG:23030");
+	
+	private JLabel jLblProj = null;
+	private JLabel jLblProjName = null;
+	private JButton jBtnChangeProj = null;
+	private boolean okPressed = false;
+	private String abrev;
+	boolean panel = false;
+	boolean targetNad = false;
+	String dataSource = "EPSG";
+	
+	private ActionListener actionListener = null;
+	
+	public ProjChooserPanel(IProjection proj) {
+		super(proj);	
+		IProjection pr = proj;
+		IWindow activeWindow = PluginServices.getMDIManager().getActiveWindow();
+    	if (activeWindow instanceof View) {		
+    		View activeView = (com.iver.cit.gvsig.project.documents.view.gui.View) activeWindow;
+    		pr = activeView.getMapControl().getProjection();
+    	}
+    	FOpenDialog.setLastProjection(pr);	
+		setCurProj(pr);
+		initialize();		
+	}
+	
+
+	/**
+	 * This method initializes this
+	 *
+	 * @return void
+	 */
+	private void initialize() {
+		this.setLayout(new GridLayout(3,1));
+        this.setLayout(new FlowLayout(FlowLayout.LEFT, 15, 0));
+        setPreferredSize(new java.awt.Dimension(330,35));
+        this.setSize(new java.awt.Dimension(330,23));
+        this.add(getJLblProjName(), null);
+        this.add(getJLblProj(), null);
+        this.add(getJBtnChangeProj(), null);
+       
+        
+        //cambiar cuando la parte de JLuis se ensamble
+        if(!((ICrs)curProj).getAbrev().equals("EPSG:23030")){
+        	dataSource = curProj.getCrsWkt().getAuthority()[0];
+        	jLblProj.setText(dataSource+":" +String.valueOf(curProj.getCode()));
+        	//jLblProj.setText(((ICrs)curProj).getCrsWkt().getName());
+        }
+        else
+        	jLblProj.setText("EPSG:23030");        
+		initBtnChangeProj();
+	}
+
+	private void initBtnChangeProj() {
+		getJBtnChangeProj().addActionListener(new java.awt.event.ActionListener() {
+			public void actionPerformed(java.awt.event.ActionEvent e) {
+				CSSelectionDialog csSelect = null;
+				TRSelectionDialog trSelect = null;
+				if (!isTransPanelActive()){
+					okPressed = false;
+					csSelect = new CSSelectionDialog((ICrs) curProj);
+					csSelect.setProjection(curProj);
+					csSelect.initRecents(curProj);
+					//csSelect.setLayout(new GridLayout(0,1));
+					
+			        PluginServices.getMDIManager().addWindow(csSelect);
+			        abrev = dataSource+ ":" +String.valueOf(curProj.getCode());
+			        if (csSelect.isOkPressed()) {
+			        	curProj = (ICrs) csSelect.getProjection();
+			        	dataSource = curProj.getCrsWkt().getAuthority()[0];
+			        	//dataSource = csSelect.getDataSource();
+			        	abrev = dataSource+ ":" +String.valueOf(curProj.getCode());
+			        	
+			        	jLblProj.setText(dataSource+ ":" +String.valueOf(curProj.getCode()));//.getAbrev());
+			        	FOpenDialog.setLastProjection(curProj);
+			        	okPressed = true;
+			        	if (actionListener != null) {
+			        		actionListener.actionPerformed(e);
+			        	}
+			        }else			        	
+			        	jLblProj.setText(abrev);  
+				}
+				else {
+					okPressed = false;										
+			    	trSelect = new TRSelectionDialog(curProj);
+					
+					trSelect.setProjection(curProj);
+			        
+					trSelect.setLayout(new GridLayout(0,1));
+					
+					PluginServices.getMDIManager().addWindow(trSelect);
+					setTargetNad(trSelect.getTargetNad());
+			        //abrev = curProj.getAbrev();
+					
+			        if (trSelect.getProjection() != curProj) {
+			        	curProj = (ICrs) trSelect.getProjection();
+			        	dataSource = curProj.getCrsWkt().getAuthority()[0];
+			        	//dataSource = trSelect.getProjPanel().getDataSource();
+			        	//abrev = trSelect.getProjectionName();
+			        	jLblProj.setText(dataSource+ ":" +String.valueOf(curProj.getCode()));//abrev);
+			        	FOpenDialog.setLastProjection(curProj);			        	
+			        	okPressed = true;
+			        	
+			        	if (actionListener != null) {
+			        		actionListener.actionPerformed(e);
+			        	}
+			        }else
+			        	jLblProj.setText(dataSource+ ":" +String.valueOf(curProj.getCode()));//abrev);
+					
+				}
+					        	
+			}
+		});
+	}
+
+	public JLabel getJLblProjName() {
+		if (jLblProjName == null) {
+	        jLblProjName = new JLabel("Proyeccion actual");
+			jLblProjName.setText(PluginServices.getText(this,"proyeccion_actual")); //$NON-NLS-1$
+		}
+		return jLblProjName;
+	}
+	
+	public JLabel getJLabel() {
+		return getJLblProjName();
+	}
+
+	public JLabel getJLblProj() {
+		if (jLblProj == null) {
+	        jLblProj = new JLabel();
+			jLblProj.setText(curProj.getAbrev());
+		}
+		return jLblProj;
+	}
+	public void addBtnChangeProjActionListener(java.awt.event.ActionListener al) {
+		jBtnChangeProj.addActionListener(al);
+	}
+
+	/**
+	 * This method initializes jButton
+	 *
+	 * @return javax.swing.JButton
+	 */
+	public JButton getJBtnChangeProj() {
+		if (jBtnChangeProj == null) {
+			jBtnChangeProj = new JButton();			
+			jBtnChangeProj.setText("..."); //$NON-NLS-1$
+			jBtnChangeProj.setPreferredSize(new Dimension(50, 23));
+		}
+		return jBtnChangeProj;
+	}
+	
+	public void setTargetNad(boolean tarNad){
+		targetNad = tarNad;
+	}
+	
+	public boolean getTargetNad(){
+		return targetNad;
+	}
+	
+	/**
+	 * @return Returns the curProj.
+	 */
+	public IProjection getCurProj() {
+		return curProj;
+	}
+	/**
+	 * @param curProj The curProj to set.
+	 */
+	public void setCurProj(IProjection curProj) {
+		this.curProj = (ICrs) curProj;
+	}
+	/**
+	 * @return Returns the okPressed.
+	 */
+	public boolean isOkPressed() {
+		return okPressed;
+	}
+	/**
+	 * @param actionListener The actionListener to set.
+	 */
+	public void addActionListener(ActionListener actionListener) {
+		this.actionListener = actionListener;
+	}
+}  //  @jve:decl-index=0:visual-constraint="10,10"

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/ProjChooserPanel.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/EPSGpanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/EPSGpanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/EPSGpanel.java	(revision 25287)
@@ -0,0 +1,844 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import javax.swing.BorderFactory;
+import javax.swing.ButtonGroup;
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+import javax.swing.ListSelectionModel;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.ogr.Epsg2wkt;
+import org.gvsig.crs.ogr.CrsEPSG;
+
+import com.iver.andami.PluginServices;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+import es.idr.teledeteccion.connection.EpsgConnection;
+import es.idr.teledeteccion.connection.Query;
+
+/**
+ * Clase perteneciente al panel de eleccin de CRS del repositorio de la
+ * EPSG, realiza la bsqueda y filtra los vlidos.
+ * 
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ * @author Luisa Marina Fernndez (luisam.fernandez@uclm.es)
+ *
+ */
+public class EPSGpanel extends JPanel implements KeyListener, ActionListener{
+
+	private static final long serialVersionUID = 1L;
+	
+	String cadWKT = "";
+	String cad_valida = "";
+	public String key;
+	public String crs_kind = null;
+	String[] soported_crs = {"projected","geographic 2D","geographic 3D", "engineering", "vertical", "compound", "geocentric"};
+	String[] not_soported_crs = {};
+	
+	int iteracion = 0;
+	int transf = 0;
+	int source_cod = 0;
+	int method_code = 0;
+	int datum_code = 0;
+	int projection_conv_code = 0;
+	public int epsg_code  = 0;
+	public int selectedRowTable = -1;
+	private int codeCRS = -1;
+	int[] valid_method_code = {9800, 9801, 9802, 9803, 9804, 9805, 9806, 9807, 9808, 9809, 9810, 
+			9811, 9812, 9813, 9814, 9815, 9816, 9817, 9602, 9659, 9818, 9819, 9820, 9822, 
+			9827};
+	
+	
+	boolean tecla_valida = false;
+	boolean source_yn = false;
+	
+
+	private JRadioButton codeRadioButton = null;
+	private JRadioButton nameRadioButton = null;
+	private JRadioButton areaRadioButton = null;
+	private ButtonGroup optGroup;
+	private JPanel groupRadioButton = null;
+	
+	public EpsgConnection connect = null;
+	public JPanel EPSGpanel = null;
+	private JLabel lblCriterio;
+	private JButton infoCrs = null;
+	private JButton searchButton = null;
+	private JTextField searchTextField = null;
+	public JTable jTable = null;
+	private JScrollPane jScrollPane = null;
+	public DefaultTableModel dtm = null;	
+	public TableSorter sorter = null;
+	
+	private int projectionCode=-1;
+	
+	/**
+	 * Construye el Objeto EpsgPanel
+	 *
+	 */
+	public EPSGpanel(){
+		initialize();
+	}
+	/*
+	 * Define las propiedades y agrega los componentes del EPSGPanel
+	 */
+	private void initialize(){
+		this.setLayout(new BorderLayout());
+		JPanel pNorth=new JPanel();
+		pNorth.setLayout(new GridLayout(2,1));
+		pNorth.setBorder(BorderFactory.createEmptyBorder(3,3,3,3));
+		pNorth.add(getGroupRadioButton());
+		JPanel pInNorth = new JPanel();
+		pInNorth.setLayout(new FlowLayout(FlowLayout.LEFT,10,1));
+		pInNorth.add(getSearchButton());
+		pInNorth.add(getSearchTextField());
+		pNorth.add(pInNorth);
+		this.add(pNorth,BorderLayout.NORTH);
+		this.add(getJScrollPane(), BorderLayout.CENTER);	
+		JPanel pSouth=new JPanel(new FlowLayout(FlowLayout.RIGHT,10,3));
+		pSouth.add(getInfoCrs());
+		this.add(pSouth,BorderLayout.SOUTH);
+	}
+	/**
+	 * Establece la conexin con la Base de Datos de la Epsg
+	 *
+	 */
+	public void connection(){
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+	}
+	 /**
+	  * Inicializa el botn de opcin 'cdigo' 
+	  * @return
+	  */   
+	private JRadioButton getCodeRadioButton() {
+		if (codeRadioButton == null) {
+			codeRadioButton = new JRadioButton();
+			codeRadioButton.setText(PluginServices.getText(this,"por_codigo"));//setText("By Code EPSG");
+			codeRadioButton.setSelected(true);
+			codeRadioButton.addActionListener(this);
+		}
+		return codeRadioButton;
+	}
+	/**
+	 * Inicializa el botn de opcin 'nombre'
+	 * @return
+	 */ 
+	private JRadioButton getNameRadioButton() {
+		if (nameRadioButton == null) {
+			nameRadioButton = new JRadioButton();
+			nameRadioButton.setText(PluginServices.getText(this,"por_nombre"));
+			nameRadioButton.addActionListener(this);
+		}
+		return nameRadioButton;
+	}
+	/**
+	 * Inicializa el botn de opcin 'Area'
+	 * @return
+	 */
+	private JRadioButton getAreaRadioButton() {
+		if (areaRadioButton == null) {
+			areaRadioButton = new JRadioButton();
+			areaRadioButton.setText(PluginServices.getText(this,"por_area"));
+			areaRadioButton.addActionListener(this);
+		}
+		return areaRadioButton;
+	}
+	 /**
+	  * Obtiene el panel con todos los botones de opcin
+	  * @return
+	  */
+	private JPanel getGroupRadioButton() {
+		if (groupRadioButton == null) {
+			groupRadioButton = new JPanel();
+			groupRadioButton.setLayout(new GridLayout(1,4));
+			groupRadioButton.add(getLblCriterio());
+			groupRadioButton.add(getCodeRadioButton());
+			groupRadioButton.add(getNameRadioButton());
+			groupRadioButton.add(getAreaRadioButton());
+			//agrupar los botones
+			getOptGroup();
+		}
+		return groupRadioButton;
+	}
+	/**
+	 * Inicializa el laber 'Criterio de bsqueda'
+	 * @return
+	 */
+	private JLabel getLblCriterio(){
+		lblCriterio = new JLabel();
+		lblCriterio.setText(PluginServices.getText(this, "criterio_busqueda")+":");
+		return lblCriterio;
+	}
+
+	/**
+	 * Mtodo que controla la bsqueda de los CRS siguiendo los criterios
+	 * de bsqueda que le hemos definido. Tambin gestiona los casos en que
+	 * no encuentre CRS, o que los parmetros de bsqueda sean errneos. Si
+	 * encuentra algn CRS pero no es soportado por la aplicacin
+	 * aparecer el mensaje de informacin correspondiente.
+	 *
+	 */
+	private void searchButton() {
+		boolean not_valid = false;
+		boolean not_numeric = false;
+		searchTextField.setBackground(Color.white);
+		
+		if (searchTextField.getText().equals("")) {
+			searchTextField.setBackground(new Color(255,204,204));
+			JOptionPane.showMessageDialog(this, PluginServices.getText(this,"fill_name"), "Warning...", JOptionPane.WARNING_MESSAGE);
+		}		
+		
+		else {
+            //Eliminar filas en cada nueva bsqueda
+			int numRow = dtm.getRowCount();
+			while (numRow != 0) {
+				numRow = numRow - 1;
+				dtm.removeRow(numRow);
+			}
+			
+			if (codeRadioButton.isSelected() && (searchTextField.getText().length()!=searchTextField.getText().replaceAll("[^0-9]", "").length())){
+				not_numeric = true;
+			}
+			
+			//Dependiendo de la opcion se realizada una busqueda
+			ResultSet result = null;
+			ResultSet result2 = null;
+			/*
+			 * variable que indicara si la busqueda se hace primero en epsg_coordinatereferencesystem
+			 * o en epsg_area; esto es debido a que HSQLDB no soporta la bsqueda simultnea en ambas
+			 * tablas, por lo cual hay que separar la bsqueda
+			 */
+			int bus = 2;  			
+			if (codeRadioButton.isSelected() && !not_numeric) {
+				bus=0;
+				key = searchTextField.getText();
+				int code = Integer.parseInt(key);
+				String sentence = "SELECT coord_ref_sys_code, coord_ref_sys_name, coord_ref_sys_kind, area_of_use_code, " +
+								  "source_geogcrs_code, projection_conv_code  " +
+								  "FROM epsg_coordinatereferencesystem " +	                              
+	                              "WHERE coord_ref_sys_code = " + code;
+								
+				result = Query.select(sentence,connect.getConnection());	
+				
+			}
+			
+			else if (nameRadioButton.isSelected()) {
+				bus=0;
+				key = searchTextField.getText();
+				key = key.toLowerCase();
+				String key2 = key.substring(0,1);
+				String key3 = key.substring(1,key.length());
+				key2 = key2.toUpperCase();
+				
+				String sentence = "SELECT coord_ref_sys_code, coord_ref_sys_name, coord_ref_sys_kind, " +
+									"area_of_use_code, source_geogcrs_code, projection_conv_code " +
+				  					"FROM epsg_coordinatereferencesystem " +	                              
+				  					"WHERE (coord_ref_sys_name LIKE '%" + key + "%') OR (coord_ref_sys_name LIKE '%"+ 
+				  					key.toUpperCase() +"%') " +
+				  					"OR (coord_ref_sys_name LIKE '%" + key2+key3 +"%')";
+				result = Query.select(sentence,connect.getConnection());
+			}
+			
+			else if (areaRadioButton.isSelected()) {
+				bus=1;
+				key = searchTextField.getText();
+				key = key.toLowerCase();				
+				String key2 = key.substring(0,1);
+				String key3 = key.substring(1,key.length());
+				key2 = key2.toUpperCase();				
+				
+				String sentence = "SELECT area_name, area_of_use, area_code " +
+	                              "FROM epsg_area " +
+	                              "WHERE (area_name LIKE '%" + key + "%') OR (area_of_use LIKE '%" + key + "%') "+
+	                              "OR (area_name LIKE '%" + key.toUpperCase() + "%') OR (area_of_use LIKE '%" + key.toUpperCase() + "%') "+
+	                              "OR (area_name LIKE '%" + key2+key3 + "%') OR (area_of_use LIKE '%" + key2+key3 + "%') ";
+				result = Query.select(sentence,connect.getConnection());				
+			}
+			
+			if (bus==0){
+				try {
+					while(result.next()) {
+						Object[]data = new Object[5];
+						data[0] = String.valueOf(result.getInt("coord_ref_sys_code"));
+						data[1] = result.getString("coord_ref_sys_name");
+						crs_kind = result.getString("coord_ref_sys_kind");
+						data[2] = crs_kind;
+						projection_conv_code = result.getInt("projection_conv_code");
+						setProjectionCode(projection_conv_code);
+						
+						int area_of_use_code = Integer.parseInt(result.getString("area_of_use_code"));
+										
+						String sentence = "SELECT area_name, area_of_use FROM epsg_area " +
+										"WHERE area_code = "+ area_of_use_code ;
+						
+						result2 = Query.select(sentence,connect.getConnection());
+						while(result2.next()){
+							data[3] = result2.getString("area_name");
+							data[4] = result2.getString("area_of_use");					
+						}
+						if (data[0]!=null /*&& validCRS(projection_conv_code)*/ && valid(crs_kind)){
+							dtm.addRow(data);
+						}
+					}
+				}
+				
+				catch (SQLException e1) {
+					e1.printStackTrace();
+				}
+			}
+			else if (bus==1){
+				try {
+					while(result.next()) {
+						Object[]data = new Object[5];
+						data[3] = result.getString("area_name");
+						data[4] = result.getString("area_of_use");	
+											
+						int area_of_use_code = Integer.parseInt(result.getString("area_code"));
+										
+						String sentence = "SELECT coord_ref_sys_code, coord_ref_sys_name, " +
+										"coord_ref_sys_kind, source_geogcrs_code, projection_conv_code " +
+										"FROM epsg_coordinatereferencesystem " +
+										"WHERE area_of_use_code = "+ area_of_use_code ;
+						
+						result2 = Query.select(sentence,connect.getConnection());
+						while(result2.next()){
+							data[0] = String.valueOf(result2.getInt("coord_ref_sys_code"));
+							data[1] = result2.getString("coord_ref_sys_name");
+							data[2] = result2.getString("coord_ref_sys_kind");
+							crs_kind = (String)data[2];
+							projection_conv_code = result2.getInt("projection_conv_code");
+							setProjectionCode(projection_conv_code);
+						}
+						/*
+						 * Buscaremos solo aquellos CRS cuyas proyecciones esten entre las
+						 * 16 soportadas por proj4 para ello creamos un metodo para validar
+						 * si esta entre estas proyecciones
+						 */						
+						if (data[0]!=null /*&& validCRS(projection_conv_code)*/ && valid(crs_kind)){
+							dtm.addRow(data);
+						}	
+						if (notValid(crs_kind)){
+							not_valid = true;
+						}
+					}
+				} 
+				
+				catch (SQLException e1) {
+					e1.printStackTrace();
+				}
+			}
+			int numr = dtm.getRowCount();			
+			if (not_valid){
+				JOptionPane.showMessageDialog(this, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+						JOptionPane.WARNING_MESSAGE);
+				not_valid = false;
+			}
+			else if (not_numeric) {
+				JOptionPane.showMessageDialog(EPSGpanel.this, 
+						PluginServices.getText(this,"numeric_format"), 
+						"Warning...", JOptionPane.WARNING_MESSAGE);
+				searchTextField.setText("");
+			}
+			else if (numr == 0){
+			JOptionPane.showMessageDialog(this, PluginServices.getText(this,"no_results"), "Warning...",
+					JOptionPane.WARNING_MESSAGE);
+			}
+			else{
+				this.getJTable().setRowSelectionInterval(0,0);
+			}
+		}		
+	}	
+	
+	/**
+	 * metodo auxiliar que hara la comprobacion de si el CRS buscado pertenecera
+	 * a los no soportados por proj4
+	 */
+	private boolean notValid(String kind){		
+		for (int i = 0; i< not_soported_crs.length; i++){
+			if (kind.equals(not_soported_crs[i])){
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	/**
+	 * Metodo que comprueba si el CRS buscado pertenece a algun tipo 
+	 * de los que soporta la aplicacion
+	 */
+	private boolean valid(String kind){		
+		for (int i = 0; i< soported_crs.length; i++){
+			if (kind.equals(soported_crs[i])){
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	/**
+	 * metodo auxiliar que nos servira para comprobar si la proyeccion del CRS seleccionado
+	 * esta entre las 16 con las que trabaja proj4
+	 */
+	private boolean validCRS(int projection_conv_code2) {
+		if (projection_conv_code2 == 0) return true;
+		String sentence = "SELECT coord_op_method_code " +
+							"FROM epsg_coordoperation " +
+							"WHERE coord_op_code = " + projection_conv_code;
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			while (result.next()){
+				method_code = result.getInt("coord_op_method_code");
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+		
+		for (int i = 0; i< valid_method_code.length; i++){
+			if (method_code == valid_method_code[i] ){
+				return true;
+			}
+		}		
+		return false;
+	}
+
+	/**
+	 * Inicializa el botn de bsqueda
+	 * @return
+	 */
+	private JButton getSearchButton() {
+		if (searchButton == null) {
+			searchButton = new JButton();
+			searchButton.setPreferredSize(new Dimension(75,20));
+			searchButton.setText(PluginServices.getText(this,"buscar"));
+			searchButton.setMnemonic('S');
+			searchButton.setToolTipText(PluginServices.getText(this,"buscar_por_criterio_seleccion"));
+			searchButton.addActionListener(this);			
+		}
+		return searchButton;
+	}	
+	/**
+	 * Inicializa el cuadro de texto en el que se introduce el dato a buscar
+	 * @return
+	 */
+	private JTextField getSearchTextField() {
+		if (searchTextField == null) {
+			searchTextField = new JTextField();
+			searchTextField.setPreferredSize(new Dimension(350,20));
+			searchTextField.addKeyListener(this);			
+		}
+		return searchTextField;
+	}
+	/**
+	 * Inicializa la tabla que se utiliza para mostrar 
+	 * los resultados de la bsqueda
+	 * @return
+	 */
+	public JTable getJTable() {
+		if (jTable == null) {
+			String[] columnNames= {PluginServices.getText(this,"codigo"),
+					PluginServices.getText(this,"nombre"),
+					PluginServices.getText(this,"tipo"),
+					PluginServices.getText(this,"area"),
+			PluginServices.getText(this,"descripcion")};
+			Object[][]data = {};			
+			dtm = new DefaultTableModel(data, columnNames)
+			 {
+				private static final long serialVersionUID = 1L;
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}
+				/*
+				 * metodo necesario para cuando utilizamos tablas ordenadas
+				 * ya que sino al ordenar por algun campo no se queda con el orden
+				 * actual al seleccionar una fila (non-Javadoc)
+				 * @see javax.swing.table.TableModel#getColumnClass(int)
+				 */
+				public Class getColumnClass(int column)
+				{
+					return getValueAt(0, column).getClass();
+				}
+				};
+			sorter = new TableSorter(dtm);			
+
+			jTable = new JTable(sorter);
+			//jTable.setPreferredSize(new Dimension(800, 100));
+			sorter.setTableHeader(jTable.getTableHeader());
+			jTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
+			jTable.setCellSelectionEnabled(false);
+			jTable.setRowSelectionAllowed(true);
+			jTable.setColumnSelectionAllowed(false);
+			jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			TableColumn column = null;
+			for (int i = 0; i < columnNames.length; i++) {
+			    column = jTable.getColumnModel().getColumn(i);
+			    if (i == 0) {
+			        column.setPreferredWidth(50); //code column is shorter			     	
+			    }			    	
+			    else if (i == 2) {
+			    	column.setPreferredWidth(80);
+			    }	
+			    else if (i==4){
+			    	column.setPreferredWidth(300);
+			    }
+			    else {
+			        column.setPreferredWidth(140);
+			    }
+			}			
+		}
+		
+		return jTable;
+		
+	}
+	/**
+	 * Establece el cdigo se CRS
+	 * @param code
+	 */
+	public void setCodeCRS(int code) {
+		codeCRS = code;
+	}
+	/**
+	 * Obtiene el cdigo de CRS
+	 * @return
+	 */
+	public int getCodeCRS() {
+		return codeCRS;
+	}	
+	/**
+	 * Inicializa el panel que contiene la tabla de resultados
+	 * @return
+	 */
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane(getJTable(),JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
+			jScrollPane.setPreferredSize(new Dimension(500,150));
+			jScrollPane.setBorder(
+				    BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(3,3,3,3),jScrollPane.getBorder()));
+			
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+	/**
+	 * Inicializa el botn que muestra la informacin de CRS seleccionado
+	 * @return
+	 */
+	public JButton getInfoCrs() {
+		if(infoCrs == null) {
+			infoCrs = new JButton();
+			infoCrs.setPreferredSize(new Dimension(85,20));
+			infoCrs.setText(PluginServices.getText(this,"infocrs"));			
+			infoCrs.setMnemonic('I');
+			infoCrs.setEnabled(false);
+			infoCrs.setToolTipText(PluginServices.getText(this,"more_info"));
+			infoCrs.addActionListener(this);
+		}
+		return infoCrs;
+	}
+	
+	
+	public ICrs getProjection() {
+		try {
+			String txt = getWKT();			
+			//ICrs crs = new CrsFactory().getCRS(epsg_code, txt);
+			ICrs crs = new CrsFactory().getCRS("EPSG:"+epsg_code);
+			return crs ;
+		} catch (CrsException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	/**
+	 * Genera la cadena WKT una vez que escogemos el CRS de la tabla.
+	 * Dicha cadena la generamos con los parmetros cogidos directamente
+	 * del repositorio de la EPSG, y ms adelante volveremos a tratarla
+	 * para pasarla a una cadena legible por la proj4.
+	 *
+	 */
+	public void setWKT(){
+		Epsg2wkt wkt = null;
+						
+		epsg_code = getCodeCRS();
+		if (epsg_code != -1){		
+			/*
+			 * ahora que he escogido, recojo toda la informacion que me va a hacer falta
+			 */
+			String sentence = "SELECT source_geogcrs_code, projection_conv_code, " +
+					"coord_ref_sys_kind, datum_code " +
+							"FROM epsg_coordinatereferencesystem " +
+							"WHERE coord_ref_sys_code = "+ epsg_code ;
+			ResultSet result = Query.select(sentence,connect.getConnection());
+			
+			try {
+				result.next();
+				source_cod = result.getInt("source_geogcrs_code");
+				projection_conv_code = result.getInt("projection_conv_code");
+				crs_kind = result.getString("coord_ref_sys_kind");
+				datum_code = result.getInt("datum_code");
+			} catch (SQLException e1) {
+				e1.printStackTrace();
+			}
+			
+			if (datum_code != 0){
+				source_yn = true;
+			}
+			else if (source_cod != 0){
+				source_yn = false;
+			}
+			else source_yn = true;
+			
+			CrsEPSG ep = new CrsEPSG(epsg_code, source_yn, source_cod, projection_conv_code, connect);
+			
+			if (crs_kind.equals("geographic 2D") || crs_kind.equals("geographic 3D")){
+				wkt = new Epsg2wkt(ep , "geog");			
+			}
+			else if (crs_kind.equals("projected")){
+				wkt = new Epsg2wkt(ep, "proj");
+			}
+			else if (crs_kind.equals("compound")){
+				wkt = new Epsg2wkt(ep,"comp");
+			}
+			else if (crs_kind.equals("geocentric")){
+				wkt = new Epsg2wkt(ep,"geoc");
+			}
+		}
+		else {
+			JOptionPane.showMessageDialog(this, 
+					PluginServices.getText(this,"crs_no_selected."), 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			
+		}
+		cadWKT = wkt.getWKT();
+	}
+		
+	public String getWKT(){
+		return cadWKT;
+	}
+	
+	public void setProjection(IProjection crs) {
+		//setCrs((ICrs) crs);
+	}
+	
+	/**
+	 * Metodo para cargar en el CRS de la capa el CRS de la vista.
+	 * Se utilizar a la hora de arrancar la definicin del CRS de la nueva capa
+	 */	
+	public void loadViewCRS(int code){
+		connection();
+		String sentence = "SELECT coord_ref_sys_code, coord_ref_sys_name, coord_ref_sys_kind, area_of_use_code, " +
+						  "source_geogcrs_code, projection_conv_code  " +
+						  "FROM epsg_coordinatereferencesystem " +	                              
+				        "WHERE coord_ref_sys_code = " + code;
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		
+		try {
+			result.next();
+			Object[]data = new Object[5];
+			data[0] = String.valueOf(result.getInt("coord_ref_sys_code"));
+			data[1] = result.getString("coord_ref_sys_name");
+			crs_kind = result.getString("coord_ref_sys_kind");
+			data[2] = crs_kind;
+			projection_conv_code = result.getInt("projection_conv_code");
+			
+			int area_of_use_code = Integer.parseInt(result.getString("area_of_use_code"));
+							
+			sentence = "SELECT area_name, area_of_use FROM epsg_area " +
+							"WHERE area_code = "+ area_of_use_code ;
+			
+			ResultSet result2 = Query.select(sentence,connect.getConnection());
+			result2.next();
+			data[3] = result2.getString("area_name");
+			data[4] = result2.getString("area_of_use");					
+			
+			dtm.addRow(data);					
+		}
+		
+		catch (SQLException e1) {
+			e1.printStackTrace();
+		}
+	}
+	/**
+	 * Controla si se pulsa intro en el cuadro de texto,
+	 * en ese caso se interpreta como si hubiese pulsado el botn 'Buscar'
+	 */
+	public void keyPressed(KeyEvent e) {	
+		if (e.getSource() == this.getSearchTextField()) {
+			if (e.getKeyCode() == 10) {
+				searchButton();
+			}			
+		}		
+	}
+
+	public void keyReleased(KeyEvent e) {
+		
+	}
+
+	public void keyTyped(KeyEvent e) {
+		
+	}
+
+	/**
+	 * Maneja los eventos de los botones y los radioButtons del panel
+	 * de la EPSG.
+	 */
+	public void actionPerformed(ActionEvent e) {
+		/*Si el objeto que genera el evento es el RadioButton 'Codigo'-->
+		resetea el texto de bsqueda*/
+		if (e.getSource() == this.getCodeRadioButton()) {
+			searchTextField.setText("");
+		}
+		/*Si el objeto que genera el evento es el RadioButton 'Nombre'-->
+		resetea el texto de bsqueda*/
+		if (e.getSource() == this.getNameRadioButton()) {
+			searchTextField.setText("");
+		}
+		/*Si el objeto que genera el evento es el RadioButton 'Area'-->
+		resetea el texto de bsqueda*/
+		if (e.getSource() == this.getAreaRadioButton()) {
+			searchTextField.setText("");
+		}
+		/*Si el objeto que genera el evento es el JButton 'Buscar'-->
+		Comprueba que no est vacio*/
+		if (e.getSource() == this.getSearchButton()) {
+			searchTextField.setBackground(Color.white);
+			if (searchTextField.getText().equals("")) {
+				searchTextField.setBackground(new Color(255,204,204));
+				JOptionPane.showMessageDialog(EPSGpanel.this, 
+						PluginServices.getText(this,"fill_name"), 
+						"Warning...", JOptionPane.WARNING_MESSAGE);
+			}
+			else {
+				searchButton();
+			}
+		}
+		/*Si el objeto que genera el evento es el JButton 'InfoCrs'
+		se muestra la informacin ralicionada con el Crs seleccionado en la tabla*/
+		if (e.getSource() == this.getInfoCrs()) {
+			InfoCRSPanel info = new InfoCRSPanel("EPSG", getCodeCRS());
+			PluginServices.getMDIManager().addWindow(info);
+		}
+	}
+	/**
+	 * Agrupa los botones de opcin
+	 * @return
+	 */
+	public ButtonGroup getOptGroup() {
+		if (optGroup==null){
+			optGroup=new ButtonGroup();
+			optGroup.add(getCodeRadioButton());
+			optGroup.add(getNameRadioButton());
+			optGroup.add(getAreaRadioButton());
+		}
+		return optGroup;
+	}
+	
+	public void setProjectionCode(int projCode) {
+		String sentence = "SELECT coord_op_method_code " +
+			"FROM epsg_coordoperation " +
+			"WHERE coord_op_code = " + projCode;
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			while (result.next()){
+				projectionCode = result.getInt("coord_op_method_code");
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+	}
+	
+	public int getProjectionCode(String code) {
+		int cod= Integer.parseInt(code);
+		
+		String sentence = "SELECT projection_conv_code  " +
+						  "FROM epsg_coordinatereferencesystem " +	                              
+				        "WHERE coord_ref_sys_code = " + code;
+		
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		int projCode = 0;
+		try {
+			while (result.next()){
+				projCode = result.getInt("projection_conv_code");
+			}
+		} catch (SQLException e1) {
+			// TODO Auto-generated catch block
+			e1.printStackTrace();
+		}
+		sentence = "SELECT coord_op_method_code " +
+					"FROM epsg_coordoperation " +
+					"WHERE coord_op_code = " + projCode;
+		
+		result = Query.select(sentence,connect.getConnection());
+		try {
+			while (result.next()){
+				projectionCode = result.getInt("coord_op_method_code");
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+		return projectionCode;
+	}
+}
\ No newline at end of file

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/EPSGpanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TreePanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TreePanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TreePanel.java	(revision 25287)
@@ -0,0 +1,201 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.util.Hashtable;
+
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.JTree;
+import javax.swing.border.EmptyBorder;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeModel;
+
+/**
+ * 
+ * @author Diego Guerrero (diego.guerrero@uclm.es)
+ *
+ */
+public class TreePanel extends JPanel {
+
+	private static final long serialVersionUID = 1L;
+	private int 		wComp = 190;
+	private int 		hComp = 360;
+	private int 		hTree = (int)Math.floor(hComp * 0.68);
+	private int 		hList = 50;
+	private JScrollPane pTree = null;
+	private JScrollPane pList = null;
+	private JTree tree = null;
+	//private JList list = null;
+	private JTextArea list = null;
+	private DefaultMutableTreeNode raiz = null;
+	private Hashtable	map;
+	String rootName = "";
+
+	public TreePanel(String rootName) {
+		super();
+		this.rootName = rootName;
+		initialize();
+	}
+	
+	private void initialize() {
+		map = new Hashtable();
+		raiz =  new DefaultMutableTreeNode(rootName);
+		this.setLayout(new BorderLayout());
+		this.setBorder(new EmptyBorder(0,10,10,10));
+		this.add(getPTree(),BorderLayout.CENTER);
+		this.add(getPList(),BorderLayout.SOUTH);
+	}
+	
+	/**
+	 * This method initializes jPanel	
+	 * 	
+	 * @return javax.swing.JPanel	
+	 */
+	private JScrollPane getPTree() {
+		if (pTree == null) {
+			pTree = new JScrollPane();
+			//pTree.setPreferredSize(new java.awt.Dimension(wComp, hTree));
+			pTree.setViewportBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
+			pTree.setVerticalScrollBarPolicy(javax.swing.JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
+			pTree.setViewportView(getTree());
+		}
+		return pTree;
+	}
+
+	/**
+	 * This method initializes jPanel1	
+	 * 	
+	 * @return javax.swing.JPanel	
+	 */
+	private JScrollPane getPList() {
+		if (pList == null) {
+			pList = new JScrollPane();
+			//pList.setPreferredSize(new java.awt.Dimension(wComp, hList));
+			pList.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
+			pList.setBackground(java.awt.Color.white);
+			pList.setVerticalScrollBarPolicy(javax.swing.JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
+			pList.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
+			pList.setViewportView(getList());
+		}
+		return pList;
+	}
+
+	/**
+	 * This method initializes jTree	
+	 * 	
+	 * @return javax.swing.JTree	
+	 */
+	public JTree getTree() {
+		if (tree == null) {
+			tree = new JTree(raiz);
+		}
+		return tree;
+	}
+
+	/**
+	 * This method initializes jList	
+	 * 	
+	 * @return javax.swing.JList	
+	 */
+	public JTextArea getList() {
+		if (list == null) {
+			list = new JTextArea();
+			list.setLineWrap(true);
+			list.setWrapStyleWord(true);
+			list.setEditable(false);
+		}
+		return list;
+	}
+	
+	public void setPanelSize(int w, int h){
+		wComp = w;
+		hComp = h;
+		hTree = (int)Math.floor(hComp * 0.68);
+		hList = hComp - hTree;
+        this.setPreferredSize(new java.awt.Dimension(wComp, hComp));
+		setPreferredSize(new java.awt.Dimension(wComp, hComp));
+		pTree.setPreferredSize(new java.awt.Dimension(wComp, hTree));
+		pList.setPreferredSize(new java.awt.Dimension(wComp, hList));
+	}
+	
+	/**
+	 * A�ade una nueva categoria al arbol
+	 * @param name	Etiqueta que aparece en el arbol. 
+	 * @param pos	Posici�n en el arbol de la nueva categoria
+	 */
+	public void addClass(String name, int pos){
+		DefaultTreeModel model =(DefaultTreeModel)tree.getModel();
+		DefaultMutableTreeNode r = new DefaultMutableTreeNode( name );
+		model.insertNodeInto(r, raiz, pos);
+	}
+	
+	/**
+	 * A�ade una entrada a una categoria
+	 * @param name Nombre de la entrada a a�adir
+	 * @param parentName Categoria a la que a�adimos
+	 * @param value Valor asociado a la entrada
+	 */
+	public void addEntry(String name, String parentName, String value){
+		DefaultTreeModel model =(DefaultTreeModel)tree.getModel();
+		for(int i = 0; i < model.getChildCount(raiz); i++){
+			if(model.getChild(raiz, i).toString().equals(parentName)){
+				DefaultMutableTreeNode node = (DefaultMutableTreeNode)model.getChild(raiz, i);
+				node.add(new DefaultMutableTreeNode(name));
+				if (value!=null)
+					map.put(name,value);
+			}
+		}
+	}
+	
+	public void setRoot(String name){
+		DefaultTreeModel model =(DefaultTreeModel)tree.getModel();
+		//for (int index = 0; index<model.getChildCount(model.getRoot());index++)
+		//	model.removeNodeFromParent((DefaultMutableTreeNode)model.getChild(raiz, index));
+		rootName=name;
+		raiz =  new DefaultMutableTreeNode(rootName);
+		model.setRoot(raiz);
+		map.clear();
+		
+	}
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TreePanel.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefinirDatum.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefinirDatum.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefinirDatum.java	(revision 25287)
@@ -0,0 +1,1383 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels.wizard;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+
+import javax.swing.BorderFactory;
+import javax.swing.ButtonGroup;
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JTextField;
+import javax.swing.plaf.basic.BasicComboBoxRenderer;
+import javax.units.ConversionException;
+import javax.units.Unit;
+
+import org.geotools.referencing.crs.AbstractSingleCRS;
+import org.geotools.referencing.datum.DefaultEllipsoid;
+import org.geotools.referencing.datum.DefaultGeodeticDatum;
+import org.geotools.referencing.datum.DefaultPrimeMeridian;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.dialog.ImportNewCrsDialog;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+
+import com.iver.andami.PluginServices;
+import com.iver.utiles.swing.JComboBox;
+
+import es.idr.teledeteccion.connection.EpsgConnection;
+import es.idr.teledeteccion.connection.Query;
+
+/**
+ * Panel de definicin del Datum 
+ * 
+ * @author Luisa Marina Fernandez Ruiz (luisam.fernandez@uclm.es)
+ * @author Jose Luis Gomez Martinez (joseluis.gomez@uclm.es)
+ * 
+ *
+ */
+public class DefinirDatum extends JPanel implements ActionListener, FocusListener, ItemListener, KeyListener{
+	
+	private JTextField txtDatum;
+	private JTextField txtElipsoide;
+	private JTextField txtSemMay;
+	private JTextField txtSemMen;
+	private JTextField txtInvF;
+	private JTextField txtMeridian;
+	private JTextField txtLong;
+	private JTextField txtNombreCrs;
+	private JTextField txtCodigoCrs;
+	
+	private JLabel lblDatum;
+	private JLabel lblElipsoide;
+	private JLabel lblMeridian;
+	private JLabel lblLong;
+	private JLabel lblNombreCrs;
+	private JLabel lblCodigoCrs;
+	private JLabel lblSemiejeMayor;
+	private JLabel lblSemiejeMenor;
+	private JLabel lblInverseFlat;
+	private JLabel lblDefinir;
+	
+	
+	private JButton btnImportDatum;
+	private JButton btnImportElipsoide;
+	private JButton btnImportMeridian;
+	
+	private JComboBox cbSemMay;
+	private JComboBox cbSemMen;
+	private JComboBox cbInvF;
+	private JComboBox cbLong;
+	
+	private JRadioButton rbA_Inv;
+	private JRadioButton rbA_B;
+	private ButtonGroup groupRadioButton;
+	
+	private Dimension bigSize;
+	private Dimension smallSize;
+	private Dimension dimLabels;
+//	private ImageIcon imodify;
+	
+	private static final long serialVersionUID = 1L;
+	ICrs crs = null;
+	
+	private String sourceUnitLong = null;
+	private String sourceUnitSemMay = null;
+	private String sourceUnitSemMen = null;
+	
+	ArrayList lengthUnits = null;
+	ArrayList angularUnits = null;
+	int divider=10000;
+	
+	boolean primera = true;
+	
+	/**
+     * Small tolerance factor for rounding errors.
+     */
+    private static final double EPS = 1E-8;
+
+	public DefinirDatum() {
+		
+		super();
+		//imodify = new ImageIcon(DefinirDatum.class.getClassLoader().getResource("images/search.png"));
+		dimLabels=new Dimension(110,15);
+		this.setLayout(new BorderLayout());
+		this.setBorder(BorderFactory.createEmptyBorder(4,4,4,4));
+		bigSize=new Dimension();
+		bigSize.width=350;
+		smallSize=new Dimension();
+		smallSize.width=130;
+		inicializarNuevo();
+		
+	}
+	private void inicializarNuevo(){
+		JPanel pMain=new JPanel();
+		JPanel pDatum=new JPanel();
+		JPanel pElipsoide=new JPanel();
+		JPanel pMeridian=new JPanel();
+		JPanel pNorthis=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
+		pMain.setLayout(new BorderLayout());
+		
+		pMain.setBorder(BorderFactory.createTitledBorder(PluginServices.getText(this,"Dat_nDatum")));
+		pElipsoide.setBorder(BorderFactory.createTitledBorder(PluginServices.getText(this,"Dat_nElipsoide")));
+		pMeridian.setBorder(BorderFactory.createTitledBorder(PluginServices.getText(this,"Dat_nMeridian")));
+		
+		/*Panel que contiene los datos del Datum*/
+		pDatum.setLayout(new GridLayout(2,1));
+		JPanel pD1=new JPanel(new FlowLayout(FlowLayout.LEFT,10,0));
+		pD1.add(getLblDatum());
+		JPanel pD2=new JPanel(new FlowLayout(FlowLayout.LEFT,10,0));
+		pD2.add(getTxtDatum());
+		pD2.add(getBtnImportDatum());
+		pDatum.add(pD1);
+		pDatum.add(pD2);
+		
+		/*Panel que contiene los datos del Elipsoide*/
+		pElipsoide.setLayout(new GridLayout(6,1));
+		//Crear y agregar los componentes a los subpaneles que componen el panel de definicin del elipsoide
+		JPanel pE1=new JPanel(new FlowLayout(FlowLayout.LEFT,10,2));
+		pE1.add(getLblElipsoide());
+		JPanel pE2=new JPanel(new FlowLayout(FlowLayout.LEFT,10,2));
+		pE2.add(getTxtElipsoide());
+		pE2.add(getBtnImportElipsoide());
+		JPanel pE3=new JPanel(new FlowLayout(FlowLayout.LEFT,10,2));
+		pE3.add(getLblDefinir());
+		pE3.add(getRbA_Inv());
+		pE3.add(getRbA_B());
+		JPanel pE4=new JPanel(new FlowLayout(FlowLayout.LEFT,10,2));
+		//Semieje mayor
+		pE4.add(getLblSemiejeMayor());
+		pE4.add(getTxtSemMay());
+		pE4.add(getCbSemMay());
+		JPanel pE5=new JPanel(new FlowLayout(FlowLayout.LEFT,10,2));
+		pE5.add(getLblInverseFlat());
+		pE5.add(getTxtInvF());
+		JPanel pE6=new JPanel(new FlowLayout(FlowLayout.LEFT,10,2));
+		//Semieje menor
+		pE6.add(getLblSemiejeMenor());
+		pE6.add(getTxtSemMen());
+		pE6.add(getCbSemMen());
+		
+		//Agregar los subpaneles al panel del Elipsoide
+		pElipsoide.add(pE1);
+		pElipsoide.add(pE2);
+		pElipsoide.add(pE3);
+		pElipsoide.add(pE4);
+		pElipsoide.add(pE5);
+		pElipsoide.add(pE6);
+		//Agrupar los Radio Buttoms
+		agruparRadioButtons();
+		
+		/*Panel que contiene los datos del Meridiano*/
+		pMeridian.setLayout(new GridLayout(2,1));
+		JPanel pM1=new JPanel(new FlowLayout(FlowLayout.LEFT,10,3));
+		pM1.add(getLblMeridian());
+		pM1.add(getTxtMeridian());
+		pM1.add(getBtnImportMeridian());
+		JPanel pM2=new JPanel(new FlowLayout(FlowLayout.LEFT,10,3));
+		pM2.add(getLblLong());
+		pM2.add(getTxtLong());
+		pM2.add(getCbLong());
+		pMeridian.add(pM1);
+		pMeridian.add(pM2);
+		pMain.add(pDatum,BorderLayout.NORTH);
+		pMain.add(pElipsoide,BorderLayout.CENTER);
+		pMain.add(pMeridian,BorderLayout.SOUTH);
+		this.add(pMain,BorderLayout.CENTER);
+		//Agregar en norte-this el nombre y el cdigo
+		pNorthis.add(getLblNombreCrs());
+		pNorthis.add(getTxtNombreCrs());
+		pNorthis.add(getLblCodigoCrs());
+		pNorthis.add(getTxtCodigoCrs());
+		this.add(pNorthis,BorderLayout.NORTH);
+		
+	}
+	/**
+	 * Inicializa el botn Importar del datum
+	 * @return
+	 */
+	public JButton getBtnImportDatum() {
+		if(btnImportDatum==null){
+			btnImportDatum=new JButton();
+			btnImportDatum.setText("...");
+			//btnImportDatum.setIcon(imodify);
+			btnImportDatum.addActionListener(this);
+		}
+		return btnImportDatum;
+	}
+	/**
+	 * Inicializa el botn Importar del Elipsoide
+	 * @return
+	 */
+	public JButton getBtnImportElipsoide() {
+		if(btnImportElipsoide==null){
+			btnImportElipsoide=new JButton();
+			btnImportElipsoide.setText("...");
+			//btnImportElipsoide.setIcon(imodify);
+			btnImportElipsoide.addActionListener(this);
+		}
+		return btnImportElipsoide;
+	}
+	/**
+	 * Inicializa el botn Importar del Meridiano
+	 * @return
+	 */
+	public JButton getBtnImportMeridian() {
+		if(btnImportMeridian==null){
+			btnImportMeridian=new JButton();
+			btnImportMeridian.setText("...");
+			//btnImportMeridian.setIcon(imodify);
+			btnImportMeridian.addActionListener(this);
+		}
+		return btnImportMeridian;
+	}
+	/**
+	 * Inicializa el Combo box con las unidades de Inverse Flat
+	 * @return
+	 */
+	public JComboBox getCbInvF() {
+		if (cbInvF==null){
+			ArrayList units = obtenerItemsUnidades();
+			String[] items = new String[units.size()];
+			for (int i=0;i<units.size();i++){
+				items[i] = units.get(i).toString();
+			}
+			cbInvF=new JComboBox(items);
+			/*Seleccionar un item por defecto*/
+			cbInvF.setSelectedIndex(0);
+			cbInvF.addItemListener(this);
+		}
+		return cbInvF;
+	}
+	/**
+	 * Inicializa el Combo box con las unidades de Longitud
+	 * @return
+	 */
+	public JComboBox getCbLong() {
+		if (cbLong==null){
+			ArrayList units = obtenerItemsUnidadesAngle();
+			String[] items = new String[units.size()];
+			String[] tooltips = new String[units.size()];
+			for (int i=0;i<units.size();i++){
+				items[i] = tooltips[i] = units.get(i).toString();
+			}
+			cbLong=new JComboBox(items);
+			cbLong.setRenderer(new ComboBoxTootipRenderer(tooltips));
+			cbLong.setPreferredSize(new Dimension(230, 25));
+			/*Seleccionar un item por defecto*/
+			cbLong.setSelectedIndex(1);
+			cbLong.addItemListener(this);
+			sourceUnitLong = getAngularUnit(cbLong.getSelectedIndex());
+		}
+		return cbLong;
+	}
+	/**
+	 * Inicializa el Combo box con las unidades de Semieje Mayor
+	 * @return
+	 */
+	public JComboBox getCbSemMay() {
+		if (cbSemMay==null){
+			ArrayList units = obtenerItemsUnidades();
+			String[] items = new String[units.size()];
+			String[] tooltips = new String[units.size()];
+			for (int i=0;i<units.size();i++){
+				items[i] = tooltips[i] = units.get(i).toString();
+			}
+			cbSemMay=new JComboBox(items);
+			cbSemMay.setRenderer(new ComboBoxTootipRenderer(tooltips));
+			cbSemMay.setPreferredSize(new Dimension(230, 25));
+			/*Seleccionar un item por defecto*/
+			cbSemMay.setSelectedIndex(0);
+			cbSemMay.addItemListener(this);
+			sourceUnitSemMay = getLengthUnit(cbSemMay.getSelectedIndex());
+		}
+		return cbSemMay;
+	}
+	/**
+	 * Inicializa el Combo box con las unidades de Semieje Menor
+	 * @return
+	 */
+	public JComboBox getCbSemMen() {
+		if (cbSemMen==null){
+			ArrayList units = obtenerItemsUnidades();
+			String[] items = new String[units.size()];
+			String[] tooltips = new String[units.size()];
+			for (int i=0;i<units.size();i++){
+				items[i] = tooltips[i] = units.get(i).toString();
+			}
+			cbSemMen=new JComboBox(items);
+			cbSemMen.setRenderer(new ComboBoxTootipRenderer(tooltips));
+			cbSemMen.setPreferredSize(new Dimension(230, 25));
+			/*Seleccionar un item por defecto*/
+			cbSemMen.setSelectedIndex(0);
+			cbSemMen.addItemListener(this);
+			sourceUnitSemMen = getLengthUnit(cbSemMen.getSelectedIndex());
+		}
+		return cbSemMen;
+	}
+	/*
+	 * Accede al la base de datos y obtiene los items de
+	 * los combobox
+	 * @return
+	 */
+	private ArrayList obtenerItemsUnidades(){ //unidades de longitud...
+		//TODO: Obtener los items del combo de la base de datos
+		ArrayList items = new ArrayList();
+		ArrayList lengthUnits = new ArrayList();
+				
+		String sentence = "SELECT unit_of_meas_name " +
+		  				"FROM epsg_unitofmeasure " +	                              
+		  				"WHERE unit_of_meas_type = 'length'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		int in=0;
+		try {
+			while (result.next()) {
+				String item = result.getString("unit_of_meas_name");
+				items.add(in,PluginServices.getText(this, item.replaceAll(" ", "_")));
+				lengthUnits.add(in, item);
+				in++;
+			}
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		setLengthUnit(lengthUnits);
+		return items;
+	}
+	
+	/*
+	 * Accede al la base de datos y obtiene los items de
+	 * los combobox
+	 * @return
+	 */
+	private ArrayList obtenerItemsUnidadesAngle(){ //unidades angulares...
+		//TODO: Obtener los items del combo de la base de datos
+		ArrayList items = new ArrayList();
+		ArrayList angularUnit = new ArrayList();
+				
+		String sentence = "SELECT unit_of_meas_name " +
+		  				"FROM epsg_unitofmeasure " +	                              
+		  				"WHERE unit_of_meas_type = 'angle' and factor_b is not null and factor_c is not null";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		int in=0;
+		try {
+			while (result.next()) {
+				String item = result.getString("unit_of_meas_name");
+				items.add(in, PluginServices.getText(this, item.replaceAll(" ", "_")));
+				angularUnit.add(in, item);
+				in++;
+			}
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		setAngularUnit(angularUnit);
+		return items;
+	}
+	/**
+	 * Inicializa el JLabel Datum
+	 * @return
+	 */
+	public JLabel getLblDatum() {
+		if (lblDatum==null){
+			lblDatum=new JLabel();
+			lblDatum.setText(PluginServices.getText(this,"Dat_Datum"));
+		}
+		return lblDatum;
+	}
+	/**
+	 * Inicializa el JLabel Elipsoide
+	 * @return
+	 */
+	public JLabel getLblElipsoide() {
+		if (lblElipsoide==null){
+			lblElipsoide=new JLabel();
+			lblElipsoide.setText(PluginServices.getText(this,"Dat_Elips"));
+			//lblElipsoide.setText("Introduce el Elipsoide");
+		}
+		return lblElipsoide;
+	}
+
+	/**
+	 * Inicializa el JLabel Longitud
+	 * @return
+	 */
+	public JLabel getLblLong() {
+		if (lblLong==null){
+			lblLong=new JLabel();
+			lblLong.setText(PluginServices.getText(this,"Dat_Long"));
+			lblLong.setMinimumSize(dimLabels);
+			lblLong.setPreferredSize(dimLabels);
+		}
+		return lblLong;
+	}
+	/**
+	 * Inicializa el JLabel Meridiano
+	 * @return
+	 */
+	public JLabel getLblMeridian() {
+		if (lblMeridian==null){
+			lblMeridian=new JLabel();
+			lblMeridian.setText(PluginServices.getText(this,"Dat_Meridian"));
+			lblMeridian.setMinimumSize(dimLabels);
+			lblMeridian.setPreferredSize(dimLabels);
+		}
+		return lblMeridian;
+	}
+	/**
+	 * Inicializa el JLabel del Cdigo de Crs
+	 * @return
+	 */
+	public JLabel getLblCodigoCrs() {
+		if (lblCodigoCrs==null){
+			lblCodigoCrs=new JLabel(PluginServices.getText(this,"Dat_CodeCrs")+":");
+		}
+		return lblCodigoCrs;
+	}
+	/**
+	 * Inicializa el JLabel del Nombre del Crs
+	 * @return
+	 */
+	public JLabel getLblNombreCrs() {
+		if (lblNombreCrs==null){
+			lblNombreCrs=new JLabel(PluginServices.getText(this,"Dat_NombreCrs")+":");
+		}
+		return lblNombreCrs;
+	}
+	public JLabel getLblInverseFlat() {
+		if(lblInverseFlat==null){
+			lblInverseFlat=new JLabel();
+			lblInverseFlat.setText(PluginServices.getText(this,"Dat_InvF")+(" (inv_f)"));
+			lblInverseFlat.setMinimumSize(dimLabels);
+			lblInverseFlat.setPreferredSize(dimLabels);
+		}	
+		return lblInverseFlat;
+	}
+	public JLabel getLblSemiejeMayor() {
+		if(lblSemiejeMayor==null){
+			lblSemiejeMayor=new JLabel();
+			lblSemiejeMayor.setText(PluginServices.getText(this,"Dat_SemMay")+(" (a)"));
+			lblSemiejeMayor.setMinimumSize(dimLabels);
+			lblSemiejeMayor.setPreferredSize(dimLabels);
+			
+		}	
+		return lblSemiejeMayor;
+	}
+	public JLabel getLblSemiejeMenor() {
+		if(lblSemiejeMenor==null){
+			lblSemiejeMenor=new JLabel();
+			lblSemiejeMenor.setText(PluginServices.getText(this,"Dat_SemMen")+(" (b)"));
+			lblSemiejeMenor.setMinimumSize(dimLabels);
+			lblSemiejeMenor.setPreferredSize(dimLabels);
+		}	
+		return lblSemiejeMenor;
+	}
+	public JLabel getLblDefinir() {
+		if(lblDefinir==null){
+			lblDefinir=new JLabel();
+			lblDefinir.setText(PluginServices.getText(this,"Dat_DefinirPor"));
+			Dimension d=new Dimension(200,15);
+			lblDefinir.setMinimumSize(d);
+			lblDefinir.setPreferredSize(d);
+		}
+		return lblDefinir;
+	}
+	
+	
+	public JRadioButton getRbA_B() {
+		if(rbA_B==null){
+			rbA_B=new JRadioButton();
+			rbA_B.setText("a, b");
+			rbA_B.addActionListener(this);
+		}
+		return rbA_B;
+	}
+	public JRadioButton getRbA_Inv() {
+		if(rbA_Inv==null){
+			rbA_Inv=new JRadioButton();
+			rbA_Inv.setText("a, inv_f");
+			Dimension d=new Dimension(100,15);
+			rbA_Inv.setMinimumSize(d);
+			rbA_Inv.setPreferredSize(d);
+			rbA_Inv.addActionListener(this);
+		}
+		return rbA_Inv;
+	}
+	
+	/*
+	public JRadioButton getRbInvF() {
+		if(rbInvF==null){
+			rbInvF=new JRadioButton();
+			rbInvF.setToolTipText(PluginServices.getText(this,"Dat_InvFToolTipText"));
+			rbInvF.setText(PluginServices.getText(this,"Dat_InvF"));
+			rbInvF.addActionListener(this);
+		}
+		return rbInvF;
+	}
+	*/
+	/**
+	 * Inicializa el radio button Semieje Mayor del elipsoide
+	 * @return
+	 */
+	/*
+	public JRadioButton getRbSemMay() {
+		if(rbSemMay==null){
+			rbSemMay=new JRadioButton();
+			rbSemMay.setToolTipText(PluginServices.getText(this,"Dat_SemMayToolTipText"));
+			rbSemMay.setText(PluginServices.getText(this,"Dat_SemMay"));
+			rbSemMay.addActionListener(this);
+		}
+		return rbSemMay;
+	}*/
+
+	/**
+	 * Inicializa el radio Button del Semieje Menor del elipsoide
+	 * @return
+	 */
+	/*
+	public JRadioButton getRbSemMen() {
+		if(rbSemMen==null){
+			rbSemMen=new JRadioButton();
+			rbSemMen.setToolTipText(PluginServices.getText(this,"Dat_SemMenToolTipText"));			
+			rbSemMen.setText(PluginServices.getText(this,"Dat_SemMen"));
+			rbSemMen.addActionListener(this);
+		}
+		return rbSemMen;
+	}
+	*/
+
+	/**
+	 * Agrupa los Radio Button de los parmetros del elipsoide
+	 * 
+	 */
+
+	private void agruparRadioButtons() {
+		if(groupRadioButton==null){
+			groupRadioButton=new ButtonGroup();
+			//Agrupar los radio Buttons
+			groupRadioButton.add(getRbA_B());
+			groupRadioButton.add(getRbA_Inv());
+			getRbA_Inv().setSelected(true);
+			getTxtSemMen().setEditable(false);
+			getCbSemMen().setEnabled(false);
+			
+		}
+	}
+
+	/**
+	 * Inicializa el cuadro de texto que contiene el datum
+	 * @return
+	 */
+	public JTextField getTxtDatum() {
+		if (txtDatum==null){
+			txtDatum=new JTextField();
+			bigSize.height=txtDatum.getPreferredSize().height;
+			txtDatum.setPreferredSize(bigSize);
+			txtDatum.addActionListener(this);
+		}
+		return txtDatum;
+	}
+	/**
+	 * Inicializa el cuadro de texto que contiene el elipsoide
+	 * @return
+	 */
+	public JTextField getTxtElipsoide() {
+		if (txtElipsoide==null){
+			txtElipsoide=new JTextField();
+			bigSize.height=txtElipsoide.getPreferredSize().height;
+			txtElipsoide.setPreferredSize(bigSize);
+			txtElipsoide.addActionListener(this);
+		}
+		return txtElipsoide;
+	}
+	/**
+	 * Inicializa el cuadro de texto que contiene el Inverse Flat del Elipsoide
+	 * @return
+	 */
+	public JTextField getTxtInvF() {
+		if (txtInvF==null){
+			txtInvF=new JTextField();
+			smallSize.height=txtInvF.getPreferredSize().height;
+			txtInvF.setPreferredSize(smallSize);
+			txtInvF.setMinimumSize(smallSize);
+			txtInvF.addActionListener(this);
+			txtInvF.addKeyListener(this);
+			txtInvF.addFocusListener(this);
+		}
+		return txtInvF;
+	}
+	/**
+	 * Inicializa el cuadro de texto que contiene el dato de longitud del
+	 * meridiano
+	 * @return
+	 */
+	public JTextField getTxtLong() {
+		if (txtLong==null){
+			txtLong=new JTextField();
+			smallSize.height=txtLong.getPreferredSize().height;
+			txtLong.setPreferredSize(smallSize);
+			txtLong.addActionListener(this);
+			txtLong.addKeyListener(this);
+			txtLong.addFocusListener(this);
+		}
+		return txtLong;
+	}
+	/**
+	 * Inicializa el cuadro de texto que contiene el meridiano
+	 * @return
+	 */
+	public JTextField getTxtMeridian() {
+		if (txtMeridian==null){
+			txtMeridian=new JTextField();
+			bigSize.height=txtMeridian.getPreferredSize().height;
+			Dimension d=new Dimension(280,15);
+			d.height=txtMeridian.getPreferredSize().height;
+			txtMeridian.setPreferredSize(d);
+			txtMeridian.addActionListener(this);
+		}
+		return txtMeridian;
+	}
+	/**
+	 * Inicializa el cuadro de texto que contiene el Semieje Mayor
+	 * del elipsoide
+	 * @return
+	 */
+	public JTextField getTxtSemMay() {
+		if (txtSemMay==null){
+			txtSemMay=new JTextField();
+			smallSize.height=txtSemMay.getPreferredSize().height;
+			txtSemMay.setPreferredSize(smallSize);
+			txtSemMay.setMinimumSize(smallSize);
+			txtSemMay.addActionListener(this);
+			txtSemMay.addKeyListener(this);
+			txtSemMay.addFocusListener(this);
+		}
+		return txtSemMay;
+	}
+	/**
+	 * Inicializa el cuadro de texto que contiene el semieje
+	 * menor del elipsoide
+	 * @return
+	 */
+	public JTextField getTxtSemMen() {
+		if (txtSemMen==null){
+			txtSemMen=new JTextField();
+			smallSize.height=txtSemMen.getPreferredSize().height;
+			txtSemMen.setPreferredSize(smallSize);
+			txtSemMen.setMinimumSize(smallSize);
+			txtSemMen.addActionListener(this);
+			txtSemMen.addKeyListener(this);
+			txtSemMen.addFocusListener(this);
+		}
+		return txtSemMen;
+	}
+	/**
+	 * Inicializa el cuadro de texto que contiene el cdigo del Crs definido por el usuario
+	 * @return
+	 */
+	public JTextField getTxtCodigoCrs() {
+		if (txtCodigoCrs==null){
+			txtCodigoCrs=new JTextField();
+			smallSize.height=txtCodigoCrs.getPreferredSize().height;
+			txtCodigoCrs.setPreferredSize(smallSize);
+			txtCodigoCrs.addActionListener(this);
+			txtCodigoCrs.addFocusListener(this);
+		}
+		return txtCodigoCrs;
+	}
+	/**
+	 * Inicializa el cuadro de texto que contiene el nombre del Crs
+	 * @return
+	 */
+	public JTextField getTxtNombreCrs() {
+		if (txtNombreCrs==null){
+			txtNombreCrs=new JTextField();
+			smallSize.height=txtNombreCrs.getPreferredSize().height;
+			txtNombreCrs.setPreferredSize(smallSize);
+			txtNombreCrs.addActionListener(this);			
+		}
+		return txtNombreCrs;
+	}
+	/*
+	 * Manejador de eventos de los controles
+	 */
+	public void actionPerformed(ActionEvent e) {
+	
+		if(e.getSource().equals(getTxtDatum())){
+			System.out.println("txt Datum");
+		}else if(e.getSource().equals(getTxtElipsoide())){
+			System.out.println("txt Elipsoide");
+		}else if(e.getSource().equals(getTxtInvF())){
+			System.out.println("txt Inverse Flat");
+		}else if(e.getSource().equals(getTxtSemMay())){
+			System.out.println("txt Semieje Mayor");
+		}else if(e.getSource().equals(getTxtSemMen())){
+			System.out.println("txt Semieje Menor");
+		}else if(e.getSource().equals(getTxtLong())){
+			System.out.println("txt Longitud");
+		}else if(e.getSource().equals(getTxtMeridian())){
+			System.out.println("txt Meridiano");
+		}else if(e.getSource().equals(getCbInvF())){
+			System.out.println("combo box Inverse Flat");
+		}else if(e.getSource().equals(getCbLong())){
+			System.out.println("combo box Longitud");
+		}else if(e.getSource().equals(getCbSemMay())){
+			System.out.println("combo box Semieje Mayor");
+		}else if(e.getSource().equals(getCbSemMen())){
+			System.out.println("combo box Semieje Menor");
+		}else if(e.getSource().equals(getRbA_B())){
+			getTxtSemMay().setEditable(true);
+			getTxtSemMen().setEditable(true);
+			getTxtInvF().setEditable(false);
+			getCbSemMen().setEnabled(true);
+		}else if(e.getSource().equals(getRbA_Inv())){
+			getTxtSemMay().setEditable(true);
+			getTxtSemMen().setEditable(false);
+			getTxtInvF().setEditable(true);	
+			getCbSemMen().setEnabled(false);
+		}else if(e.getSource().equals(getBtnImportDatum())){
+			System.out.println("Importar Datum");
+			ImportNewCrsDialog newCrs = new ImportNewCrsDialog(PluginServices.getText(this, "datum"));
+       	 	PluginServices.getMDIManager().addWindow(newCrs);
+       	 	if (newCrs.getCode() != -1) {
+	       	 	setCrs(newCrs.getCode());
+	       	 	fillDatum(getCrs());
+       	 	}
+		}else if(e.getSource().equals(getBtnImportElipsoide())){
+			System.out.println("Importar Elipsoide");
+			ImportNewCrsDialog newCrs = new ImportNewCrsDialog(PluginServices.getText(this, "ellips"));
+       	 	PluginServices.getMDIManager().addWindow(newCrs);
+       	 	if (newCrs.getCode() != -1) {
+	       	 	setCrs(newCrs.getCode());
+	       	 	fillEllipsoid(getCrs());
+       	 	}
+		}else if(e.getSource().equals(getBtnImportMeridian())){
+			System.out.println("Importar Meridiano");
+			ImportNewCrsDialog newCrs = new ImportNewCrsDialog(PluginServices.getText(this, "primem"));
+       	 	PluginServices.getMDIManager().addWindow(newCrs);
+       	 	if (newCrs.getCode() != -1) {
+	       	 	setCrs(newCrs.getCode());
+	       	 	fillPrimeMeridian(getCrs());
+       	 	}else if(e.getSource().equals(getRbA_Inv())){
+			
+       	 	}else if(e.getSource().equals(getRbA_B())){
+			
+       	 	}
+		}
+	}
+	
+	public void fillData(ICrs crs){
+		getTxtNombreCrs().setText(crs.getCrsWkt().getGeogcs());
+		getTxtCodigoCrs().setText(getMaxCode());
+		fillDatum(crs);
+	}
+	
+	public void fillData(ICrs crs, boolean editing){
+		getTxtNombreCrs().setText(crs.getCrsWkt().getGeogcs());
+		getTxtCodigoCrs().setText(""+crs.getCode());
+		fillDatum(crs);
+	}
+	
+	public void fillDatum(ICrs crs) {
+		getTxtDatum().setText(crs.getCrsWkt().getDatumName());
+		fillEllipsoid(crs);
+		fillPrimeMeridian(crs);
+	}
+	
+	public void fillData(CoordinateReferenceSystem crsGT) {
+		AbstractSingleCRS crs = (AbstractSingleCRS)crsGT;
+		String authority = crs.getName().toString().split(":")[0];
+		//String code = crs.getName().toString().split(":")[1];
+		getTxtNombreCrs().setText(authority);
+		getTxtCodigoCrs().setText(getMaxCode());
+		DefaultGeodeticDatum d = (DefaultGeodeticDatum) crs.getDatum();
+		String[] val = d.getName().toString().split(":");
+		if (val.length<2)
+			getTxtDatum().setText(d.getName().toString().split(":")[0]);
+		else
+			getTxtDatum().setText(d.getName().toString().split(":")[1]);
+		DefaultEllipsoid ellips = (DefaultEllipsoid)d.getEllipsoid();
+		
+		Unit u = ellips.getAxisUnit();
+		double semi_major = convert(ellips.getSemiMajorAxis(), u.toString());
+		double inv_f = ellips.getInverseFlattening();
+		val = ellips.getName().toString().split(":");
+		if (val.length<2)
+			getTxtElipsoide().setText(val[0]);
+		else
+			getTxtElipsoide().setText(val[1]);
+		getTxtSemMay().setText(String.valueOf(semi_major));
+		getTxtInvF().setText(String.valueOf(inv_f));
+		getTxtSemMen().setText(String.valueOf(calcularSemMen()));
+		
+		DefaultPrimeMeridian primem = (DefaultPrimeMeridian)d.getPrimeMeridian();
+		
+		u = primem.getAngularUnit();
+		double longitude = convert(primem.getGreenwichLongitude(), u.toString());
+		val = primem.getName().toString().split(":");
+		if (val.length<2)
+			getTxtMeridian().setText(val[0]);
+		else
+			getTxtMeridian().setText(val[1]);
+		
+		getTxtLong().setText(""+longitude);		
+	}
+	
+	public void fillEllipsoid(ICrs crs) {
+		getTxtElipsoide().setText(crs.getCrsWkt().getSpheroid()[0]);
+		String semMay = crs.getCrsWkt().getSpheroid()[1];
+		String invF = crs.getCrsWkt().getSpheroid()[2];
+		getTxtSemMay().setText(semMay);
+		getTxtInvF().setText(invF);
+		double semMen = calcularSemMen();
+		getTxtSemMen().setText(String.valueOf(semMen));		
+	}
+	
+	public void fillPrimeMeridian(ICrs crs) {
+		getTxtMeridian().setText(crs.getCrsWkt().getPrimen()[0]);
+		getTxtLong().setText(crs.getCrsWkt().getPrimen()[1]);
+	}
+	
+	
+	private double calcularSemMen() {
+		String cadenaNumerica = getTxtSemMay().getText().replaceAll("[^0-9.E]", "");
+				
+		if (getTxtSemMay().getText().length() != cadenaNumerica.length() || notANumber(cadenaNumerica)) {
+			JOptionPane.showMessageDialog(DefinirDatum.this, 
+					PluginServices.getText(this,"numeric_format")+": "+PluginServices.getText(this,"semMay"), 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			return 0;
+		}
+		else {
+			if (getTxtInvF().getText().equals("Infinity")) {
+				getRbA_B().setSelected(true);
+				getTxtSemMay().setEditable(true);
+				getTxtSemMen().setEditable(true);
+				getTxtInvF().setEditable(false);
+				getCbSemMen().setEnabled(true);
+				return Double.parseDouble((String)getTxtSemMay().getText());
+			}
+			cadenaNumerica = getTxtInvF().getText().replaceAll("[^0-9.E-]", "");
+			
+			if (getTxtInvF().getText().length() != cadenaNumerica.length() || notANumber(cadenaNumerica)) {
+		
+			JOptionPane.showMessageDialog(DefinirDatum.this, 
+					PluginServices.getText(this,"numeric_format")+": "+PluginServices.getText(this,"inv_f"), 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			return 0;
+			}
+		}
+		
+		double semMay = Double.parseDouble((String)getTxtSemMay().getText());
+		double invF = Double.parseDouble((String)getTxtInvF().getText());
+		
+		if (invF != 0)
+			return semMay - (semMay / (invF));
+		return Double.NEGATIVE_INFINITY;
+	}
+	
+	private double calcularInvF() {
+		String cadenaNumerica = getTxtSemMay().getText().replaceAll("[^0-9.E]", "");
+		
+		if (getTxtSemMay().getText().length() != cadenaNumerica.length() || notANumber(cadenaNumerica)) {
+			JOptionPane.showMessageDialog(DefinirDatum.this, 
+					PluginServices.getText(this,"numeric_format")+": "+PluginServices.getText(this,"semMay"), 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			return 0;
+		}
+		else {
+			cadenaNumerica = getTxtSemMen().getText().replaceAll("[^0-9.E-]", "");
+			
+			if (getTxtSemMen().getText().length() != cadenaNumerica.length() || notANumber(cadenaNumerica)) {
+		
+			JOptionPane.showMessageDialog(DefinirDatum.this, 
+					PluginServices.getText(this,"numeric_format")+": "+PluginServices.getText(this,"semMen"), 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			return 0;
+			}
+		}
+		
+		double semMay = Double.parseDouble((String)getTxtSemMay().getText());
+		double semMen = Double.parseDouble((String)getTxtSemMen().getText());
+		
+		
+		if ((semMay - semMen) != 0)
+			return (semMay ) / (semMay - semMen);
+		return Double.POSITIVE_INFINITY;
+	}
+	
+	public void setCrs(int code) {
+		try {
+			crs = new CrsFactory().getCRS("EPSG:"+code);
+		} catch (CrsException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+	}
+	
+	public ICrs getCrs() {
+		return crs;
+	}
+	
+	public void cleanData() {
+		String max = getMaxCode();
+		getTxtCodigoCrs().setText(max);
+		getTxtNombreCrs().setText("");
+		getTxtDatum().setText("");
+		getTxtElipsoide().setText("GRS 1980");
+		getTxtInvF().setText("298.257222101");
+		getTxtLong().setText("0.0");
+		getTxtMeridian().setText("Greenwich");
+		getTxtSemMay().setText("6378137.0");
+		double semMen = calcularSemMen();
+		getTxtSemMen().setText(""+semMen);
+	}
+	
+	private String getMaxCode() {
+		String sentence = "SELECT usr_code " +
+							"FROM USR " +	                              
+							"ORDER BY usr_code ASC";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionUsr();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		int max = 0;
+		int lastValue = 0;
+		int goodValue = 1;
+		boolean firstAccess = true;
+		try {
+			while (result.next()) {
+				max = result.getInt("usr_code");
+				if (firstAccess && max != 1) {					
+					return ""+goodValue;
+				}
+				firstAccess = false;
+				if ((max - lastValue) == 1) {
+					lastValue = max;
+				} else {
+					goodValue = lastValue+1;
+					break;
+				}
+			}
+			if (goodValue == 1) {
+				goodValue = max+1;
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+		return ""+goodValue;
+	}
+	
+	public double convert2Meters(String unit, double value) {
+		double factor_b = 0;
+		double factor_c = 0;
+		String sentence = "SELECT factor_b, factor_c " +
+			"FROM epsg_unitofmeasure " +	                              
+			"WHERE unit_of_meas_name = '" +unit + "'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}		
+		return ((value*factor_b)/factor_c);
+	}
+	
+	/**
+	 * Convierte una valor en las unidades indicadas a grados sexagesimales según los factores 
+	 * de conversión obtenidos de la base de datos de la EPSG.
+	 * 
+	 * @param unit Unidad de entrada.
+	 * @param value Valor a convertir
+	 * @return Valor en grados sexagesimales.
+	 */
+	public double convert2Degree(String unit, double value) {
+		//*************************************
+		//Se realiza la conversión a radianes:
+		double factor_b = 0;
+		double factor_c = 0;
+		String sentence = "SELECT factor_b, factor_c " +
+			"FROM epsg_unitofmeasure " +	                              
+			"WHERE unit_of_meas_name = '" +unit + "'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}	
+		if(Math.abs(factor_b/factor_c-Math.PI/180.0)<1.0e-12)
+			return value;
+		value = ((value*factor_b)/factor_c);
+		//**********************************************
+		
+		//Conversió de radianes a grados sexagesimales:
+		//return ((value * 180.0) / 200.0);
+		return ((value * 180.0) / Math.PI);
+	}
+	
+	public double convert(double value, String measure) throws ConversionException {
+		if (measure.equals("D.MS")) {		
+			value *= this.divider;
+	        int deg,min;
+	        deg = (int) (value/10000); value -= 10000*deg;
+	        min = (int) (value/  100); value -=   100*min;
+	        if (min<=-60 || min>=60) {  // Accepts NaN
+	            if (Math.abs(Math.abs(min) - 100) <= EPS) {
+	                if (min >= 0) deg++; else deg--;
+	                min = 0;
+	            } else {
+	                throw new ConversionException("Invalid minutes: "+min);
+	            }
+	        }
+	        if (value<=-60 || value>=60) { // Accepts NaN
+	            if (Math.abs(Math.abs(value) - 100) <= EPS) {
+	                if (value >= 0) min++; else min--;
+	                value = 0;
+	            } else {
+	                throw new ConversionException("Invalid secondes: "+value);
+	            }
+	        }
+	        value = ((value/60) + min)/60 + deg;
+	        return value;
+		}
+		if (measure.equals("grad") || measure.equals("grade")) 
+			return ((value * 180.0) / 200.0);			
+		if (measure.equals(""+(char)176)) 
+			return value;		
+		if (measure.equals("DMS") ) 
+			return value;		
+		if (measure.equals("m")) 
+			return value;	
+		if (measure.equals("")) 
+			return value;
+		
+		throw new ConversionException("Conversion no contemplada: "+measure);
+    }
+	
+	public double convertFromDegree(String unitSource, String unitTarget, double value) {
+		double factor_b = 0;
+		double factor_c = 0;		
+		String sentence = "SELECT factor_b, factor_c " +
+			"FROM epsg_unitofmeasure " +	                              
+			"WHERE unit_of_meas_name = '" +unitSource + "'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}		
+		value = ((value*factor_b)/factor_c);
+		
+		sentence = "SELECT factor_b, factor_c " +
+		"FROM epsg_unitofmeasure " +	                              
+		"WHERE unit_of_meas_name = '" +unitTarget + "'";
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}		
+		return ((value*factor_c)/factor_b);
+	}
+	
+	public void itemStateChanged(ItemEvent e) {
+		if (e.getItemSelectable().equals(cbLong)) {
+			String unit = getAngularUnit(((JComboBox)e.getSource()).getSelectedIndex());
+			 double value = Double.valueOf(getTxtLong().getText()).doubleValue();
+			 value = convertFromDegree(sourceUnitLong, unit, value);
+			 sourceUnitLong = unit;
+			 String val = String.valueOf(value);
+			 getTxtLong().setText(val);
+		}
+		if (e.getItemSelectable().equals(cbSemMay) ) {
+			String unit = getLengthUnit(((JComboBox)e.getSource()).getSelectedIndex());			 
+			double value = Double.valueOf(getTxtSemMay().getText()).doubleValue();
+			 value = convertFromMeters(sourceUnitSemMay, unit, value);
+			 sourceUnitSemMay = unit;
+			 String val = String.valueOf(value);
+			 getTxtSemMay().setText(val);
+		}
+		if (e.getItemSelectable().equals(cbSemMen) ) {
+			String unit = getLengthUnit(((JComboBox)e.getSource()).getSelectedIndex());
+			 double value = Double.valueOf(getTxtSemMen().getText()).doubleValue();
+			 value = convertFromMeters(sourceUnitSemMen, unit, value);
+			 sourceUnitSemMen = unit;
+			 String val = String.valueOf(value);
+			 getTxtSemMen().setText(val);
+		}		
+	}
+	
+	private boolean notANumber(String cadenaNumerica) {
+		int puntos = 0;
+		int signos = 0;
+		int letras = 0;
+		for (int i = 0; i< cadenaNumerica.length(); i++) {
+			if (cadenaNumerica.charAt(i) == '.')
+				puntos++;
+			else if (cadenaNumerica.charAt(i) == '-') {
+				if (i==0) {
+					signos++;
+				}
+				else if (i!=0 && cadenaNumerica.charAt(i-1) != 'E') {
+					signos = 2;
+				}
+			}
+			else if (cadenaNumerica.charAt(i) == 'E') {
+				if (i== 0) {
+					letras = 2;
+				}
+				else letras ++;
+			}
+		}
+		
+		if ((letras > 1) || (signos > 1) || (puntos > 1))
+			return true;
+		return false;
+	}
+	
+	public double convertFromMeters(String unitSource, String unitTarget, double value) {
+		double factor_b = 0;
+		double factor_c = 0;
+		String sentence = "SELECT factor_b, factor_c " +
+			"FROM epsg_unitofmeasure " +	                              
+			"WHERE unit_of_meas_name = '" +unitSource.replace("'", "'+char(39)+'") + "'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}		
+		value = ((value*factor_b)/factor_c);
+		
+		sentence = "SELECT factor_b, factor_c " +
+		"FROM epsg_unitofmeasure " +	                              
+		"WHERE unit_of_meas_name = '" +unitTarget.replace("'", "'+char(39)+'")+ "'";
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}		
+		return ((value*factor_c)/factor_b);
+	}
+	
+	public void keyPressed(KeyEvent e) {
+		primera = true;
+		if (e.getSource() == this.getTxtSemMay()) {			
+			if (e.getKeyCode() == 10) {
+				primera = false;
+				if (getRbA_Inv().isSelected()) {
+					getTxtSemMen().setText(String.valueOf(calcularSemMen()));
+				}
+				else if (getRbA_B().isSelected()) {
+					getTxtInvF().setText(String.valueOf(calcularInvF()));					
+				}
+			}			
+		}
+		if (e.getSource() == this.getTxtSemMen()) {
+			if (e.getKeyCode() == 10) {
+				primera = false;
+				getTxtInvF().setText(String.valueOf(calcularInvF()));				
+			}			
+		}
+		if (e.getSource() == this.getTxtInvF()) {
+			if (e.getKeyCode() == 10) {
+				primera = false;
+				getTxtSemMen().setText(String.valueOf(calcularSemMen()));				
+			}			
+		}
+		if (e.getSource() == this.getTxtLong()) {
+			if (e.getKeyCode() == 10) {
+				primera = false;
+				String cadenaNumerica = getTxtLong().getText().replaceAll("[^0-9.E]", "");
+				
+				if (getTxtLong().getText().length() != cadenaNumerica.length() || notANumber(cadenaNumerica)) {
+					JOptionPane.showMessageDialog(DefinirDatum.this, 
+							PluginServices.getText(this,"numeric_format")+": "+PluginServices.getText(this,"long"), 
+							"Warning...", JOptionPane.WARNING_MESSAGE);
+					primera = true;
+					return;
+				}
+			}
+		}
+		primera = true;
+	}
+	public void keyReleased(KeyEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+	public void keyTyped(KeyEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+	
+	public void setLengthUnit(ArrayList units) {
+		this.lengthUnits = units;
+	}
+	
+	public void setAngularUnit(ArrayList units) {
+		this.angularUnits = units;
+	}
+	
+	public String getLengthUnit(int indice) {
+		return (String)lengthUnits.get(indice);
+	}
+	
+	public String getAngularUnit(int indice) {
+		return (String)angularUnits.get(indice);
+	}
+	public void focusGained(FocusEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+	public void focusLost(FocusEvent e) {
+		if (primera) {
+			primera = false;
+			if (e.getSource() == this.getTxtSemMay()) {
+				if (getRbA_Inv().isSelected()) {
+					getTxtSemMen().setText(String.valueOf(calcularSemMen()));
+				}
+				else if (getRbA_B().isSelected()) {
+					getTxtInvF().setText(String.valueOf(calcularInvF()));					
+				}
+							
+			}
+			if (e.getSource() == this.getTxtSemMen()) {
+				getTxtInvF().setText(String.valueOf(calcularInvF()));						
+			}
+			if (e.getSource() == this.getTxtInvF()) {
+				getTxtSemMen().setText(String.valueOf(calcularSemMen()));			
+			}
+			if (e.getSource() == this.getTxtLong()) {
+				String cadenaNumerica = getTxtLong().getText().replaceAll("[^0-9.E]", "");
+				
+				if (getTxtLong().getText().length() != cadenaNumerica.length() || notANumber(cadenaNumerica)) {
+					JOptionPane.showMessageDialog(DefinirDatum.this, 
+							PluginServices.getText(this,"numeric_format")+": "+PluginServices.getText(this,"long"), 
+							"Warning...", JOptionPane.WARNING_MESSAGE);
+					return;
+				}
+			}
+		}
+	}
+	
+	class ComboBoxTootipRenderer extends BasicComboBoxRenderer {
+		
+		private String[] tooltips = null;
+		
+	    public ComboBoxTootipRenderer(String[] tooltips) {
+	    	super();
+	    	this.tooltips = tooltips;
+		}
+
+		public Component getListCellRendererComponent(JList list, Object value,
+	        int index, boolean isSelected, boolean cellHasFocus) {
+	      if (isSelected) {
+	        setBackground(list.getSelectionBackground());
+	        setForeground(list.getSelectionForeground());
+	        if (-1 < index) {
+	          list.setToolTipText(tooltips[index]);
+	        }
+	      } else {
+	        setBackground(list.getBackground());
+	        setForeground(list.getForeground());
+	      }
+	      setFont(list.getFont());
+	      setText((value == null) ? "" : value.toString());
+	      return this;
+	    }
+	  }
+		
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefinirDatum.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/ComboBoxEditor.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/ComboBoxEditor.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/ComboBoxEditor.java	(revision 25287)
@@ -0,0 +1,15 @@
+package org.gvsig.crs.gui.panels.wizard;
+
+import javax.swing.DefaultCellEditor;
+
+import com.iver.utiles.swing.JComboBox;
+
+public class ComboBoxEditor extends DefaultCellEditor {
+
+	private static final long serialVersionUID = 1L;
+
+	public ComboBoxEditor(String[] items)
+    {
+        super(new JComboBox(items));
+    }
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/ComboBoxEditor.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/ComboBoxRenderer.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/ComboBoxRenderer.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/ComboBoxRenderer.java	(revision 25287)
@@ -0,0 +1,39 @@
+package org.gvsig.crs.gui.panels.wizard;
+
+import java.awt.Component;
+import javax.swing.JTable;
+import javax.swing.table.TableCellRenderer;
+
+import com.iver.utiles.swing.JComboBox;
+
+public class ComboBoxRenderer extends JComboBox implements TableCellRenderer{
+
+
+	private static final long serialVersionUID = 1L;
+
+	public ComboBoxRenderer(String[] items)
+    {
+        super(items);
+    }
+ 
+    public Component getTableCellRendererComponent(JTable table,
+                                                   Object value,
+                                                   boolean isSelected,
+                                                   boolean hasFocus,
+                                                   int row, int column)
+    {
+        if (isSelected)
+        {
+            setForeground(table.getSelectionForeground());
+            super.setBackground(table.getSelectionBackground());
+        }
+        else
+        {
+            setForeground(table.getForeground());
+            setBackground(table.getBackground());
+        }
+        setSelectedItem(value);
+        return this;
+    }
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/ComboBoxRenderer.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefCrsUsr.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefCrsUsr.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefCrsUsr.java	(revision 25287)
@@ -0,0 +1,343 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels.wizard;
+
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.ButtonGroup;
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.dialog.ImportNewCrsDialog;
+
+import com.iver.andami.PluginServices;
+
+
+/**
+ * Panel de definicin del Crs por el usuario
+ * 
+ *  @author Luisa Marina Fernandez Ruiz (luisam.fernandez@uclm.es)
+ *  @author Jose Luis Gomez Martinez (joseluis.gomez@uclm.es)
+ *
+ */
+public class DefCrsUsr extends JPanel implements ActionListener{
+	private JPanel panel;
+	//jbuton definido por gvsig
+	private JButton btnCrsExistente;
+	private JLabel lblCrs;
+	private JRadioButton rbCrsExistente;
+	private JRadioButton rbNuevoCrs;
+	private JRadioButton rbCadenaWkt;
+	private ButtonGroup crsGroup;
+	private JTextArea txtAreaWkt;
+	private JButton btnImportarWkt;
+	private JScrollPane scrollWkt;
+	private ICrs currentCrs;
+	private int width=380;
+	//290
+	
+	private static final long serialVersionUID = 1L;
+	
+	ICrs crs = null;
+	boolean hasChanged = false;
+
+	public DefCrsUsr(ICrs crs) {
+		super();
+		currentCrs = crs;
+		initialize();
+		
+	}
+
+	/*
+	 * Inicializa el panel de Definicin del Crs por el usuario
+	 */
+	private void initialize() {
+		this.setLayout(new BorderLayout());
+		this.add(getPanel(),BorderLayout.CENTER);
+		habilitarWkt(false);
+			
+	}
+	
+	/*
+	 * Agrega todos los elementos
+	 */
+	public JPanel getPanel() {
+		if(panel==null){
+			panel=new JPanel();
+			panel.setLayout(new GridBagLayout());
+			GridBagConstraints c = new GridBagConstraints();
+			c.fill = GridBagConstraints.BOTH;
+			c.weighty=0.1;
+			//c.ipady=100;
+			//establece el espacio superior, inferior, izquierdo y derecho
+			//entre cada componente
+			c.insets=new Insets(8,8,8,8);
+			//c.ipady =60;      //make this component tall
+			c.weightx = 0.75;
+			c.gridx = 0;
+			c.gridy = 1;
+			panel.add(getRbCrsExistente(),c);
+			c.weightx = 0.25;
+			c.gridx = 1;
+			c.gridy = 1;
+			panel.add(getLblCrs(),c);
+			
+			c.fill = GridBagConstraints.EAST;
+			c.weightx=0.0;
+			c.gridx = 2;
+			c.gridy = 1;
+			panel.add(getBtnCrsExistente(),c);
+			
+			c.fill = GridBagConstraints.BOTH;
+			c.weightx = 0.75;
+			c.gridx = 0;
+			c.gridy = 0;
+			panel.add(getRbNuevoCrs(),c);
+	
+			c.gridx = 0;
+			c.gridy = 2;
+			panel.add(getRbCadenaWkt(),c);
+//			Agrupa los botones de opcion
+			agruparRadioButtons();
+			//Seleccin por defecto
+			getRbNuevoCrs().setSelected(true);
+			
+			c.gridx=2;
+		    c.gridy=2;
+		    c.weightx=0.0;
+		    c.weighty=0.0;
+		    c.fill = GridBagConstraints.NONE;
+		    //panel.add(getBtnImportarWkt(),c);
+		    		
+			//vertical
+			c.fill=GridBagConstraints.VERTICAL;
+			c.anchor=GridBagConstraints.EAST;
+			c.gridx = 0;
+			c.gridy = 4;
+			c.gridwidth=3;
+			c.weighty=0.75;
+			panel.add(getScrollWkt(),c);
+			
+			
+		}
+		return panel;
+	}
+	
+	/*
+	 * Agrupa los botones de opcin
+	 */
+	private void agruparRadioButtons() {
+		if (crsGroup==null){
+				crsGroup=new ButtonGroup();
+				//Agrupar los botones de opcion
+				crsGroup.add(getRbCrsExistente());
+				crsGroup.add(getRbNuevoCrs());
+				crsGroup.add(getRbCadenaWkt());
+			}
+			
+	}
+
+	public JRadioButton getRbCadenaWkt() {
+		if (rbCadenaWkt==null){
+			rbCadenaWkt=new JRadioButton(PluginServices.getText(this,"DefCrsUsr_wkt"));
+			rbCadenaWkt.addActionListener(this);
+			//rbCadenaWkt.setEnabled(false);
+		}
+		return rbCadenaWkt;
+	}
+
+	public JRadioButton getRbCrsExistente() {
+		if (rbCrsExistente==null){
+			rbCrsExistente=new JRadioButton(PluginServices.getText(this,"DefCrsUsr_existente"));
+			rbCrsExistente.addActionListener(this);
+		}
+		return rbCrsExistente;
+	}
+	
+	public JRadioButton getRbNuevoCrs() {
+		if (rbNuevoCrs==null){
+			rbNuevoCrs=new JRadioButton(PluginServices.getText(this,"DefCrsUsr_nuevo"));
+			rbNuevoCrs.addActionListener(this);
+		}
+		return rbNuevoCrs;
+	}
+
+
+	public JLabel getLblCrs() {
+		if (lblCrs==null){
+			lblCrs=new JLabel(currentCrs.getAbrev());
+		}
+		return lblCrs;
+	}
+
+    /**
+     * Activa o desactiva el botn y el cuadro de texto
+     * @param b Si es False--> deshabilita
+     */
+	public void habilitarExistente(boolean b) {
+			getBtnCrsExistente().setEnabled(b);
+			getLblCrs().setEnabled(b);
+	}
+	public void habilitarWkt(boolean b){
+			//getBtnImportarWkt().setEnabled(b);
+			getTxtAreaWkt().setEnabled(b);
+	}
+	/**
+	 * Inicilizar el boton importar la cadena WKT
+	 * @return
+	 */
+	public JButton getBtnImportarWkt() {
+		if(btnImportarWkt==null){
+			btnImportarWkt=new JButton();
+			btnImportarWkt.setText("...");
+			btnImportarWkt.addActionListener(this);
+			btnImportarWkt.setToolTipText(PluginServices.getText(this,"DefCrsUsr_importar_wkt"));
+			btnImportarWkt.setEnabled(false);
+		}
+		return btnImportarWkt;
+	}
+	public JButton getBtnCrsExistente() {
+		if (btnCrsExistente==null){
+			btnCrsExistente=new JButton("...");
+			Dimension d=new Dimension(btnCrsExistente.getPreferredSize());
+			d.width=100;
+			btnCrsExistente.setSize(d);
+			btnCrsExistente.addActionListener(this);
+			btnCrsExistente.setToolTipText(PluginServices.getText(this,"DefCrsUsr_Seleccionar_Crs"));
+		}
+		return btnCrsExistente;
+	}
+	/**
+	 * Inicializar el area de texto donde se introduce la cadena WKT
+	 * @return
+	 */
+	public JTextArea getTxtAreaWkt() {
+		if(txtAreaWkt==null){
+			txtAreaWkt=new JTextArea();
+			txtAreaWkt.setLineWrap(true);
+			txtAreaWkt.setWrapStyleWord(true);
+			Dimension d=new Dimension(txtAreaWkt.getPreferredSize());
+			d.width=width;
+			txtAreaWkt.setSize(d);
+		}
+		return txtAreaWkt;
+	}
+	/*
+	 *Crea un panel de desplazamineto en el que se 
+	 *agrega el area de texto para que ste tenga barras de desplazamiento 
+	 */
+	public JScrollPane getScrollWkt() {
+		if (scrollWkt==null){
+			scrollWkt=new JScrollPane();
+			scrollWkt.setViewportView(getTxtAreaWkt());
+			scrollWkt.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
+			Dimension d=new Dimension(txtAreaWkt.getPreferredSize());
+			d.width=width;
+			scrollWkt.setSize(d);
+		}
+		return scrollWkt;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		 if(e.getSource().equals(getRbCrsExistente())){
+			 setHasChange(true);
+	      	  habilitarExistente(true);
+	      	  habilitarWkt(false);
+         }else  if(e.getSource().equals(getRbNuevoCrs())){
+        	 setHasChange(true);
+      	   habilitarExistente(false);
+      	   habilitarWkt(false);      	   
+         }else  if(e.getSource().equals(getRbCadenaWkt())){
+        	 setHasChange(true);
+      	   habilitarExistente(false);
+      	   habilitarWkt(true);
+         }else if(e.getSource().equals(getBtnCrsExistente())){
+        	 ImportNewCrsDialog newCrs = new ImportNewCrsDialog("crs");
+        	 PluginServices.getMDIManager().addWindow(newCrs);
+        	 if (newCrs.getCode() != -1) {
+	        	 getLblCrs().setText("EPSG:"+newCrs.getCode());
+	        	 setCrs(newCrs.getCode());
+	        	 setHasChange(true);
+        	 }
+        	 
+         }else if(e.getSource().equals(getBtnImportarWkt())){
+        	 System.out.println("Boton Importar Wkt");
+        	 
+         }
+	}
+	
+	public void setCrs(int code) {
+		try {
+			crs = new CrsFactory().getCRS("EPSG:"+code);
+		} catch (CrsException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+	}
+	
+	public ICrs getCrs() {
+		return crs;
+	}
+	
+	public void setHasChange(boolean change) {
+		hasChanged = change;
+	}
+	
+	public boolean getHasChanged() {
+		return hasChanged;
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefCrsUsr.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefSistCoordenadas.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefSistCoordenadas.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefSistCoordenadas.java	(revision 25287)
@@ -0,0 +1,1153 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels.wizard;
+import java.awt.BorderLayout;
+import java.awt.CardLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+
+import javax.swing.BorderFactory;
+import javax.swing.ButtonGroup;
+import javax.swing.DefaultCellEditor;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+import javax.swing.border.TitledBorder;
+import javax.swing.table.DefaultTableCellRenderer;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+import javax.units.ConversionException;
+import javax.units.Unit;
+
+import org.geotools.referencing.crs.DefaultProjectedCRS;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.Proj4;
+import org.gvsig.crs.gui.dialog.ImportNewCrsDialog;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+
+import com.iver.andami.PluginServices;
+
+import es.idr.teledeteccion.connection.EpsgConnection;
+import es.idr.teledeteccion.connection.Query;
+
+
+
+/**
+ * Panel de Definicion del Sistema de Coordenadas
+ * 
+ * @author Luisa Marina Fernandez Ruiz (luisam.fernandez@uclm.es)
+ * @author Jose Luis Gomez Martinez (joseluis.gomez@uclm.es)
+ *
+ */
+public class DefSistCoordenadas extends JPanel implements ActionListener, ItemListener{
+	
+	private static final long serialVersionUID = 1L;
+	private JPanel top;
+	private JPanel proyectadoPanel;
+	//private JPanel geograficoPanel;
+	private JPanel cardPanel;
+	private JRadioButton rbGeografico;
+	private JRadioButton rbProyectado;
+	private ButtonGroup coordGroup;
+	
+	private JButton btnImportar=null;
+	private JLabel lblProyeccion;
+	private JLabel lblNombreProy;
+	private JTextField txtNombreProy;
+	private JComboBox cbProyeccion;
+	private JComboBox cbUnits;
+	private JTable tableParametros;
+	private JScrollPane scrollTable;
+	
+	private DefaultTableModel model = null;
+	
+	private int theigth=140;
+	private int twidth=300;
+	
+	final static String PROYECTADOPANEL = "Proyectado";
+	//final static String GEOGRAFICOPANEL = "Geografico";
+	private String sourceUnit = null;
+	
+	private ArrayList projections = null;
+	private ArrayList trueParametersNames = null;
+	
+	ICrs crs;
+	Proj4 proj4 = null;
+	private int pos;
+	int divider=10000;
+	
+	/**
+     * Small tolerance factor for rounding errors.
+     */
+    private static final double EPS = 1E-8;
+
+	
+	public DefSistCoordenadas() {
+		super();
+		BorderLayout bl=new BorderLayout();
+		try {
+			proj4 = new Proj4();
+		} catch (CrsException e) {
+			e.printStackTrace();
+		}
+		bl.setVgap(5);
+		bl.setHgap(5);
+		this.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+		this.setLayout(bl);
+		this.add(getTop(),BorderLayout.NORTH);
+		
+		//agregar cardPanel en el this
+		this.add(getCardPanel(),BorderLayout.CENTER);
+		
+	}
+	
+	public JPanel getCardPanel() {		
+		if (cardPanel==null) {
+			cardPanel=new JPanel();
+			cardPanel.setLayout(new CardLayout());
+			//agregar los elementos correspondientes en el cardPanel
+			cardPanel.add(PROYECTADOPANEL,getProyectadoPanel());
+			//cardPanel.add(GEOGRAFICOPANEL,getGeograficoPanel());			
+		}
+		return cardPanel;
+	}
+	/**
+	 * Inicializa el radio button  Geogr�fico 2D
+	 * @return
+	 */
+	public JRadioButton getRbGeografico() {
+		if (rbGeografico==null){
+			rbGeografico=new JRadioButton(PluginServices.getText(this,"SistCoor_Geografico2D"));
+			rbGeografico.addActionListener(this);
+		}
+		return rbGeografico;
+	}
+	/**
+	 * Inicializa el radio button Proyectado
+	 * @return
+	 */
+	public JRadioButton getRbProyectado() {
+		if (rbProyectado==null){
+			rbProyectado=new JRadioButton(PluginServices.getText(this,"SistCoor_Proyactado"));
+			rbProyectado.addActionListener(this);
+		}
+		return rbProyectado;
+	}
+	/**
+	 * Inicializa el panel que contiene las opciones 
+	 * si el crs seleccionado es proyectado
+	 * 
+	 */
+	public JPanel getProyectadoPanel() {
+		if(proyectadoPanel==null){
+			proyectadoPanel=new JPanel(new BorderLayout(5,5));
+			proyectadoPanel.setBorder(BorderFactory.createEmptyBorder(0,3,0,3));
+			//Tendra que alinearlo todo a la izquierda
+			JPanel p1=new JPanel(new FlowLayout(FlowLayout.LEFT,3,5));
+			p1.add(getLblNombreProy());
+			p1.add(getTxtNombreProy());
+			p1.add(getBtnImportar());
+			JPanel p2=new JPanel(new FlowLayout(FlowLayout.RIGHT,3,5));
+			p2.add(getLblProyeccion());
+			p2.add(getCbProyeccion());
+			JPanel pNorth=new JPanel(new GridLayout(2,1));
+			pNorth.add(p1);
+			pNorth.add(p2);
+			proyectadoPanel.add(pNorth,BorderLayout.NORTH);
+			proyectadoPanel.add(getScrollTable(),BorderLayout.CENTER);
+		}
+		return proyectadoPanel;
+	}
+	/**
+	 * Inicializa el panel superior donde se define el sistema 
+	 * de coordenadas
+	 * 
+	 */
+	public JPanel getTop() {
+		if(top==null){
+			top=new JPanel();
+			top.add(getRbGeografico());
+			top.add(getRbProyectado());
+			//Agrupar las opciones
+			agruparRadioButtons();
+			top.setBorder(new TitledBorder(PluginServices.getText(this,"SistCoor_titmarco")));
+		}
+		return top;
+	}
+	/**
+	 * Agrupa los radio button
+	 *
+	 */
+	private void agruparRadioButtons() {
+		if (coordGroup==null){
+				coordGroup=new ButtonGroup();
+				//Agrupar los botones de opcion
+				coordGroup.add(getRbProyectado());
+				coordGroup.add(getRbGeografico());
+				getRbProyectado().setSelected(true);
+			}	
+	}
+	/**
+	 * Inicializa el label Proyecci�n
+	 * @return
+	 */
+	public JLabel getLblProyeccion() {
+		if (lblProyeccion==null){
+			lblProyeccion=new JLabel();
+			lblProyeccion.setText(PluginServices.getText(this,"SistCoor_Proyeccion"));
+		}
+		return lblProyeccion;
+	}
+	/**
+	 * Crea la tabla donde se definen los par�metros de la
+	 * proyecci�n seleccionada en el combobox
+	 * @return
+	 */
+	public JTable getTableParametros() {
+		
+		if(tableParametros==null){
+			tableParametros = new JTable();
+			tableParametros.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
+		    model = (DefaultTableModel)tableParametros.getModel();		    
+		    //Crea la tabla con 7 filas
+		    Object[][] data = {
+					{"", "", "Metros"},
+					{"", "", "Metros"},
+					{"", "", "Metros"},
+					{"", "", "Metros"},
+					{"", "", "Metros"},
+					{"", "", "Metros"},
+					{"", "", "Metros"}};
+		    
+			String col1=PluginServices.getText(this,"SistCoor_Parametro");
+			String col2=PluginServices.getText(this,"SistCoor_Valor");
+			String col3=PluginServices.getText(this,"SistCoor_Unidades");
+			Object[] headers = {col1, col2, col3};
+		    
+		     /*Agrega otra fila
+			model.addRow(new Object[]{"fila","","Metros"});*/
+		    //define los items del combo
+		    ArrayList units = obtenerItemsUnidades();
+			String[] items = new String[units.size()];
+			for (int i=0;i<units.size();i++){
+				items[i] = units.get(i).toString();
+			}
+			
+			model = new DefaultTableModel(data, headers) {
+				private static final long serialVersionUID = 1L;
+				public boolean isCellEditable(int row, int column) {
+					if (column == 0 || column == 2)
+						return false;
+					else return true;
+				}
+			 };
+			 tableParametros.setModel(model);
+	        //String[] items = new String[] { "Metros", "Grados", "Kilometros", "Decimetros", "Hect�metros" };
+	       /* TableColumn col = tableParametros.getColumnModel().getColumn(2);
+	        
+	        //ComboBoxEditor editor = new ComboBoxEditor(items);
+	        col.setCellEditor(new DefaultCellEditor(getCbUnits()));
+	        DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
+	       
+	        col.setCellRenderer(renderer);*/
+	        
+	        
+	        //Define el tama�o de la tabla
+			tableParametros.setPreferredScrollableViewportSize(new Dimension(twidth,theigth));
+			//la posicion de las columnas es fija
+			tableParametros.getTableHeader().setReorderingAllowed( false );
+			//Ajustar ancho y alto de las filas y columnas
+			ajustarTamanoTabla();
+			fillTable(getProjection(0));			
+		}
+
+		return tableParametros;
+	}
+	
+	/**
+	 * Contiene los nombres de las distintas unidades
+	 * @return
+	 */
+	public JComboBox getCbUnits() {
+		if (cbUnits==null){
+			ArrayList units = obtenerItemsUnidades();
+			String[] items = new String[units.size()];
+			for (int i=0;i<units.size();i++){
+				items[i] = units.get(i).toString();
+			}
+			cbUnits=new JComboBox(items);
+			cbUnits.setEditable(false);
+			cbUnits.setToolTipText(PluginServices.getText(this,"SistCoor_cbToolTip"));
+			sourceUnit = (String)cbUnits.getItemAt(0);
+			cbUnits.addItemListener(this);
+		}
+		return cbUnits;
+	}
+	
+	/**
+	 * Accede al la base de datos y obtiene los items de
+	 * los combobox
+	 * @return
+	 */
+	private ArrayList obtenerItemsUnidades(){ //unidades de longitud...
+		ArrayList items = new ArrayList();
+				
+		String sentence = "SELECT unit_of_meas_name " +
+		  				"FROM epsg_unitofmeasure ";// +	                              
+		  				//"WHERE unit_of_meas_type = 'length'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			while (result.next()) {
+				String item = result.getString("unit_of_meas_name");
+				items.add(PluginServices.getText(this, item));
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+		return items;
+	}
+	
+	/**
+	 * Accede al la base de datos y obtiene los items de
+	 * los combobox
+	 * @return
+	 */
+	private ArrayList obtenerItemsUnidadesAngular(){ //unidades angulares...
+		ArrayList items = new ArrayList();
+				
+		String sentence = "SELECT unit_of_meas_name " +
+		  				"FROM epsg_unitofmeasure " +	                              
+		  				"WHERE unit_of_meas_type = 'angle'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			while (result.next()) {
+				String item =result.getString("unit_of_meas_name"); 
+				items.add(PluginServices.getText(this, item));
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+		return items;
+	}
+	
+	/**
+	 * Accede al la base de datos y obtiene los items de
+	 * los combobox
+	 * @return
+	 */
+	private ArrayList obtenerItemsUnidadesScale(){ //unidades angulares...
+		ArrayList items = new ArrayList();
+				
+		String sentence = "SELECT unit_of_meas_name " +
+		  				"FROM epsg_unitofmeasure " +	                              
+		  				"WHERE unit_of_meas_type = 'scale'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			while (result.next()) {
+				String item = result.getString("unit_of_meas_name");
+				items.add(PluginServices.getText(this, item));
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+		return items;
+	}
+
+	/**
+	 * Crear scrollPane y agregar la tabla en �l
+	 */
+	public JScrollPane getScrollTable() {
+		if(scrollTable==null){
+			scrollTable = new JScrollPane(getTableParametros());
+			scrollTable.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+		}
+		return scrollTable;
+	}
+	/**
+	 * Contiene los nombres de las distintas proyecciones
+	 * @return
+	 */
+	public JComboBox getCbProyeccion() {
+		if (cbProyeccion==null){
+			ArrayList projections = obtainProjections();
+			String[] items = new String[projections.size()];
+			for (int i=0;i<projections.size();i++){
+				items[i] = projections.get(i).toString();
+			}
+			cbProyeccion=new JComboBox(items);
+			cbProyeccion.setEditable(false);
+			cbProyeccion.setToolTipText(PluginServices.getText(this,"SistCoor_cbToolTip"));
+			cbProyeccion.addItemListener(this);			
+		}
+		return cbProyeccion;
+	}
+	/**
+	 * Inicializa el label que contiene el Nombre de la Proyeccin
+	 * @return
+	 */
+	public JLabel getLblNombreProy() {
+		if(lblNombreProy==null){
+			lblNombreProy=new JLabel(PluginServices.getText(this,"nombre_proyeccion"));
+		}
+		return lblNombreProy;
+	}
+	/**
+	 * Inicializa el cuadro de texto que contiene el nombre de la proyeccin
+	 * @return
+	 */
+	public JTextField getTxtNombreProy() {
+		if(txtNombreProy==null){
+			txtNombreProy=new JTextField();
+			Dimension d=new Dimension(320,20);
+			txtNombreProy.setPreferredSize(d);
+			txtNombreProy.setMinimumSize(d);
+		}
+		return txtNombreProy;
+	}
+	private ArrayList obtainProjections() {
+		ArrayList items = new ArrayList();
+		ArrayList util = new ArrayList();
+		for (int i = 0;i<proj4.getProjectionNameList().size(); i++) {
+			try {
+				items.add(i, PluginServices.getText(this,proj4.getProj4ProjectionName(i)));
+				util.add(i, proj4.getProj4ProjectionName(i));
+			} catch (CrsException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}			
+		}
+		
+		/*String sentence = "SELECT coord_op_method_name " +
+		  				"FROM epsg_coordoperationmethod " +	                              
+		  				"WHERE coord_op_method_code > 9800 "+
+		  				"ORDER BY coord_op_method_name ASC";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		int in=0;
+		try {
+			while (result.next()) {
+				String item = result.getString("coord_op_method_name"); 
+				items.add(in, PluginServices.getText(this, item.replaceAll(" ", "_")));
+				util.add(in, item);
+				in++;
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}*/
+		
+		/*
+		 * Ordenamos los ArrayList por si con las traducciones
+		 * se producen cambios de orden. Pensar en la implementacion...
+		 */
+		String tempItem1,tempItem2, tempUtil1, tempUtil2;
+		for (int i=0; i< items.size()-1; i++) {
+			for (int j=i+1; j< items.size();j++) {
+				tempItem1 = (String)items.get(i);				
+				tempItem2 = (String)items.get(j);
+				tempUtil1 = (String)util.get(i);
+				tempUtil2 = (String)util.get(j);
+				if (((String)items.get(j)).compareTo(tempItem1) < 0) {
+					items.remove(i);
+					items.add(i, tempItem2);
+					items.remove(j);
+					items.add(j, tempItem1);
+					util.remove(i);
+					util.add(i, tempUtil2);
+					util.remove(j);
+					util.add(j, tempUtil1);
+				}
+			}
+		}
+		setProjection(util);
+		return items;
+	}
+	/*
+	 * Redimensiona el tama�o de las filas y columnas de la tabla
+	 *
+	 */
+	public void ajustarTamanoTabla(){
+	    TableColumn column = null;
+	    //Fijar el alto de las filas
+	    getTableParametros().setRowHeight(20);
+	    //Fijar el ancho de las columnas
+	    column = getTableParametros().getColumnModel().getColumn(0);
+	    column.setPreferredWidth(30);
+	    column = getTableParametros().getColumnModel().getColumn(1);
+	    column.setPreferredWidth(90);
+	    column = getTableParametros().getColumnModel().getColumn(2);
+	    column.setPreferredWidth(120);
+
+	}
+	
+	/**
+	 * Fija los eventos de los RadioButtons y dem�s controles
+	 */
+	public void actionPerformed(ActionEvent e) {
+		//MOSTRAR UN PANEL U OTRO
+        CardLayout cl = (CardLayout)(cardPanel.getLayout());
+		if (e.getSource().equals(getRbProyectado())){
+			/*Si est� seleccionada la opcion de Proyectado 
+			se muestra el panel de seleccion de la proyecci�n con sus par�metros*/
+			 //cl.show(cardPanel, PROYECTADOPANEL);
+			habilitarControles();
+		}else if(e.getSource().equals(getRbGeografico())){
+			/*Se muestra el panel de Sistema de Coordenadas Geografico*/
+			 //cl.show(cardPanel, GEOGRAFICOPANEL);
+			deshabilitarControles();
+		} else if (e.getSource().equals(getBtnImportar())) {
+			System.out.println("Importar Proyeccion");
+			ImportNewCrsDialog newCrs = new ImportNewCrsDialog(PluginServices.getText(this, "projection"));
+       	 	PluginServices.getMDIManager().addWindow(newCrs);
+       	 	if (newCrs.getCode() != -1) {
+	       	 	setCrs(newCrs.getCode());
+	       	 	fillData(getCrs());
+       	 	}
+		}
+	}
+
+	/*
+	 * Crear el panel que contiene los componentes de 
+	 * un sistema de coordenadas geografico
+	 * */
+	/*public JPanel getGeograficoPanel() {
+		if(geograficoPanel==null){
+			BorderLayout b=new BorderLayout();
+			b.setVgap(5);
+			b.setHgap(5);
+			geograficoPanel=new JPanel(b);
+			geograficoPanel.add(new JButton("Crear panel Geogr�fico 2D"));
+		}
+		return geograficoPanel;
+	}*/
+	
+	public void fillData(ICrs crs) {
+		if (!crs.getCrsWkt().getProjcs().equals("")) {
+			getRbProyectado().setSelected(true);
+			int index = proj4.findProjection(crs.getCrsWkt().getProjection());
+			String proj2Compare = "";
+			try {
+				proj2Compare = proj4.getProj4ProjectionName(index);
+			} catch (CrsException e1) {
+				e1.printStackTrace();
+			}
+			for (int i = 0; i < getCbProyeccion().getItemCount(); i++) {
+				if (getProjection(i).equals(proj2Compare)) {
+					getCbProyeccion().setSelectedIndex(i);
+					break;
+				}
+			}
+			getTxtNombreProy().setText(crs.getCrsWkt().getProjcs());
+			setPos(proj4.findProjection(crs.getCrsWkt().getProjection()));
+			int numRow = model.getRowCount();
+			while (numRow != 0) {
+				numRow = numRow - 1;
+				model.removeRow(numRow);
+			}
+			Object[] data = new Object[3];
+			data[2] = "Metros";
+			ArrayList trueParametersNames = new ArrayList();			
+			
+			try {				
+			
+				for (int i = 0; i < crs.getCrsWkt().getParam_name().length; i++) {
+					String param = crs.getCrsWkt().getParam_name()[i].trim();
+					if (param.equals("semi_major") || param.equals("semi_minor")) {
+						continue;
+					}
+					trueParametersNames.add(param);
+					data[0] = PluginServices.getText(this, param);
+					data[1] = crs.getCrsWkt().getParam_value()[i];
+					int pos = proj4.findProjectionParameter(param);
+					String unit = proj4.getProjectionParameterUnitList(pos);
+					if (unit.equals("Angular")) 
+						data[2] = "Degree";
+					else if (unit.equals("Unitless"))
+						data[2] = "Unitless";
+					else if (unit.equals("Linear"))
+						data[2] = "Meters";
+					model.addRow(data);
+				}
+				setTrueParametersNames(trueParametersNames);
+			} catch (CrsException e) {
+				e.printStackTrace();
+			}
+		} else {
+			getRbGeografico().setSelected(true);
+			 CardLayout cl = (CardLayout)(cardPanel.getLayout());
+			//cl.show(cardPanel, GEOGRAFICOPANEL);
+			 deshabilitarControles();
+		}
+	}
+	
+	public void fillData(CoordinateReferenceSystem crs) {
+		if (crs instanceof DefaultProjectedCRS) {
+			DefaultProjectedCRS sour = (DefaultProjectedCRS) crs;
+			String[] val = sour.getName().toString().split(":");
+			
+			if (val.length<2)
+				getTxtNombreProy().setText(val[0]);
+			else
+				getTxtNombreProy().setText(val[1]);
+			
+			val = sour.getConversionFromBase().getMethod().getName().toString().split(":");
+			String proj;
+			if (val.length<2) 
+				proj=val[0];
+			else
+				proj=val[1];			
+			
+			int index = proj4.findProjection(proj);
+			String proj2Compare = "";
+			try {
+				proj2Compare = proj4.getProj4ProjectionName(index);
+			} catch (CrsException e1) {
+				e1.printStackTrace();
+			}
+			for (int i = 0; i < getCbProyeccion().getItemCount(); i++) {
+				if (getProjection(i).equals(proj2Compare)) {
+					getCbProyeccion().setSelectedIndex(i);
+					break;
+				}
+			}
+			String[] param_name = new String[sour.getConversionFromBase().getParameterValues().values().size()];
+			String[] param_value= new String[sour.getConversionFromBase().getParameterValues().values().size()];
+			for (int i=0; i< sour.getConversionFromBase().getParameterValues().values().size();i++) {
+				String str = sour.getConversionFromBase().getParameterValues().values().get(i).toString();
+				Unit u = sour.getConversionFromBase().getParameterValues().parameter(str.split("=")[0]).getUnit();
+				double value = sour.getConversionFromBase().getParameterValues().parameter(str.split("=")[0]).doubleValue();
+				value = convert(value, u.toString());
+				param_name[i] = str.split("=")[0];
+				param_value [i] = String.valueOf(value);
+			}
+			
+			setPos(proj4.findProjection(proj));
+			int numRow = model.getRowCount();
+			while (numRow != 0) {
+				numRow = numRow - 1;
+				model.removeRow(numRow);
+			}
+			
+			Object[] data = new Object[3];
+			ArrayList trueParametersNames = new ArrayList();			
+			try {				
+			
+				for (int i = 0; i < param_name.length; i++) {
+					String param = param_name[i].trim();				
+					if (param.equals("semi_major") || param.equals("semi_minor")) {
+						continue;
+					}
+					trueParametersNames.add(param);
+					data[0] = PluginServices.getText(this, param);
+					data[1] = param_value[i];
+					int pos = proj4.findProjectionParameter(param);
+					String unit = proj4.getProjectionParameterUnitList(pos);
+					if (unit.equals("Angular")) 
+						data[2] = "Degree";
+					else if (unit.equals("Unitless"))
+						data[2] = "Unitless";
+					else if (unit.equals("Linear"))
+						data[2] = "Meters";
+					model.addRow(data);
+				}
+				setTrueParametersNames(trueParametersNames);
+			} catch (CrsException e) {
+				e.printStackTrace();
+			}
+		}
+		else {
+			getRbGeografico().setSelected(true);
+			 CardLayout cl = (CardLayout)(cardPanel.getLayout());
+			//cl.show(cardPanel, GEOGRAFICOPANEL);
+			 deshabilitarControles();
+		}
+	}
+	
+	public void fillTable(String projection) {
+		try {			
+			int index = proj4.findProjection(projection);
+			ArrayList params = proj4.getProj4ProjectionParameters(index);
+			ArrayList defaultValuesParams = proj4.getProj4ProjectionParameterDefaultValues(index);
+			setPos(index);
+			String[] parameters = new String[params.size()];
+			String[] defaultValues = new String[params.size()];
+			String[] units = new String[params.size()];
+			for (int i = 0; i < params.size(); i++) {
+				parameters[i] = params.get(i).toString();
+				int pos = proj4.findProjectionParameter(parameters[i]);
+				defaultValues[i] = defaultValuesParams.get(i).toString();
+				units[i] = proj4.getProjectionParameterUnitList(pos);
+				
+			}			
+			int numRow = model.getRowCount();
+			while (numRow != 0) {
+				numRow = numRow - 1;
+				model.removeRow(numRow);
+			}
+			Object[] data = new Object[3];
+			data[1] = ""+0;
+			data[2] = "Metros";
+			String[] items = null;
+			//Estas 5 lineas se eliminaran cuando se pueda utilizar el codigo
+			//del siguiente comentario
+			ArrayList unit = obtenerItemsUnidades();
+			items = new String[unit.size()];
+			for (int j=0;j<unit.size();j++){
+				items[j] = unit.get(j).toString();
+			}
+			/**
+			 * Esto debera ser utilizado cuando podamos distinguir
+			 * entre las unidades. De momento vamos a coger todas
+			 */
+			ArrayList trueParametersNames = new ArrayList();
+			for (int i = 0; i < parameters.length; i++) {
+				trueParametersNames.add(i,parameters[i]);
+				data[0] = PluginServices.getText(this, parameters[i]);
+				data[1] = defaultValues[i];
+				if (units[i].equals("Angular")) {
+					data[2] = "Degree";
+					//define los items del combo
+				    /*unit = obtenerItemsUnidadesAngular();
+					items = new String[unit.size()];
+					for (int j=0;j<unit.size();j++){
+						items[j] = unit.get(j).toString();
+					}*/					
+				}
+				else if (units[i].equals("Unitless")) {
+					data[2] = "Unitless";
+					//define los items del combo
+				    /*unit = obtenerItemsUnidadesScale();
+					items = new String[unit.size()];
+					for (int j=0;j<unit.size();j++){
+						items[j] = unit.get(j).toString();
+					}*/				
+				}
+				else {					
+					data[2] = "Meters";
+					//define los items del combo
+				    /*unit = obtenerItemsUnidades();
+					items = new String[unit.size()];
+					for (int j=0;j<unit.size();j++){
+						items[j] = unit.get(j).toString();
+					}*/					
+				}
+				model.addRow(data);				
+				/*TableColumn col = getTableParametros().getColumnModel().getColumn(2);
+		        
+		        col.setCellEditor(new DefaultCellEditor(getCbUnits()));
+		        DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
+		       
+		        col.setCellRenderer(renderer);
+		        getTableParametros().setCellEditor(new DefaultCellEditor(getCbUnits()));	
+		        */
+			}			
+			setTrueParametersNames(trueParametersNames);			
+		} catch (CrsException e) {
+			e.printStackTrace();
+		}
+	}
+	public void itemStateChanged(ItemEvent e) {
+		if (e.getItemSelectable().equals(cbProyeccion) ) {
+			String op = (String)e.getItem();			
+			int option = ((JComboBox)e.getSource()).getSelectedIndex();
+			fillTable(getProjection(option));
+		}
+		
+		if (e.getItemSelectable().equals(cbUnits) ) {
+			 System.out.println( (String)e.getItem());
+			 double value = Double.valueOf((String)getTableParametros().getValueAt(0, 1)).doubleValue();
+			 value = convertFromMeters(sourceUnit, (String)e.getItem(), value);
+			 sourceUnit = (String)e.getItem();
+			 String val = String.valueOf(value);
+			 getTableParametros().setValueAt(val, 0, 1);
+		}
+	}
+	
+	public void cleanData() {
+		getTxtNombreProy().setText("");
+		getCbProyeccion().setSelectedIndex(0);
+	}
+	
+	public double convert(double value, String measure) throws ConversionException {
+		if (measure.equals("D.MS")) {		
+			value *= this.divider;
+	        int deg,min;
+	        deg = (int) (value/10000); value -= 10000*deg;
+	        min = (int) (value/  100); value -=   100*min;
+	        if (min<=-60 || min>=60) {  // Accepts NaN
+	            if (Math.abs(Math.abs(min) - 100) <= EPS) {
+	                if (min >= 0) deg++; else deg--;
+	                min = 0;
+	            } else {
+	                throw new ConversionException("Invalid minutes: "+min);
+	            }
+	        }
+	        if (value<=-60 || value>=60) { // Accepts NaN
+	            if (Math.abs(Math.abs(value) - 100) <= EPS) {
+	                if (value >= 0) min++; else min--;
+	                value = 0;
+	            } else {
+	                throw new ConversionException("Invalid secondes: "+value);
+	            }
+	        }
+	        value = ((value/60) + min)/60 + deg;
+	        return value;
+		}
+		if (measure.equals("grad") || measure.equals("grade")) 
+			return ((value * 180.0) / 200.0);			
+		if (measure.equals(""+(char)176)) 
+			return value;		
+		if (measure.equals("DMS") ) 
+			return value;		
+		if (measure.equals("m")) 
+			return value;	
+		if (measure.equals("")) 
+			return value;
+		
+		throw new ConversionException("Conversion no contemplada: "+measure);
+    }
+	
+	public double convert2Meters(String unit, double value) {
+		double factor_b = 0;
+		double factor_c = 0;
+		String sentence = "SELECT factor_b, factor_c " +
+			"FROM epsg_unitofmeasure " +	                              
+			"WHERE unit_of_meas_name = '" +unit + "'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+		return ((value*factor_b)/factor_c);
+	}
+	
+	public double convert2Unitless(String unit, double value) {
+		double factor_b = 0;
+		double factor_c = 0;
+		String sentence = "SELECT factor_b, factor_c " +
+			"FROM epsg_unitofmeasure " +	                              
+			"WHERE unit_of_meas_name = '" +unit + "'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+		return ((value*factor_b)/factor_c);
+	}
+	
+	public double convert2Degree(String unit, double value) {
+		double factor_b = 0;
+		double factor_c = 0;
+		String sentence = "SELECT factor_b, factor_c " +
+			"FROM epsg_unitofmeasure " +	                              
+			"WHERE unit_of_meas_name = '" +unit + "'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+		value = ((value*factor_b)/factor_c);
+		return ((value * 180.0) / 200.0);
+	}
+	
+	public double convertFromMeters(String unitSource, String unitTarget, double value) {
+		double factor_b = 0;
+		double factor_c = 0;
+		String sentence = "SELECT factor_b, factor_c " +
+			"FROM epsg_unitofmeasure " +	                              
+			"WHERE unit_of_meas_name = '" +unitSource + "'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+		value = ((value*factor_b)/factor_c);
+		
+		sentence = "SELECT factor_b, factor_c " +
+		"FROM epsg_unitofmeasure " +	                              
+		"WHERE unit_of_meas_name = '" +unitTarget + "'";
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+		return ((value*factor_c)/factor_b);
+	}
+	
+	public double convertFromUnitless(String unitSource, String unitTarget, double value) {
+		double factor_b = 0;
+		double factor_c = 0;
+		String sentence = "SELECT factor_b, factor_c " +
+			"FROM epsg_unitofmeasure " +	                              
+			"WHERE unit_of_meas_name = '" +unitSource + "'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");	
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+		value = ((value*factor_b)/factor_c);
+		
+		sentence = "SELECT factor_b, factor_c " +
+		"FROM epsg_unitofmeasure " +	                              
+		"WHERE unit_of_meas_name = '" +unitTarget + "'";
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+		return ((value*factor_c)/factor_b);
+	}
+	
+	public double convertFromDegree(String unitSource, String unitTarget, double value) {
+		double factor_b = 0;
+		double factor_c = 0;
+		String sentence = "SELECT factor_b, factor_c " +
+			"FROM epsg_unitofmeasure " +	                              
+			"WHERE unit_of_meas_name = '" +unitSource + "'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+		value = ((value*factor_b)/factor_c);
+		
+		sentence = "SELECT factor_b, factor_c " +
+		"FROM epsg_unitofmeasure " +	                              
+		"WHERE unit_of_meas_name = '" +unitTarget + "'";
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+		return ((value*factor_c)/factor_b);
+	}
+	
+	public Proj4 getProj4() {
+		return proj4;
+	}
+	
+	/**
+	 * Contiene la posición de la proyección seleccionada dentro de la lista
+	 * de proyecciones de proj4.
+	 * @param pos
+	 */
+	public void setPos(int pos) {
+		this.pos = pos;
+	}
+	
+	/** Obtiene la posición de la proyección seleccionada dentro de la lista
+	 * de proyecciones de proj4.
+	 */
+	public int getPos() {
+		return this.pos;
+	}
+	
+	/**
+	 * Deshabilita todos los controles del panel
+	 *
+	 */
+	private void deshabilitarControles() {
+		getProyectadoPanel().setEnabled(false);
+		getTableParametros().setEnabled(false);
+		getTableParametros().getTableHeader().setEnabled(false);
+		getTxtNombreProy().setEnabled(false);
+		getLblNombreProy().setEnabled(false);
+		getLblProyeccion().setEnabled(false);
+		getCbProyeccion().setEnabled(false);	
+		getBtnImportar().setEnabled(false);
+	}
+	
+	/**
+	 * Habilita todos los controles del panel.
+	 *
+	 */
+	private void habilitarControles() {	
+		getProyectadoPanel().setEnabled(true);
+		getTableParametros().setEnabled(true);
+		getTableParametros().getTableHeader().setEnabled(true);
+		getTxtNombreProy().setEnabled(true);
+		getLblNombreProy().setEnabled(true);
+		getLblProyeccion().setEnabled(true);
+		getCbProyeccion().setEnabled(true);
+		getBtnImportar().setEnabled(true);
+	}
+	/**
+	 * Inicializa el boton que importa la proyeccion actual
+	 * @return
+	 */
+	public JButton getBtnImportar() {
+		if(btnImportar==null){
+			btnImportar=new JButton("...");
+			btnImportar.addActionListener(this);
+			
+		}
+		return btnImportar;
+	}
+	
+	/**
+	 * CRS que estamos cogiendo para poder rellenar los datos
+	 * @param code
+	 */
+	public void setCrs(int code) {
+		try {
+			crs = new CrsFactory().getCRS("EPSG:"+code);
+		} catch (CrsException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+	}
+	
+	/**
+	 * Obtiene el CRS actual
+	 * @return
+	 */
+	public ICrs getCrs() {
+		return crs;
+	}
+	
+	/**
+	 * Seleccion de la proyeccion que estamos utilizando. Esto lo hacemos para
+	 * obtener la cadena correcta de la proyeccion en lugar de su traduccion
+	 * que se utiliza en el combobox.
+	 * @param proj
+	 */
+	public void setProjection(ArrayList proj) {
+		projections = proj;
+	}
+	
+	/**
+	 * Obtencion de la proyecion utilizada a traves del indice.
+	 * @param indice
+	 * @return
+	 */
+	public String getProjection(int indice) {
+		return (String)projections.get(indice);
+	}
+	
+	/**
+	 * define los parametros utilizados por una proyeccion. Al igual que la
+	 * proyeccion, sirve para coger el valor correcto del parametro en lugar
+	 * de su traduccion en la tabla.
+	 * @param names
+	 */
+	public void setTrueParametersNames(ArrayList names) {
+		this.trueParametersNames = names;
+	}
+	
+	/**
+	 * Consigue los nombres buenos de los parametros utilizados en una proyeccion
+	 * @param indice
+	 * @return
+	 */
+	public String getTrueParametersNames(int indice) {
+		return (String)trueParametersNames.get(indice);
+	}
+
+
+}
+

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefSistCoordenadas.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/MainPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/MainPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/MainPanel.java	(revision 25287)
@@ -0,0 +1,782 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels.wizard;
+
+import java.awt.BorderLayout;
+import java.awt.FlowLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.text.ParseException;
+import java.util.ArrayList;
+
+import javax.swing.JButton;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JTabbedPane;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+
+import org.geotools.referencing.wkt.Parser;
+import org.gvsig.crs.Crs;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+
+import es.idr.teledeteccion.connection.EpsgConnection;
+import es.idr.teledeteccion.connection.Query;
+
+
+/**
+ * 
+ * @author Luisa Marina Fernndez (luisam.fernandez@uclm.es)
+ * @author Jose Luis Gomez Martinez (joseluis.gomez@uclm.es)
+ *
+ */
+public class MainPanel extends JPanel implements ActionListener, ChangeListener, IWindow {
+	
+	private static final long serialVersionUID = 1L;
+	private JTabbedPane pCard;
+	private JPanel pSouth;
+	
+	private JButton btnCancelar;
+	private JButton btnSiguiente;
+	private JButton btnAnterior;
+	private JButton btnFinalizar;
+	
+	private DefCrsUsr pCrsUsr;
+	private DefinirDatum pDatum;
+	private DefSistCoordenadas pSistCoord;
+	private ICrs currentCrs;
+	private String cadWkt = "";
+	private int newCrsCode = -1;
+	private boolean edit = false;
+	
+	public MainPanel(ICrs crs) {
+		super();
+		setCrs(crs);
+		this.setLayout(new BorderLayout());
+		this.add(getPCard(),BorderLayout.CENTER);
+		this.add(getPSouth(),BorderLayout.SOUTH);
+		getPCrsUsr().getRbCadenaWkt().addActionListener(this);
+		getPCrsUsr().getRbCrsExistente().addActionListener(this);
+		getPCrsUsr().getRbNuevoCrs().addActionListener(this);
+	}
+	/**
+	 * Inicilizar el botn Anterior
+	 * @return
+	 */
+	public JButton getBtnAnterior() {
+		if(btnAnterior==null){
+			btnAnterior=new JButton();
+			btnAnterior.setText(PluginServices.getText(this,"wz_anterior"));
+			btnAnterior.addActionListener(this);
+			
+		}
+		return btnAnterior;
+	}
+	/**
+	 * Inicilizar el botn Cancelar
+	 * @return
+	 */
+	public JButton getBtnCancelar() {
+		if(btnCancelar==null){
+			btnCancelar=new JButton();
+			btnCancelar.setText(PluginServices.getText(this,"wz_cancel"));
+			btnCancelar.addActionListener(this);
+		}
+		return btnCancelar;
+	}
+	/**
+	 * Inicilizar el botn Finalizar
+	 * @return
+	 */
+	public JButton getBtnFinalizar() {
+		if(btnFinalizar==null){
+			btnFinalizar=new JButton();
+			btnFinalizar.setText(PluginServices.getText(this,"wz_fin"));
+			btnFinalizar.addActionListener(this);
+		}
+		return btnFinalizar;
+	}
+	/**
+	 * Inicilizar el botn Siguiente
+	 * @return
+	 */
+	public JButton getBtnSiguiente() {
+		if(btnSiguiente==null){
+			btnSiguiente=new JButton();
+			btnSiguiente.setText(PluginServices.getText(this,"wz_siguiente"));
+			btnSiguiente.addActionListener(this);
+		}
+		return btnSiguiente;
+	}
+	/**
+	 * Inicilizar el panel que maneja los subpaneles del asistente
+	 * @return
+	 */
+	public JTabbedPane getPCard() {
+		if(pCard==null){
+			pCard = new JTabbedPane();			
+			pCard.addTab(PluginServices.getText(this,"crs_usuario"),getPCrsUsr());
+			pCard.addTab(PluginServices.getText(this,"Dat_nDatum"),getPDatum());
+			pCard.addTab(PluginServices.getText(this,"SistCoor_titmarco"),getPSistCoord());
+			//Por defecto se muestra la primera pestaa
+			pCard.setSelectedIndex(0);
+			pCard.addChangeListener(this);
+		}
+		return pCard;
+	}
+	/**
+	 * Iniciliza el panel que contiene los botones del asistente
+	 * @return
+	 */
+	public JPanel getPSouth() {
+		if(pSouth==null){
+			pSouth=new JPanel();
+			pSouth.setLayout(new FlowLayout(FlowLayout.RIGHT,5,5));
+			pSouth.add(getBtnCancelar());
+			pSouth.add(getBtnAnterior());
+			pSouth.add(getBtnSiguiente());
+			pSouth.add(getBtnFinalizar());
+			getBtnFinalizar().setVisible(false);
+			getBtnAnterior().setVisible(false);
+		}
+		return pSouth;
+	}
+	public DefCrsUsr getPCrsUsr() {
+		if(pCrsUsr==null){
+			pCrsUsr=new DefCrsUsr(getCrs());
+		}
+		return pCrsUsr;
+	}
+	public DefinirDatum getPDatum() {
+		if(pDatum==null){
+			pDatum=new DefinirDatum();
+		}
+		return pDatum;
+	}
+	public DefSistCoordenadas getPSistCoord() {
+		if(pSistCoord==null){
+			pSistCoord=new DefSistCoordenadas();
+		}
+		return pSistCoord;
+	}
+	public void actionPerformed(ActionEvent e) {
+	
+		if(e.getSource().equals(getBtnAnterior())){
+
+			//Establecer los botones del Wizard
+			getBtnFinalizar().setVisible(false);
+			getBtnSiguiente().setVisible(true);
+			
+			if (getPSistCoord().isShowing() && isEditing()) {
+				getBtnAnterior().setVisible(false);
+			}
+			if(getPDatum().isShowing()){
+				//Se va a mostrar el primer panel del Wizard
+				getBtnAnterior().setVisible(false);
+				if (getPCrsUsr().getRbCadenaWkt().isSelected()) {
+					getBtnFinalizar().setVisible(true);
+				}
+				getPCard().setSelectedComponent(getPCrsUsr());
+			}
+			else if (getPSistCoord().isShowing()) {
+				getPCard().setSelectedComponent(getPDatum());
+			}
+			
+		}else if(e.getSource().equals(getBtnSiguiente())){
+			if (getPCrsUsr().isShowing() && getPCrsUsr().getRbCrsExistente().isSelected() ){
+				getBtnFinalizar().setVisible(false);
+				ICrs crs = getPCrsUsr().getCrs();
+				if (crs != null){
+					fillData(crs);
+				}
+				else fillData(getCrs());
+			}
+			else if (getPCrsUsr().isShowing() && getPCrsUsr().getRbNuevoCrs().isSelected() ){
+				getBtnFinalizar().setVisible(false);
+				cleanData();
+			}
+			else if (getPCrsUsr().isShowing() && getPCrsUsr().getRbCadenaWkt().isSelected()) {
+				if (getPCrsUsr().getTxtAreaWkt().getText().equals("")) {
+					JOptionPane.showMessageDialog(MainPanel.this, 
+							PluginServices.getText(this,"white_Textbox"), 
+							"Warning...", JOptionPane.WARNING_MESSAGE);
+					return;
+				} else {
+					CoordinateReferenceSystem crs = null;
+					String wkt = getPCrsUsr().getTxtAreaWkt().getText();
+					Parser parser = new Parser();
+			        
+					try {
+						crs = parser.parseCoordinateReferenceSystem(wkt);
+					} catch (ParseException e1) {
+						//System.out.println("Cadena WKT no ha podido ser parseada");
+						//e1.printStackTrace();
+						JOptionPane.showMessageDialog(MainPanel.this, 
+								PluginServices.getText(this, "problem_with_wkt_try_manually"), 
+								"Warning...", JOptionPane.WARNING_MESSAGE);					
+						return;					
+					} catch (UnsupportedOperationException e2) {
+						JOptionPane.showMessageDialog(MainPanel.this, 
+								PluginServices.getText(this, "problem_with_wkt_try_manually"), 
+								"Warning...", JOptionPane.WARNING_MESSAGE);					
+						return;
+					}
+					
+					fillData(crs);
+				}
+			}
+			if (getPCrsUsr().isShowing())			
+				getPCard().setSelectedComponent(getPDatum());
+			else if (getPDatum().isShowing())
+				getPCard().setSelectedComponent(getPSistCoord());
+			
+			getBtnAnterior().setVisible(true);
+			//Si aparece el ultimo panel visualizar el botn finalizar
+			if (getPDatum().isShowing()){
+				getBtnFinalizar().setVisible(true);
+				getBtnSiguiente().setVisible(false);
+				getBtnAnterior().setVisible(true);
+			}
+		}else if(e.getSource().equals(getBtnFinalizar())){
+			if (getPCrsUsr().getRbCadenaWkt().isSelected()) {
+				CoordinateReferenceSystem crs = null;
+				String wkt = getPCrsUsr().getTxtAreaWkt().getText();
+				Parser parser = new Parser();
+				if (getPCrsUsr().getTxtAreaWkt().getText().equals("")) {
+						JOptionPane.showMessageDialog(MainPanel.this, 
+								PluginServices.getText(this,"white_Textbox"), 
+								"Warning...", JOptionPane.WARNING_MESSAGE);
+						return;
+				}
+				try {
+					crs = parser.parseCoordinateReferenceSystem(wkt);
+				} catch (ParseException e1) {
+					//System.out.println("Cadena WKT no ha podido ser parseada");
+					//e1.printStackTrace();
+					JOptionPane.showMessageDialog(MainPanel.this, 
+							PluginServices.getText(this, "problem_with_wkt_try_manually"), 
+							"Warning...", JOptionPane.WARNING_MESSAGE);					
+					return;
+				} catch (UnsupportedOperationException e2) {
+					JOptionPane.showMessageDialog(MainPanel.this, 
+							PluginServices.getText(this, "problem_with_wkt_try_manually"), 
+							"Warning...", JOptionPane.WARNING_MESSAGE);					
+					return;
+				}
+				
+				fillData(crs);
+			}
+			
+			//Realizar las acciones de fin del Wizard
+			getDataAndUpdate();	
+			
+		}else if(e.getSource().equals(getBtnCancelar())){
+			//Cerrar el asistente
+			PluginServices.getMDIManager().closeWindow(this);
+		} else if (e.getSource().equals(getPCrsUsr().getRbCadenaWkt())) {			
+			getPCrsUsr().habilitarExistente(false);
+			getPCrsUsr().habilitarWkt(true);
+			getBtnFinalizar().setVisible(true);
+		}
+		else if(e.getSource().equals(getPCrsUsr().getRbCrsExistente())){
+			 getPCrsUsr().habilitarExistente(true);
+			 getPCrsUsr().habilitarWkt(false);
+			 getBtnFinalizar().setVisible(false);
+        }else  if(e.getSource().equals(getPCrsUsr().getRbNuevoCrs())){       	 
+       	 	getPCrsUsr().habilitarExistente(false);
+       	 	getPCrsUsr().habilitarWkt(false);
+       	 	getBtnFinalizar().setVisible(false);
+        }
+	}
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle(PluginServices.getText(this,"wz_titulo"));
+   		m_viewinfo.setWidth(560);
+   		//m_viewinfo.setHeight(425);
+   		m_viewinfo.setHeight(400);
+		return m_viewinfo;
+	}
+	
+	public ICrs getCrs () {
+		return currentCrs;
+	}
+	
+	public void setCrs (ICrs crs) {
+		currentCrs = crs;
+	}
+	
+	public void fillData(ICrs crs) {
+		getPDatum().fillData(crs);
+		getPSistCoord().fillData(crs);
+	}
+	
+	public void fillData(ICrs crs, boolean editing) {
+		getPDatum().fillData(crs, editing);
+		getPSistCoord().fillData(crs);
+	}
+	
+	public void cleanData() {
+		getPDatum().cleanData();
+		getPSistCoord().cleanData();
+	}
+	
+	public void fillData(CoordinateReferenceSystem crs) {		
+		getPDatum().fillData(crs);
+		getPSistCoord().fillData(crs);
+	}
+	
+	private void getDataAndUpdate() {
+		EpsgConnection conn = new EpsgConnection();
+		conn.setConnectionUsr();
+		String codeCrs = "";
+		String sentence;
+		ResultSet result;
+		
+		if (getPDatum().getTxtSemMay().getText().equals("")) {
+			JOptionPane.showMessageDialog(MainPanel.this, 
+					PluginServices.getText(this,"white_Textbox")+": Semieje Mayor", 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			return;
+		}
+		
+		if (getPDatum().getTxtLong().getText().equals("")) {
+			JOptionPane.showMessageDialog(MainPanel.this, 
+					PluginServices.getText(this,"white_Textbox")+": Longitud", 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			return;
+		}
+		
+		if (getPDatum().getTxtCodigoCrs().getText().equals("")) {
+			JOptionPane.showMessageDialog(MainPanel.this, 
+					PluginServices.getText(this,"white_Textbox")+": Codigo CRS", 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			return;
+		}
+		
+		String cadenaNumerica = getPDatum().getTxtSemMay().getText().replaceAll("[^0-9.E-]", "");
+						
+		if (getPDatum().getTxtSemMay().getText().length() != cadenaNumerica.length() || notANumber(cadenaNumerica)) {
+			JOptionPane.showMessageDialog(MainPanel.this, 
+					PluginServices.getText(this,"numeric_format")+": Semieje Mayor", 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			return;
+		}		
+		
+		cadenaNumerica = getPDatum().getTxtLong().getText().replaceAll("[^0-9.E-]", "");
+		
+		if (getPDatum().getTxtLong().getText().length() != cadenaNumerica.length() || notANumber(cadenaNumerica)) {
+		
+			JOptionPane.showMessageDialog(MainPanel.this, 
+					PluginServices.getText(this,"numeric_format")+": Longitud", 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			return;
+		}
+		
+		codeCrs = getPDatum().getTxtCodigoCrs().getText().replaceAll("[^0-9]", "");
+		
+		if (getPDatum().getTxtCodigoCrs().getText().length() != codeCrs.length()) {
+			
+			JOptionPane.showMessageDialog(MainPanel.this, 
+					PluginServices.getText(this,"numeric_format")+": Codigo CRS", 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			return;
+		}
+		
+		double value = Double.valueOf(getPDatum().getTxtSemMay().getText()).doubleValue();
+		//Comprobar si es numerico, o quedarnos con la parte numerica...
+		//searchTextField.getText().length()!=searchTextField.getText().replaceAll("[^0-9]", "").length())
+		String unit = getPDatum().getLengthUnit(getPDatum().getCbSemMay().getSelectedIndex());
+		double semMay = getPDatum().convert2Meters(unit, value);
+		value = Double.valueOf(getPDatum().getTxtLong().getText()).doubleValue();
+		unit = getPDatum().getAngularUnit(getPDatum().getCbLong().getSelectedIndex());
+		double longitude = getPDatum().convert2Degree(unit, value);
+		String spheroidName = getPDatum().getTxtElipsoide().getText();
+		if (spheroidName.equals(""))
+			spheroidName = PluginServices.getText(this, "no_name");
+		String[] spheroid = {spheroidName,
+							""+semMay,getPDatum().getTxtInvF().getText()};
+		String meridianName = getPDatum().getTxtMeridian().getText();
+		if (meridianName.equals(""))
+			meridianName = PluginServices.getText(this, "no_name");
+		String[] primem = {meridianName, ""+longitude};
+		
+		String[] authority = {"\"USR\"", codeCrs};
+		if (!isEditing()){
+			sentence = "SELECT usr_code FROM USR WHERE usr_code = " +authority[1];
+			result = Query.select(sentence, conn.getConnection());
+			try {
+				if (result.next()) {
+					JOptionPane.showMessageDialog(MainPanel.this, 
+							PluginServices.getText(this,"crsRepeat")+": "+authority[1], 
+							"Warning...", JOptionPane.WARNING_MESSAGE);
+					return;
+				}
+			} catch (SQLException e1) {
+				// TODO Auto-generated catch block
+				e1.printStackTrace();
+			}				
+		}
+		String datum = getPDatum().getTxtDatum().getText();
+		if (datum.equals(""))
+			datum = PluginServices.getText(this, "no_name");		
+		
+		if (getPSistCoord().getRbGeografico().isSelected()) {
+			String name = getPDatum().getTxtNombreCrs().getText();
+			if (name.equals(""))
+				name = PluginServices.getText(this, "no_name");
+			cadWkt = "GEOGCS[\"" + name + "\", DATUM[\""+ datum +
+			"\", SPHEROID[\""+ spheroid[0] + "\", "+ spheroid[1] + ", "+ spheroid[2] +"]], " +
+			"PRIMEM[\""+ primem[0] + "\", "+ primem[1] +"], UNIT[\"Degree\", " + (Math.PI/180) +
+			"]]";
+			if (!isEditing()){
+				sentence = "INSERT INTO USR VALUES("+authority[1]+",'" +
+							cadWkt +"','','"+name+"','"+datum+"')";
+			} else { 
+				sentence = "UPDATE USR SET usr_wkt='" +cadWkt +"'," +
+						"usr_proj='',usr_geog='"+getPDatum().getTxtNombreCrs().getText()+"'," +
+						"usr_datum='"+datum+"' " +
+						"WHERE usr_code = " +authority[1];
+			}
+	
+		} else {
+			String name = getPDatum().getTxtNombreCrs().getText();
+			if (name.equals(""))
+				name = PluginServices.getText(this, "no_name");
+			String projection = getPSistCoord().getTxtNombreProy().getText();
+			if (projection.equals(""))
+				projection = PluginServices.getText(this, "no_name");
+			cadWkt = "PROJCS[\""+projection+
+				"\", GEOGCS[\"" + name + "\", DATUM[\""+ datum +
+				"\", SPHEROID[\""+ spheroid[0] + "\", "+ spheroid[1] + ", "+ spheroid[2] +"]], " +
+				"PRIMEM[\""+ primem[0] + "\", "+ primem[1] +"], UNIT[\"Degree\", " + (Math.PI/180) +
+				"]], PROJECTION[\""+ getPSistCoord().getProjection(getPSistCoord().getCbProyeccion().getSelectedIndex()) + "\"], ";
+				
+			
+			ArrayList maxValues = null;
+			ArrayList minValues = null;
+			int paramPos = 0;
+			try {
+				maxValues = getPSistCoord().getProj4().getProj4ProjectionParameterMaxValues(getPSistCoord().getPos());
+				minValues = getPSistCoord().getProj4().getProj4ProjectionParameterMinValues(getPSistCoord().getPos());
+				
+			} catch (CrsException e) {
+				e.printStackTrace();
+			}
+			/*
+			 * falta la parte de los parámetros... metodo para nombres...
+			 */		
+			int j=0;
+			for (int i= 0; i< getPSistCoord().getTableParametros().getRowCount();i++){
+				if (((String)(getPSistCoord().getTableParametros().getValueAt(i,1))).equals("")) {
+					getPSistCoord().getTableParametros().setValueAt("0",i,1);
+				}
+				cadenaNumerica = ((String)(getPSistCoord().getTableParametros().getValueAt(i,1))).replaceAll("[^0-9.E-]", "");
+				
+				if (((String)(getPSistCoord().getTableParametros().getValueAt(i,1))).length() != cadenaNumerica.length() || notANumber(cadenaNumerica)) {
+			
+					JOptionPane.showMessageDialog(MainPanel.this, 
+							PluginServices.getText(this,"numeric_format")+": Parametro "+(String)(getPSistCoord().getTableParametros().getValueAt(i,0)), 
+							"Warning...", JOptionPane.WARNING_MESSAGE);
+					return;
+				}
+				String condition = (String)getPSistCoord().getTableParametros().getValueAt(i, 0);
+				String param = getPSistCoord().getTrueParametersNames(j);
+				paramPos = findPositionParameter(param);
+				if (paramPos != -1) {
+					value = Double.parseDouble(cadenaNumerica);
+					if ((PluginServices.getText(this, condition).trim().equals("semi_major") || (PluginServices.getText(this, condition).trim().equals("semi_minor")))) {
+						continue;
+					}
+					else if (!(param.trim().equals("semi_major") || param.trim().equals("semi_minor"))) {
+						double maxValue = Double.parseDouble((String)maxValues.get(paramPos));
+						double minValue = Double.parseDouble((String) minValues.get(paramPos));
+						if (value > maxValue || value < minValue) {
+							JOptionPane.showMessageDialog(MainPanel.this, 
+									PluginServices.getText(this,"incorrect_domain")+": Parametro "+(String)(getPSistCoord().getTableParametros().getValueAt(i,0)), 
+									"Warning...", JOptionPane.WARNING_MESSAGE);
+							return;
+						}
+						j++;
+						//paramPos ++;
+					}
+									
+					value = 0;
+					unit = "";
+					/**
+					 * Esto está hecho en general, habrá que hacerlo dependiendo del tipo de
+					 * unidad que tenga el parametro
+					 */
+					String type = (String) getPSistCoord().getTableParametros().getValueAt(i, 2);
+					value = Double.parseDouble((String)getPSistCoord().getTableParametros().getValueAt(i, 1));
+					/*if (type.equals("Meters")) {
+						value = Double.parseDouble((String)getPSistCoord().getTableParametros().getValueAt(i, 1));
+						unit = (String)getPSistCoord().getCbUnits().getSelectedItem();
+						value = getPSistCoord().convert2Meters(unit, value);
+					}
+					else if (type.equals("Degree")) {
+						value = Double.parseDouble((String)getPSistCoord().getTableParametros().getValueAt(i, 1));
+						unit = (String)getPSistCoord().getCbUnits().getSelectedItem();
+						value = getPSistCoord().convert2Degree(unit, value);
+					}
+					else if (type.equals("Unitless")) {
+						value = Double.parseDouble((String)getPSistCoord().getTableParametros().getValueAt(i, 1));
+						unit = (String)getPSistCoord().getCbUnits().getSelectedItem();
+						value = getPSistCoord().convert2Unitless(unit, value);
+					}*/
+					
+					cadWkt += "PARAMETER[\""+getPSistCoord().getTrueParametersNames(i)+"\", " + 
+								value+ "], ";				
+				} else {
+					j++;
+				}
+			}
+			
+			cadWkt += "UNIT[\"Meters\", 1.0]]";
+			
+			if (!isEditing()) {
+				sentence = "INSERT INTO USR VALUES("+authority[1]+",'" +
+				cadWkt +"','"+projection+"','"+name+"','"+datum+"')";
+			}
+			else { 
+				sentence = "UPDATE USR SET usr_wkt='" + cadWkt +"'," +
+						"usr_proj='"+projection+"'," +
+						"usr_geog='"+name+"'," +
+						"usr_datum='"+datum+"' " +
+						"WHERE usr_code = " +authority[1];
+			}
+		}		
+		try {
+			conn.update(sentence);
+			conn.shutdown();
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+		setNewCrsCode(Integer.parseInt(authority[1]));
+		try {
+			ICrs crs = new CrsFactory().getCRS("USR:"+authority[1]);			
+			crs.getProj4String();
+		} catch (CrsException e1) {
+			JOptionPane.showMessageDialog(this, PluginServices.getText(this,e1.getMessage()), "Warning...",
+					JOptionPane.WARNING_MESSAGE);
+			conn.setConnectionUsr();			
+			sentence = "DELETE FROM USR WHERE usr_code =" + authority[1];
+			result = Query.select(sentence,conn.getConnection());	
+			try {
+				conn.shutdown();
+			} catch (SQLException arg0) {
+				// TODO Auto-generated catch block
+				arg0.printStackTrace();
+			}
+			return;
+		}
+		PluginServices.getMDIManager().closeWindow(this);
+	}
+	
+	private int findPositionParameter(String param) {
+		ArrayList parameters = new ArrayList();
+		try {
+			parameters = getPSistCoord().getProj4().getProj4ProjectionParameters(getPSistCoord().getPos());
+			int pos = -1;
+			int i = 0;
+			do {
+				pos = getPSistCoord().getProj4().findProjectionParameters(param, parameters.get(i).toString());
+				i++;
+				if (i==parameters.size()) break;
+			} while (pos == -1);
+			if (pos!=-1)
+				param = getPSistCoord().getProj4().getProj4ProjectionParameterName(pos);			
+		} catch (CrsException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		for (int i=0; i< parameters.size(); i++) {
+			String actualParam = ((String)parameters.get(i)).trim();
+			if (actualParam.equals(param)) return i;
+		}
+		return -1;
+	}
+	
+	public void setNewCrsCode(int code) {
+		newCrsCode = code;
+	}
+	
+	public int getNewCrsCode() {
+		return newCrsCode;
+	}
+	
+	private boolean notANumber(String cadenaNumerica) {
+		int puntos = 0;
+		int signos = 0;
+		int letras = 0;
+		for (int i = 0; i< cadenaNumerica.length(); i++) {
+			if (cadenaNumerica.charAt(i) == '.')
+				puntos++;
+			else if (cadenaNumerica.charAt(i) == '-') {
+				if (i==0) {
+					signos++;
+				}
+				else if (i!=0 && cadenaNumerica.charAt(i-1) != 'E') {
+					signos = 2;
+				}
+			}
+			else if (cadenaNumerica.charAt(i) == 'E') {
+				if (i== 0) {
+					letras = 2;
+				}
+				else letras ++;
+			}
+		}
+		
+		if ((letras > 1) || (signos > 1) || (puntos > 1))
+			return true;
+		return false;
+	}
+	
+	public void setEditing(boolean edit) {
+		this.edit = edit;
+	}
+	
+	public boolean isEditing() {
+		return this.edit;
+	}
+	
+	public void setEditingPanel() {
+		pCard.setSelectedComponent(getPDatum());
+		pCard.setEnabledAt(0, false);
+		fillData(getCrs(), true);
+		getPDatum().getTxtCodigoCrs().setEnabled(false);
+		
+	}
+	public void stateChanged(ChangeEvent e) {
+		if (e.getSource() == getPCard()) {
+			if (getPCrsUsr().getHasChanged()) {
+				if (getPCrsUsr().getRbCrsExistente().isSelected()) {
+					ICrs crs = getPCrsUsr().getCrs();
+					if (crs != null) fillData(crs);					
+					else fillData(getCrs());
+					getPCrsUsr().setHasChange(false);
+				}
+				else if (getPCrsUsr().getRbNuevoCrs().isSelected()) {
+					cleanData();
+					getPCrsUsr().setHasChange(false);
+				}
+				else if (getPCrsUsr().getRbCadenaWkt().isSelected()) {
+					cleanData();
+					if (getPCrsUsr().getTxtAreaWkt().getText().equals("")) {
+						JOptionPane.showMessageDialog(MainPanel.this, 
+								PluginServices.getText(this,"white_Textbox"), 
+								"Warning...", JOptionPane.WARNING_MESSAGE);
+						getPCrsUsr().setHasChange(false);
+						getPCard().setSelectedComponent(getPCrsUsr());
+						return;
+					} else {
+						CoordinateReferenceSystem crs = null;
+						String wkt = getPCrsUsr().getTxtAreaWkt().getText();
+						Parser parser = new Parser();
+				        Crs crs2 = null;
+						try {
+							crs = parser.parseCoordinateReferenceSystem(wkt);
+						} catch (ParseException e1) {
+							//System.out.println("Cadena WKT no ha podido ser parseada");
+							//e1.printStackTrace();
+							JOptionPane.showMessageDialog(MainPanel.this, 
+									PluginServices.getText(this, "problem_with_wkt_try_manually"), 
+									"Warning...", JOptionPane.WARNING_MESSAGE);					
+							getPCrsUsr().setHasChange(false);
+							getPCard().setSelectedComponent(getPCrsUsr());
+							return;
+						} catch (UnsupportedOperationException e2) {
+							JOptionPane.showMessageDialog(MainPanel.this, 
+									PluginServices.getText(this, "problem_with_wkt_try_manually"), 
+									"Warning...", JOptionPane.WARNING_MESSAGE);					
+							getPCrsUsr().setHasChange(false);
+							getPCard().setSelectedComponent(getPCrsUsr());
+							return;
+						}						
+						fillData(crs);
+					}
+					getPCrsUsr().setHasChange(false);
+				}
+			}
+			int i = ((JTabbedPane)e.getSource()).getSelectedIndex();
+			if (i==0){
+				getBtnAnterior().setVisible(false);
+				getBtnSiguiente().setVisible(true);
+				if (getPCrsUsr().getRbCadenaWkt().isSelected()){
+					getPCrsUsr().setHasChange(true);
+					getBtnFinalizar().setVisible(true);
+				}
+				else
+					getBtnFinalizar().setVisible(false);
+			}
+			else if (i==1 && !isEditing()) {
+				getBtnAnterior().setVisible(true);
+				getBtnSiguiente().setVisible(true);
+				getBtnFinalizar().setVisible(false);
+				if (getPCrsUsr().getRbCadenaWkt().isSelected()){
+					//getPCrsUsr().setHasChange(true);
+					getBtnFinalizar().setVisible(true);
+				}
+			}
+			else if (i==1 && isEditing()) {
+				getBtnAnterior().setVisible(false);
+				getBtnSiguiente().setVisible(true);
+				getBtnFinalizar().setVisible(false);
+			}
+			else if (i == 2) {				
+				getBtnAnterior().setVisible(true);
+				getBtnSiguiente().setVisible(false);
+				getBtnFinalizar().setVisible(true);				
+			}
+		}
+		
+	}
+	
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/wizard/MainPanel.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/NewCRSPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/NewCRSPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/NewCRSPanel.java	(revision 25287)
@@ -0,0 +1,833 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import javax.swing.ButtonGroup;
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+import javax.swing.ListSelectionModel;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.panels.wizard.MainPanel;
+import org.gvsig.crs.ogr.Iau2wkt;
+import org.gvsig.crs.persistence.CrsData;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+
+import com.iver.andami.PluginServices;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+import es.idr.teledeteccion.connection.EpsgConnection;
+import es.idr.teledeteccion.connection.Query;
+
+/**
+ * Crea la interfaz de definicin de un nuevo crs por el usuario
+ * @author Luisa Marina Fernandez Ruiz (luisam.fernandez@uclm.es)
+ * @author Jose Luis Gomez Martinez (joseluis.gomez@uclm.es)
+ *
+ */
+public class NewCRSPanel extends JPanel implements ActionListener,KeyListener{
+	private static final long serialVersionUID = 1L;
+	
+	private JRadioButton codeRadioButton = null;
+	private JRadioButton nameRadioButton = null;	
+	private JLabel lblCriterio=null;
+	private JButton searchButton = null;
+	private JTextField searchTextField = null;
+	private JButton infoCrs;
+	private JButton btnNuevo;
+	private JButton btnEditar;
+	private JButton btnEliminar;
+	private JScrollPane jScrollPane=null;   
+	private JTable jTable;
+	public TableSorter sorter = null;
+	public DefaultTableModel dtm = null;
+	
+	public String key;
+	public EpsgConnection connect = null;
+	public int selectedRowTable = -1;	
+	String cadWkt = "";
+	private int codeCRS = -1;
+	private ICrs currentCrs;
+	
+	public NewCRSPanel(){}
+	
+	public NewCRSPanel(ICrs crs) {
+		super();
+		currentCrs = crs;
+		initialize();
+		//fijar los listener de todos los componentes
+		setListener();
+		habilitarJbuttons(false);
+	}
+	/**
+	 * Inicializa this
+	 *
+	 */
+	private void initialize(){
+		this.setLayout(new BorderLayout());
+		this.setBorder(new EmptyBorder(1,1,1,1));
+		//Este panel contiene los componentes de radio button
+		JPanel radio=new JPanel();
+		radio.setLayout(new GridLayout(1,4,10,0));
+		radio.add(getLblCriterio());
+		radio.add(getCodeRadioButton());
+		radio.add(getNameRadioButton());
+		//Agrupar los radioButtons
+		agruparRadioButtons();
+		//Este panel contiene los componentes relacionados con la bsqueda
+		JPanel busqueda=new JPanel();
+		busqueda.setLayout(new FlowLayout(FlowLayout.LEFT,10,1));
+		busqueda.add(getSearchButton());
+		busqueda.add(getSearchTextField());
+		//busqueda.setBackground(Color.red);
+		JPanel pNorth=new JPanel();
+		pNorth.setLayout(new GridLayout(2,1));
+		pNorth.add(radio);
+		pNorth.add(busqueda);
+		this.add(pNorth,BorderLayout.NORTH);
+		//agregar los botones de la tabla
+		JPanel pInSouth=new JPanel();
+		pInSouth.setLayout(new FlowLayout(FlowLayout.LEFT,10,0));
+		pInSouth.add(getInfoCrs());
+		pInSouth.add(getBtnNuevo());
+		pInSouth.add(getBtnEditar());
+		pInSouth.add(getBtnEliminar());
+		JPanel pCenter=new JPanel();
+		pCenter.setLayout(new BorderLayout());
+		pCenter.add(getJScrollPane(),BorderLayout.CENTER);
+		pCenter.add(pInSouth,BorderLayout.SOUTH);
+		this.add(pCenter,BorderLayout.CENTER);
+				
+	}
+	
+	public void connection(){
+		connect = new EpsgConnection();
+		connect.setConnectionUsr();
+		
+	}
+	
+	/**
+	 * Inicializa el botn que muestra la informacin de CRS seleccionado
+	 * @return
+	 */
+	public JButton getInfoCrs() {
+		if(infoCrs == null) {
+			infoCrs = new JButton();
+			infoCrs.setPreferredSize(new Dimension(85,23));
+			infoCrs.setText(PluginServices.getText(this,"infocrs"));			
+			infoCrs.setMnemonic('I');
+			infoCrs.setToolTipText(PluginServices.getText(this,"more_info"));
+			
+		}
+		return infoCrs;
+	}
+	/**
+	 * Inicializa el panel que contiene la tabla de resultados
+	 * @return
+	 */
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane(getJTable(),JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
+			jScrollPane.setPreferredSize(new Dimension(500,150));
+			jScrollPane.setBorder(new CompoundBorder(new EmptyBorder(3,10,3,10),jScrollPane.getBorder()));
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+	/**
+	 * Inicializa la tabla que se utiliza para mostrar 
+	 * los resultados de la bsqueda
+	 * @return
+	 */
+	public JTable getJTable() {
+		if (jTable == null) {
+			//TODO: Poner los titulos de las columnas correspondientes
+			String[] columnNames= {PluginServices.getText(this,"codigo"),
+					PluginServices.getText(this,"nombre"),
+					PluginServices.getText(this,"projected"),
+					PluginServices.getText(this,"datum")};
+			Object[][]data = {};			
+			dtm = new DefaultTableModel(data, columnNames)
+			 {
+				private static final long serialVersionUID = 1L;
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}
+				/*
+				 * metodo necesario para cuando utilizamos tablas ordenadas
+				 * ya que sino al ordenar por algun campo no se queda con el orden
+				 * actual al seleccionar una fila (non-Javadoc)
+				 * @see javax.swing.table.TableModel#getColumnClass(int)
+				 */
+				public Class getColumnClass(int column)
+				{
+					return getValueAt(0, column).getClass();
+				}
+				};
+			sorter = new TableSorter(dtm);			
+
+			jTable = new JTable(sorter);
+			sorter.setTableHeader(jTable.getTableHeader());
+			jTable.setCellSelectionEnabled(false);
+			jTable.setRowSelectionAllowed(true);
+			jTable.setColumnSelectionAllowed(false);
+			jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			TableColumn column = null;
+			for (int i = 0; i < columnNames.length; i++) {
+			    column = jTable.getColumnModel().getColumn(i);
+			    if (i == 0) {
+			        column.setPreferredWidth(80); //code column is shorter			     	
+			    }else if (i ==2) {
+			    	column.setPreferredWidth(50);
+			    } else {
+			    	column.setPreferredWidth(175);
+			    }
+			    
+			}
+			initializeTable();
+		}
+		
+		return jTable;
+		
+	}
+	
+	public void initializeTable() {
+		// Eliminar filas en cada nueva bsqueda
+		int numRow = dtm.getRowCount();
+		while (numRow != 0) {
+			numRow = numRow - 1;
+			dtm.removeRow(numRow);
+		}
+		
+		String sentence = "SELECT usr_code, usr_wkt, usr_proj, usr_geog, usr_datum " +							 
+		  "FROM USR ORDER BY usr_code ASC";
+		
+		connect = new EpsgConnection();
+		connect.setConnectionUsr();
+		ResultSet result = Query.select(sentence,connect.getConnection());	
+		try {
+			connect.shutdown();
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+		Object[] data = new Object[4];
+		try {
+			while (result.next()){
+				data[0]	= result.getString("usr_code");
+				data[1] = result.getString("usr_wkt");
+				String proj = result.getString("usr_proj");
+				if (!proj.equals("")){
+					data[1] = proj;
+					data[2] = PluginServices.getText(this,"si");
+				} 
+				else 
+				{
+					data[1] = result.getString("usr_geog");
+					data[2] = PluginServices.getText(this,"no");
+				}
+		
+				data[3] = result.getString("usr_datum");
+				dtm.addRow(data);
+			}
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}
+		
+		int numr = dtm.getRowCount();
+		if (numr > 0){
+			this.getJTable().setRowSelectionInterval(0,0);
+			//getBtnEditar().setEnabled(true);
+			//getBtnEliminar().setEnabled(true);
+		}
+						
+	}
+	/**
+	 * Inicializa el radioButton 'Codigo'
+	 * @return jRadioButton
+	 */
+	public JRadioButton getCodeRadioButton() {
+		if (codeRadioButton == null) {
+			codeRadioButton = new JRadioButton();
+			codeRadioButton.setText(PluginServices.getText(this,"por_codigo"));
+			codeRadioButton.setSelected(true);
+			codeRadioButton.addActionListener(this);
+		}
+		return codeRadioButton;
+	}
+	/**
+	 * Inicializa el radioButton 'Name'
+	 * @return jRadioButton
+	 */
+	public JRadioButton getNameRadioButton() {
+		if (nameRadioButton == null) {
+			nameRadioButton = new JRadioButton();
+			nameRadioButton.setText(PluginServices.getText(this,"por_nombre"));
+			nameRadioButton.addActionListener(this);
+		}
+		return nameRadioButton;
+	}
+	
+	/**
+	 * Agrupa los radioButtons
+	 */
+	private void agruparRadioButtons(){
+		ButtonGroup group= new ButtonGroup();
+		group.add(getCodeRadioButton());
+		group.add(getNameRadioButton());		
+	}
+	/**
+	 * Inicializa el label 'Criterio de Bsqueda'
+	 * @return jLabel
+	 */
+	public JLabel getLblCriterio() {
+		lblCriterio = new JLabel();
+		lblCriterio.setText(PluginServices.getText(this, "criterio_busqueda")+":");
+		return lblCriterio;
+	}
+	/**
+	 * Inicializa el botn 'Buscar'
+	 * @return jButton
+	 */
+	public JButton getSearchButton() {
+		if (searchButton == null) {
+			searchButton = new JButton();
+			searchButton.setPreferredSize(new Dimension(75,20));
+			searchButton.setText(PluginServices.getText(this,"buscar"));
+			searchButton.setMnemonic('S');
+			searchButton.setToolTipText(PluginServices.getText(this,"buscar_por_criterio_seleccion"));
+						
+		}
+		return searchButton;
+	}
+	/**
+	 * Inicializa el TextField 
+	 * en el que se incluye el texto a buscar
+	 * @return jTextField
+	 */
+	public JTextField getSearchTextField() {
+		if (searchTextField == null) {
+			searchTextField = new JTextField();
+			searchTextField.setPreferredSize(new Dimension(340,20));
+				
+		}
+		return searchTextField;
+	}
+	/**
+	 * Manejador de eventos
+	 */
+	public void actionPerformed(ActionEvent e) {
+		if (e.getSource().equals(getCodeRadioButton())){
+			getSearchTextField().setText("");
+		}else if (e.getSource().equals(getNameRadioButton())){
+			getSearchTextField().setText("");
+		}else if (e.getSource().equals(getBtnEditar())){
+			//editar la fila seleccionada de la tabla (si hay)
+			ICrs crs = null;
+			try {
+				crs = new CrsFactory().getCRS("USR:"+getCodeCRS());
+			} catch (CrsException e1) {
+				// TODO Auto-generated catch block
+				e1.printStackTrace();
+			}			
+			MainPanel wizard = new MainPanel(crs);
+			wizard.setEditing(true);
+			wizard.setEditingPanel();
+			PluginServices.getMDIManager().addWindow(wizard);
+			getNewCrs(wizard.getNewCrsCode());
+			
+			/**
+			 * Actualizamos recientes para que coja los cambios del crs
+			 */
+			/*
+    		 * Actualizar recientes...
+    		 */
+    		String authority = "USR";
+    		String name = "";
+    		if (wizard.getPSistCoord().getTxtNombreProy().getText().equals("")) {
+    			name = wizard.getPDatum().getTxtNombreCrs().getText();
+    		} else {
+    			name = wizard.getPSistCoord().getTxtNombreProy().getText();
+    		}
+    		int code = getCodeCRS();
+    		CrsData crsData = new CrsData(authority,code,name);
+    		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+    		persistence.addCrsData(crsData);
+    		
+		}else if (e.getSource().equals(getBtnEliminar())){
+			//eliminar la fila seleccionada de la tabla
+			int i = JOptionPane.showConfirmDialog(NewCRSPanel.this, PluginServices.getText(this, "deleteUsr"));
+			if (i==0) {
+				connect = new EpsgConnection();
+				connect.setConnectionUsr();
+				String sentence = "DELETE FROM USR WHERE usr_code =" + getCodeCRS();
+				ResultSet result = Query.select(sentence,connect.getConnection());	
+				try {
+					connect.shutdown();
+				} catch (SQLException arg0) {
+					// TODO Auto-generated catch block
+					arg0.printStackTrace();
+				}
+				dtm.removeRow(getJTable().getSelectedRow());
+			}
+			//searchButton();
+		}else if (e.getSource().equals(getBtnNuevo())){
+			//mostrar el asistente de nuevo crs
+		
+			MainPanel wizard = new MainPanel(currentCrs);
+			if ((wizard.getPCard().getSelectedIndex() == 0) && wizard.getPCrsUsr().getRbCrsExistente().isSelected() ){
+				ICrs crs = wizard.getPCrsUsr().getCrs();
+				if (crs != null){
+					wizard.fillData(crs);
+				}
+				else wizard.fillData(wizard.getCrs());
+			}
+			else if ((wizard.getPCard().getSelectedIndex() == 0)  && wizard.getPCrsUsr().getRbNuevoCrs().isSelected() ){
+				wizard.cleanData();
+			}
+			PluginServices.getMDIManager().addWindow(wizard);
+			getNewCrs(wizard.getNewCrsCode());
+			
+		}else if (e.getSource().equals(getSearchButton())){
+			searchButton();			
+		}		
+		/*Si el objeto que genera el evento es el JButton 'InfoCrs'
+		se muestra la informacin ralicionada con el Crs seleccionado en la tabla*/
+		else if (e.getSource().equals(getInfoCrs())) {
+			InfoCRSPanel info = new InfoCRSPanel("USR", getCodeCRS());
+			PluginServices.getMDIManager().addWindow(info);
+		}
+	}
+	public void keyPressed(KeyEvent e) {
+		//Si se pulsa intro-->Buscar
+		if (e.getSource() == this.getSearchTextField()) {
+			if (e.getKeyCode() == 10) {
+				searchTextField.setBackground(Color.white);
+				if (searchTextField.getText().equals("")) {
+					initializeTable();
+				}
+				else {
+					searchButton();
+				}
+			}			
+		}		
+	}
+	public void keyReleased(KeyEvent e) {
+		
+	}
+	public void keyTyped(KeyEvent e) {
+		
+	}
+	/**
+	 * Inicializa el botn 'Editar'  una fila de la tabla
+	 * @return jButton
+	 */
+	public JButton getBtnEditar() {
+		if (btnEditar==null){
+			btnEditar=new JButton();
+			btnEditar.setText(PluginServices.getText(this,"editar"));
+		}
+		return btnEditar;
+	}
+	/**
+	 * Inicializa el botn 'Eliminar' una fila de la tabla
+	 * @return
+	 */
+	public JButton getBtnEliminar() {
+		if (btnEliminar==null){
+			btnEliminar=new JButton();
+			btnEliminar.setText(PluginServices.getText(this,"eliminar"));
+		}
+		return btnEliminar;
+	}
+	/**
+	 * Inicializa el botn 'Nuevo' para la creacin de un nuevo Crs
+	 * @return
+	 */
+	public JButton getBtnNuevo() {
+		if (btnNuevo==null){
+			btnNuevo=new JButton();
+			btnNuevo.setText(PluginServices.getText(this,"nuevo"));
+		}
+		return btnNuevo;
+	}
+	/**
+	 * Establece los listener de todos los componentes
+	 */
+	private void setListener(){
+		getBtnEditar().addActionListener(this);
+		getBtnEliminar().addActionListener(this);
+		getBtnNuevo().addActionListener(this);
+		getInfoCrs().addActionListener(this);
+		getCodeRadioButton().addActionListener(this);
+		getNameRadioButton().addActionListener(this);
+		getSearchButton().addActionListener(this);
+		getSearchTextField().addKeyListener(this);
+		
+	}
+	private void habilitarJbuttons(boolean b){
+		getInfoCrs().setEnabled(b);
+		getBtnEditar().setEnabled(b);
+		getBtnEliminar().setEnabled(b);
+	}
+	
+	/**
+	 * Mtodo que controla la bsqueda de los CRS siguiendo los criterios
+	 * de bsqueda que le hemos definido. Tambin gestiona los casos en que
+	 * no encuentre CRS, o que los parmetros de bsqueda sean errneos. Si
+	 * encuentra algn CRS pero no es soportado por la aplicacin
+	 * aparecer el mensaje de informacin correspondiente.
+	 *
+	 */
+	private void searchButton() {
+		searchTextField.setBackground(Color.white);
+				
+		if (codeRadioButton.isSelected() && (searchTextField.getText().length()!=searchTextField.getText().replaceAll("[^0-9]", "").length())){
+			JOptionPane.showMessageDialog(NewCRSPanel.this, 
+					PluginServices.getText(this,"numeric_format"), 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			searchTextField.setText("");
+			return;
+		}
+		
+        //Eliminar filas en cada nueva bsqueda
+		int numRow = dtm.getRowCount();
+		while (numRow != 0) {
+			numRow = numRow - 1;
+			dtm.removeRow(numRow);
+		}
+//			Dependiendo de la opcion se realizada una busqueda
+		ResultSet result = null;
+		
+		if (searchTextField.getText().equals("")) {
+			String sentence = "SELECT usr_code, usr_wkt, usr_proj, usr_geog, usr_datum " +							 
+			  "FROM USR ORDER BY usr_code ASC";
+			connect = new EpsgConnection();
+			connect.setConnectionUsr();
+			result = Query.select(sentence,connect.getConnection());	
+			try {
+				connect.shutdown();
+			} catch (SQLException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+			Object[] data = new Object[4];
+			try {
+				while (result.next()){
+					data[0]	= result.getString("usr_code");
+					data[1] = result.getString("usr_wkt");
+					String proj = result.getString("usr_proj");
+					if (!proj.equals("")){
+						data[1] = proj;
+						data[2] = PluginServices.getText(this,"si");
+					} 
+					else 
+					{
+						data[1] = result.getString("usr_geog");
+						data[2] = PluginServices.getText(this,"no");
+					}
+					
+					data[3] = result.getString("usr_datum");
+					dtm.addRow(data);
+				}
+			} catch (SQLException e1) {
+				e1.printStackTrace();
+			}
+		}
+		
+		else if (codeRadioButton.isSelected()) {
+				
+			key = searchTextField.getText();
+			int code = Integer.parseInt(key);
+			String sentence = "SELECT usr_code, usr_wkt, usr_proj, usr_geog, usr_datum " +							 
+							  "FROM USR " +	                              
+                              "WHERE usr_code = " + code;
+			connect = new EpsgConnection();
+			connect.setConnectionUsr();
+			result = Query.select(sentence,connect.getConnection());	
+			try {
+				connect.shutdown();
+			} catch (SQLException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+			
+			Object[] data = new Object[4];
+			try {
+				while (result.next()){
+					data[0]	= result.getString("usr_code");
+					data[1] = result.getString("usr_wkt");
+					String proj = result.getString("usr_proj");
+					if (!proj.equals("")){
+						data[1] = proj;
+						data[2] = PluginServices.getText(this,"si");
+					} 
+					else 
+					{
+						data[1] = result.getString("usr_geog");
+						data[2] = PluginServices.getText(this,"no");
+					}
+					
+					data[3] = result.getString("usr_datum");
+					dtm.addRow(data);
+				}
+			} catch (SQLException e1) {
+				e1.printStackTrace();
+			}
+		}
+		else if (nameRadioButton.isSelected()) {
+			key = searchTextField.getText();
+			String key2 = key.substring(0,1);
+			String key3 = key.substring(1,key.length());
+			key2 = key2.toUpperCase();
+			
+			String sentence = "SELECT usr_code, usr_wkt, usr_proj, usr_geog, usr_datum " +							 
+				"FROM USR " +	                              
+				"WHERE (usr_proj LIKE '%" + key + "%') OR (usr_proj LIKE '%"+ 
+				key.toUpperCase() +"%') " +
+				"OR (usr_proj LIKE '%" + key2+key3 +"%') OR " +
+						"(usr_geog LIKE '%" + key + "%') OR (usr_geog LIKE '%"+ 
+				key.toUpperCase() +"%') " +
+				"OR (usr_geog LIKE '%" + key2+key3 +"%')";
+			
+			connect = new EpsgConnection();
+			connect.setConnectionUsr();
+			result = Query.select(sentence,connect.getConnection());
+			try {
+				connect.shutdown();
+			} catch (SQLException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+							
+			Object[] data = new Object[4];
+			try {
+				while (result.next()){
+					data[0]	= result.getString("usr_code");
+					data[1] = result.getString("usr_wkt");
+					String proj = result.getString("usr_proj");
+					if (!proj.equals("")){
+						data[1] = proj;
+						data[2] = PluginServices.getText(this,"si");
+					} 
+					else 
+					{
+						data[1] = result.getString("usr_geog");
+						data[2] = PluginServices.getText(this,"no");
+					}
+					
+					data[3] = result.getString("usr_datum");
+					dtm.addRow(data);
+				}
+			} catch (SQLException e1) {
+				e1.printStackTrace();
+			}
+		}
+					
+		int numr = dtm.getRowCount();
+		if (numr == 0){
+			JOptionPane.showMessageDialog(this, PluginServices.getText(this,"no_results"), "Warning...",
+					JOptionPane.WARNING_MESSAGE);
+		}
+		else {
+			this.getJTable().setRowSelectionInterval(0,0);				
+		}					
+	}
+	
+	public void setCodeCRS(int code) {
+		codeCRS = code;
+	}
+	
+	public int getCodeCRS() {
+		return codeCRS;
+	}	
+	
+	/**
+	 * Consigue la cadena wkt del CRS seleccionado, y genera la cadena que ms
+	 * tarde volver a ser tratada para la consecucin de una cadena wkt
+	 * legible por la proj4.
+	 *
+	 */
+	public void setWKT(){
+		int code = getCodeCRS();
+		String sentence = "SELECT usr_wkt " +							 
+						  "FROM USR " +	                              
+                          "WHERE usr_code = " + code;
+		
+		
+		connect = new EpsgConnection();
+		connect.setConnectionUsr();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			connect.shutdown();
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		try {
+			result.next();			
+			cadWkt = result.getString("usr_wkt");			
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}		
+		cadWkt = cadWkt.substring(0, cadWkt.length()-1) + ", AUTHORITY[\"USR\","+ getCodeCRS()+"]]";
+		
+	}
+	
+	public String getWKT(){
+		return cadWkt;
+	}
+	
+	public ICrs getProjection() {
+		try {
+			ICrs crs = new CrsFactory().getCRS("USR:"+getCodeCRS());
+			return crs ;
+		} catch (CrsException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	private void getNewCrs(int code) {
+		if (code != -1) {
+			//		Eliminar filas en cada nueva bsqueda
+			int numRow = dtm.getRowCount();
+			while (numRow != 0) {
+				numRow = numRow - 1;
+				dtm.removeRow(numRow);
+			}
+			String sentence = "SELECT usr_code, usr_wkt, usr_proj, usr_geog, usr_datum " +							 
+								"FROM USR " +	                              
+								"WHERE usr_code = " + code;
+			connect = new EpsgConnection();
+			connect.setConnectionUsr();
+			ResultSet result = Query.select(sentence,connect.getConnection());	
+			try {
+				connect.shutdown();
+			} catch (SQLException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+			
+			Object[] data = new Object[4];
+			try {
+				while (result.next()){
+					data[0]	= result.getString("usr_code");
+					data[1] = result.getString("usr_wkt");
+					String proj = result.getString("usr_proj");
+					if (!proj.equals("")){
+						data[1] = proj;
+						data[2] = PluginServices.getText(this,"si");
+					} 
+					else 
+					{
+						data[1] = result.getString("usr_geog");
+						data[2] = PluginServices.getText(this,"no");
+					}
+					
+					data[3] = result.getString("usr_datum");
+					dtm.addRow(data);
+				}
+			} catch (SQLException e1) {
+				e1.printStackTrace();
+			}
+			int numr = dtm.getRowCount();
+			if (numr == 0){
+				searchButton();
+			}
+			else {
+				this.getJTable().setRowSelectionInterval(0,0);				
+			}			
+		}	
+	}
+	
+	public boolean isInBD (int code) {
+		String sentence = "SELECT usr_code " +							 
+						"FROM USR " +	                              
+						"WHERE usr_code ="+code;		
+	
+		connect = new EpsgConnection();
+		connect.setConnectionUsr();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			connect.shutdown();
+			} catch (SQLException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+		try {
+			if (result.next()) {
+				return true;
+			}
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		return false;
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/NewCRSPanel.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/ESRIpanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/ESRIpanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/ESRIpanel.java	(revision 25287)
@@ -0,0 +1,516 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+import javax.swing.ListSelectionModel;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.ogr.Esri2wkt;
+
+import com.iver.andami.PluginServices;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+import es.idr.teledeteccion.connection.EpsgConnection;
+import es.idr.teledeteccion.connection.Query;
+
+
+/**
+ * Clase que genera el panel para el repositorio ESRI
+ * 
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ *
+ */
+public class ESRIpanel extends JPanel implements ActionListener, KeyListener {
+	
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;	
+	
+
+	private JRadioButton codeRadioButton = null;
+	private JRadioButton nameRadioButton = null;	
+	private JPanel groupRadioButton = null;
+	public TableSorter sorter = null;
+	public JTable jTable = null;
+	private JScrollPane jScrollPane = null;
+	private JButton searchButton = null;
+	private JButton infoCrs=null;
+	private JTextField searchTextField = null;
+	public DefaultTableModel dtm = null;
+	private int codeCRS = -1;
+	public String key;
+	String cadWKT;
+	public int selectedRowTable = -1;	
+	
+	public EpsgConnection connect = null;
+	
+	public ESRIpanel() {
+		initialize();		
+	}
+	
+	private void initialize(){
+		this.setLayout(new BorderLayout());
+		JPanel pNorth=new JPanel();
+		pNorth.setLayout(new GridLayout(2,1));
+		pNorth.setBorder(BorderFactory.createEmptyBorder(3,3,3,3));
+		pNorth.add(getGroupRadioButton());
+		JPanel pInNorth = new JPanel();
+		pInNorth.setLayout(new FlowLayout(FlowLayout.LEFT,10,1));
+		pInNorth.add(getSearchButton());
+		pInNorth.add(getSearchTextField());
+		pNorth.add(pInNorth);
+		this.add(pNorth,BorderLayout.NORTH);
+		this.add(getJScrollPane(), BorderLayout.CENTER);	
+		JPanel pSouth=new JPanel(new FlowLayout(FlowLayout.RIGHT,10,3));
+		pSouth.add(getInfoCrs());
+		this.add(pSouth,BorderLayout.SOUTH);
+
+		//probar asi y ver el resultado
+		/*this.setLayout(new GridLayout(2,3));
+		this.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
+		this.add(getGroupRadioButton(), null);
+		this.add(getSearchButton(), null);
+		this.add(getSearchTextField(), null);		
+		this.add(getJScrollPane(), null);	*/
+	}
+	
+	public void connection(){
+		connect = new EpsgConnection();
+		connect.setConnectionEsri();				
+	}
+	
+	private JRadioButton getCodeRadioButton() {
+		if (codeRadioButton == null) {
+			codeRadioButton = new JRadioButton();
+			codeRadioButton.setText(PluginServices.getText(this,"por_codigo"));//setText("By Code EPSG");
+			codeRadioButton.setSelected(true);
+			codeRadioButton.addActionListener(this);
+		}
+		return codeRadioButton;
+	}
+		  
+	private JRadioButton getNameRadioButton() {
+		if (nameRadioButton == null) {
+			nameRadioButton = new JRadioButton();
+			nameRadioButton.setText(PluginServices.getText(this,"por_nombre"));
+			nameRadioButton.addActionListener(this);
+		}
+		return nameRadioButton;
+	}
+		 
+	private JPanel getGroupRadioButton() {
+		if (groupRadioButton == null) {
+			groupRadioButton = new JPanel();
+			groupRadioButton.setLayout(new GridLayout(1,0));
+			groupRadioButton.setPreferredSize(new Dimension(500,30));
+			groupRadioButton.add(getLabel());
+			groupRadioButton.add(getCodeRadioButton());
+			groupRadioButton.add(getNameRadioButton());			
+		}
+		return groupRadioButton;
+	}
+	
+	private JLabel getLabel(){
+		JLabel criterio = new JLabel();
+		criterio.setPreferredSize(new Dimension(100, 20));
+		criterio.setText(PluginServices.getText(this, "criterio_busqueda"));
+		return criterio;
+	}
+	
+	public JButton getInfoCrs() {
+		if(infoCrs == null) {
+			infoCrs = new JButton();
+			infoCrs.setPreferredSize(new Dimension(85,20));
+			infoCrs.setText(PluginServices.getText(this,"infocrs"));
+			infoCrs.setMnemonic('I');
+			infoCrs.setEnabled(false);
+			infoCrs.setToolTipText(PluginServices.getText(this,"more_info"));
+			infoCrs.addActionListener(this);
+		}
+		return infoCrs;
+	}
+	private JButton getSearchButton() {
+		if (searchButton == null) {
+			searchButton = new JButton();
+			searchButton.setPreferredSize(new Dimension(75,20));
+			searchButton.setText(PluginServices.getText(this,"buscar"));
+			searchButton.setMnemonic('S');			
+			searchButton.addActionListener(this);			
+		}
+		return searchButton;
+	}	
+	
+	private JTextField getSearchTextField() {
+		if (searchTextField == null) {
+			searchTextField = new JTextField();
+			searchTextField.setPreferredSize(new Dimension(300,20));
+			searchTextField.addKeyListener(this);
+		}		
+		return searchTextField;
+	}
+	
+	public JTable getJTable() {
+		if (jTable == null) {
+			String[] columnNames= {PluginServices.getText(this,"codigo"),
+					PluginServices.getText(this,"nombre"),
+					PluginServices.getText(this,"projected"),
+					PluginServices.getText(this,"datum")};
+			
+			Object[][]data = {};			
+			dtm = new DefaultTableModel(data, columnNames)
+			 {
+				private static final long serialVersionUID = 1L;
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}
+				/*
+				 * metodo necesario para cuando utilizamos tablas ordenadas
+				 * ya que sino al ordenar por algun campo no se queda con el orden
+				 * actual al seleccionar una fila (non-Javadoc)
+				 * @see javax.swing.table.TableModel#getColumnClass(int)
+				 */
+				public Class getColumnClass(int column)
+				{
+					return getValueAt(0, column).getClass();
+				}
+				};
+			sorter = new TableSorter(dtm);			
+
+			jTable = new JTable(sorter);
+			sorter.setTableHeader(jTable.getTableHeader());			
+			jTable.setCellSelectionEnabled(false);
+			jTable.setRowSelectionAllowed(true);
+			jTable.setColumnSelectionAllowed(false);
+			jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			TableColumn column = null;
+			for (int i = 0; i < 4; i++) {
+			    column = jTable.getColumnModel().getColumn(i);
+			    if (i == 0) {
+			        column.setPreferredWidth(80); //code column is shorter			     	
+			    }else if (i ==2) {
+			    	column.setPreferredWidth(50);
+			    } else {
+			    	column.setPreferredWidth(175);
+			    }
+			    
+			}			
+	}
+		return jTable;
+		
+	}
+	
+	public void setCodeCRS(int code) {
+		codeCRS = code;
+	}
+	
+	public int getCodeCRS() {
+		return codeCRS;
+	}	
+	
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane();
+			jScrollPane.setPreferredSize(new Dimension(500,150));
+			jScrollPane.setBorder(
+				    BorderFactory.createCompoundBorder(
+					BorderFactory.createCompoundBorder(
+							BorderFactory.createTitledBorder(PluginServices.getText(this,"ESRI")),
+							BorderFactory.createEmptyBorder(5,5,5,5)),
+							jScrollPane.getBorder()));
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+	
+	public void keyPressed(KeyEvent e) {
+		if (e.getSource() == this.getSearchTextField()){
+			if (e.getKeyCode() == 10) {
+				searchButton();
+			}			
+		}		
+	}
+	
+	/**
+	 * Mtodo que controla la bsqueda de CRS del repositorio de ESRI.
+	 * Tambin maneja los errores en caso de que los parmetros de bsqueda
+	 * sean errneos, o que no se encuentren resultados.
+	 *
+	 */
+	private void searchButton() {		
+		searchTextField.setBackground(Color.white);
+		boolean not_numeric = false;
+		
+		if (searchTextField.getText().equals("")) {
+			searchTextField.setBackground(new Color(255,204,204));
+			JOptionPane.showMessageDialog(this, PluginServices.getText(this,"fill_name"), "Warning...", JOptionPane.WARNING_MESSAGE);
+		}
+		
+		else {
+            //Eliminar filas en cada nueva bsqueda
+			int numRow = dtm.getRowCount();
+			while (numRow != 0) {
+				numRow = numRow - 1;
+				dtm.removeRow(numRow);
+			}
+			
+			if (codeRadioButton.isSelected() && (searchTextField.getText().length()!=searchTextField.getText().replaceAll("[^0-9]", "").length())){
+				not_numeric = true;
+			}
+			
+			//Dependiendo de la opcion se realizada una busqueda
+			ResultSet result = null;
+								  			
+			if (codeRadioButton.isSelected() && !not_numeric) {
+					
+				key = searchTextField.getText();
+				int code = Integer.parseInt(key);
+				String sentence = "SELECT esri_code, esri_wkt, esri_proj, esri_geog, esri_datum " +							 
+								  "FROM ESRI " +	                              
+	                              "WHERE esri_code = " + code;
+								
+				result = Query.select(sentence,connect.getConnection());	
+				
+				
+				Object[] data = new Object[4];
+				try {
+					while (result.next()){
+						data[0]	= result.getString("esri_code");
+						data[1] = result.getString("esri_wkt");
+						String proj = result.getString("esri_proj");
+						if (!proj.equals("")){
+							data[1] = proj;
+							data[2] = PluginServices.getText(this,"si");
+						} 
+						else 
+						{
+							data[1] = result.getString("esri_geog");
+							data[2] = PluginServices.getText(this,"no");
+						}
+						
+						data[3] = result.getString("esri_datum");
+						dtm.addRow(data);
+					}
+				} catch (SQLException e1) {
+					e1.printStackTrace();
+				}
+			}
+			else if (nameRadioButton.isSelected()) {
+				key = searchTextField.getText();
+				key = key.toLowerCase();				
+				String key2 = key.substring(0,1);
+				String key3 = key.substring(1,key.length());
+				key2 = key2.toUpperCase();
+				
+				String sentence = "SELECT esri_code, esri_wkt, esri_proj, esri_geog, esri_datum " +							 
+					"FROM ESRI " +	                              
+					"WHERE (esri_proj LIKE '%" + key + "%') OR (esri_proj LIKE '%"+ 
+					key.toUpperCase() +"%') " +
+					"OR (esri_proj LIKE '%" + key2+key3 +"%') OR " +
+							"(esri_geog LIKE '%" + key + "%') OR (esri_geog LIKE '%"+ 
+					key.toUpperCase() +"%') " +
+					"OR (esri_geog LIKE '%" + key2+key3 +"%')";
+								
+				result = Query.select(sentence,connect.getConnection());	
+								
+				Object[] data = new Object[4];
+				try {
+					while (result.next()){
+						data[0]	= result.getString("esri_code");
+						data[1] = result.getString("esri_wkt");
+						String proj = result.getString("esri_proj");
+						if (!proj.equals("")){
+							data[1] = proj;
+							data[2] = PluginServices.getText(this,"si");
+						} 
+						else 
+						{
+							data[1] = result.getString("esri_geog");
+							data[2] = PluginServices.getText(this,"no");
+						}
+						
+						data[3] = result.getString("esri_datum");
+						dtm.addRow(data);
+					}
+				} catch (SQLException e1) {
+					e1.printStackTrace();
+				}
+			}
+						
+			int numr = dtm.getRowCount();
+			if (not_numeric) {
+				JOptionPane.showMessageDialog(ESRIpanel.this, 
+						PluginServices.getText(this,"numeric_format"), 
+						"Warning...", JOptionPane.WARNING_MESSAGE);
+				searchTextField.setText("");
+			}
+			else if (numr == 0){
+			JOptionPane.showMessageDialog(this, PluginServices.getText(this,"no_results"), "Warning...",
+					JOptionPane.WARNING_MESSAGE);
+			}
+			else{
+				this.getJTable().setRowSelectionInterval(0,0);				
+			}
+		}		
+	}	
+
+	public void keyReleased(KeyEvent arg0) {
+		
+	}
+
+	public void keyTyped(KeyEvent arg0) {
+	
+	}
+
+	/**
+	 * Maneja los eventos de los botones y los radioButtons del panel
+	 * del repositorio ESRI.
+	 */
+	public void actionPerformed(ActionEvent e) {
+		if (e.getSource() == this.getSearchButton()){
+			searchTextField.setBackground(Color.white);
+			if (searchTextField.getText().equals("")) {
+				searchTextField.setBackground(new Color(255,204,204));
+				JOptionPane.showMessageDialog(ESRIpanel.this, 
+						PluginServices.getText(this,"fill_name"), 
+						"Warning...", JOptionPane.WARNING_MESSAGE);
+			}
+			else {
+				searchButton();
+			}
+		}
+		if (e.getSource() == this.getCodeRadioButton()) {
+			searchTextField.setText("");
+			codeRadioButton.setSelected(true);
+			nameRadioButton.setSelected(false);
+		}
+		
+		if (e.getSource() == this.getNameRadioButton()) {
+			searchTextField.setText("");
+			nameRadioButton.setSelected(true);
+			codeRadioButton.setSelected(false);
+		}
+		
+		/*Si el objeto que genera el evento es el JButton 'InfoCrs'
+		se muestra la informacin ralicionada con el Crs seleccionado en la tabla*/
+		if (e.getSource() == this.getInfoCrs()) {
+			InfoCRSPanel info = new InfoCRSPanel("ESRI", getCodeCRS());
+			PluginServices.getMDIManager().addWindow(info);
+		}
+	}	
+	
+	public ICrs getProjection() {
+		try {
+			String txt = getWKT();			
+			//ICrs crs = new CrsFactory().getCRS("ESRI:"+getCodeCRS(), txt); 
+			ICrs crs = new CrsFactory().getCRS("ESRI:"+getCodeCRS());
+			return crs ;
+		} catch (CrsException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	/**
+	 * Consigue la cadena wkt del CRS seleccionado, y genera la cadena que ms
+	 * tarde volver a ser tratada para la consecucin de una cadena wkt
+	 * legible por la proj4.
+	 *
+	 */
+	public void setWKT(){
+		int code = getCodeCRS();
+		String sentence = "SELECT esri_wkt " +							 
+						  "FROM ESRI " +	                              
+                          "WHERE esri_code = " + code;
+		
+		
+		ResultSet result = Query.select(sentence,connect.getConnection());	
+	
+		try {
+			result.next();			
+			cadWKT = result.getString("esri_wkt");			
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}		
+		cadWKT = cadWKT.substring(0, cadWKT.length()-1) + ", AUTHORITY[\"ESRI\","+ getCodeCRS()+"]]";
+		if (cadWKT.charAt(0) == 'P'){
+			Esri2wkt wk = new Esri2wkt(cadWKT);
+			cadWKT = wk.getWkt();
+		}
+	}
+	
+	public String getWKT(){
+		return cadWKT;
+	}
+	
+	public void setProjection(IProjection crs) {
+		//setCrs((ICrs) crs);
+	}
+	
+	
+	
+	
+}
\ No newline at end of file

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/ESRIpanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/InfoCRSPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/InfoCRSPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/InfoCRSPanel.java	(revision 25287)
@@ -0,0 +1,607 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.Font;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.swing.JButton;
+import javax.swing.JEditorPane;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.ListSelectionModel;
+import javax.swing.border.EmptyBorder;
+import javax.swing.event.HyperlinkEvent;
+import javax.swing.table.DefaultTableModel;
+
+import org.cresques.ui.DefaultDialogPanel;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.persistence.RecentTrsPersistence;
+import org.gvsig.crs.persistence.TrData;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.persistence.generate.PluginsStatusDescriptor;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+
+/**
+ * Clase que genera el panel de informacin del CRS seleccionado
+ * en el caso del repositorio de la EPSG
+ * @author Jose Luis Gomez Martinez (joseluis.gomez@uclm.es)
+ * @author Luisa Marina Fernndez (luisam.fernandez@uclm.es)
+ *
+ */
+public class InfoCRSPanel extends DefaultDialogPanel implements IWindow, ActionListener{
+	
+	private static final long serialVersionUID = 1L;
+
+	private JPanel panelLabels;
+	
+	private JTable jTable;
+	public DefaultTableModel dtm = null;
+	private JScrollPane jScrollPane1 = null;
+	private JPanel jPanelbuttons;
+	private JButton jButtonOk;
+	
+	private ICrs proj;
+	
+	private JLabel jLabelProjcs;
+	private JLabel jLabelGeogcs;
+	private JLabel jLabelDatum;
+	private JLabel jLabelSpheroid;
+	private JLabel jLabelPrimem;
+	private JLabel jLabelProjection;
+	private JLabel jLabelUnits;
+	private JLabel jLabelUnits_p;
+	private JLabel jLabelProjcsdinamic;
+	private JLabel jLabelGeogcsdinamic;
+	private JLabel jLabelDatumdinamic;
+	private JLabel jLabelSpheroiddinamic;
+	private JLabel jLabelPrimemdinamic;
+	private JLabel jLabelProjectiondinamic;
+	private JLabel jLabelUnitsdinamic;
+	private JLabel jLabelUnits_pdinamic;
+	
+	private JEditorPane jEditorPane = null;
+	private JScrollPane jScrollPane = null;
+	private String page = "";
+	private boolean isTransformation = false;
+	private String details = null;
+	private String transformationAuthority = null;
+	private int transformationCode = -1;
+	private String sourceCrs = null;
+	private String targetCrs = null;
+	private String transformationName = null;
+	//private String
+	
+	
+	public InfoCRSPanel(String fuente, int codigo) {
+		super(false);		
+		try {
+			proj = new CrsFactory().getCRS(fuente+":"+codigo);
+		} catch (CrsException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}	
+		inicializate();
+	}
+	
+	public InfoCRSPanel(String fuente, int codigo, String trans) {
+		super(false);		
+		try {
+			proj = new CrsFactory().getCRS(fuente+":"+codigo);
+		} catch (CrsException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}	
+		if (!trans.equals(PluginServices.getText(this, "sin_transformacion"))) {
+			isTransformation = true;
+			details = trans;
+			RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+			TrData crsTrDataArray[] = trPersistence.getArrayOfTrData();
+			
+			for (int iRow = crsTrDataArray.length-1; iRow >= 0; iRow--) {
+				if (details.equals(crsTrDataArray[iRow].getAuthority()+":"+crsTrDataArray[iRow].getCode()+" <--> "+crsTrDataArray[iRow].getDetails())) {
+					//Ya tenemos todos los datos de la transformacion...
+					transformationAuthority = crsTrDataArray[iRow].getAuthority();
+					transformationCode = crsTrDataArray[iRow].getCode();
+					sourceCrs = crsTrDataArray[iRow].getCrsSource();
+					targetCrs = crsTrDataArray[iRow].getCrsTarget();
+					transformationName = crsTrDataArray[iRow].getName();
+					details = crsTrDataArray[iRow].getDetails();					
+				}
+			}
+			
+		} 
+		inicializate();
+	}
+	
+	private void inicializate() {
+		this.setLayout(new BorderLayout());
+		JPanel p=new JPanel(new BorderLayout());
+		p.setBorder(new EmptyBorder(0,10,0,10));
+		//p.add(getPanel(),BorderLayout.NORTH);
+		//p.add(getJScrollPane1(),BorderLayout.CENTER);
+		createPage();
+		
+		p.add(getJScrollPane());
+		
+		this.add(p, BorderLayout.CENTER);
+		this.add(getJPanelButtons(),BorderLayout.SOUTH);
+	}
+
+	private JPanel getPanel() {
+		if(panelLabels == null) {
+			panelLabels = new JPanel();
+			panelLabels.setLayout(new GridLayout(4,2));
+			JPanel p00=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
+			p00.add(getJLabelProjcs());
+			p00.add(getJLabelProjcsDinamic());
+			JPanel p01=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
+			p01.add(getJLabelGeogcs());
+			p01.add(getJLabelGeogcsDinamic());
+			JPanel p10=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
+			p10.add(getJLabelDatum());
+			p10.add(getJLabelDatumDinamic());
+			JPanel p11=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
+			p11.add(getJLabelSpheroid());
+			p11.add(getJLabelSpheroidDinamic());
+			JPanel p20=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
+			p20.add(getJLabelPrimen());
+			p20.add(getJLabelPrimenDinamic());
+			JPanel p21=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
+			p21.add(getJLabelUnits());
+			p21.add(getJLabelUnitsDinamic());
+			JPanel p30=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
+			p30.add(getJLabelProjection());
+			p30.add(getJLabelProjectionDinamic());
+			JPanel p31=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
+			p31.add(getJLabelUnits_p());
+			p31.add(getJLabelUnits_pDinamic());
+			
+			panelLabels.add(p00);
+			panelLabels.add(p01);
+			panelLabels.add(p10);
+			panelLabels.add(p11);
+			panelLabels.add(p20);
+			panelLabels.add(p21);
+			panelLabels.add(p30);
+			panelLabels.add(p31);
+			
+		}
+		return panelLabels;
+	}
+	
+	private JPanel getJPanelButtons() {
+		if(jPanelbuttons == null) {
+			jPanelbuttons = new JPanel();
+			jPanelbuttons.setLayout(new FlowLayout(FlowLayout.RIGHT,10,10));
+			jPanelbuttons.add(getJButtonOk(),null);
+		}
+		return jPanelbuttons;
+	}
+	
+	private JButton getJButtonOk() {
+		if(jButtonOk == null) {
+			jButtonOk = new JButton();
+			jButtonOk.setText(PluginServices.getText(this,"ok"));
+			jButtonOk.setPreferredSize(new Dimension(100,25));
+			jButtonOk.setMnemonic('O');
+			jButtonOk.setToolTipText("Accept");
+			jButtonOk.addActionListener(this);
+		}
+		return jButtonOk;
+	}
+	
+	private JLabel getJLabelProjcs() {
+		if(jLabelProjcs == null) {
+			jLabelProjcs = new JLabel();
+			jLabelProjcs.setFont(new Font("Projcs:",Font.BOLD,10));
+			jLabelProjcs.setText(PluginServices.getText(this,"projcs")+":");
+		}
+		return jLabelProjcs;
+	}
+	
+	private JLabel getJLabelProjcsDinamic() {
+		if(jLabelProjcsdinamic == null) {
+			jLabelProjcsdinamic = new JLabel();
+			jLabelProjcsdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelProjcsdinamic.setText(proj.getCrsWkt().getProjcs());
+		}
+		return jLabelProjcsdinamic;
+	}
+	
+	private JLabel getJLabelGeogcs() {
+		if(jLabelGeogcs == null) {
+			jLabelGeogcs = new JLabel();
+			jLabelGeogcs.setFont(new Font("Geogcs:",Font.BOLD,10));
+			jLabelGeogcs.setText(PluginServices.getText(this,"geogcs")+ ":");
+		}
+		return jLabelGeogcs;
+	}
+	
+	private JLabel getJLabelGeogcsDinamic() {
+		if(jLabelGeogcsdinamic == null) {
+			jLabelGeogcsdinamic = new JLabel();
+			jLabelGeogcsdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelGeogcsdinamic.setText(proj.getCrsWkt().getGeogcs());
+		}
+		return jLabelGeogcsdinamic;
+	}
+	
+	private JLabel getJLabelDatum() {
+		if(jLabelDatum == null) {
+			jLabelDatum = new JLabel();
+			jLabelDatum.setFont(new Font("Datum:",Font.BOLD,10));
+			jLabelDatum.setText(PluginServices.getText(this,"datum")+":");
+		}
+		return jLabelDatum;
+	}
+	
+	private JLabel getJLabelDatumDinamic() {
+		if(jLabelDatumdinamic == null) {
+			jLabelDatumdinamic = new JLabel();
+			jLabelDatumdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelDatumdinamic.setText(proj.getCrsWkt().getDatumName());
+		}
+		return jLabelDatumdinamic;
+	}
+	
+	private JLabel getJLabelSpheroid() {
+		if(jLabelSpheroid == null) {
+			jLabelSpheroid = new JLabel();
+			jLabelSpheroid.setFont(new Font("Spheroid",Font.BOLD,10));
+			jLabelSpheroid.setText(PluginServices.getText(this,"spheriod")+":");
+		}
+		return jLabelSpheroid;
+	}
+	
+	private JLabel getJLabelSpheroidDinamic() {
+		if(jLabelSpheroiddinamic == null) {
+			String[] sphe = proj.getCrsWkt().getSpheroid();
+			jLabelSpheroiddinamic = new JLabel();
+			jLabelSpheroiddinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelSpheroiddinamic.setText(sphe[0]+" , "+sphe[1]+" , "+sphe[2]);
+		}
+		return jLabelSpheroiddinamic;
+	}
+	
+	private JLabel getJLabelPrimen() {
+		if(jLabelPrimem == null) {
+			jLabelPrimem = new JLabel();
+			jLabelPrimem.setFont(new Font("Primen:",Font.BOLD,10));
+			jLabelPrimem.setText(PluginServices.getText(this,"primem")+":");
+		}
+		return jLabelPrimem;
+	}
+	
+	private JLabel getJLabelPrimenDinamic() {
+		if(jLabelPrimemdinamic == null) {
+			String pri[] = proj.getCrsWkt().getPrimen();
+			jLabelPrimemdinamic = new JLabel();
+			jLabelPrimemdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelPrimemdinamic.setText(pri[0]+" , "+pri[1]);
+		}
+		return jLabelPrimemdinamic;
+	}
+	
+	private JLabel getJLabelProjection() {
+		if(jLabelProjection == null) {
+			jLabelProjection = new JLabel();
+			jLabelProjection.setFont(new Font("Projection",Font.BOLD,10));
+			jLabelProjection.setText(PluginServices.getText(this,"projection")+":");
+		}
+		return jLabelProjection;
+	}
+	
+	private JLabel getJLabelProjectionDinamic() {
+		if(jLabelProjectiondinamic == null) {
+			jLabelProjectiondinamic = new JLabel();
+			jLabelProjectiondinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelProjectiondinamic.setText(proj.getCrsWkt().getProjection());
+		}
+		return jLabelProjectiondinamic;
+	}
+	
+	private JLabel getJLabelUnits() {
+		if(jLabelUnits == null) {
+			jLabelUnits = new JLabel();
+			jLabelUnits.setFont(new Font("Units",Font.BOLD,10));
+			jLabelUnits.setText(PluginServices.getText(this,"units")+":");
+		}
+		return jLabelUnits;
+	}
+	
+	private JLabel getJLabelUnitsDinamic() {
+		if(jLabelUnitsdinamic == null) {
+			String[] units = proj.getCrsWkt().getUnit();
+			jLabelUnitsdinamic = new JLabel();
+			jLabelUnitsdinamic.setPreferredSize(new Dimension(200,20));
+			jLabelUnitsdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelUnitsdinamic.setText(units[0]+" , "+units[1]);
+			System.out.println("Unidades:  "+ units[0]+" , "+units[1]);
+
+		}
+		return jLabelUnitsdinamic;
+	}
+	
+	private JLabel getJLabelUnits_p() {
+		if(jLabelUnits_p == null) {
+			jLabelUnits_p = new JLabel();
+			jLabelUnits_p.setFont(new Font("",Font.BOLD,10));
+			jLabelUnits_p.setText(PluginServices.getText(this,"units_p")+":");
+		}
+		return jLabelUnits_p;
+	}
+	
+	private JLabel getJLabelUnits_pDinamic() {
+		if(jLabelUnits_pdinamic == null) {
+			String[] uni_p = proj.getCrsWkt().getUnit_p();
+			jLabelUnits_pdinamic = new JLabel();
+			jLabelUnits_pdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelUnits_pdinamic.setText(uni_p[0]+" , "+uni_p[1]);
+			
+		}
+		return jLabelUnits_pdinamic;
+	}
+	
+	private JScrollPane getJScrollPane1() {
+		if(jScrollPane1 == null) {
+			jScrollPane1 = new JScrollPane();
+			jScrollPane1.setPreferredSize(new Dimension(400,150));
+			jScrollPane1.setViewportView(getJTable());
+		}
+		return jScrollPane1;
+	}
+	
+	private JTable getJTable() {
+		if(jTable == null) {
+			String[] columnNames = {PluginServices.getText(this,"nombre")
+					,PluginServices.getText(this,"valor")};
+			String[] param_n = proj.getCrsWkt().getParam_name();
+			String[] param_v = proj.getCrsWkt().getParam_value();
+			Object[][]data;
+			if(param_v != null) {
+				data = new Object[param_v.length][2];
+				for(int i = 0 ; i < 2 ; i++ )
+					for(int j = 0 ; j < param_n.length ; j++) {
+						if(i == 0)
+							data[j][i] = param_n[j];
+						else
+							data[j][i] = param_v[j];
+					}
+			} else 
+				data = new Object[1][1];
+			dtm = new DefaultTableModel(data, columnNames);
+			jTable = new JTable(dtm);
+			jTable.setCellSelectionEnabled(false);
+			jTable.setRowSelectionAllowed(true);
+			jTable.setColumnSelectionAllowed(false);
+			jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			
+		}
+		return jTable;
+	}
+
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle(PluginServices.getText(this,proj.getCrsWkt().getName()));
+   		m_viewinfo.setWidth(600);
+   		m_viewinfo.setHeight(500);
+		return m_viewinfo;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		if (e.getSource() == getJButtonOk()){
+			PluginServices.getMDIManager().closeWindow(this);
+		}
+	}
+	
+	/**
+	 * This method initializes jScrollPane	
+	 * 	
+	 * @return javax.swing.JScrollPane	
+	 */    
+	private JScrollPane getJScrollPane() {
+		
+		// if (jScrollPane == null) {
+			jScrollPane = new JScrollPane();
+			jScrollPane.setPreferredSize(new java.awt.Dimension(300,450));
+			jScrollPane.setViewportView(getJEditorPane());
+		// }
+		return jScrollPane;
+	}
+	/**
+	 * This method initializes jEditorPane1	
+	 * 	
+	 * @return javax.swing.JEditorPane	
+	 */    
+	private JEditorPane getJEditorPane() {
+		// if (jEditorPane == null) {
+			jEditorPane = new JEditorPane();
+			
+			jEditorPane.setEditable(false);
+			jEditorPane.setContentType("text/html");
+			jEditorPane.setPreferredSize(new java.awt.Dimension(300,450));
+			
+			
+			jEditorPane.setText(page);//Page(aboutURL);
+			  
+			
+		// }
+		return jEditorPane;
+	}
+	
+	private void createPage() {
+		String title = PluginServices.getText(this, "infoCRS");
+		
+		page += "<html>  <head>  <title>"+title+"</title> <meta content=\"\"> <style></style> </head> <body>";
+		page += "<p align=\"center\"><font size=5><b>"+title.toUpperCase()+"</font></b></p>";
+		//Primera fila, codigo y repositorio
+		page += "<br><table width=\"100%\" border=\"0\">  " +
+				"<tr> " +
+					"<td width=\"50%\">"+PluginServices.getText(this, "codeSelectedCrs")+": "+proj.getCode()+"</td> " +
+					"<td width=\"50%\"><div align=\"center\">"+PluginServices.getText(this, "repository")+": "+proj.getCrsWkt().getAuthority()[0]+"</div></td> " +
+				"</tr>";
+		
+		String projected;
+		if (proj.getCrsWkt().getProjcs().equals(""))
+			projected = PluginServices.getText(this, "no");
+		else
+			projected = PluginServices.getText(this, "si");		
+		
+		//Segunda fila, nombre y proyeccion		
+		page += "<tr> " +
+			"<td width=\"50%\">"+PluginServices.getText(this, "nameSelectedCrs")+": "+proj.getCrsWkt().getName()+"</td> " +
+			"<td width=\"50%\"><div align=\"center\">"+PluginServices.getText(this, "projected")+": "+projected+"</div></td> " +
+		"</tr>";
+		
+		//Nombre del datum
+		page += "<tr> " +
+			"<td width=\"60%\">"+PluginServices.getText(this, "nameDatum")+": "+proj.getCrsWkt().getDatumName()+"</td> " +
+			"<td width=\"40%\"><div align=\"center\">"+"</div></td> " +
+		"</tr>";
+		
+		page +="</table>";
+		
+		//Datos del elipsoide
+		page += "<br><table width=\"100%\" border=\"2\">  " +
+				"<tr> " +
+					"<td align=\"center\"><b>"+PluginServices.getText(this, "ellipsoid")+": "+proj.getCrsWkt().getSpheroid()[0]+"</b></td> " +
+				"</tr>";
+		
+		page += "<tr> " +
+					"<td>"+PluginServices.getText(this, "semiMajorAxis")+"</td> " +
+					"<td><div align=\"center\">"+proj.getCrsWkt().getSpheroid()[1]+"</div></td> " +
+				"</tr>";
+		page += "<tr> " +
+					"<td>"+PluginServices.getText(this, "invFlattening")+"</td> " +
+					"<td><div align=\"center\">"+proj.getCrsWkt().getSpheroid()[2]+"</div></td> " +
+				"</tr>";
+		page += "</table>";
+		
+		//Datos del prime meridian
+		page += "<br><table width=\"100%\" border=\"2\">  " +
+		"<tr> " +
+			"<td align=\"center\"><b>"+PluginServices.getText(this, "primeMeridian")+": "+proj.getCrsWkt().getPrimen()[0]+"</b></td> " +
+		"</tr>";
+
+		page += "<tr> " +
+			"<td>"+PluginServices.getText(this, "greenwichLongitude")+"</td> " +
+			"<td><div align=\"center\">"+proj.getCrsWkt().getPrimen()[1]+"</div></td> " +
+		"</tr>";
+		
+		page += "</table>";
+		
+		//Si es proyectado procedemos a concatenar la proyección y sus parámetros
+		if (projected.equals(PluginServices.getText(this, "si"))) {
+						
+			//proyeccion
+			page += "<p><font size=4>"+PluginServices.getText(this, "projection")+": <b>"+proj.getCrsWkt().getProjection()+"</b></font></p>";
+			
+			//Parametros
+			page += "<p align=\"center\">"+PluginServices.getText(this, "parameters")+"<table width=\"100%\" border=\"2\">  ";
+			for (int i = 0; i < proj.getCrsWkt().getParam_name().length; i++) {
+				
+				page += "<tr> " +
+					"<td align=\"center\">"+PluginServices.getText(this, proj.getCrsWkt().getParam_name()[i])+"</td> " +
+					"<td align=\"center\">"+proj.getCrsWkt().getParam_value()[i]+"</td> " +
+				"</tr>";
+			}
+			page += "</table>";
+		}
+		
+		try {
+			page += "<p>"+PluginServices.getText(this, "proj4Chain")+": "+ proj.getProj4String() +"</p>";
+		} catch (CrsException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+		if (isTransformation) {
+			
+			//Titulo de la transformacion
+			page += "<p align=\"center\"><font size=5><b>"+PluginServices.getText(this, "transformation")+"</b></font></p>";
+			
+			//Tipo de transformacion y codigo si es EPSG
+			page += "<p>"+PluginServices.getText(this, "type_transformation")+": ";
+			
+			if (transformationAuthority.equals(PluginServices.getText(this, "USR"))) {
+				page += PluginServices.getText(this, "user")+"</p>";
+			}
+			else if (transformationAuthority.equals(PluginServices.getText(this, "EPSG"))) {
+				page += PluginServices.getText(this, "EPSG")+":"+transformationCode+"</p>";
+				//nombre de la transformacion
+				page += "<p>"+PluginServices.getText(this, "name")+": "+transformationName+"</p>";
+			}
+			else if (transformationAuthority.equals(PluginServices.getText(this, "NADGR"))) {
+				page += PluginServices.getText(this, "nadgrids")+"</p>";
+			}
+			else if (transformationAuthority.equals(PluginServices.getText(this, "COMP"))) {
+				page += PluginServices.getText(this, "compound")+"</p>";
+			}
+			
+			//Fuente y destino de la transformacion
+			page += "<br><table width=\"100%\" border=\"0\">  " +
+			"<tr> " +
+				"<td align=\"center\">"+PluginServices.getText(this, "source_crs")+": "+sourceCrs+"</td> " +
+				"<td align=\"center\">"+PluginServices.getText(this, "target_crs")+": "+targetCrs+"</td> " +
+			"</tr></table>";
+			
+			page += "<p>"+PluginServices.getText(this, "detailsTransformation")+": "+details+"</p>";	
+			
+		}
+		
+		page += "</body> </html>";
+	}
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/InfoCRSPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationManualPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationManualPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationManualPanel.java	(revision 25287)
@@ -0,0 +1,643 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.GridLayout;
+import java.util.ArrayList;
+
+import javax.swing.BorderFactory;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+import javax.swing.border.EmptyBorder;
+
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.CrsWkt;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.persistence.RecentTrsPersistence;
+import org.gvsig.crs.persistence.TrData;
+
+import com.iver.andami.PluginServices;
+
+/**
+ * Clase que define el panel de tranformaciones manuales, as como su
+ * funcionamiento.
+ * 
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ * @author Luisa Marina Fernndez (luisam.fernandez@uclm.es)
+ *
+ */
+public class TransformationManualPanel extends JPanel {
+	
+	private static final long serialVersionUID = 1L;
+	
+	private static boolean pressed = true;
+	
+	private JLabel x_Translation;
+	private JLabel y_Translation;
+	private JLabel z_Translation;
+	private JLabel x_Rotation;
+	private JLabel y_Rotation;
+	private JLabel z_Rotation;
+	private JLabel scale;
+	
+	private JTextField tx_Translation;
+	private JTextField ty_Translation;
+	private JTextField tz_Translation;
+	private JTextField tx_Rotation;
+	private JTextField ty_Rotation;
+	private JTextField tz_Rotation;
+	private JTextField tScale;
+	
+	private JLabel domainTranslation;
+	private JLabel domainRotation;
+	private JLabel domainScale;
+	
+	//private JLabel wkt;
+	private JTextArea info;	
+	int codeEpsg;
+	String targetAbrev = "";
+	String sourceAbrev = "";
+	String[] targetAuthority;
+	
+	private String cadWKT = "";	
+	
+	public TransformationManualPanel() {		
+		initialize();	
+	}
+	
+	private void initialize(){
+		JPanel p=new JPanel();
+		p.setLayout(new GridLayout(7,3,10,10));
+		
+		p.add(getX_Translation());
+		p.add(getTx_Translation());
+		p.add(getDomainTranslation());
+			
+		p.add(getY_Translation());
+		p.add(getTy_Translation());
+		p.add(getDomainTranslation());
+			
+		p.add(getZ_Translation());
+		p.add(getTz_Translation());
+		p.add(getDomainTranslation());
+			
+		p.add(getX_Rotation());
+		p.add(getTx_Rotation());
+		p.add(getDomainRotation());
+			
+		p.add(getY_Rotation());
+		p.add(getTy_Rotation());
+		p.add(getDomainRotation());
+			
+		p.add(getZ_Rotation());
+		p.add(getTz_Rotation());
+		p.add(getDomainRotation());
+			
+		p.add(getScale());
+		p.add(getTscale());
+		p.add(getDomainScale());
+		p.setBorder(new EmptyBorder(50,20,50,10));
+		this.setLayout(new BorderLayout(1,30));
+		this.setBorder(
+			    BorderFactory.createCompoundBorder(
+						BorderFactory.createCompoundBorder(
+								BorderFactory.createTitledBorder(PluginServices.getText(this,"transformacion_manual")),
+								BorderFactory.createEmptyBorder(2,2,2,2)),
+								getBorder()));
+		this.add(p,BorderLayout.CENTER);
+	}
+	
+	private JLabel getDomainTranslation(){
+		domainTranslation = new JLabel();
+		domainTranslation.setText("[-1000.0, 1000.0]");
+		return domainTranslation;
+	}
+	
+	private JLabel getDomainRotation(){
+		domainRotation = new JLabel();
+		domainRotation.setText("[-60.0, 60.0]");
+		return domainRotation;
+	}
+	
+	private JLabel getDomainScale(){
+		domainScale = new JLabel();
+		domainScale.setText("[-20.0, 20.0]");
+		return domainScale;
+	}
+
+	private JLabel getX_Translation() {
+		if(x_Translation == null ) {
+			x_Translation = new JLabel();
+			//x_Translation.setFont(new Font("x_Translation:",Font.BOLD,15));
+			x_Translation.setText(PluginServices.getText(this,"x_Translation")+":");	
+		}
+		return x_Translation;
+	}
+	
+	private JLabel getY_Translation() {
+		if(y_Translation == null ) {
+			y_Translation = new JLabel();
+			//y_Translation.setFont(new Font("y_Translation:",Font.BOLD,15));
+			y_Translation.setText(PluginServices.getText(this,"y_Translation")+":");
+		}
+		return y_Translation;
+	}
+	
+	private JLabel getZ_Translation() {
+		if(z_Translation == null ) {
+			z_Translation = new JLabel();
+			//z_Translation.setFont(new Font("z_Translation:",Font.BOLD,15));
+			z_Translation.setText(PluginServices.getText(this,"z_Translation")+":");
+			
+		}
+		return z_Translation;
+	}
+	
+	private JLabel getX_Rotation() {
+		if(x_Rotation == null ) {
+			x_Rotation = new JLabel();
+			//x_Rotation.setFont(new Font("x_Rotation:",Font.BOLD,15));
+			x_Rotation.setText(PluginServices.getText(this,"x_Rotation")+":");
+			
+		}
+		return x_Rotation;
+	}
+	
+	private JLabel getY_Rotation() {
+		if(y_Rotation == null ) {
+			y_Rotation = new JLabel();
+			//y_Rotation.setFont(new Font("x_Rotation:",Font.BOLD,15));
+			y_Rotation.setText(PluginServices.getText(this,"y_Rotation")+":");
+			
+		}
+		return y_Rotation;
+	}
+	
+	private JLabel getZ_Rotation() {
+		if(z_Rotation == null ) {
+			z_Rotation = new JLabel();
+			//z_Rotation.setFont(new Font("x_Translation:",Font.BOLD,15));
+			z_Rotation.setText(PluginServices.getText(this,"z_Rotation")+":");
+			
+		}
+		return z_Rotation;
+	}
+	
+	private JLabel getScale() {
+		if(scale == null ) {
+			scale = new JLabel();
+			//scale.setFont(new Font("scale:",Font.BOLD,15));
+			scale.setText(PluginServices.getText(this,"scale")+":");
+			
+		}
+		return scale;
+	}
+	
+	public JTextField getTx_Translation() {
+		if(tx_Translation == null ) {
+			tx_Translation = new JTextField();
+			//tx_Translation.setFont(new Font("",Font.ITALIC,10));
+			tx_Translation.setText("0");
+			tx_Translation.setEditable(true);
+			//tx_Translation.addKeyListener(this);
+		}
+		return tx_Translation;
+	}
+	
+	public JTextField getTy_Translation() {
+		if(ty_Translation == null ) {
+			ty_Translation = new JTextField();
+			//ty_Translation.setFont(new Font("",Font.ITALIC,10));
+			ty_Translation.setText("0");
+			ty_Translation.setEditable(true);
+			//ty_Translation.addKeyListener(this);
+		}
+		return ty_Translation;
+	}
+	
+	public JTextField getTz_Translation() {
+		if(tz_Translation == null ) {
+			tz_Translation = new JTextField();
+			//tz_Translation.setFont(new Font("",Font.ITALIC,10));
+			tz_Translation.setText("0");
+			tz_Translation.setEditable(true);
+			//tz_Translation.addKeyListener(this);
+		}
+		return tz_Translation;
+	}
+	
+	public JTextField getTx_Rotation() {
+		if(tx_Rotation == null ) {
+			tx_Rotation = new JTextField();
+			//tx_Rotation.setFont(new Font("",Font.ITALIC,10));
+			tx_Rotation.setText("0");
+			tx_Rotation.setEditable(true);
+			//tx_Rotation.addKeyListener(this);
+		}
+		return tx_Rotation;
+	}
+	
+	public JTextField getTy_Rotation() {
+		if(ty_Rotation == null ) {
+			ty_Rotation = new JTextField();
+			//ty_Rotation.setFont(new Font("",Font.ITALIC,10));
+			ty_Rotation.setText("0");
+			ty_Rotation.setEditable(true);
+			//ty_Rotation.addKeyListener(this);
+		}
+		return ty_Rotation;
+	}
+	
+	public JTextField getTz_Rotation() {
+		if(tz_Rotation == null ) {
+			tz_Rotation = new JTextField();
+			//tz_Rotation.setFont(new Font("",Font.ITALIC,10));
+			tz_Rotation.setText("0");
+			tz_Rotation.setEditable(true);
+			//tz_Rotation.addKeyListener(this);
+		}
+		return tz_Rotation;
+	}
+	
+	public JTextField getTscale() {
+		if(tScale == null ) {
+			tScale = new JTextField();
+			//tScale.setFont(new Font("",Font.ITALIC,10));
+			tScale.setText("0");
+			tScale.setEditable(true);
+			//tScale.addKeyListener(this);
+		}
+		return tScale;
+	}
+			
+	/**
+	 * 
+	 * @return
+	 */
+	public ICrs getProjection() {
+		if(tx_Translation.getText().equals("")){
+			tx_Translation.setText("0");
+		}
+		else if (ty_Translation.getText().equals("")){
+			ty_Translation.setText("0");
+		}
+		else if (tz_Translation.getText().equals("")){
+			tz_Translation.setText("0");
+		}
+		else if (tx_Rotation.getText().equals("")){
+			tx_Rotation.setText("0");
+		}
+		else if (ty_Rotation.getText().equals("")){
+			ty_Rotation.setText("0");
+		}
+		else if (tz_Rotation.getText().equals("")){
+			tz_Rotation.setText("0");
+		}
+		else if (tScale.getText().equals("")){
+			tScale.setText("0");
+		}		
+		String param = "+towgs84="+ tx_Translation.getText()+","+
+					   ty_Translation.getText()+","+
+					   tz_Translation.getText()+","+
+					   tx_Rotation.getText()+","+
+					   ty_Rotation.getText()+","+
+					   tz_Rotation.getText()+","+
+					   tScale.getText() + " ";
+		
+		try {
+			String[] sourceAuthority = getSourceAbrev().split(":");
+			//ICrs crs = new CrsFactory().getCRS(getCode(), getWKT(),param);
+			ICrs crs = new CrsFactory().getCRS(sourceAuthority[0]+":"+getCode());
+			crs.setTransformationParams(param,null);
+			return crs;
+		} catch (org.gvsig.crs.CrsException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	/**
+	 * 
+	 * @param cod
+	 */
+	public void setCode(int cod){
+		codeEpsg = cod;
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public int getCode(){
+		return codeEpsg;
+	}
+	
+	/**
+	 * 
+	 * @param cad
+	 */
+	public void setWKT(String cad){
+		cadWKT = cad;
+		CrsWkt parser = new CrsWkt(cad);
+		setSourceAbrev(parser.getAuthority()[0], parser.getAuthority()[1]);		
+	}	
+	
+	/**
+	 * 
+	 * @param cad
+	 */
+	public void setWKT(ICrs crs){
+		cadWKT = crs.getWKT();		
+		setSourceAbrev(crs.getCrsWkt().getAuthority()[0], crs.getCrsWkt().getAuthority()[1]);		
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public String getWKT(){
+		return cadWKT;
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public static boolean isPressed() { return pressed; }
+	
+	
+	/**
+	 * metodo para comprobar si los JTextfile estan escritos 
+	 * correctamente los campos de la transformacion manual
+	 */
+	public boolean correctJTextField(){
+		boolean correct = true;
+		
+		if ((tx_Translation.getText().length()==0) || (tx_Translation.getText().length()!=verify(tx_Translation.getText()).length())){
+			tx_Translation.setText("0");
+			tx_Translation.setBackground(new Color(255,204,204));
+			correct = false;
+		}
+		else tx_Translation.setBackground(new Color(255,255,255));
+		if ((ty_Translation.getText().length()==0) || (ty_Translation.getText().length()!=verify(ty_Translation.getText()).length())){
+			ty_Translation.setText("0");
+			ty_Translation.setBackground(new Color(255,204,204));
+			correct = false;
+		}
+		else ty_Translation.setBackground(new Color(255,255,255));
+		if ((tz_Translation.getText().length()==0) || (tz_Translation.getText().length()!=verify(tz_Translation.getText()).length())){
+			tz_Translation.setText("0");
+			tz_Translation.setBackground(new Color(255,204,204));
+			correct = false;
+		}
+		else tz_Translation.setBackground(new Color(255,255,255));
+		if ((tx_Rotation.getText().length() == 0) || (tx_Rotation.getText().length()!=verify(tx_Rotation.getText()).length())){
+			tx_Rotation.setText("0");
+			tx_Rotation.setBackground(new Color(255,204,204));
+			correct = false;
+		}
+		else tx_Rotation.setBackground(new Color(255,255,255));
+		if ((ty_Rotation.getText().length() == 0) || (ty_Rotation.getText().length()!=verify(ty_Rotation.getText()).length())){
+			ty_Rotation.setText("0");
+			ty_Rotation.setBackground(new Color(255,204,204));
+			correct = false;
+		}
+		else ty_Rotation.setBackground(new Color(255,255,255));
+		if ((tz_Rotation.getText().length() == 0) || (tz_Rotation.getText().length()!=verify(tz_Rotation.getText()).length())){
+			tz_Rotation.setText("0");
+			tz_Rotation.setBackground(new Color(255,204,204));
+			correct = false;
+		}
+		else tz_Rotation.setBackground(new Color(255,255,255));
+		if ((tScale.getText().length() == 0) || (tScale.getText().length()!=verify(tScale.getText()).length())){
+			tScale.setText("0");
+			tScale.setBackground(new Color(255,204,204));
+			correct = false;
+		}
+		else tScale.setBackground(new Color(255,255,255));
+		return correct;
+	}
+	
+	/**
+	 * Verifica que el valor insertado en el campo JTextField correspondiente
+	 * se corresponde con un valor nmerico y de tipo double
+	 * 
+	 * @param cad
+	 * @return
+	 */
+	private String verify(String cad) {
+		String num_cad = "";
+		int pto = 0;
+		char[] nums = {'0','1','2','3','4','5','6','7','8','9'};
+		if (cad.startsWith("-")) num_cad += "-";
+		for (int i=0; i< cad.length(); i++){						
+			if (cad.charAt(i) == '.'){				
+				if (cad.startsWith(".") || cad.endsWith(".") || pto>0);
+				else {
+					pto++;
+					num_cad += cad.charAt(i);
+				}
+			}			
+			else
+				for (int j=0; j< nums.length; j++)
+					if (cad.charAt(i) == nums[j])
+						num_cad += cad.charAt(i);				
+		}		
+		return num_cad;
+	}
+	
+	/**
+	 * Mira si los JTextField tienen dominios correctos
+	 * @return
+	 */
+	public boolean correctDomain(){
+		boolean correctDomain = true;
+		double tx = Double.parseDouble(tx_Translation.getText());
+		double ty = Double.parseDouble(ty_Translation.getText());
+		double tz = Double.parseDouble(tz_Translation.getText());
+		double rx = Double.parseDouble(tx_Rotation.getText());
+		double ry = Double.parseDouble(ty_Rotation.getText());
+		double rz = Double.parseDouble(tz_Rotation.getText());
+		double sc = Double.parseDouble(tScale.getText());
+		
+		if (tx < -1000.0 || tx > 1000.0) {
+			tx_Translation.setText("0");
+			tx_Translation.setBackground(new Color(255,204,204));
+			correctDomain = false;
+		}
+		else tx_Translation.setBackground(new Color(255,255,255));
+		if (ty < -1000.0 || ty > 1000.0) {
+			ty_Translation.setText("0");
+			ty_Translation.setBackground(new Color(255,204,204));
+			correctDomain = false;
+		}
+		else ty_Translation.setBackground(new Color(255,255,255));
+		if (tz < -1000.0 || tz > 1000.0) {
+			tz_Translation.setText("0");
+			tz_Translation.setBackground(new Color(255,204,204));
+			correctDomain = false;
+		}
+		else tz_Translation.setBackground(new Color(255,255,255));
+		if (rx < -60.0 || rx > 60.0) {
+			tx_Rotation.setText("0");
+			tx_Rotation.setBackground(new Color(255,204,204));
+			correctDomain = false;
+		}
+		else tx_Rotation.setBackground(new Color(255,255,255));
+		if (ry < -60.0 || ry > 60.0) {
+			ty_Rotation.setText("0");
+			ty_Rotation.setBackground(new Color(255,204,204));
+			correctDomain = false;
+		}
+		else ty_Rotation.setBackground(new Color(255,255,255));
+		if (rz < -60.0 || rz > 60.0) {
+			tz_Rotation.setText("0");
+			tz_Rotation.setBackground(new Color(255,204,204));
+			correctDomain = false;
+		}
+		else tz_Rotation.setBackground(new Color(255,255,255));
+		if (sc < -20.0 || sc > 20.0) {
+			tScale.setText("0");
+			tScale.setBackground(new Color(255,204,204));
+			correctDomain = false;
+		}
+		else tScale.setBackground(new Color(255,255,255));
+		return correctDomain;
+	}
+	
+	/**
+	 * Consigue el estado actual de los parmetros insertados. En caso
+	 * de que todos los parmetros sean 0, o haya parmetros sin valor
+	 * deshabilitar el botn de aceptar
+	 * @return
+	 */
+	public boolean getStatus() {
+		if ((tx_Translation.getText().equals("0") || tx_Translation.getText().equals("")) &&
+				(ty_Translation.getText().equals("0")  || ty_Translation.getText().equals(""))&&
+				(tz_Translation.getText().equals("0")  || tz_Translation.getText().equals(""))&&
+				(tx_Rotation.getText().equals("0")  || tx_Rotation.getText().equals(""))&&
+				(ty_Rotation.getText().equals("0")  || ty_Rotation.getText().equals(""))&&
+				(tz_Rotation.getText().equals("0")  || tz_Rotation.getText().equals(""))&&
+				(tScale.getText().equals("0")  || tScale.getText().equals("")))
+			return false;
+		else if (tx_Translation.getText().equals("") ||
+				(ty_Translation.getText().equals(""))||
+				(tz_Translation.getText().equals(""))||
+				(tx_Rotation.getText().equals(""))||
+				(ty_Rotation.getText().equals(""))||
+				(tz_Rotation.getText().equals(""))||
+				(tScale.getText().equals("")))
+			return false;
+		return true;
+	}
+	
+	public void setTargetAuthority(String[] authority){
+		targetAuthority = authority;
+		setTargetAbrev(targetAuthority[0], targetAuthority[1]);		
+	}
+	
+	public void setTargetAbrev(String fuente, String codigo){
+		targetAbrev = fuente + ":" + codigo;
+	}
+	
+	public String getTargetAbrev() {
+		return targetAbrev;
+	}
+	
+	public void setSourceAbrev(String fuente, String codigo){
+		sourceAbrev = fuente + ":" + codigo;
+	}
+	
+	public String getSourceAbrev(){
+		return sourceAbrev;
+	}
+	
+	public String getValues(){
+		return "["+tx_Translation.getText()+","+ty_Translation.getText()+
+		","+tz_Translation.getText()+","+tx_Rotation.getText()+","+ty_Rotation.getText()+","
+		+tz_Rotation.getText()+","+tScale.getText()+"]";
+	}
+	
+	/**
+	 * cuando utilizamos crs+transformacion, cargamos los paneles para que
+	 * el usuario pueda consultar la transformacion utilizada...
+	 * @param details
+	 */
+	public void fillData(String details) {
+		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+		TrData crsTrDataArray[] = trPersistence.getArrayOfTrData();
+		
+		for (int iRow = crsTrDataArray.length-1; iRow >= 0; iRow--) {
+			if (details.equals(crsTrDataArray[iRow].getAuthority()+":"+crsTrDataArray[iRow].getCode()+" <--> "+crsTrDataArray[iRow].getDetails()) && crsTrDataArray[iRow].getAuthority().equals(PluginServices.getText(this, "USR"))) {
+				String data = crsTrDataArray[iRow].getDetails();
+				data = data.trim().substring(1, data.length()-1);
+				String values[] = data.split(",");
+				tx_Translation.setText(values[0]);
+				ty_Translation.setText(values[1]);
+				tz_Translation.setText(values[2]);
+				tx_Rotation.setText(values[3]);
+				ty_Rotation.setText(values[4]);
+				tz_Rotation.setText(values[5]);
+				tScale.setText(values[6]);				
+				break;
+			}
+		}
+	}
+	
+	/**
+	 * metodo para eliminar la informacion previamente cargada
+	 *
+	 */
+	public void resetData() {
+		tx_Translation.setText("0");
+		ty_Translation.setText("0");
+		tz_Translation.setText("0");
+		tx_Rotation.setText("0");
+		ty_Rotation.setText("0");
+		tz_Rotation.setText("0");
+		tScale.setText("0");
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationManualPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/CrsRecentsPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/CrsRecentsPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/CrsRecentsPanel.java	(revision 25287)
@@ -0,0 +1,298 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+
+import javax.swing.Action;
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.ListSelectionModel;
+
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.persistence.CrsData;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+
+import com.iver.andami.PluginServices;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+/**
+ * Clase que genera el panel de recientes
+ * 
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ * @author Luisa Marina Fernndez (luisam.fernandez@uclm.es)
+ *
+ */
+public class CrsRecentsPanel extends JPanel implements ActionListener {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	
+	public JTable jTable = null;
+	private JScrollPane jScrollPane = null;
+	private JButton infoCrs=null;
+	public DefaultTableModel dtm = null;
+	public TableSorter sorter = null;
+	private CrsData crsDataArray[] = null;
+	
+	public int selectedRowTable = -1;
+	private String authority = null;
+	private int codeCRS = -1;
+	private ICrs crs = null;
+	
+	public CrsRecentsPanel() {
+		super();
+		initialize();
+	}
+	
+	private void initialize(){
+		this.setLayout(new BorderLayout());
+		JPanel p=new JPanel(new FlowLayout(FlowLayout.LEFT,15,15));
+		p.add(getJLabel());
+		this.add(p, BorderLayout.NORTH);
+		this.add(getJScrollPane(), BorderLayout.CENTER);
+		JPanel pSouth=new JPanel(new FlowLayout(FlowLayout.RIGHT,5,5));
+		pSouth.add(getInfoCrs());
+		this.add(pSouth,BorderLayout.SOUTH);
+	}
+	
+	private JLabel getJLabel(){
+		JLabel label = new JLabel();
+		label.setText(PluginServices.getText(this, "ultimos_crs_utilizados")+":");
+		return label;
+	}
+	/**
+	 * Inicializa el panel que contiene la tabla con los crs
+	 * @return
+	 */
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane();
+			jScrollPane.setBorder(
+				    BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(3,3,3,3),jScrollPane.getBorder()));
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+	/**
+	 * Inicializa la tabla que contiene los crs
+	 * @return
+	 */
+	public JTable getJTable() {
+		if (jTable == null) {
+			String[] columnNames= {PluginServices.getText(this,"repository"),
+					PluginServices.getText(this,"codigo"),
+					PluginServices.getText(this,"nombre")};
+			Object[][]data = {};			
+			dtm = new DefaultTableModel(data, columnNames)
+			 {
+				private static final long serialVersionUID = 1L;
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}
+				/*
+				 * metodo necesario para cuando utilizamos tablas ordenadas
+				 * ya que sino al ordenar por algun campo no se queda con el orden
+				 * actual al seleccionar una fila (non-Javadoc)
+				 * @see javax.swing.table.TableModel#getColumnClass(int)
+				 */
+				public Class getColumnClass(int column)
+				{
+					return getValueAt(0, column).getClass();
+				}
+				};
+			sorter = new TableSorter(dtm);			
+
+			jTable = new JTable(sorter);
+			sorter.setTableHeader(jTable.getTableHeader());
+			jTable.setCellSelectionEnabled(false);
+			jTable.setRowSelectionAllowed(true);
+			jTable.setColumnSelectionAllowed(false);
+			jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			TableColumn column = null;
+			for (int i = 0; i < 3; i++) {
+			    column = jTable.getColumnModel().getColumn(i);
+			    if (i == 0) {
+			        column.setPreferredWidth(80); //code column is shorter			     	
+			    }else if (i == 2) {
+			    	column.setPreferredWidth(275);
+			    }
+			    else {			    
+			        column.setPreferredWidth(140);
+			    }
+			}	
+		}
+		return jTable;		
+	}
+	
+	/**
+	 * Inicializa el botn que obtiene la informacin del CRS
+	 * @return
+	 */
+	public JButton getInfoCrs() {
+		if(infoCrs == null) {
+			infoCrs = new JButton();
+			infoCrs.setPreferredSize(new Dimension(85,20));
+			infoCrs.setText(PluginServices.getText(this,"infocrs"));
+			infoCrs.setMnemonic('I');
+			infoCrs.setEnabled(false);
+			infoCrs.setToolTipText(PluginServices.getText(this,"more_info"));
+			infoCrs.addActionListener(this);
+		}
+		return infoCrs;
+	}
+	public ICrs getProjection() {		
+		return crs;
+	}
+	
+	public void setCodeCRS(int code) {
+		codeCRS = code;
+	}
+	
+	public int getCodeCRS() {
+		return codeCRS;
+	}
+	
+	public void setProjection(IProjection crs) {
+		//setCrs((ICrs) crs);
+	}
+	
+	/**
+	 * Carga en la tabla los CRSs leidos del sistema de persistencia.
+	 */
+	public void loadRecents(){
+		
+//		 Eliminar filas en cada nueva bsqueda
+		int numRow = dtm.getRowCount();
+		while (numRow != 0) {
+			numRow = numRow - 1;
+			dtm.removeRow(numRow);
+		}
+		
+		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+		crsDataArray = persistence.getArrayOfCrsData();
+		boolean available = true;
+		for (int iRow = crsDataArray.length-1;iRow>=0;iRow--){
+			Object row[] ={crsDataArray[iRow].getAuthority(),Integer.toString(crsDataArray[iRow].getCode()),crsDataArray[iRow].getName()};
+			if (crsDataArray[iRow].getAuthority().equals(PluginServices.getText(this, "USR"))) {
+				available = isUSR(crsDataArray[iRow].getCode());
+			}			
+			if (available) {
+				dtm.addRow(row);
+			} else {
+				available = true;
+			}
+		}
+		
+		/*
+		/*Seleccionar el primer registro.
+		 */
+		int numr = dtm.getRowCount();
+		if (numr != 0 )
+			this.getJTable().setRowSelectionInterval(0,0);
+	}
+	
+	/**
+	 * metodo que nos indica si un crs de usuario esta o no en la base de datos de usuario
+	 * @param code
+	 * @return
+	 */
+	public boolean isUSR(int code) {
+		NewCRSPanel usr = new NewCRSPanel();		
+		return usr.isInBD(code);
+	}
+
+	public ICrs getCrs() {
+		return crs;
+	}
+	
+	public void initCrs(){
+		
+		selectedRowTable = getJTable().getSelectedRow();		        			        	
+    	Integer.parseInt((String)sorter.getValueAt(selectedRowTable,1));
+		setAuthority((String)sorter.getValueAt(selectedRowTable,0)+":"+(String)sorter.getValueAt(selectedRowTable,1));
+    	
+		codeCRS = Integer.parseInt((String)sorter.getValueAt(selectedRowTable,1));
+		try {
+			crs = new CrsFactory().getCRS(getAuthority());
+		} catch (CrsException e) {
+			e.printStackTrace();
+		}
+	}
+	
+	public String getAuthority() {
+		return authority;
+	}
+	
+	public void setAuthority(String aut) {
+		this.authority = aut;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		/*Si el objeto que genera el evento es el JButton 'InfoCrs'
+		se muestra la informacin ralicionada con el Crs seleccionado en la tabla*/
+		if (e.getSource() == this.getInfoCrs()) {
+			String[] aut = getAuthority().split(":");			
+			InfoCRSPanel info = new InfoCRSPanel(aut[0], getCodeCRS());
+			PluginServices.getMDIManager().addWindow(info);
+		}
+		
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/CrsRecentsPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationVistaPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationVistaPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationVistaPanel.java	(revision 25287)
@@ -0,0 +1,468 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.CardLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.ListSelectionModel;
+
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.CRSMainTrPanel;
+import org.gvsig.crs.gui.listeners.TransformationCompuestaPanelListener;
+import org.gvsig.crs.persistence.CompTrData;
+import org.gvsig.crs.persistence.RecentTrsPersistence;
+import org.gvsig.crs.persistence.TrData;
+
+import com.iver.andami.PluginServices;
+
+/**
+ *  Clase que define la transformacion de la vista en una transformacion compuesta
+ *
+ * @author Jose Luis Gomez Martinez (JoseLuis.Gomez@uclm.es)
+ * @author Luisa Marina Fernandez (luisam.fernandez@uclm.es)
+ *
+ */
+public class TransformationVistaPanel extends JPanel implements ActionListener {
+	private static final long serialVersionUID = 1L;
+	private JLabel lblTransVista=null;
+	private JComboBox jComboOptions=null;
+	private JPanel pNorth=null;
+	private JPanel pCenter=null;
+	private TransformationManualPanel manualTrPanel = null;
+	private TransformationEpsgPanel epsgTrPanel = null;
+	private TransformationNadgridsPanel nadsTrPanel = null;
+	private TransformationRecentsPanel recentsTrPanel = null;
+	private JLabel lblCrsView = null;
+	private JLabel lblCrsViewCode = null;
+	
+	String crs_target = null;
+	String crs_source = null;
+	String sourceAbrev = "";
+	String sourceTransformation = null;
+	String targetTransformation = null;
+	CRSMainTrPanel crsMainTrPanel = null;
+	
+	boolean recentCompTransformation = false;
+	
+	/**
+	 * Inicializa this
+	 *
+	 */
+	public TransformationVistaPanel(String target, CRSMainTrPanel p) {
+		super();
+		crsMainTrPanel = p;
+		setCrs_target(target);
+		manualTrPanel = new TransformationManualPanel();
+		epsgTrPanel = new TransformationEpsgPanel(getCrs_target());
+		nadsTrPanel = new TransformationNadgridsPanel(false);
+		recentsTrPanel = new TransformationRecentsPanel();
+						
+		this.setLayout(new BorderLayout());
+		//Aadir al norte el panel que contiene las diferentes opciones de transformacin
+		this.add(getPNorth(),BorderLayout.NORTH);
+		this.add(getPCenter(),BorderLayout.CENTER);
+		
+		setListeners();
+		
+	}
+	
+	public JPanel getPCenter() {
+		if (pCenter == null) {
+			pCenter = new JPanel();
+			pCenter.setLayout(new CardLayout());		
+			
+			pCenter.add("recents", recentsTrPanel);
+			pCenter.add("manual", manualTrPanel);
+			pCenter.add("epsg", epsgTrPanel);
+			pCenter.add("nad", nadsTrPanel);
+		}
+		
+		return pCenter;
+	}
+
+	public JLabel getLblTransVista() {
+		if(lblTransVista==null){
+		lblTransVista=new JLabel(PluginServices.getText(this,"transformacion_vista")+":");
+		}
+		return lblTransVista;
+	}
+	
+	public JLabel getLblCrsVista() {
+		if(lblCrsView==null){
+			lblCrsView=new JLabel(PluginServices.getText(this,"crs_view")+":");
+		}
+		return lblCrsView;
+	}
+	
+	public JLabel getLblCrsVistaCode() {
+		if(lblCrsViewCode==null){
+			lblCrsViewCode=new JLabel();
+		}
+		return lblCrsViewCode;
+	}
+	/**
+	 * Definicion del panel que contiene el Label y el Combo de 
+	 * las transformaciones de la vista
+	 * @return
+	 */
+	public JPanel getPNorth() {
+		if (pNorth==null){
+			pNorth=new JPanel();
+			pNorth.setLayout(new GridLayout(2,1));
+			JPanel p1=new JPanel(new FlowLayout(FlowLayout.LEFT,10,3));
+			p1.add(getLblCrsVista());
+			p1.add(getLblCrsVistaCode());
+			JPanel p2=new JPanel(new FlowLayout(FlowLayout.LEFT,10,3));
+			p2.add(getLblTransVista());
+			p2.add(getJComboOptions());
+			
+			pNorth.add(p1);
+			pNorth.add(p2);
+		}
+		return pNorth;
+	}
+	/**
+	 * Definicin del ComboBox que contiene las diferentes transformaciones 
+	 * aplicables a la vista
+	 * @return
+	 */
+
+	public JComboBox getJComboOptions() {
+		if (jComboOptions == null){
+		String[] selection = {PluginServices.getText(this, "recents_transformation"),
+				PluginServices.getText(this, "transformacion_epsg"),
+					PluginServices.getText(this, "transformacion_manual"), 
+					PluginServices.getText(this, "nadgrids")}; 
+			jComboOptions = new JComboBox(selection);
+			//jComboOptions=new JComboBox();
+			jComboOptions.setPreferredSize(new Dimension(180,25));	
+			jComboOptions.setSelectedIndex(0);
+			jComboOptions.addActionListener(this);
+		}
+		
+		return jComboOptions;
+	}
+	
+	/**
+	 * Mtodo para aplicarle los eventos necesarios en el panel actual. La
+	 * definicin de estos listeners estarn en la clase CRSMainTrPanelListener
+	 *
+	 */
+	private void setListeners(){
+
+		TransformationCompuestaPanelListener listener = new TransformationCompuestaPanelListener(this, crsMainTrPanel);
+		
+		getJComboOptions().addActionListener(listener);
+		getRecentsTrPanel().getJButtonInfo().addActionListener(listener);
+				 
+        ListSelectionModel rowSMEpsgTr = getEpsgTrPanel().getJTable().getSelectionModel();
+		rowSMEpsgTr.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMRecentsTr = getRecentsTrPanel().getJTable().getSelectionModel();
+		rowSMRecentsTr.addListSelectionListener(listener);
+		
+		getNadsTrPanel().getJComboNadFile().addItemListener(listener);
+		
+		getManualTrPanel().getTx_Translation().addKeyListener(listener);
+		getManualTrPanel().getTy_Translation().addKeyListener(listener);
+		getManualTrPanel().getTz_Translation().addKeyListener(listener);
+		getManualTrPanel().getTx_Rotation().addKeyListener(listener);
+		getManualTrPanel().getTy_Rotation().addKeyListener(listener);
+		getManualTrPanel().getTz_Rotation().addKeyListener(listener);
+		getManualTrPanel().getTscale().addKeyListener(listener);
+	}
+
+		
+	public void actionPerformed(ActionEvent e) {
+		//Al cambiar el item seleccionado del combo
+		if(e.getSource().equals(getJComboOptions())){
+			CardLayout cl = (CardLayout)(pCenter.getLayout());
+			if(getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"recents_transformation"))){
+				//Mostrar el panel de transformacin reciente
+				 cl.show(pCenter, "recents");
+			}
+			else if(getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_epsg"))){
+		
+				//mostrar el panel de transformacin epsg
+				 cl.show(pCenter, "epsg");
+			}
+			else if(getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_manual"))){
+		
+				
+				//mostrar el panel de transformacin manual
+				 cl.show(pCenter, "manual");
+			}
+			else if(getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"nadgrids"))){
+			//mostrar el panel de nadgrids
+				 cl.show(pCenter, "nad");
+			}
+		}
+		
+	}
+	
+	public TransformationEpsgPanel getEpsgTrPanel() {
+		return epsgTrPanel;
+	}
+
+	public TransformationManualPanel getManualTrPanel() {
+		return manualTrPanel;
+	}
+
+	public TransformationNadgridsPanel getNadsTrPanel() {
+		return nadsTrPanel;
+	}
+	
+	public TransformationRecentsPanel getRecentsTrPanel() {
+		return recentsTrPanel;
+	}
+	
+	public void setCrs_target(String authTarget) {
+		crs_target = authTarget;
+		getLblCrsVistaCode().setText(authTarget);
+	}
+	
+	public String getCrs_target() {
+		return crs_target;
+	}
+	
+	public void setCrs_source(String authority) {
+		crs_source = authority;
+		setSourceAbrev(authority);
+	}
+	
+	public String getCrs_source() {
+		return crs_source;
+	}
+	
+	public void fillData() {
+		String[] source = getCrs_source().split(":");
+		String[] target = getCrs_target().split(":");
+		recentsTrPanel.loadRecentsCompuesta(getCrs_target());
+		epsgTrPanel.setSourceCompuesta(getCrs_target());		
+		nadsTrPanel.setCode(Integer.parseInt(source[1]));
+		nadsTrPanel.setSourceAbrev(source[0], source[1]);
+		nadsTrPanel.setTargetAbrev(target[0], target[1]);
+		nadsTrPanel.getJComboNadFile().setSelectedIndex(0);
+		manualTrPanel.setCode(Integer.parseInt(source[1]));
+		manualTrPanel.setSourceAbrev(source[0], source[1]);
+		manualTrPanel.setTargetAbrev(target[0], target[1]);
+		getJComboOptions().setSelectedIndex(0);
+		/*
+		 * Se dice que no es una transformacion cogida de las recientes compuestas
+		 * para un correcto funcionamiento de los botones.
+		 */
+		setRecentCompTransformation(false);
+	}
+	
+	public void setSourceAbrev(String fuente){
+		sourceAbrev = fuente;		
+	}
+	
+	public String getSourceAbrev(){
+		return sourceAbrev;
+	}
+	
+	public ICrs getProjection() {
+		ICrs crs;		
+		try {
+			crs = new CrsFactory().getCRS(getSourceAbrev());
+			crs.setTransformationParams(getSourceTransformation(),getTargetTransformation());//nadFile);
+			return crs;
+		} catch (org.gvsig.crs.CrsException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	public void setSourceTransformation(String trans) {
+		sourceTransformation = trans;
+	}
+	
+	public String getSourceTransformation() {
+		return sourceTransformation;
+	}
+	
+	public void setTargetTransformation(String trans) {
+		targetTransformation = trans;
+	}
+	
+	public String getTargetTransformation() {
+		return targetTransformation;
+	}
+	
+	public String getParamsEpsg(String [] values) {
+		String params = "+towgs84=";
+		params += values[0];
+		for(int i = 1; i < values.length; i++)
+			params +=","+values[i];
+		return params;
+	}
+		
+	public String getManualParams() {
+		if(getManualTrPanel().getTx_Translation().getText().equals("")){
+			getManualTrPanel().getTx_Translation().setText("0");
+		}
+		else if (getManualTrPanel().getTy_Translation().getText().equals("")){
+			getManualTrPanel().getTy_Translation().setText("0");
+		}
+		else if (getManualTrPanel().getTz_Translation().getText().equals("")){
+			getManualTrPanel().getTz_Translation().setText("0");
+		}
+		else if (getManualTrPanel().getTx_Rotation().getText().equals("")){
+			getManualTrPanel().getTx_Rotation().setText("0");
+		}
+		else if (getManualTrPanel().getTy_Rotation().getText().equals("")){
+			getManualTrPanel().getTy_Rotation().setText("0");
+		}
+		else if (getManualTrPanel().getTz_Rotation().getText().equals("")){
+			getManualTrPanel().getTz_Rotation().setText("0");
+		}
+		else if (getManualTrPanel().getTscale().getText().equals("")){
+			getManualTrPanel().getTscale().setText("0");
+		}		
+		String param = "+towgs84="+ getManualTrPanel().getTx_Translation().getText()+","+
+						getManualTrPanel().getTy_Translation().getText()+","+
+						getManualTrPanel().getTz_Translation().getText()+","+
+						getManualTrPanel().getTx_Rotation().getText()+","+
+						getManualTrPanel().getTy_Rotation().getText()+","+
+						getManualTrPanel().getTz_Rotation().getText()+","+
+						getManualTrPanel().getTscale().getText() + " ";
+		return param;		
+	}
+	
+	public String getNadsParams(String info) {
+		String[] partes = info.split("\\(");
+		String nadFile = partes[0];		
+		return "+nadgrids="+nadFile;
+	}
+	
+	/**
+	 * cuando utilizamos crs+transformacion, cargamos los paneles para que
+	 * el usuario pueda consultar la transformacion utilizada...
+	 * @param details
+	 */
+	public void fillData(String details) {
+		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+		TrData crsTrDataArray[] = trPersistence.getArrayOfTrData();
+		CompTrData comp = null;
+		
+		for (int iRow = crsTrDataArray.length-1; iRow >= 0; iRow--) {
+			if (details.equals(crsTrDataArray[iRow].getAuthority()+":"+crsTrDataArray[iRow].getCode()+" <--> "+crsTrDataArray[iRow].getDetails()) && crsTrDataArray[iRow].getAuthority().equals(PluginServices.getText(this, "COMP"))) {
+				comp = (CompTrData) crsTrDataArray[iRow];				
+				break;
+			}
+		}
+		if (comp.getSecondTr().getAuthority().equals(PluginServices.getText(this, "EPSG"))) {
+			getJComboOptions().setSelectedIndex(1);
+			int cod =Integer.parseInt(comp.getFirstTr().getCrsSource().split(":")[1]);
+			String code = String.valueOf(comp.getSecondTr().getCode());
+			//getEpsgTrPanel().setSource(PluginServices.getText(this, "EPSG"), cod);
+			for (int i=0; i< getEpsgTrPanel().getJTable().getRowCount(); i++) {
+				if (code.equals((String)getEpsgTrPanel().getJTable().getValueAt(i, 0))) {
+					//seleccionarlo						
+					getEpsgTrPanel().getJTable().setRowSelectionInterval(i,i);
+					break;						
+				}
+			}
+		} else if (comp.getSecondTr().getAuthority().equals(PluginServices.getText(this, "USR"))) {
+			getJComboOptions().setSelectedIndex(2);
+			String data = comp.getSecondTr().getDetails();
+			data = data.trim().substring(1, data.length()-1);
+			String values[] = data.split(",");
+			getManualTrPanel().getTx_Translation().setText(values[0]);
+			getManualTrPanel().getTy_Translation().setText(values[1]);
+			getManualTrPanel().getTz_Translation().setText(values[2]);
+			getManualTrPanel().getTx_Rotation().setText(values[3]);
+			getManualTrPanel().getTy_Rotation().setText(values[4]);
+			getManualTrPanel().getTz_Rotation().setText(values[5]);
+			getManualTrPanel().getTscale().setText(values[6]);
+			
+		} else if (comp.getSecondTr().getAuthority().equals(PluginServices.getText(this, "NADGR"))) {
+			getJComboOptions().setSelectedIndex(3);
+			String data[] = comp.getSecondTr().getDetails().split(" ");
+			String fichero = data[0];
+			String[] authority = data[1].substring(1,data[1].length()-1).split(":");
+			//Mirar como indicarle el CRS al que se le aplica...			
+			getNadsTrPanel().setSourceAbrev(authority[0], authority[1]);
+			
+			for (int i = 0; i< getNadsTrPanel().getJComboNadFile().getItemCount(); i++) {
+				if (fichero.equals((String)getNadsTrPanel().getJComboNadFile().getItemAt(i))) {
+					getNadsTrPanel().getJComboNadFile().setSelectedIndex(i);
+					break;
+				}
+			}			
+		}
+		/*
+		 * Por aquí solo pasa cuando se ha seleccionado una transformación compuesta de recientes.
+		 * Pondremos el valor de que es un crs compuesto reciente a true para que el botón de siguiente
+		 * salga habilitado.
+		 */
+		setRecentCompTransformation(true);
+	}
+	
+	public void setRecentCompTransformation(boolean state) {
+		recentCompTransformation = state;
+	}
+	
+	public boolean getRecentCompTransformation() {
+		return recentCompTransformation;
+	}
+	
+	public void resetData() {
+		fillData();
+	}
+	
+	public boolean isSthSelected() {
+		if (getRecentsTrPanel().selectedRowTable == -1)
+			return false;
+		return true;
+	}
+	
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationVistaPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/IAU2000panel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/IAU2000panel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/IAU2000panel.java	(revision 25287)
@@ -0,0 +1,596 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import javax.swing.BorderFactory;
+import javax.swing.ButtonGroup;
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+import javax.swing.ListSelectionModel;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.ogr.Iau2wkt;
+
+import com.iver.andami.PluginServices;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+import es.idr.teledeteccion.connection.EpsgConnection;
+import es.idr.teledeteccion.connection.Query;
+
+/**
+ * Clase que genera el panel para la bsqueda de CRS del repositorio
+ * de la IAU2000
+ * 
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ * @author Luisa Marina Fernndez (luisam.fernandez@uclm.es)
+ *
+ */
+public class IAU2000panel extends JPanel implements KeyListener, ActionListener {
+
+	private static final long serialVersionUID = 1L;
+	public JPanel IAU2000panel = null;
+	
+	private JRadioButton codeRadioButton = null;
+	private JRadioButton nameRadioButton = null;	
+	private JPanel groupRadioButton = null;
+	private JButton infoCrs=null;
+	
+	JLabel jLabel = null;
+	private JLabel lblCriterio=null;
+	JTextField crsTextFld = null;	
+	
+	String cadWKT = "";
+	
+	int transf = 0;	
+	boolean source_yn = false;
+	int source_cod = 0;
+	int method_code = 0;
+	int datum_code = 0;
+	int projection_conv_code = 0;
+	public String crs_kind = null;
+
+	public TableSorter sorter = null;
+	
+	public EpsgConnection connect = null;
+	
+
+	private JButton searchButton = null;
+	private JTextField searchTextField = null;
+	public JTable jTable = null;
+	private JScrollPane jScrollPane = null;
+	public DefaultTableModel dtm = null;
+	
+	public String key;
+	public int selectedRowTable = -1;	
+	private int codeCRS = -1;	
+	
+	public IAU2000panel() {		
+		initialize();
+	}
+	/*
+	 * Establece las propiedades y los componentes del panel de la IAU2000
+	 */
+	private void initialize(){
+		this.setLayout(new BorderLayout());
+		JPanel pNorth=new JPanel();
+		JPanel pInNorth=new JPanel();
+		JPanel pSouth=new JPanel();
+		//Agregar las opciones de bsqueda
+		pInNorth.setLayout(new FlowLayout(FlowLayout.CENTER,10,1));
+		pInNorth.add(getSearchButton());
+		pInNorth.add(getSearchTextField());
+		
+		pNorth.setLayout(new GridLayout(0,1));
+		pNorth.add(getGroupRadioButton());
+		pNorth.add(pInNorth);
+		
+		pSouth.setLayout(new FlowLayout(FlowLayout.RIGHT,5,5));
+		pSouth.add(getInfoCrs());
+		//Agregar estos elementos al panel principal
+		this.add(pNorth,BorderLayout.NORTH);
+		this.add(getJScrollPane(),BorderLayout.CENTER);
+		this.add(pSouth,BorderLayout.SOUTH);
+	}
+	
+	public void connection(){
+		connect = new EpsgConnection();
+		connect.setConnectionIAU2000();
+		
+	}
+	/**
+	 * Inicializa el Radio Button 'Cdigo' 
+	 * @return
+	 */
+	private JRadioButton getCodeRadioButton() {
+		if (codeRadioButton == null) {
+			codeRadioButton = new JRadioButton();
+			codeRadioButton.setText(PluginServices.getText(this,"por_codigo"));//setText("By Code EPSG");
+			codeRadioButton.setSelected(true);
+			codeRadioButton.addActionListener(this);
+		}
+		return codeRadioButton;
+	}
+	/**
+	 * Inicializa el Radio Button  'Nombre'
+	 * @return
+	 */
+	private JRadioButton getNameRadioButton() {
+		if (nameRadioButton == null) {
+			nameRadioButton = new JRadioButton();
+			nameRadioButton.setText(PluginServices.getText(this,"por_nombre"));
+			nameRadioButton.addActionListener(this);
+		}
+		return nameRadioButton;
+	}
+	/**
+	 * Agrega todos los Radio Buttons a un panel
+	 * @return
+	 */
+	private JPanel getGroupRadioButton() {
+		if (groupRadioButton == null) {
+			groupRadioButton = new JPanel();
+			groupRadioButton.setLayout(new GridLayout(1,0));
+			groupRadioButton.setPreferredSize(new Dimension(500,30));
+			groupRadioButton.add(getLblCriterio());
+			groupRadioButton.add(getCodeRadioButton());
+			groupRadioButton.add(getNameRadioButton());	
+			//Agrupar los Radio Buttons
+			ButtonGroup group=new ButtonGroup();
+			group.add(getCodeRadioButton());
+			group.add(getNameRadioButton());
+		}
+		return groupRadioButton;
+	}
+	/**
+	 * Inicializa el Label que nombra el Criterio de Bsqueda
+	 * @return
+	 */
+	private JLabel getLblCriterio(){
+		if(lblCriterio==null){
+			lblCriterio = new JLabel();
+			lblCriterio.setPreferredSize(new Dimension(100, 20));
+			lblCriterio.setText(PluginServices.getText(this, "criterio_busqueda"));
+		}
+		return lblCriterio;
+	}
+	
+	/**
+	 * Mtodo que controla la bsqueda de CRS del repositorio de IAU2000.
+	 * Tambien maneja los errores en caso de que los parmetros de bsqueda
+	 * sean errneos, o que no se encuentren resultados.
+	 *
+	 */
+	private void searchButton() {		
+		searchTextField.setBackground(Color.white);
+		boolean not_numeric = false;
+		
+		if (searchTextField.getText().equals("")) {
+			searchTextField.setBackground(new Color(255,204,204));
+			JOptionPane.showMessageDialog(this, PluginServices.getText(this,"fill_name"), "Warning...", JOptionPane.WARNING_MESSAGE);
+		}
+		
+		else {
+            //Eliminar filas en cada nueva bsqueda
+			int numRow = dtm.getRowCount();
+			while (numRow != 0) {
+				numRow = numRow - 1;
+				dtm.removeRow(numRow);
+			}
+			
+			if (codeRadioButton.isSelected() && (searchTextField.getText().length()!=searchTextField.getText().replaceAll("[^0-9]", "").length())){
+				not_numeric = true;
+			}
+			
+			//Dependiendo de la opcion se realizada una busqueda
+			ResultSet result = null;
+								  			
+			if (codeRadioButton.isSelected() && !not_numeric) {
+					
+				key = searchTextField.getText();
+				int code = Integer.parseInt(key);
+				String sentence = "SELECT iau_code, iau_wkt, iau_proj, iau_geog, iau_datum " +							 
+								  "FROM IAU2000 " +	                              
+	                              "WHERE iau_code = " + code;
+								
+				result = Query.select(sentence,connect.getConnection());	
+				
+				
+				Object[] data = new Object[4];
+				try {
+					while (result.next()){
+						data[0]	= result.getString("iau_code");
+						data[1] = result.getString("iau_wkt");
+						String proj = result.getString("iau_proj");
+						if (!proj.equals("")){
+							data[1] = proj;
+							data[2] = PluginServices.getText(this,"si");
+						} 
+						else 
+						{
+							data[1] = result.getString("iau_geog");
+							data[2] = PluginServices.getText(this,"no");
+						}
+						
+						data[3] = result.getString("iau_datum");
+						dtm.addRow(data);
+					}
+				} catch (SQLException e1) {
+					e1.printStackTrace();
+				}
+			}
+			else if (nameRadioButton.isSelected()) {
+				key = searchTextField.getText();
+				key = key.toLowerCase();
+				String key2 = key.substring(0,1);
+				String key3 = key.substring(1,key.length());
+				key2 = key2.toUpperCase();
+				
+				String sentence = "SELECT iau_code, iau_wkt, iau_proj, iau_geog, iau_datum " +							 
+					"FROM IAU2000 " +	                              
+					"WHERE (iau_proj LIKE '%" + key + "%') OR (iau_proj LIKE '%"+ 
+					key.toUpperCase() +"%') " +
+					"OR (iau_proj LIKE '%" + key2+key3 +"%') OR " +
+							"(iau_geog LIKE '%" + key + "%') OR (iau_geog LIKE '%"+ 
+					key.toUpperCase() +"%') " +
+					"OR (iau_geog LIKE '%" + key2+key3 +"%')";
+								
+				result = Query.select(sentence,connect.getConnection());	
+								
+				Object[] data = new Object[4];
+				try {
+					while (result.next()){
+						data[0]	= result.getString("iau_code");
+						data[1] = result.getString("iau_wkt");
+						String proj = result.getString("iau_proj");
+						if (!proj.equals("")){
+							data[1] = proj;
+							data[2] = PluginServices.getText(this,"si");
+						} 
+						else 
+						{
+							data[1] = result.getString("iau_geog");
+							data[2] = PluginServices.getText(this,"no");
+						}
+						
+						data[3] = result.getString("iau_datum");
+						dtm.addRow(data);
+					}
+				} catch (SQLException e1) {
+					e1.printStackTrace();
+				}
+			}
+						
+			int numr = dtm.getRowCount();
+			if (not_numeric) {
+				JOptionPane.showMessageDialog(IAU2000panel.this, 
+						PluginServices.getText(this,"numeric_format"), 
+						"Warning...", JOptionPane.WARNING_MESSAGE);
+				searchTextField.setText("");
+			}
+			else if (numr == 0){
+			JOptionPane.showMessageDialog(this, PluginServices.getText(this,"no_results"), "Warning...",
+					JOptionPane.WARNING_MESSAGE);
+			}
+			else{
+				this.getJTable().setRowSelectionInterval(0,0);				
+			}
+		}		
+	}	
+		
+	private JButton getSearchButton() {
+		if (searchButton == null) {
+			searchButton = new JButton();
+			searchButton.setPreferredSize(new Dimension(75,20));
+			searchButton.setText(PluginServices.getText(this,"buscar"));
+			searchButton.setMnemonic('S');
+			searchButton.setToolTipText(PluginServices.getText(this,"buscar_por_criterio_seleccion"));
+			searchButton.addActionListener(this);			
+		}
+		return searchButton;
+	}	
+	
+	/**
+	 * Inicializa el botn que obtiene la informacin del CRS
+	 * @return
+	 */
+	public JButton getInfoCrs() {
+		if(infoCrs == null) {
+			infoCrs = new JButton();
+			infoCrs.setPreferredSize(new Dimension(85,20));
+			infoCrs.setText(PluginServices.getText(this,"infocrs"));
+			infoCrs.setMnemonic('I');
+			infoCrs.setEnabled(false);
+			infoCrs.setToolTipText(PluginServices.getText(this,"more_info"));
+			infoCrs.addActionListener(this);
+		}
+		return infoCrs;
+	}
+	private JTextField getSearchTextField() {
+		if (searchTextField == null) {
+			searchTextField = new JTextField();
+			searchTextField.setPreferredSize(new Dimension(300,20));
+			searchTextField.addKeyListener(this);
+		}		
+		return searchTextField;
+	}
+	
+	public JTable getJTable() {
+		if (jTable == null) {
+			String[] columnNames= {PluginServices.getText(this,"codigo"),
+					PluginServices.getText(this,"nombre"),
+					PluginServices.getText(this,"projected"),
+					PluginServices.getText(this,"datum")};
+			Object[][]data = {};			
+			dtm = new DefaultTableModel(data, columnNames)
+			 {
+				private static final long serialVersionUID = 1L;
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}
+				/*
+				 * metodo necesario para cuando utilizamos tablas ordenadas
+				 * ya que sino al ordenar por algun campo no se queda con el orden
+				 * actual al seleccionar una fila (non-Javadoc)
+				 * @see javax.swing.table.TableModel#getColumnClass(int)
+				 */
+				public Class getColumnClass(int column)
+				{
+					return getValueAt(0, column).getClass();
+				}
+				};
+			sorter = new TableSorter(dtm);			
+
+			jTable = new JTable(sorter);
+			sorter.setTableHeader(jTable.getTableHeader());			
+			jTable.setCellSelectionEnabled(false);
+			jTable.setRowSelectionAllowed(true);
+			jTable.setColumnSelectionAllowed(false);
+			jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			TableColumn column = null;
+			for (int i = 0; i < columnNames.length; i++) {
+			    column = jTable.getColumnModel().getColumn(i);
+			    if (i == 0) {
+			        column.setPreferredWidth(80); //code column is shorter			     	
+			    }else if (i ==2) {
+			    	column.setPreferredWidth(50);
+			    } else {
+			    	column.setPreferredWidth(175);
+			    }
+			    
+			}			
+	}
+		return jTable;
+		
+	}
+	
+	public void setCodeCRS(int code) {
+		codeCRS = code;
+	}
+	
+	public int getCodeCRS() {
+		return codeCRS;
+	}	
+	
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane();
+			jScrollPane.setPreferredSize(new Dimension(500,150));
+			/*jScrollPane.setBorder(
+				    BorderFactory.createCompoundBorder(
+					BorderFactory.createCompoundBorder(
+							BorderFactory.createTitledBorder(PluginServices.getText(this,"IAU2000")),
+							BorderFactory.createEmptyBorder(5,5,5,5)),
+							jScrollPane.getBorder()));*/
+			jScrollPane.setBorder(
+				    BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(3,3,3,3),jScrollPane.getBorder()));
+			
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+	
+	public ICrs getProjection() {
+		try {
+			String txt = getWKT();			
+			//ICrs crs = new CrsFactory().getCRS("IAU2000:"+getCodeCRS(), txt); 
+			ICrs crs = new CrsFactory().getCRS("IAU2000:"+getCodeCRS());
+			return crs ;
+		} catch (CrsException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	/**
+	 * Consigue la cadena wkt del CRS seleccionado, y genera la cadena que ms
+	 * tarde volver a ser tratada para la consecucin de una cadena wkt
+	 * legible por la proj4.
+	 *
+	 */
+	public void setWKT(){
+		int code = getCodeCRS();
+		String sentence = "SELECT iau_wkt " +							 
+						  "FROM IAU2000 " +	                              
+                          "WHERE iau_code = " + code;
+		
+		
+		ResultSet result = Query.select(sentence,connect.getConnection());	
+	
+		try {
+			result.next();			
+			cadWKT = result.getString("iau_wkt");			
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}		
+		cadWKT = cadWKT.substring(0, cadWKT.length()-1) + ", AUTHORITY[\"IAU2000\","+ getCodeCRS()+"]]";
+		if (cadWKT.charAt(0) == 'P'){
+			Iau2wkt wk = new Iau2wkt(cadWKT);
+			cadWKT = wk.getWkt();
+		}
+	}
+	
+	public String getWKT(){
+		return cadWKT;
+	}
+	
+	public void setProjection(IProjection crs) {
+		//setCrs((ICrs) crs);
+	}
+	
+	/**
+	 * Metodo para cargar en el CRS de la capa el CRS de la vista.
+	 * Se utilizar a la hora de arrancar la definicin del CRS de la nueva capa
+	 */
+	public void loadViewCRS(int code){
+		connection();		
+		String sentence = "SELECT iau_code, iau_wkt, iau_proj, iau_geog, iau_datum " +							 
+						  "FROM IAU2000 " +	                              
+                          "WHERE iau_code = " + code;
+				
+		ResultSet result = Query.select(sentence,connect.getConnection());	
+				
+		Object[] data = new Object[4];
+		try {
+			while (result.next()){
+				data[0]	= result.getString("iau_code");
+				data[1] = result.getString("iau_wkt");
+				String proj = result.getString("iau_proj");
+				if (!proj.equals("")){
+					data[1] = proj;
+					data[2] = PluginServices.getText(this,"si");
+				} 
+				else 
+				{
+					data[1] = result.getString("iau_geog");
+					data[2] = PluginServices.getText(this,"no");
+				}
+				
+				data[3] = result.getString("iau_datum");
+				dtm.addRow(data);
+			}
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}
+	}
+
+	public void keyPressed(KeyEvent e) {
+		if (e.getSource() == this.getSearchTextField()){
+			if (e.getKeyCode() == 10) {
+				searchTextField.setBackground(Color.white);
+				if (searchTextField.getText().equals("")) {
+					searchTextField.setBackground(new Color(255,204,204));
+					JOptionPane.showMessageDialog(IAU2000panel.this, 
+							PluginServices.getText(this,"fill_name"), 
+							"Warning...", JOptionPane.WARNING_MESSAGE);
+				}
+				else {
+					searchButton();
+				}
+			}			
+		}		
+	}
+
+	public void keyReleased(KeyEvent arg0) {
+	
+	}
+
+	public void keyTyped(KeyEvent arg0) {
+	
+	}
+
+	/**
+	 * Maneja los eventos de los botones y los radioButtons del panel
+	 * del repositorio IAU2000.
+	 */
+	public void actionPerformed(ActionEvent e) {
+		if (e.getSource() == this.getSearchButton()){
+			searchTextField.setBackground(Color.white);
+			if (searchTextField.getText().equals("")) {
+				searchTextField.setBackground(new Color(255,204,204));
+				JOptionPane.showMessageDialog(IAU2000panel.this, 
+						PluginServices.getText(this,"fill_name"), 
+						"Warning...", JOptionPane.WARNING_MESSAGE);
+			}
+			else {
+				searchButton();
+			}
+		}
+		if (e.getSource() == this.getCodeRadioButton()) {
+			searchTextField.setText("");
+		}
+		
+		if (e.getSource() == this.getNameRadioButton()) {
+			searchTextField.setText("");
+		
+		}	
+		
+		/*Si el objeto que genera el evento es el JButton 'InfoCrs'
+		se muestra la informacin ralicionada con el Crs seleccionado en la tabla*/
+		if (e.getSource() == this.getInfoCrs()) {
+			InfoCRSPanel info = new InfoCRSPanel("IAU2000", getCodeCRS());
+			PluginServices.getMDIManager().addWindow(info);
+		}
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/IAU2000panel.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/USGSpanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/USGSpanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/USGSpanel.java	(revision 25287)
@@ -0,0 +1,10 @@
+package org.gvsig.crs.gui.panels;
+
+public class USGSpanel {
+
+	public USGSpanel() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/USGSpanel.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationNadgridsPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationNadgridsPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationNadgridsPanel.java	(revision 25287)
@@ -0,0 +1,625 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.RandomAccessFile;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JFileChooser;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JTextArea;
+import javax.swing.border.EmptyBorder;
+import javax.swing.filechooser.FileFilter;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.CrsWkt;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+import org.gvsig.crs.persistence.RecentTrsPersistence;
+import org.gvsig.crs.persistence.TrData;
+
+import au.com.objectix.jgridshift.GridShiftFile;
+import au.com.objectix.jgridshift.SubGrid;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+import com.iver.utiles.XMLEntity;
+
+/**
+ * Clase para generar el panel de la tranformacin nadgrids y su
+ * manejo
+ * 
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ * @author Luisa Marina Fernndez (luisam.fernandez@uclm.es)
+ *
+ */
+public class TransformationNadgridsPanel extends JPanel implements IWindow, ActionListener {
+	
+	private static final long serialVersionUID = 1L;
+	
+	private JPanel groupRadioButton = null;
+	private JLabel jLabelChooser = null;
+	private JRadioButton jRadioButtonSource = null;
+	private JRadioButton jRadioButtonTarget = null;
+	
+	private IProjection firstProj;
+	private String nadFile = null;
+	String[] targetAuthority;
+	String targetAbrev = "";
+	String sourceAbrev = "";
+	
+	private String cadWKT = "";
+	private String dataPath = "./gvSIG/extensiones/org.gvsig.crs/data/";
+	private int codeEpsg;
+	
+	private JPanel jPanelOpen;
+	private JPanel jPanelSelectNad;
+	private JLabel jLabelOpenGsb;
+	private JFileChooser openFileChooser;
+	private JButton jButtonOpen;
+	private TreePanel treePanel = null;
+	private JComboBox jComboNadFile = null;
+	private JLabel jLabelSelectNad = null;
+	
+	
+	private JTextArea jTextAreaInfo;
+	
+	private PluginServices ps = null;
+	private XMLEntity xml = null;
+	
+	boolean targetNad = false;
+	boolean setRadioButtons = false;
+
+	public TransformationNadgridsPanel(boolean optional) {
+		ps = PluginServices.getPluginServices("org.gvsig.crs"); 
+		xml = ps.getPersistentXML();
+		setRadioButtons = optional;
+		initialize();
+	}
+		
+	private void initialize(){
+		
+		this.setLayout(new BorderLayout());
+		this.setBorder(BorderFactory.createCompoundBorder(
+				BorderFactory.createTitledBorder("+ "+PluginServices.getText(this,"nadgrids")),
+				BorderFactory.createEmptyBorder(5,5,5,5)));
+		JPanel pNorth=new JPanel();
+		pNorth.setBorder(new EmptyBorder(1,10,1,10));
+		pNorth.setLayout(new GridLayout(4,1));
+		
+		pNorth.add(getJPanelOpen());
+		//label+combo
+		pNorth.add(getJPanelSelectNad());
+		JPanel lbl=new JPanel(new FlowLayout(FlowLayout.LEFT,0,10));
+		lbl.add(getJLabelChooser());
+		if (setRadioButtons) {
+			pNorth.add(lbl);
+			//dos radio buttons
+			pNorth.add(getGroupRadioButton());
+		}
+		this.add(pNorth,BorderLayout.NORTH);
+		this.add(getTreePanel(),BorderLayout.CENTER);
+		
+	}
+	
+	private JPanel getGroupRadioButton() {
+		if (groupRadioButton == null) {
+			groupRadioButton = new JPanel();
+			groupRadioButton.setLayout(new GridLayout(1,0));	
+			groupRadioButton.add(getJRadioButtonSource());
+			groupRadioButton.add(getJRadioButtonTarget());			
+		}
+		return groupRadioButton;
+	}
+	
+	private JRadioButton getJRadioButtonSource() {
+		if (jRadioButtonSource == null) {
+			jRadioButtonSource = new JRadioButton();			
+			jRadioButtonSource.setSelected(true);
+			jRadioButtonSource.addActionListener(this);
+		}
+		jRadioButtonSource.setText(PluginServices.getText(this,"aplicar_capa") + " " + "("+getSourceAbrev()+")" );
+		return jRadioButtonSource;
+	}
+	
+	
+	private JRadioButton getJRadioButtonTarget() {		
+		if (jRadioButtonTarget == null) {
+			jRadioButtonTarget = new JRadioButton();			
+			jRadioButtonTarget.setSelected(false);
+			jRadioButtonTarget.addActionListener(this);
+		}
+		jRadioButtonTarget.setText(PluginServices.getText(this,"aplicar_vista") + " " + "("+ getTargetAbrev()+")");
+		return jRadioButtonTarget;
+	}	
+	
+	private JLabel getJLabelChooser(){
+		jLabelChooser = new JLabel();
+		jLabelChooser.setText(PluginServices.getText(this, "seleccion_nadgrids")+":");
+		return jLabelChooser;
+	}
+		
+		
+	private JPanel getJPanelOpen() {
+		if(jPanelOpen == null) {
+			jPanelOpen = new JPanel();
+			jPanelOpen.setLayout(new FlowLayout(FlowLayout.LEFT,5,5));
+			jPanelOpen.add(getJLabelOpenGsb(), null);
+			jPanelOpen.add(getJButtonOpen(), null);			
+		}
+		return jPanelOpen;
+	}
+	
+	private JLabel getJLabelOpenGsb() {
+		if(jLabelOpenGsb == null) {
+			jLabelOpenGsb = new JLabel();
+			jLabelOpenGsb.setPreferredSize(new Dimension(130,20));
+			jLabelOpenGsb.setText(PluginServices.getText(this,"importarRejilla"));
+		}
+		return jLabelOpenGsb;
+	}
+	
+	private JFileChooser getOpenFileChooser(){
+		if(openFileChooser == null){
+			openFileChooser = new JFileChooser();			
+			openFileChooser.setEnabled(false);
+			openFileChooser.addChoosableFileFilter(new FiltroNadgrids());
+		}
+		return openFileChooser;
+	}
+
+	private JButton getJButtonOpen() {
+		if(jButtonOpen == null) {
+			jButtonOpen = new JButton();
+			jButtonOpen.setText("");
+			jButtonOpen.setPreferredSize(new Dimension(20,20));
+			jButtonOpen.setText("...");
+			jButtonOpen.addActionListener(this);
+		}
+		return jButtonOpen;
+	}
+	
+	public ICrs getProjection() {
+		ICrs crs;
+		if (jRadioButtonSource.isSelected()){
+			try {
+				setNad(false);
+				//crs = new CrsFactory().getCRS(getSourceAbrev(),	getWKT());
+				crs = new CrsFactory().getCRS(getSourceAbrev());
+				crs.setTransformationParams("+nadgrids="+getNadFile(),null);//nadFile);
+				return crs;
+			} catch (org.gvsig.crs.CrsException e) {
+				e.printStackTrace();
+			}
+			return null;
+		}
+		else {	
+			setNad(true);
+			try {
+				//crs = new CrsFactory().getCRS(getSourceAbrev(), getWKT());
+				crs = new CrsFactory().getCRS(getSourceAbrev());
+				crs.setTransformationParams(null,"+nadgrids="+getNadFile());//nadFile);
+				//crs.setParamsInTarget(true);
+				
+				return crs;
+			} catch (CrsException e) {				
+				e.printStackTrace();
+			}
+			return null;
+		}		
+	}
+	
+	public void setProjection(IProjection proj) {
+		firstProj = proj;
+	}
+	
+	public void setNad(boolean nadg){
+		targetNad = nadg;		
+	}
+	
+	public boolean getNad(){
+		return targetNad;		
+	}
+	
+	public void setCode(int cod){
+		codeEpsg = cod;
+	}
+	
+	public int getCode(){
+		return codeEpsg;
+	}
+	
+	public void setWKT(String cad){
+		cadWKT = cad;
+		CrsWkt parser = new CrsWkt(cad);
+		//setSourceAbrev(parser.getAuthority()[0], parser.getAuthority()[1]);
+		//getJTextAreaInfo();
+		//getJRadioButtonSource();
+	}
+	
+	public String getWKT(){
+		return cadWKT;
+	}
+	
+	public void setTargetAuthority(String[] authority){
+		targetAuthority = authority;
+		setTargetAbrev(targetAuthority[0], targetAuthority[1]);
+		getJRadioButtonTarget();		
+	}
+	
+	public String[] getTargetAuthority(){
+		return targetAuthority;
+	}
+	
+	public void setTargetAbrev(String fuente, String codigo){
+		targetAbrev = fuente + ":" + codigo;
+	}
+	
+	public String getTargetAbrev() {
+		return targetAbrev;
+	}
+	
+	public void setSourceAbrev(String fuente, String codigo){
+		sourceAbrev = fuente + ":" + codigo;
+		getJRadioButtonSource();
+	}
+	
+	public String getSourceAbrev(){
+		return sourceAbrev;
+	}
+
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle(PluginServices.getText(this,"nadgrids"));
+		return m_viewinfo;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		if (e.getSource() == this.getJRadioButtonSource()){
+			jRadioButtonSource.setSelected(true);
+			jRadioButtonTarget.setSelected(false);
+		}
+		
+		if (e.getSource() == this.getJRadioButtonTarget()){
+			jRadioButtonTarget.setSelected(true);
+			jRadioButtonSource.setSelected(false);
+		}
+		
+		if (e.getSource() == this.getJButtonOpen()){
+			jPanelOpen.add(getOpenFileChooser(), null);
+			//openChooser.setCurrentDirectory(f);
+			int returnVal = openFileChooser.showOpenDialog(TransformationNadgridsPanel.this);
+	        if (returnVal == JFileChooser.APPROVE_OPTION) {
+	            File inFile = openFileChooser.getSelectedFile();
+	            //jTextOpen.setText(file.getAbsolutePath());
+
+	            String fileName = inFile.getName();
+	            
+	            //Comprobar que el fichero existe y tiene formato valido
+	    		RandomAccessFile raFile = null;
+	    		try {
+	    			raFile = new RandomAccessFile(inFile.getAbsolutePath(),"r");
+	    		} catch (FileNotFoundException ex) {
+	    			ex.printStackTrace();
+	    			getJComboNadFile().setSelectedIndex(0);
+	    			getTreePanel().setRoot(PluginServices.getText(this,"nadfile_not_found"));
+	    			setNadFile(null);//nadFile = null;
+	    			return;
+	    		}
+	    		GridShiftFile gsf = new GridShiftFile();
+	    		try {
+	    			gsf.loadGridShiftFile(raFile);
+	    		} catch (IOException ex) {
+	    			ex.printStackTrace();
+	    			getJComboNadFile().setSelectedIndex(0);
+	    			getTreePanel().setRoot(PluginServices.getText(this,"nadfile_bad_format"));
+	    			setNadFile(null);//nadFile = null;
+	    			return;
+	    		}catch (java.lang.Exception ex) {
+	    			ex.printStackTrace();
+	    			getJComboNadFile().setSelectedIndex(0);
+	    			getTreePanel().setRoot(PluginServices.getText(this,"nadfile_bad_format"));
+	    			setNadFile(null);//nadFile = null;
+	    			return;
+	    		}
+	            
+	            //Copiar el fichero seleccionado al directorio data de la extensin:
+	            
+	    		File outFile = new File(dataPath+fileName);
+	    		InputStream in = null;
+	    		OutputStream out = null;
+	    		try {
+	    			in = new FileInputStream(inFile);
+	    			out = new FileOutputStream(outFile);
+	    		} catch (FileNotFoundException ex) {
+	    			ex.printStackTrace();
+	    		}
+	    		byte[] buf = new byte[1024];
+	    		int len;
+	    		try {
+	    			while ((len = in.read(buf)) > 0) {
+	    				out.write(buf, 0, len);
+	    			}
+	    			in.close();
+	    			out.close();
+	    		} catch (IOException ex) {
+	    			ex.printStackTrace();
+	    		}
+	    		
+	    		//Incluir el fichero importado en el combo y seleccionarlo
+	    		boolean exists = false;
+	    		for (int item=0; item<getJComboNadFile().getItemCount() && !exists;item++)
+	    			if (getJComboNadFile().getItemAt(item).equals(fileName))
+	    				exists = true;
+	    		if(!exists)
+		    		getJComboNadFile().addItem(fileName);
+	    		getJComboNadFile().setSelectedItem(fileName);
+	    		setNadFile(fileName);//nadFile = fileName;
+	        }
+		}
+	}
+
+	public TreePanel getTreePanel() {
+		if (treePanel == null){
+			treePanel = new TreePanel(PluginServices.getText(this,"grids_en")+": "+nadFile);
+			treePanel.getTree().expandRow(0);
+			treePanel.setPanelSize(530,150);
+		}
+		return treePanel;
+	}
+	
+	public void initializeTree(){
+		// leer el fichero nadgrids
+		RandomAccessFile raFile = null;
+		try {
+			raFile = new RandomAccessFile("./gvSIG/extensiones/org.gvsig.crs/data/"+nadFile,"r");
+		} catch (FileNotFoundException e) {
+			e.printStackTrace();
+			getTreePanel().setRoot(PluginServices.getText(this,"nadfile_not_found"));
+			setNadFile(null);//nadFile = null;
+			return;
+		}
+		GridShiftFile gsf = new GridShiftFile();
+		try {
+			gsf.loadGridShiftFile(raFile);
+		} catch (IOException e) {
+			e.printStackTrace();
+			getTreePanel().setRoot(PluginServices.getText(this,"nadfile_bad_format"));
+			setNadFile(null);//nadFile = null;
+			return;
+		}catch (java.lang.Exception e) {
+			e.printStackTrace();
+			getTreePanel().setRoot(PluginServices.getText(this,"nadfile_bad_format"));
+			setNadFile(null);//nadFile = null;
+			return;
+		}
+		
+		SubGrid subGrid[] = gsf.getSubGridTree(); 
+		
+		for (int i=0;i<subGrid.length;i++){
+			getTreePanel().addClass(subGrid[i].getSubGridName(),i);
+			getTreePanel().addEntry(PluginServices.getText(this,"long_min")+": "+String.valueOf(subGrid[i].getMaxLon()/-3600)+"",subGrid[i].getSubGridName(), "");
+			getTreePanel().addEntry(PluginServices.getText(this,"lat_min")+": "+String.valueOf(subGrid[i].getMinLat()/3600)+"?",subGrid[i].getSubGridName(), "");
+			getTreePanel().addEntry(PluginServices.getText(this,"long_max")+": "+String.valueOf(subGrid[i].getMinLon()/-3600+"?"),subGrid[i].getSubGridName(), "");
+			getTreePanel().addEntry(PluginServices.getText(this,"lat_max")+": "+String.valueOf(subGrid[i].getMaxLat()/3600+""),subGrid[i].getSubGridName(), "");
+			getTreePanel().addEntry(PluginServices.getText(this,"node_count")+": "+String.valueOf(subGrid[i].getNodeCount()),subGrid[i].getSubGridName(), "");
+			getTreePanel().addEntry(PluginServices.getText(this,"detalles")+": "+String.valueOf(subGrid[i].getDetails()),subGrid[i].getSubGridName(), "");
+		}
+		getTreePanel().getTree().expandRow(0);
+		getTreePanel().getList().setText(PluginServices.getText(this,"advertencia_nad"));
+	}
+
+	public JComboBox getJComboNadFile() {
+		if (jComboNadFile == null){
+			jComboNadFile = new JComboBox();
+			jComboNadFile.setPreferredSize(new Dimension(200,25));
+			jComboNadFile.setEditable(false);
+			jComboNadFile.addItem(PluginServices.getText(this,"seleccionar")+"...");
+			//Aadir los al combo los nombres de los .gsb que hay en el directorio data
+			File dataDir = new File(dataPath);
+			for (int i = 0; i<dataDir.list().length;i++)
+				if (dataDir.list()[i].substring(dataDir.list()[i].lastIndexOf('.')+1).equals("gsb")){
+					jComboNadFile.addItem(dataDir.list()[i]);
+				}
+			if (getNadFile() != null)//nadFile != null)
+				jComboNadFile.setSelectedItem(getNadFile());//nadFile);
+						
+		}
+		return jComboNadFile;
+	}
+
+	public JLabel getJLabelSelectNad() {
+		if (jLabelSelectNad == null){
+			jLabelSelectNad = new JLabel(PluginServices.getText(this,"seleccionarRejilla")+":  ");
+			jLabelSelectNad.setPreferredSize(new Dimension(130,25));
+		}
+		return jLabelSelectNad;
+	}
+
+	public JPanel getJPanelSelectNad() {
+		if (jPanelSelectNad == null){
+			jPanelSelectNad = new JPanel();
+			jPanelSelectNad.setLayout(new FlowLayout(FlowLayout.LEFT,5,5));		
+			jPanelSelectNad.add(getJLabelSelectNad());
+			jPanelSelectNad.add(getJComboNadFile());
+		}
+		return jPanelSelectNad;
+	}
+	
+	public void setNadFile(String nad){
+		nadFile = nad;
+	}
+	
+	public String getNadFile(){
+		return nadFile;
+	}	
+	
+	/**
+	 * Guarda el nombre del fichero nadgrids mediante el modelo de persistencia
+	 * de Andami
+	 * @param name Nombre del fichero nadgrids
+	 */
+	public void saveNadFileName(String name){
+		ps = PluginServices.getPluginServices("org.gvsig.crs"); 
+		xml = ps.getPersistentXML();
+		
+		for (int child = 0; child<xml.getChildrenCount();child++)
+			if (xml.getChild(child).getPropertyName(0).equals("nadFile"))
+				xml.removeChild(child);
+		
+		
+		XMLEntity xmlEnt = new XMLEntity();
+		xmlEnt.putProperty("nadFile",name);
+		xml.addChild(xmlEnt);
+		ps.setPersistentXML(xml);
+	}
+	
+	/**
+	 * Obtiene el nombre del fichero nadgrids guardado mediante el
+	 * modelo de persistencia de Andami.
+	 * 
+	 * @return nombre del fichero nadgrids o null si no ha sido guardado.
+	 */
+	private String restoreNadFileName(){
+		String fileName;
+		for (int child = 0; child<xml.getChildrenCount();child++)
+			if (xml.getChild(child).getPropertyName(0).equals("nadFile")){
+				fileName = xml.getChild(child).getPropertyValue(0);
+				File dataDir = new File(dataPath);
+				for (int i = 0; i<dataDir.list().length;i++)
+					if (dataDir.list()[i].equals(fileName)){
+						return fileName;
+					}
+			}
+		
+		return null;
+	}
+	
+	/**
+	 * cuando utilizamos crs+transformacion, cargamos los paneles para que
+	 * el usuario pueda consultar la transformacion utilizada...
+	 * @param details
+	 */
+	public void fillData(String details) {
+		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+		TrData crsTrDataArray[] = trPersistence.getArrayOfTrData();
+		
+		for (int iRow = crsTrDataArray.length-1; iRow >= 0; iRow--) {
+			if (details.equals(crsTrDataArray[iRow].getAuthority()+":"+crsTrDataArray[iRow].getCode()+" <--> "+crsTrDataArray[iRow].getDetails()) && crsTrDataArray[iRow].getAuthority().equals(PluginServices.getText(this, "NADGR"))) {
+				String data[] = crsTrDataArray[iRow].getDetails().split(" ");
+				String fichero = data[0];
+				String authority = data[1].substring(1,data[1].length()-1);
+				for (int i = 0; i< getJComboNadFile().getItemCount(); i++) {
+					if (fichero.equals((String)getJComboNadFile().getItemAt(i))) {
+						getJComboNadFile().setSelectedIndex(i);
+						break;
+					}
+				}
+				if (authority.equals(getSourceAbrev())) {
+					getJRadioButtonSource().setSelected(true);
+					getJRadioButtonTarget().setSelected(false);
+				}
+				else {
+					getJRadioButtonSource().setSelected(false);
+					getJRadioButtonTarget().setSelected(true);
+				}
+				
+				break;
+			}
+		}
+	}
+	
+	public void resetData () {
+		getJRadioButtonSource().setSelected(true);
+		getJRadioButtonTarget().setSelected(false);
+		getJComboNadFile().setSelectedIndex(0);		
+	}
+	
+}
+
+class FiltroNadgrids extends FileFilter {
+
+	final static String gsb = "gsb";
+	public boolean accept(File f) {
+		if (f.isDirectory()) {
+           return true;
+       }
+       String s = f.getName();
+       int i = s.lastIndexOf('.');
+
+       if (i > 0 &&  i < s.length() - 1) {
+           String extension = s.substring(i+1).toLowerCase();
+           if (gsb.equals(extension)){
+                   return true;
+           } else {
+               return false;
+           }
+       }
+       return false;
+	}
+
+	public String getDescription() {
+		 return "Archivos .gsb";
+	}
+	
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/panels/TransformationNadgridsPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/CRSSelectionTrDialog.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/CRSSelectionTrDialog.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/CRSSelectionTrDialog.java	(revision 25287)
@@ -0,0 +1,101 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui;
+
+import javax.swing.JPanel;
+
+import org.gvsig.crs.CrsWkt;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.persistence.CrsData;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.cit.gvsig.project.documents.view.gui.BaseView;
+
+/**
+ * Di�logo contenedor del panel de la selecci�n de CRS y transformaci�n
+ * de la capa a a�adir
+ * 
+ * @author Jos� Luis G�mez Mart�nez (JoseLuis.Gomez@uclm.es)
+ *
+ */
+
+public class CRSSelectionTrDialog extends JPanel {
+	
+	private static final long serialVersionUID = 1L;
+	
+	JPanel contentPane = null;
+	ICrs curProj = null;
+
+	public CRSSelectionTrDialog(ICrs proj) {
+		super(false);
+		curProj = proj;
+		if (curProj.getSourceTransformationParams() == null && curProj.getTargetTransformationParams() == null) {
+			CrsData crsData = new CrsData(proj.getCrsWkt().getAuthority()[0], proj.getCode(),proj.getCrsWkt().getName());
+			RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+			persistence.addCrsData(crsData);
+		}
+		inicializate();
+	}
+	public void inicializate(){
+		this.add(getContentPanel(), null);        
+	}
+			
+    public CRSMainTrPanel getProjPanel() {
+        return (CRSMainTrPanel) getContentPanel();
+    }
+
+	public JPanel getContentPanel() {
+	    if (contentPane == null) {	    	
+	    	IWindow activeWindow = PluginServices.getMDIManager().getActiveWindow();
+	    	BaseView activeView = (com.iver.cit.gvsig.project.documents.view.gui.BaseView) activeWindow;
+	    	int target = ((ICrs) activeView.getMapControl().getProjection()).getCode();
+	    	CrsWkt crsWktTarget = ((ICrs) activeView.getMapControl().getProjection()).getCrsWkt();
+	    	if (crsWktTarget.getDatumName().equals("")){	    		
+	    	}
+        	contentPane = new CRSMainTrPanel(target, crsWktTarget, curProj);        	
+	    	      	
+       }
+	   return contentPane;
+    }
+	
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/CRSSelectionTrDialog.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/listeners/CRSSelectionDialogListener.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/listeners/CRSSelectionDialogListener.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/listeners/CRSSelectionDialogListener.java	(revision 25287)
@@ -0,0 +1,537 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+
+package org.gvsig.crs.gui.listeners;
+
+import java.awt.CardLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+
+import javax.swing.JOptionPane;
+import javax.swing.ListSelectionModel;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsWkt;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.CRSSelectionDialog;
+import org.gvsig.crs.persistence.CrsData;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+
+import com.iver.andami.PluginServices;
+
+/**
+ * Esta clase contiene los listeners necesarios para el manejo 
+ * de los eventos del panel de eleccin de CRS de la vista principal.
+ * 
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ *
+ */
+
+public class CRSSelectionDialogListener implements ActionListener,
+		 ListSelectionListener, ItemListener, MouseListener {
+	
+	int[] valid_method_code = {9800, 9801, 9802, 9803, 9804, 9805, 9806, 9807, 9809, 9810, 
+			9811, 9812, 9813, 9814, 9815, 9602, 9659, 9818, 9819, 9820, 9821, 9822, 9823, 
+			9827, 9829};
+	
+	CRSSelectionDialog dialog = null;
+
+	public CRSSelectionDialogListener(CRSSelectionDialog d) {
+		dialog = d;
+	}
+	
+	/**
+	 * Manejador de los eventos relacionados con los botones del panel
+	 * de seleccin de CRS.
+	 */
+	public void actionPerformed(ActionEvent e) {
+		if (e.getSource() == dialog.getCrsMainPanel().getJButtonAccept()){
+			ICrs crs = (ICrs) dialog.getProjection();
+			try {
+				crs.getProj4String();
+			} catch (CrsException e1) {
+				JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,e1.getMessage()), "Warning...",
+						JOptionPane.WARNING_MESSAGE);
+				return;
+			}
+			dialog.setLastProj(crs);
+			dialog.setDataSource(dialog.getCrsMainPanel().getDataSource());
+        	if (dialog.getLastProj() != null){
+        		/*
+        		 * Actualizar recientes...
+        		 */
+        		String authority = ((ICrs)dialog.getLastProj()).getCrsWkt().getAuthority()[0];
+        		String name = ((ICrs)dialog.getLastProj()).getCrsWkt().getName();
+        		int code = ((ICrs)dialog.getLastProj()).getCode();
+        		CrsData crsData = new CrsData(authority,code,name);
+        		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+        		persistence.addCrsData(crsData);
+        		
+        		
+        		PluginServices.getMDIManager().closeWindow(dialog);
+        		dialog.setOkPressed(true);
+			}
+        	else {
+        		dialog.setOkPressed(false);
+        	}	
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getJButtonCancel()){
+			dialog.setProjection(dialog.getLastProj());
+            PluginServices.getMDIManager().closeWindow(dialog);
+            dialog.setOkPressed(false);
+		}
+
+	}
+
+
+	/**
+	 * Maneja los eventos del combobox de eleccin de repositorio para
+	 * la seleccin del CRS de la vista
+	 */
+	public void itemStateChanged(ItemEvent e) {
+		CardLayout cl = (CardLayout)(dialog.getCrsMainPanel().getJPanelMain().getLayout());
+		String op = (String)e.getItem();		
+		if (op.equals("EPSG")){
+			dialog.getCrsMainPanel().getEpsgPanel().connection();	
+			if(dialog.getCrsMainPanel().getEpsgPanel().getJTable().getSelectedRowCount()>0)
+				dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);
+			else
+				dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
+				
+		} else if (op.equals("IAU2000")) {
+			dialog.getCrsMainPanel().getIauPanel().connection();
+			if(dialog.getCrsMainPanel().getIauPanel().getJTable().getSelectedRowCount()>0)
+				dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);
+			else
+				dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
+		}else if (op.equals("Recientes")) {
+			//Comprobar de nuevo recientes por si hemos eliminado alguno de usuario
+			dialog.getCrsMainPanel().getRecentsPanel().loadRecents();
+			if(dialog.getCrsMainPanel().getRecentsPanel().getJTable().getSelectedRowCount()>0)
+				dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);
+			else
+				dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
+		}
+		else if (op.equals("ESRI")) {
+			dialog.getCrsMainPanel().getEsriPanel().connection();
+		if(dialog.getCrsMainPanel().getEsriPanel().getJTable().getSelectedRowCount()>0)
+			dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);
+		else
+			dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
+		}else if (op.equals(PluginServices.getText(this, "newCRS"))) {
+			dialog.getCrsMainPanel().getNewCrsPanel().connection();
+			if(dialog.getCrsMainPanel().getNewCrsPanel().getJTable().getSelectedRowCount()>0) {
+				dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);
+				if (dialog.getCrsMainPanel().getNewCrsPanel().getSearchTextField().getText().equals(""))
+					dialog.getCrsMainPanel().getNewCrsPanel().initializeTable();				
+			}
+			else
+				dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
+		}
+	    cl.show(dialog.getCrsMainPanel().getJPanelMain(), (String)e.getItem());
+	    dialog.getCrsMainPanel().setDataSource((String)e.getItem());
+	}
+
+	/**
+	 * Maneja el evento de cambio de valor de las tablas existentes
+	 * en cada uno de los distintos repositorios para la seleccin
+	 * del CRS de la vista.
+	 */
+	public void valueChanged(ListSelectionEvent e) {
+		if (e.getSource() == dialog.getCrsMainPanel().getRecentsPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+			
+	        if (lsm.isSelectionEmpty()) {
+	        	dialog.getCrsMainPanel().getRecentsPanel().selectedRowTable = -1;
+	        	dialog.getCrsMainPanel().getRecentsPanel().setCodeCRS(-1);
+	        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
+	        	dialog.getCrsMainPanel().getRecentsPanel().getInfoCrs().setEnabled(false);
+	        	dialog.setCode(0);	        	
+	        } 
+	        else {        	
+	        	dialog.getCrsMainPanel().getRecentsPanel().initCrs();	        			        	
+        		dialog.setCode(dialog.getCrsMainPanel().getRecentsPanel().getCodeCRS());
+        		dialog.getCrsMainPanel().getRecentsPanel().getInfoCrs().setEnabled(true);	        	
+            	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);
+	        }
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getIauPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+			String[] not_soported = {"Oblique_Cylindrical_Equal_Area"};
+			boolean soported = true;
+			 if (lsm.isSelectionEmpty()) {
+		        	dialog.getCrsMainPanel().getIauPanel().selectedRowTable = -1;
+		        	dialog.getCrsMainPanel().getIauPanel().setCodeCRS(-1);
+		        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
+		        	dialog.getCrsMainPanel().getIauPanel().getInfoCrs().setEnabled(false);
+		        	dialog.setCode(0);        	
+		        	
+			 } 
+			 else {  
+				 
+				 dialog.getCrsMainPanel().getIauPanel().selectedRowTable = lsm.getMinSelectionIndex();
+				 dialog.getCrsMainPanel().getIauPanel().setCodeCRS(Integer.parseInt((String)dialog.getCrsMainPanel().getIauPanel().sorter.getValueAt(dialog.getCrsMainPanel().getIauPanel().selectedRowTable,0)));
+				 dialog.getCrsMainPanel().getIauPanel().setWKT();
+				 CrsWkt crs = new CrsWkt(dialog.getCrsMainPanel().getIauPanel().getWKT());
+				 String crs_kind = crs.getProjection();
+				 for (int i = 0; i < not_soported.length; i++) {
+					 if (crs_kind.equals(not_soported[i]))
+		        		soported = false;					 
+		        }
+		        if (soported){
+		        	dialog.setCode(dialog.getCrsMainPanel().getIauPanel().getCodeCRS());
+		        	dialog.getCrsMainPanel().getIauPanel().getInfoCrs().setEnabled(true);
+		        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);	
+		        }
+		        else {
+		        	JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+		        	dialog.getCrsMainPanel().getIauPanel().setCodeCRS(-1);
+		        	dialog.getCrsMainPanel().getIauPanel().setCodeCRS(0);
+		        	dialog.getCrsMainPanel().getIauPanel().getInfoCrs().setEnabled(false);
+		        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);	        		
+		        }	        		            	
+		     }
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getEpsgPanel().getJTable().getSelectionModel()){
+			String[] not_soported = {"engineering", "vertical", "compound", "geocentric", "geographic 3D"};
+			
+			String problem = "";
+			boolean soported = true;
+			boolean soported2 = false;
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+								
+	        if (lsm.isSelectionEmpty()) {
+	        	dialog.getCrsMainPanel().getEpsgPanel().selectedRowTable = -1;
+	        	dialog.getCrsMainPanel().getEpsgPanel().setCodeCRS(-1);
+	        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);        	
+	        	dialog.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(false);
+	        	dialog.setCode(0);     	        	
+	        } 
+	        else {	        	
+	        	dialog.getCrsMainPanel().getEpsgPanel().selectedRowTable = lsm.getMinSelectionIndex();
+	        	String crs_kind = (String)dialog.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(dialog.getCrsMainPanel().getEpsgPanel().selectedRowTable,2);	        	
+	        	for (int i = 0; i < not_soported.length; i++) {
+	        		if (crs_kind.equals(not_soported[i])){
+	        			soported = false;
+	        			problem = not_soported[i];
+	        		}
+	        	}
+	        	for (int i=0; i< valid_method_code.length;i++) {
+	        		if (dialog.getCrsMainPanel().getEpsgPanel().getProjectionCode((String)dialog.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(dialog.getCrsMainPanel().getEpsgPanel().selectedRowTable,0)) == valid_method_code[i]) {
+	        			soported2 = true;
+	        		}
+	        	}
+	        	if (crs_kind.equals("geographic 2D")) {
+	        		soported2 = true;
+	        	}
+	        	if (soported && soported2){
+	        		dialog.getCrsMainPanel().getEpsgPanel().setCodeCRS(Integer.parseInt((String)dialog.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(dialog.getCrsMainPanel().getEpsgPanel().selectedRowTable,0)));
+	            	dialog.getCrsMainPanel().getEpsgPanel().setWKT();
+	            	dialog.setCode(dialog.getCrsMainPanel().getEpsgPanel().epsg_code);
+	            	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);
+	            	dialog.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(true);
+	            	
+	        	}
+	        	else {
+	        		JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,"crs_not_soported")+" "+PluginServices.getText(this,problem), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+	        		dialog.getCrsMainPanel().getEpsgPanel().setCodeCRS(-1);
+	        		dialog.setCode(0);
+	        		dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
+	        		dialog.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(false);
+	        	}	        	
+	        }
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getEsriPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+			String[] not_soported = {"Oblique_Cylindrical_Equal_Area"};
+			boolean soported = true;
+			 if (lsm.isSelectionEmpty()) {
+		        	dialog.getCrsMainPanel().getEsriPanel().selectedRowTable = -1;
+		        	dialog.getCrsMainPanel().getEsriPanel().setCodeCRS(-1);
+		        	dialog.getCrsMainPanel().getEsriPanel().getInfoCrs().setEnabled(false);		        	
+		        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);		        	
+		        	dialog.setCode(0);        	
+		        	
+			 } 
+			 else {  
+				 
+				 dialog.getCrsMainPanel().getEsriPanel().selectedRowTable = lsm.getMinSelectionIndex();
+				 dialog.getCrsMainPanel().getEsriPanel().setCodeCRS(Integer.parseInt((String)dialog.getCrsMainPanel().getEsriPanel().sorter.getValueAt(dialog.getCrsMainPanel().getEsriPanel().selectedRowTable,0)));
+				 dialog.getCrsMainPanel().getEsriPanel().setWKT();
+				 CrsWkt crs = new CrsWkt(dialog.getCrsMainPanel().getEsriPanel().getWKT());
+				 String crs_kind = crs.getProjection();
+				 for (int i = 0; i < not_soported.length; i++) {
+					 if (crs_kind.equals(not_soported[i]))
+		        		soported = false;					 
+		        }
+		        if (soported){
+		        	dialog.setCode(dialog.getCrsMainPanel().getEsriPanel().getCodeCRS());
+		        	dialog.getCrsMainPanel().getEsriPanel().getInfoCrs().setEnabled(true);
+		        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);	
+		        }
+		        else {
+		        	JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+		        	dialog.getCrsMainPanel().getEsriPanel().setCodeCRS(-1);
+		        	dialog.getCrsMainPanel().getEsriPanel().setCodeCRS(0);
+		        	dialog.getCrsMainPanel().getEsriPanel().getInfoCrs().setEnabled(false);
+		        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);	        		
+		        }	        		            	
+		     }
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getNewCrsPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+			if (lsm.isSelectionEmpty()) {
+		        	dialog.getCrsMainPanel().getNewCrsPanel().selectedRowTable = -1;
+		        	dialog.getCrsMainPanel().getNewCrsPanel().setCodeCRS(-1);
+		        	dialog.getCrsMainPanel().getNewCrsPanel().getInfoCrs().setEnabled(false);		        	
+		        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
+		        	dialog.getCrsMainPanel().getNewCrsPanel().getBtnEliminar().setEnabled(false);
+		        	dialog.getCrsMainPanel().getNewCrsPanel().getBtnEditar().setEnabled(false);
+		        	dialog.setCode(0);        	
+		        	
+			 } 
+			 else {  
+				 
+				 dialog.getCrsMainPanel().getNewCrsPanel().selectedRowTable = lsm.getMinSelectionIndex();
+				 dialog.getCrsMainPanel().getNewCrsPanel().setCodeCRS(Integer.parseInt((String)dialog.getCrsMainPanel().getNewCrsPanel().sorter.getValueAt(dialog.getCrsMainPanel().getNewCrsPanel().selectedRowTable,0)));
+				 dialog.getCrsMainPanel().getNewCrsPanel().setWKT();
+				 dialog.getCrsMainPanel().getNewCrsPanel().getInfoCrs().setEnabled(true);
+				 dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);	
+				 dialog.getCrsMainPanel().getNewCrsPanel().getBtnEliminar().setEnabled(true);
+				 dialog.getCrsMainPanel().getNewCrsPanel().getBtnEditar().setEnabled(true);
+		     }
+		}
+	}
+		
+	/**
+	 * Controla los eventos relacionados con el doble click para
+	 * la seleccin del CRS de la vista de las tablas del panel de
+	 * seleccin de CRS
+	 */	
+	public void mouseClicked(MouseEvent e) {
+
+		if (e.getSource() == dialog.getCrsMainPanel().getRecentsPanel().getJTable()){
+			if (e.getClickCount() == 2){
+				ICrs crs = (ICrs) dialog.getProjection();
+				try {
+					crs.getProj4String();
+				} catch (CrsException e1) {
+					JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,e1.getMessage()), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+					return;
+				}
+				dialog.setLastProj(crs);
+				dialog.setDataSource(dialog.getCrsMainPanel().getDataSource());
+	        	if (dialog.getLastProj() != null){
+	        		/*
+	        		 * Actualizar recientes...
+	        		 */
+	        		String authority = ((ICrs)dialog.getLastProj()).getCrsWkt().getAuthority()[0];	        		
+	        		String name = ((ICrs)dialog.getLastProj()).getCrsWkt().getName();
+	        		int code = ((ICrs)dialog.getLastProj()).getCode();
+	        		CrsData crsData = new CrsData(authority,code,name);
+	        		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+	        		persistence.addCrsData(crsData);
+	        		
+	        		PluginServices.getMDIManager().closeWindow(dialog);
+	        		dialog.setOkPressed(true);
+				}
+	        	else dialog.setOkPressed(false);	        	
+		    }
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getEpsgPanel().getJTable()){
+			if (e.getClickCount() == 2){
+				ICrs crs = (ICrs) dialog.getProjection();
+				try {
+					crs.getProj4String();
+				} catch (CrsException e1) {
+					JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,e1.getMessage()), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+					return;
+				}
+				dialog.setLastProj(dialog.getProjection());
+				dialog.setDataSource(dialog.getCrsMainPanel().getDataSource());
+	        	if (dialog.getLastProj() != null){
+	        		/*
+	        		 * Actualizar recientes...
+	        		 */
+	        		String authority = ((ICrs)dialog.getLastProj()).getCrsWkt().getAuthority()[0];	        		
+	        		String name = ((ICrs)dialog.getLastProj()).getCrsWkt().getName();
+	        		int code = ((ICrs)dialog.getLastProj()).getCode();
+	        		CrsData crsData = new CrsData(authority,code,name);
+	        		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+	        		persistence.addCrsData(crsData);
+	        		
+	        		PluginServices.getMDIManager().closeWindow(dialog);
+	        		dialog.setOkPressed(true);
+				}
+	        	else dialog.setOkPressed(false);	        		
+		    }
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getIauPanel().getJTable()){
+			if (e.getClickCount() == 2){
+				ICrs crs = (ICrs) dialog.getProjection();
+				try {
+					crs.getProj4String();
+				} catch (CrsException e1) {
+					JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,e1.getMessage()), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+					return;
+				}
+				dialog.setLastProj(dialog.getProjection());
+				dialog.setDataSource(dialog.getCrsMainPanel().getDataSource());
+	        	if (dialog.getLastProj() != null){
+	        		/*
+	        		 * Actualizar recientes...
+	        		 */
+	        		String authority = ((ICrs)dialog.getLastProj()).getCrsWkt().getAuthority()[0];	        		
+	        		String name = ((ICrs)dialog.getLastProj()).getCrsWkt().getName();
+	        		int code = ((ICrs)dialog.getLastProj()).getCode();
+	        		CrsData crsData = new CrsData(authority,code,name);
+	        		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+	        		persistence.addCrsData(crsData);	        		
+	        		
+	        		PluginServices.getMDIManager().closeWindow(dialog);
+	        		dialog.setOkPressed(true);
+				}
+	        	else dialog.setOkPressed(false);	        		
+		    }
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getEsriPanel().getJTable()){
+			if (e.getClickCount() == 2){
+				ICrs crs = (ICrs) dialog.getProjection();
+				try {
+					crs.getProj4String();
+				} catch (CrsException e1) {
+					JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,e1.getMessage()), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+					return;
+				}
+				dialog.setLastProj(dialog.getProjection());
+				dialog.setDataSource(dialog.getCrsMainPanel().getDataSource());
+	        	if (dialog.getLastProj() != null){
+	        		/*
+	        		 * Actualizar recientes...
+	        		 */
+	        		String authority = ((ICrs)dialog.getLastProj()).getCrsWkt().getAuthority()[0];	        		
+	        		String name = ((ICrs)dialog.getLastProj()).getCrsWkt().getName();
+	        		int code = ((ICrs)dialog.getLastProj()).getCode();
+	        		CrsData crsData = new CrsData(authority,code,name);
+	        		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+	        		persistence.addCrsData(crsData);	        		
+	        		
+	        		PluginServices.getMDIManager().closeWindow(dialog);
+	        		dialog.setOkPressed(true);
+				}
+	        	else dialog.setOkPressed(false);	        		
+		    }
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getNewCrsPanel().getJTable()){
+			if (e.getClickCount() == 2){
+				ICrs crs = (ICrs) dialog.getProjection();
+				try {
+					crs.getProj4String();
+				} catch (CrsException e1) {
+					JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,e1.getMessage()), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+					return;
+				}
+				dialog.setLastProj(dialog.getProjection());
+				dialog.setDataSource(dialog.getCrsMainPanel().getDataSource());
+	        	if (dialog.getLastProj() != null){
+	        		/*
+	        		 * Actualizar recientes...
+	        		 */
+	        		String authority = ((ICrs)dialog.getLastProj()).getCrsWkt().getAuthority()[0];	        		
+	        		String name = ((ICrs)dialog.getLastProj()).getCrsWkt().getName();
+	        		int code = ((ICrs)dialog.getLastProj()).getCode();
+	        		CrsData crsData = new CrsData(authority,code,name);
+	        		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+	        		persistence.addCrsData(crsData);	        		
+	        		
+	        		PluginServices.getMDIManager().closeWindow(dialog);
+	        		dialog.setOkPressed(true);
+				}
+	        	else dialog.setOkPressed(false);	        		
+		    }
+		}
+	}
+
+	public void mouseEntered(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mouseExited(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mousePressed(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mouseReleased(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/listeners/CRSSelectionDialogListener.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/listeners/CRSMainTrPanelListener.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/listeners/CRSMainTrPanelListener.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/listeners/CRSMainTrPanelListener.java	(revision 25287)
@@ -0,0 +1,1858 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+
+package org.gvsig.crs.gui.listeners;
+
+import java.awt.CardLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import javax.swing.JComboBox;
+import javax.swing.JOptionPane;
+import javax.swing.ListSelectionModel;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+
+import org.gvsig.crs.CrsGT;
+import org.gvsig.crs.CrsWkt;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.CRSMainTrPanel;
+import org.gvsig.crs.gui.panels.InfoCRSPanel;
+import org.gvsig.crs.ogr.TransEPSG;
+import org.gvsig.crs.persistence.CompTrData;
+import org.gvsig.crs.persistence.CrsData;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+import org.gvsig.crs.persistence.RecentTrsPersistence;
+import org.gvsig.crs.persistence.TrData;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.cit.gvsig.project.documents.view.gui.BaseView;
+
+import es.idr.teledeteccion.connection.Query;
+
+/**
+ * Esta clase contiene todos los listeners necesarios para el manejo 
+ * de los eventos del panel de eleccin de CRS de la capa y de su
+ * tranformacin. 
+ * 
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es) 
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ *
+ */
+
+public class CRSMainTrPanelListener implements ActionListener, 
+			ListSelectionListener, ItemListener, MouseListener, KeyListener{
+
+	int[] valid_method_code = {9800, 9801, 9802, 9803, 9804, 9805, 9806, 9807, 9809, 9810, 
+			9811, 9812, 9813, 9814, 9815, 9602, 9659, 9818, 9819, 9820, 9821, 9822, 9823, 
+			9827, 9829};
+	
+	private CRSMainTrPanel panel = null;
+		
+	public CRSMainTrPanelListener(CRSMainTrPanel p) {
+		panel=p;	
+	}
+	
+	/**
+	 * Manejador de los eventos relacionados con los botones del panel
+	 * de transformacin y al combobox de las transformaciones
+	 */
+	public void actionPerformed(ActionEvent e) {
+		if(	e.getSource() == panel.getJButtonAccept()){
+			if (panel.isEpsg_tr()) {			
+				TransEPSG epsgParams = new TransEPSG(panel.getEpsgTrPanel().getTransformation_code(),panel.getEpsgTrPanel().connect, panel.getEpsgTrPanel().inverseTranformation);
+				panel.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+				panel.setProjection(panel.getEpsgTrPanel().getProjection());
+				panel.setEpsg_tr(false);
+				
+				/*
+				 * Actualizar Transformaciones recientes
+				 */
+				String authority = "EPSG";
+	    		String name = (String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,1);
+	    		int code = panel.getEpsgTrPanel().getTransformation_code();
+	    		String crsSource = "EPSG:"+String.valueOf(panel.getEpsgTrPanel().getSource()); 	    			
+	    		String crsTarget = "EPSG:"+String.valueOf(panel.getEpsgTrPanel().getTarget()); 	    			
+	    		String details = (String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,5);
+	    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+	    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+	    		trPersistence.addTrData(trData);
+				
+	    		
+			}
+			else if (panel.isManual_tr()) {
+				boolean domain = panel.getManualTrPanel().correctJTextField();
+				if (domain && panel.getManualTrPanel().correctDomain()){
+					panel.setProjection(panel.getManualTrPanel().getProjection());
+					panel.setManual_tr(false);
+				}
+				else if (!domain) {
+					JOptionPane.showMessageDialog(panel, 
+							PluginServices.getText(this,"numeric_format"), 
+							"Warning...", JOptionPane.WARNING_MESSAGE);					
+					return;
+				}				
+				else {
+					JOptionPane.showMessageDialog(panel, 
+							PluginServices.getText(this,"incorrect_domain"), 
+							"Warning...", JOptionPane.WARNING_MESSAGE);					
+					return;
+				}
+				
+				/*
+				 * Actualizar Transformaciones recientes
+				 */
+				String authority = "USR";
+	    		String name = PluginServices.getText(this,"manual");
+	    		int code = 0;
+	    		String crsSource = panel.getManualTrPanel().getSourceAbrev();
+	    		String crsTarget = panel.getManualTrPanel().getTargetAbrev();
+	    		String details = panel.getManualTrPanel().getValues();
+	    		 
+	    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+	    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+	    		trPersistence.addTrData(trData);
+				
+			}
+			else if (panel.isNads_tr()) {
+				panel.setProjection(panel.getNadsTrPanel().getProjection());
+				panel.setTargetNad(panel.getNadsTrPanel().getNad());
+				panel.setNads_tr(false);
+				
+				/*
+				 * Actualizar Transformaciones recientes
+				 */
+				String authority = "NADGR";
+	    		String name = "----";
+	    		int code = 0;
+	    		String crsSource = panel.getNadsTrPanel().getSourceAbrev();
+	    		String crsTarget = panel.getNadsTrPanel().getTargetAbrev();
+	    		String details = "";
+	    		if (panel.getNadsTrPanel().getNad())
+	    			details = panel.getNadsTrPanel().getNadFile()+ " ("+panel.getNadsTrPanel().getTargetAbrev() +")";
+	    		else
+	    			details = panel.getNadsTrPanel().getNadFile()+ " ("+panel.getNadsTrPanel().getSourceAbrev() +")"; 
+	    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+	    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+	    		trPersistence.addTrData(trData);
+			}
+			/*
+			 * Ver que es necesario cuando aceptas en el panel de transformaciones
+			 * recientes.
+			 */
+			else if (panel.isRecents_tr()) {
+				String[] transformation = ((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0)).split(":");
+				if (transformation[0].equals("USR")){
+	        		panel.getRecentsTrPanel().setParamsManual((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4));
+	        		panel.setProjection(panel.getRecentsTrPanel().getProjection());
+	        	}
+				if (transformation[0].equals("EPSG")){
+					TransEPSG epsgParams = new TransEPSG(panel.getRecentsTrPanel().getTrCode(),panel.getRecentsTrPanel().connect, panel.getRecentsTrPanel().getInverseTransformation());
+					panel.getRecentsTrPanel().setParamsEPGS(epsgParams.getParamValue());
+					panel.setProjection(panel.getRecentsTrPanel().getProjection());
+	        	}
+				if (transformation[0].equals("NADGR")){
+					panel.setProjection(panel.getRecentsTrPanel().getProjectionNad((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4)));
+				}
+				if (transformation[0].equals("COMP")) {
+					panel.setProjection(panel.getRecentsTrPanel().getProjectionComplex((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4)));
+				}
+				//panel.setProjection(panel.getRecentsTrPanel().getProjection());
+				panel.setRecents_tr(false);
+				
+				/*
+				 * Actualizar Transformaciones recientes
+				 */
+				String authCode = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0);
+				String authority = authCode.split(":")[0];
+	    		String name = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,1);
+	    		int code = Integer.parseInt(authCode.split(":")[1]);
+	    		String crsSource = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,2);
+	    		String crsTarget = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,3);
+	    		String details = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4);	    		
+	    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+	    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+	    		trPersistence.addTrData(trData);
+			}else if(panel.isCompuesta_tr()){
+				//Selecciona transformacin compuesta
+				//Mostrar el panel de transformacin de la Capa
+				panel.setProjection(panel.getVistaTrPanel().getProjection());
+				//panel.setTargetNad(panel.getNadsTrPanel().getNad());
+				panel.setCompuesta_tr(false);			
+				panel.setVista_tr(false);
+				
+				/**
+				 * para actualizar las transformaciones recientes, tendremos
+				 * que coger las dos transformaciones utilizadas...
+				 */
+				
+				/*					
+				 * Actualizar Transformaciones recientes
+				 */
+				String authorityLayer = null;
+	    		String nameLayer = null;
+	    		int codeLayer = 0;
+	    		String crsSourceLayer = null;
+	    		String crsTargetLayer = null;
+	    		String detailsLayer = "";
+	    		
+				if(panel.getCapaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"recents_transformation"))){
+					String[] transform = ((String)panel.getCapaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getRecentsTrPanel().selectedRowTable,0)).split(":");
+					
+					authorityLayer = PluginServices.getText(this, transform[0]);						
+					nameLayer = (String)panel.getCapaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getRecentsTrPanel().selectedRowTable,1);
+					crsSourceLayer = (String)panel.getCapaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getRecentsTrPanel().selectedRowTable,2);
+					crsTargetLayer = (String)panel.getCapaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getRecentsTrPanel().selectedRowTable,3);
+					detailsLayer = (String)panel.getCapaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getRecentsTrPanel().selectedRowTable,4);
+				}
+				else if(panel.getCapaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_epsg"))){
+					authorityLayer = "EPSG";
+		    		nameLayer = (String)panel.getCapaTrPanel().getEpsgTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getEpsgTrPanel().selectedRowTable,1);
+		    		codeLayer = panel.getCapaTrPanel().getEpsgTrPanel().getTransformation_code();
+		    		crsSourceLayer = "EPSG:"+String.valueOf(panel.getCapaTrPanel().getEpsgTrPanel().getSource()); 	    			
+		    		crsTargetLayer = "EPSG:"+String.valueOf(panel.getCapaTrPanel().getEpsgTrPanel().getTarget()); 	    			
+		    		detailsLayer = (String)panel.getCapaTrPanel().getEpsgTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getEpsgTrPanel().selectedRowTable,5);
+		    		
+				}
+				else if(panel.getCapaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_manual"))){
+					authorityLayer = "USR";
+		    		nameLayer = PluginServices.getText(this,"manual");
+		    		codeLayer = 0;
+		    		crsSourceLayer = panel.getCapaTrPanel().getManualTrPanel().getSourceAbrev();
+		    		crsTargetLayer = panel.getCapaTrPanel().getManualTrPanel().getTargetAbrev();
+		    		detailsLayer = panel.getCapaTrPanel().getManualTrPanel().getValues();
+				}
+				else if(panel.getCapaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"nadgrids"))){
+					authorityLayer = "NADGR";
+		    		nameLayer = "----";
+		    		codeLayer = 0;
+		    		crsSourceLayer = panel.getCapaTrPanel().getNadsTrPanel().getSourceAbrev();
+		    		crsTargetLayer = panel.getCapaTrPanel().getNadsTrPanel().getTargetAbrev();
+		    		detailsLayer = panel.getCapaTrPanel().getNadsTrPanel().getNadFile()+ " ("+panel.getCapaTrPanel().getNadsTrPanel().getSourceAbrev() +")";
+				}		    		 
+	    		TrData trDataLayer = new TrData(authorityLayer,codeLayer,nameLayer,crsSourceLayer,crsTargetLayer,detailsLayer);
+	    		
+	    		String authorityView = null;
+	    		String nameView = null;
+	    		int codeView = 0;
+	    		String crsSourceView = null;
+	    		String crsTargetView = null;
+	    		String detailsView = "";
+	    		
+				if(panel.getVistaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"recents_transformation"))){
+					String[] transform = ((String)panel.getVistaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getRecentsTrPanel().selectedRowTable,0)).split(":");
+					
+					authorityView = PluginServices.getText(this, transform[0]);						
+					nameView = (String)panel.getVistaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getRecentsTrPanel().selectedRowTable,1);
+					crsSourceView = (String)panel.getVistaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getRecentsTrPanel().selectedRowTable,2);
+					crsTargetView = (String)panel.getVistaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getRecentsTrPanel().selectedRowTable,3);
+					detailsView = (String)panel.getVistaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getRecentsTrPanel().selectedRowTable,4);
+				}
+				else if(panel.getVistaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_epsg"))){
+					authorityView = "EPSG";
+		    		nameView = (String)panel.getVistaTrPanel().getEpsgTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getEpsgTrPanel().selectedRowTable,1);
+		    		codeView = panel.getVistaTrPanel().getEpsgTrPanel().getTransformation_code();
+		    		crsSourceView = "EPSG:"+String.valueOf(panel.getVistaTrPanel().getEpsgTrPanel().getSource()); 	    			
+		    		crsTargetView = "EPSG:"+String.valueOf(panel.getVistaTrPanel().getEpsgTrPanel().getTarget()); 	    			
+		    		detailsView = (String)panel.getVistaTrPanel().getEpsgTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getEpsgTrPanel().selectedRowTable,5);
+		    		
+				}
+				else if(panel.getVistaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_manual"))){
+					authorityView = "USR";
+		    		nameView = PluginServices.getText(this,"manual");
+		    		codeView = 0;
+		    		crsSourceView = panel.getVistaTrPanel().getManualTrPanel().getSourceAbrev();
+		    		crsTargetView = panel.getVistaTrPanel().getManualTrPanel().getTargetAbrev();
+		    		detailsView = panel.getVistaTrPanel().getManualTrPanel().getValues();
+				}
+				else if(panel.getVistaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"nadgrids"))){
+					authorityView = "NADGR";
+		    		nameView = "----";
+		    		codeView = 0;
+		    		crsSourceView = panel.getVistaTrPanel().getNadsTrPanel().getSourceAbrev();
+		    		crsTargetView = panel.getVistaTrPanel().getNadsTrPanel().getTargetAbrev();
+		    		detailsView = panel.getVistaTrPanel().getNadsTrPanel().getNadFile()+ " ("+panel.getVistaTrPanel().getNadsTrPanel().getTargetAbrev() +")";
+		    	}		    		 
+	    		TrData trDataView = new TrData(authorityView,codeView,nameView,crsSourceView,crsTargetView,detailsView);
+	    		CompTrData comp = new CompTrData(trDataLayer, trDataView);
+	    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+	    		trPersistence.addTrData(comp);
+			}
+			else{
+				panel.setSin_tr(true);
+				panel.setProjection(panel.getProjection());	
+				/*
+	    		 * Actualizar recientes...
+	    		 */
+	    		String authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+	    		String name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+	    		int code = ((ICrs)panel.getProjection()).getCode();
+	    		CrsData crsData = new CrsData(authority,code,name);
+	    		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+	    		persistence.addCrsData(crsData);
+			}			
+			
+			/*
+    		 * Actualizar recientes...
+    		 
+    		String authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+    		String name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+    		int code = ((ICrs)panel.getProjection()).getCode();
+    		CrsData crsData = new CrsData(authority,code,name);
+    		RecentCRSsPersistence persistence = new RecentCRSsPersistence(RecentCRSsPersistence.pluginClassInstance);
+    		persistence.addCrsData(crsData);*/
+			
+			PluginServices.getMDIManager().closeWindow(panel);
+		}
+		
+		if(	e.getSource() == panel.getJButtonBefore()){
+			CardLayout cl = (CardLayout)(panel.getJPanelMain().getLayout());		    
+			if(panel.getNewSelection().equals(PluginServices.getText(this, "transformacion_compuesta")) && panel.isVista_tr()) {	
+				cl.show(panel.getJPanelMain(), "capa");
+				panel.setVista_tr(false);	        	
+				panel.getJButtonNext().setEnabled(true);
+				panel.getJButtonAccept().setEnabled(false);
+			    panel.getJButtonBefore().setEnabled(true);
+			} else {
+				cl.show(panel.getJPanelMain(), "primero");
+			    if (!panel.getDataSource().equals(PluginServices.getText(this,"recientes"))){
+					panel.setEpsg_tr(false);
+		        	panel.setNads_tr(false);
+		        	panel.setManual_tr(false);
+		        	panel.setRecents_tr(false);
+		        	panel.setCapa_tr(false);
+		        	panel.setVista_tr(false);		        	
+			    }
+			    /**
+			     * mirar si el panel es el de recientes, el item seleccionado
+			     * y actualizar estado de los botones...
+			     */
+			    else {
+			    	panel.setEpsg_tr(false);
+		        	panel.setNads_tr(false);
+		        	panel.setManual_tr(false);
+		        	panel.setRecents_tr(false);
+		        	panel.setCapa_tr(false);
+		        	panel.setVista_tr(false);
+		        	int sel = panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable;
+		        	panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getJTable().setRowSelectionInterval(0, 0);
+		        	panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getJTable().setRowSelectionInterval(sel, sel);
+			    }
+			    
+			   //panel.getJButtonAccept().setEnabled(false);
+	        	//panel.getJButtonNext().setEnabled(true);			    
+			    panel.getJButtonBefore().setEnabled(false);
+			}
+		}
+		
+		if(	e.getSource() == panel.getJButtonCancel()){
+			panel.setCancelYes(true);
+			panel.setProjection(panel.getCrsfirst());
+			PluginServices.getMDIManager().closeWindow(panel);
+		}
+
+		if(	e.getSource() == panel.getJButtonNext()){
+			panel.getJButtonNext().setEnabled(false);
+			//panel.getJButtonAccept().setEnabled(true);
+			panel.getJButtonBefore().setEnabled(true);
+			if (panel.getNewSelection().equals(PluginServices.getText(this,"transformacion_manual"))) {
+				CardLayout cl = (CardLayout)(panel.getJPanelMain().getLayout());
+				if (panel.getDataSource().equals(PluginServices.getText(this,"EPSG"))){
+					panel.getManualTrPanel().setWKT(panel.getCrsMainPanel().getEpsgPanel().getWKT());
+					panel.getManualTrPanel().setCode(panel.getCrsMainPanel().getEpsgPanel().epsg_code);
+					panel.getManualTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"recientes"))) {
+					if (panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs() instanceof CrsGT) {
+						panel.getManualTrPanel().setWKT(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs());
+					}
+					else {
+						panel.getManualTrPanel().setWKT(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs().getWKT());
+					}
+					/**
+					 * En el caso de haber elegido un crs con transformacion reciente
+					 * vamos a cargar los datos.
+					 */
+					if (!((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3)).equals(PluginServices.getText(this, "sin_transformacion"))) {
+						if (getCorrectOption().equals(PluginServices.getText(this, "USR")))
+							panel.getManualTrPanel().fillData((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+						else
+							panel.getManualTrPanel().resetData();
+					} else
+						panel.getManualTrPanel().resetData();
+					panel.getManualTrPanel().setCode(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+					panel.getManualTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"IAU2000"))) {
+					panel.getManualTrPanel().setWKT(panel.getCrsMainPanel().getIauPanel().getWKT());
+					panel.getManualTrPanel().setCode(panel.getCrsMainPanel().getIauPanel().getCodeCRS());
+					panel.getManualTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"ESRI"))) {
+					panel.getManualTrPanel().setWKT(panel.getCrsMainPanel().getEsriPanel().getWKT());
+					panel.getManualTrPanel().setCode(panel.getCrsMainPanel().getEsriPanel().getCodeCRS());
+					panel.getManualTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"newCRS"))) {
+					panel.getManualTrPanel().setWKT(panel.getCrsMainPanel().getNewCrsPanel().getWKT());
+					panel.getManualTrPanel().setCode(panel.getCrsMainPanel().getNewCrsPanel().getCodeCRS());
+					panel.getManualTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				if(!panel.getManualTrPanel().getStatus()) {
+					panel.getJButtonAccept().setEnabled(false);
+				}
+				panel.setManual_tr(true);
+			    cl.show(panel.getJPanelMain(), "manual");		    
+			}		
+			else if(panel.getNewSelection().equals(PluginServices.getText(this,"nadgrids"))){
+				CardLayout cl = (CardLayout)(panel.getJPanelMain().getLayout());
+				if (panel.getDataSource().equals(PluginServices.getText(this,"EPSG"))){
+					panel.getNadsTrPanel().setWKT(panel.getCrsMainPanel().getEpsgPanel().getWKT());
+					panel.getNadsTrPanel().setSourceAbrev(PluginServices.getText(this,"EPSG"), ""+panel.getCrsMainPanel().getEpsgPanel().epsg_code);
+					panel.getNadsTrPanel().setCode(panel.getCrsMainPanel().getEpsgPanel().epsg_code);
+					panel.getNadsTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"recientes"))) {
+					panel.getNadsTrPanel().setWKT(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs().getWKT());
+					String sour = (String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable,0);		        	
+					panel.getNadsTrPanel().setSourceAbrev(PluginServices.getText(this,sour), ""+panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+					panel.getNadsTrPanel().setCode(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+					panel.getNadsTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+					/**
+					 * En el caso de haber elegido un crs con transformacion reciente
+					 * vamos a cargar los datos.
+					 */
+					if (!((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3)).equals(PluginServices.getText(this, "sin_transformacion"))) {
+						if (getCorrectOption().equals(PluginServices.getText(this, "NADGR")))
+							panel.getNadsTrPanel().fillData((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+						else
+							panel.getNadsTrPanel().resetData();
+					} else
+						panel.getNadsTrPanel().resetData();
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"IAU2000"))) {
+					panel.getNadsTrPanel().setWKT(panel.getCrsMainPanel().getIauPanel().getWKT());
+					panel.getNadsTrPanel().setSourceAbrev(PluginServices.getText(this,"IAU2000"), ""+panel.getCrsMainPanel().getIauPanel().getCodeCRS());
+					panel.getNadsTrPanel().setCode(panel.getCrsMainPanel().getIauPanel().getCodeCRS());
+					panel.getNadsTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"ESRI"))) {
+					panel.getNadsTrPanel().setWKT(panel.getCrsMainPanel().getEsriPanel().getWKT());
+					panel.getNadsTrPanel().setSourceAbrev(PluginServices.getText(this,"ESRI"), ""+panel.getCrsMainPanel().getEsriPanel().getCodeCRS());
+					panel.getNadsTrPanel().setCode(panel.getCrsMainPanel().getEsriPanel().getCodeCRS());
+					panel.getNadsTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"newCRS"))) {
+					panel.getNadsTrPanel().setWKT(panel.getCrsMainPanel().getNewCrsPanel().getWKT());
+					panel.getNadsTrPanel().setSourceAbrev(PluginServices.getText(this,"USR"), ""+panel.getCrsMainPanel().getNewCrsPanel().getCodeCRS());
+					panel.getNadsTrPanel().setCode(panel.getCrsMainPanel().getNewCrsPanel().getCodeCRS());
+					panel.getNadsTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				if (panel.getNadsTrPanel().getJComboNadFile().getSelectedIndex() == 0)
+					panel.getJButtonAccept().setEnabled(false);
+				else panel.getJButtonAccept().setEnabled(true);
+				panel.setNads_tr(true);
+			    cl.show(panel.getJPanelMain(), "nad");		    
+			}
+			else if(panel.getNewSelection().equals(PluginServices.getText(this,"transformacion_epsg"))){
+				CardLayout cl = (CardLayout)(panel.getJPanelMain().getLayout());
+				if (panel.getDataSource().equals(PluginServices.getText(this,"EPSG"))){
+					panel.getEpsgTrPanel().setWKT(panel.getCrsMainPanel().getEpsgPanel().getWKT());
+					panel.getEpsgTrPanel().setSource(PluginServices.getText(this,"EPSG"),panel.getCrsMainPanel().getEpsgPanel().epsg_code);
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"recientes"))) {
+					panel.getEpsgTrPanel().setWKT(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs().getWKT());
+					String sour = (String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable,0);		        	
+					panel.getEpsgTrPanel().setSource(PluginServices.getText(this,sour),panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+					/**
+					 * En el caso de haber elegido un crs con transformacion reciente
+					 * vamos a cargar los datos.
+					 */
+					if (!((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3)).equals(PluginServices.getText(this, "sin_transformacion"))) {
+						if (getCorrectOption().equals(PluginServices.getText(this, "EPSG")))
+							panel.getEpsgTrPanel().fillData((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+						else
+							panel.getEpsgTrPanel().resetData();
+					} else
+						panel.getEpsgTrPanel().resetData();
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"IAU2000"))) {
+					panel.getEpsgTrPanel().setWKT(panel.getCrsMainPanel().getIauPanel().getWKT());
+					panel.getEpsgTrPanel().setSource(PluginServices.getText(this,"IAU2000"),panel.getCrsMainPanel().getIauPanel().getCodeCRS());					
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"ESRI"))) {
+					panel.getEpsgTrPanel().setWKT(panel.getCrsMainPanel().getEsriPanel().getWKT());
+					panel.getEpsgTrPanel().setSource(PluginServices.getText(this,"ESRI"),panel.getCrsMainPanel().getEsriPanel().getCodeCRS());					
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"newCRS"))) {
+					panel.getEpsgTrPanel().setWKT(panel.getCrsMainPanel().getNewCrsPanel().getWKT());
+					panel.getEpsgTrPanel().setSource(PluginServices.getText(this,"USR"),panel.getCrsMainPanel().getNewCrsPanel().getCodeCRS());					
+				}
+				
+				int numr = panel.getEpsgTrPanel().dtm.getRowCount();
+				if (numr == 0 )
+					panel.getJButtonAccept().setEnabled(false);
+				panel.setEpsg_tr(true);				
+			    cl.show(panel.getJPanelMain(), "epsg");		    			
+			}
+			/*
+			 * Parte necesaria para la transformacion reciente, cuando se vaya a cargar
+			 * el panel, tendremos que ver que hay que pasarle.
+			 */
+			else if(panel.getNewSelection().equals(PluginServices.getText(this, "recents_transformation"))) {
+				CardLayout cl = (CardLayout)(panel.getJPanelMain().getLayout());
+				if (panel.getDataSource().equals(PluginServices.getText(this,"EPSG"))){
+					panel.getRecentsTrPanel().setWKT(panel.getCrsMainPanel().getEpsgPanel().getWKT());
+					panel.getRecentsTrPanel().loadRecents(PluginServices.getText(this,"EPSG")+":"+panel.getCrsMainPanel().getEpsgPanel().getCodeCRS(),panel.getCrsWkt_target().getAuthority()[0]+":"+panel.getCrsWkt_target().getAuthority()[1]);
+					//panel.getRecentsTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"recientes"))) {
+					panel.getRecentsTrPanel().setWKT(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs().getWKT());
+					String sour = (String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable,0);		        	
+					panel.getRecentsTrPanel().loadRecents(PluginServices.getText(this,sour)+":"+panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS(),panel.getCrsWkt_target().getAuthority()[0]+":"+panel.getCrsWkt_target().getAuthority()[1]);
+					//panel.getRecentsTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"IAU2000"))) {
+					panel.getRecentsTrPanel().setWKT(panel.getCrsMainPanel().getIauPanel().getWKT());
+					panel.getRecentsTrPanel().loadRecents(PluginServices.getText(this,"IAU2000")+":"+panel.getCrsMainPanel().getIauPanel().getCodeCRS(),panel.getCrsWkt_target().getAuthority()[0]+":"+panel.getCrsWkt_target().getAuthority()[1]);					
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"ESRI"))) {
+					panel.getRecentsTrPanel().setWKT(panel.getCrsMainPanel().getEsriPanel().getWKT());
+					panel.getRecentsTrPanel().loadRecents(PluginServices.getText(this,"ESRI")+":"+panel.getCrsMainPanel().getEsriPanel().getCodeCRS(),panel.getCrsWkt_target().getAuthority()[0]+":"+panel.getCrsWkt_target().getAuthority()[1]);					
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"newCRS"))) {
+					panel.getRecentsTrPanel().setWKT(panel.getCrsMainPanel().getNewCrsPanel().getWKT());
+					panel.getRecentsTrPanel().loadRecents(PluginServices.getText(this,"USR")+":"+panel.getCrsMainPanel().getNewCrsPanel().getCodeCRS(),panel.getCrsWkt_target().getAuthority()[0]+":"+panel.getCrsWkt_target().getAuthority()[1]);					
+				}
+				
+				int numr = panel.getRecentsTrPanel().dtm.getRowCount();
+				if (numr == 0 )
+					panel.getJButtonAccept().setEnabled(false);
+				panel.setRecents_tr(true);				
+			    cl.show(panel.getJPanelMain(), "recents");
+			}
+			//Si se selecciona la opcin de transformacin compuesta
+			else if(panel.getNewSelection().equals(PluginServices.getText(this, "transformacion_compuesta"))) {
+				//vamos a definir los crs fuentes para los dos paneles para
+				//las transformaciones de la capa y la vista
+				if (!panel.isCapa_tr()) {
+					if (panel.getDataSource().equals(PluginServices.getText(this,"EPSG"))){
+						panel.getCapaTrPanel().setCrs_source(PluginServices.getText(this,"EPSG")+":"+panel.getCrsMainPanel().getEpsgPanel().epsg_code);
+						panel.getVistaTrPanel().setCrs_source(PluginServices.getText(this,"EPSG")+":"+panel.getCrsMainPanel().getEpsgPanel().epsg_code);
+						panel.getCapaTrPanel().fillData();
+						panel.getVistaTrPanel().fillData();
+					}
+					else if (panel.getDataSource().equals(PluginServices.getText(this,"recientes"))) {
+						String sour = (String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable,0);					
+						panel.getCapaTrPanel().setCrs_source(PluginServices.getText(this,sour)+":"+panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+						panel.getVistaTrPanel().setCrs_source(PluginServices.getText(this,sour)+":"+panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+						panel.getCapaTrPanel().fillData();
+						panel.getVistaTrPanel().fillData();
+						/**
+						 * En el caso de haber elegido un crs con transformacion reciente
+						 * vamos a cargar los datos.
+						 */
+						if (!((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3)).equals(PluginServices.getText(this, "sin_transformacion"))) {
+							if (getCorrectOption().equals(PluginServices.getText(this, "COMP"))) {
+								panel.getCapaTrPanel().fillData((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+								panel.getVistaTrPanel().fillData((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+								panel.getJButtonAccept().setEnabled(true);								
+							} else {
+								panel.getCapaTrPanel().resetData();
+								panel.getVistaTrPanel().resetData();
+							}							
+						} else {
+							panel.getCapaTrPanel().resetData();
+							panel.getVistaTrPanel().resetData();
+						}
+					}
+					else if (panel.getDataSource().equals(PluginServices.getText(this,"IAU2000"))) {
+						panel.getCapaTrPanel().setCrs_source(PluginServices.getText(this,"IAU2000")+":"+panel.getCrsMainPanel().getIauPanel().getCodeCRS());
+						panel.getVistaTrPanel().setCrs_source(PluginServices.getText(this,"IAU2000")+":"+panel.getCrsMainPanel().getIauPanel().getCodeCRS());
+						panel.getCapaTrPanel().fillData();
+						panel.getVistaTrPanel().fillData();
+					}
+					else if (panel.getDataSource().equals(PluginServices.getText(this,"ESRI"))) {
+						panel.getCapaTrPanel().setCrs_source(PluginServices.getText(this,"ESRI")+":"+panel.getCrsMainPanel().getEsriPanel().getCodeCRS());
+						panel.getVistaTrPanel().setCrs_source(PluginServices.getText(this,"ESRI")+":"+panel.getCrsMainPanel().getEsriPanel().getCodeCRS());
+						panel.getCapaTrPanel().fillData();
+						panel.getVistaTrPanel().fillData();
+					}
+					else if (panel.getDataSource().equals(PluginServices.getText(this,"newCRS"))) {
+						panel.getCapaTrPanel().setCrs_source(PluginServices.getText(this,"USR")+":"+panel.getCrsMainPanel().getNewCrsPanel().getCodeCRS());
+						panel.getVistaTrPanel().setCrs_source(PluginServices.getText(this,"USR")+":"+panel.getCrsMainPanel().getNewCrsPanel().getCodeCRS());
+						panel.getCapaTrPanel().fillData();
+						panel.getVistaTrPanel().fillData();
+					}		
+				}
+				
+				if(panel.isCapa_tr()){
+					//En este caso se esta mostrando el panel de seleccion de la transformacin de la capa
+					panel.setVista_tr(true);					
+					panel.getVistaTrPanel().setSourceTransformation(panel.getCapaTrPanel().getSourceTransformation());
+					CardLayout cl = (CardLayout)(panel.getJPanelMain().getLayout());
+					cl.show(panel.getJPanelMain(), "vista");
+					panel.getJButtonNext().setEnabled(false);
+					if (panel.getVistaTrPanel().isSthSelected())
+						panel.getJButtonAccept().setEnabled(true);
+				}else{					
+					if (panel.getCapaTrPanel().getRecentCompTransformation()) {
+						panel.getJButtonAccept().setEnabled(true);
+						panel.getJButtonNext().setEnabled(true);
+					}
+					else {
+						panel.getJButtonAccept().setEnabled(false);
+						if (panel.getCapaTrPanel().isSthSelected())
+							panel.getJButtonNext().setEnabled(true);
+					}
+					panel.setCompuesta_tr(true);
+					panel.setEpsg_tr(false);
+					panel.setNads_tr(false);
+					panel.setManual_tr(false);
+					panel.setRecents_tr(false);
+					panel.setCapa_tr(true);					
+					CardLayout cl = (CardLayout)(panel.getJPanelMain().getLayout());
+					cl.show(panel.getJPanelMain(), "capa");
+				}
+			}
+			
+		}	
+		if(	e.getSource() == panel.getJComboOptions()){
+			JComboBox cb = (JComboBox)e.getSource();
+			panel.setNewSelection((String)cb.getSelectedItem());
+		    if (panel.getNewSelection().equals(PluginServices.getText(this,"sin_transformacion"))){
+				panel.getJButtonAccept().setEnabled(true);
+				panel.getJButtonNext().setEnabled(false);
+				panel.setEpsg_tr(false);
+				panel.setNads_tr(false);
+				panel.setManual_tr(false);
+				panel.setRecents_tr(false);
+				panel.setCapa_tr(false);
+				panel.setCompuesta_tr(false);
+				panel.setVista_tr(false);
+			}
+		    else {
+		    	if (panel.getNewSelection().equals(PluginServices.getText(this,"recents_transformation"))) {
+		    		panel.setEpsg_tr(false);
+					panel.setNads_tr(false);
+					panel.setManual_tr(false);
+					panel.setRecents_tr(true);
+					panel.setCapa_tr(false);
+					panel.setCompuesta_tr(false);
+					panel.setVista_tr(false);
+		    	}
+		    	else if (panel.getNewSelection().equals(PluginServices.getText(this,"transformacion_epsg"))) {
+		    		panel.setEpsg_tr(true);
+					panel.setNads_tr(false);
+					panel.setManual_tr(false);
+					panel.setRecents_tr(false);
+					panel.setCapa_tr(false);
+					panel.setCompuesta_tr(false);
+					panel.setVista_tr(false);
+		    	}
+		    	else if (panel.getNewSelection().equals(PluginServices.getText(this,"transformacion_manual"))) {
+		    		panel.setEpsg_tr(false);
+					panel.setNads_tr(false);
+					panel.setManual_tr(true);
+					panel.setRecents_tr(false);
+					panel.setCapa_tr(false);
+					panel.setCompuesta_tr(false);
+					panel.setVista_tr(false);
+		    	}
+		    	else if (panel.getNewSelection().equals(PluginServices.getText(this,"transformacion_compuesta"))) {
+		    		panel.setEpsg_tr(false);
+					panel.setNads_tr(false);
+					panel.setManual_tr(false);
+					panel.setRecents_tr(false);
+					panel.setCapa_tr(false);
+					panel.setCompuesta_tr(true);
+					panel.setVista_tr(false);
+		    	}
+		    	else if (panel.getNewSelection().equals(PluginServices.getText(this,"nadgrids"))) {
+		    		panel.setEpsg_tr(false);
+					panel.setNads_tr(true);
+					panel.setManual_tr(false);
+					panel.setRecents_tr(false);
+					panel.setCapa_tr(false);
+					panel.setCompuesta_tr(false);
+					panel.setVista_tr(false);
+		    	}
+		    	panel.getJButtonAccept().setEnabled(false);
+		    	panel.getJButtonNext().setEnabled(true);
+		    }
+		}
+		if(	e.getSource() == panel.getRecentsTrPanel().getJButtonInfo()){
+			String[] data = new String[5];
+			data[0] = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0);
+			data[1] = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,1);
+			data[2] = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,2);
+			data[3] = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,3);
+			data[4] = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4);
+			
+			//Mostrar el panel de informacin de las transformaciones recientes
+			//InfoTransformationsRecentsPanel info = new InfoTransformationsRecentsPanel(data);
+			InfoCRSPanel info = new InfoCRSPanel(data[2].split(":")[0], Integer.parseInt(data[2].split(":")[1]) , data[0]+" <--> "+ data[4]);
+			PluginServices.getMDIManager().addWindow(info);
+		}
+	}
+	
+	/**
+	 * Metodo que nos servira para conocer si tras la seleccion de crs mas la
+	 * transformacion, hemos decidido cambiar de transformacion
+	 * @return
+	 */
+	private String getCorrectOption (){
+		String item = ((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+		if (item.startsWith(PluginServices.getText(this, "EPSG"))) {
+			return "EPSG";
+		}
+		else if (item.startsWith(PluginServices.getText(this, "NADGR"))) {
+			return "NADGR";
+		}
+		else if (item.startsWith(PluginServices.getText(this, "USR"))) {
+			return "USR";
+		}
+		else if (item.startsWith(PluginServices.getText(this, "COMP"))) {
+			return "COMP";
+		}
+		return "";
+	}
+
+	/**
+	 * Manejador de los eventos relacionados al cambio de valor
+	 * dentro de las tablas del panel de tranformaciones.
+	 */
+	public void valueChanged(ListSelectionEvent e) {
+		if (e.getSource() == panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+	        if (lsm.isSelectionEmpty()) {
+	        	panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable = -1;
+	        	panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().setCodeCRS(-1);
+	        	panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getInfoCrs().setEnabled(false);
+	        	panel.getJButtonAccept().setEnabled(false);		        	
+	        	panel.getJComboOptions().setEnabled(false); 
+	        	panel.getJButtonNext().setEnabled(false);
+	        	panel.getJComboOptions().setSelectedIndex(0);	        	
+	        } 
+	        else {
+	        	panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().initCrs();		        			        	
+	        	panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getInfoCrs().setEnabled(true);
+	        	if (((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3)).equals(PluginServices.getText(this, "sin_transformacion"))) {
+	        		if (panel.getJComboOptions().getSelectedIndex() == 0) {
+	        			panel.getJButtonAccept().setEnabled(true);
+	        			panel.getJButtonNext().setEnabled(false);
+	        		} else{
+	        			panel.getJButtonAccept().setEnabled(false);
+	        			panel.getJButtonNext().setEnabled(true);
+	        		}
+	        	} else {
+	        		String option = getCorrectItem();
+	        		if (option.equals("USR")) {
+	        			if (panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs() instanceof CrsGT) {
+							panel.getManualTrPanel().setWKT(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs());
+						}
+						else {
+							panel.getManualTrPanel().setWKT(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs().getWKT());
+						}						
+						panel.getManualTrPanel().setCode(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+						panel.getManualTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+					
+	        			/**
+	        			 * Rellenamos los datos con anterioridad para si acepta poder
+	        			 * reutilizar el mecanismo que ya tenemos.
+	        			 */
+						panel.getManualTrPanel().fillData((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+						panel.setManual_tr(true);
+						panel.setEpsg_tr(false);
+						panel.setNads_tr(false);
+						panel.setRecents_tr(false);
+						panel.setCompuesta_tr(false);
+					} else if (option.equals("EPSG")) {
+						panel.getEpsgTrPanel().setWKT(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs().getWKT());
+						String sour = (String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable,0);		        	
+						panel.getEpsgTrPanel().setSource(PluginServices.getText(this,sour),panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+						
+						panel.getEpsgTrPanel().fillData((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+						
+						panel.setManual_tr(false);
+						panel.setEpsg_tr(true);
+						panel.setNads_tr(false);
+						panel.setRecents_tr(false);
+						panel.setCompuesta_tr(false);
+					} else if (option.equals("NADGR")) {
+						panel.getNadsTrPanel().setWKT(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs().getWKT());
+						String sour = (String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable,0);		        	
+						panel.getNadsTrPanel().setSourceAbrev(PluginServices.getText(this,sour), ""+panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+						panel.getNadsTrPanel().setCode(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+						panel.getNadsTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+						
+						panel.getNadsTrPanel().fillData((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+						
+						panel.setManual_tr(false);
+						panel.setEpsg_tr(false);
+						panel.setNads_tr(true);
+						panel.setRecents_tr(false);
+						panel.setCompuesta_tr(false);
+						
+					} else if (option.equals("COMP")) {
+						String sour = (String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable,0);					
+						panel.getCapaTrPanel().setCrs_source(PluginServices.getText(this,sour)+":"+panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+						panel.getVistaTrPanel().setCrs_source(PluginServices.getText(this,sour)+":"+panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+						panel.getCapaTrPanel().fillData();
+						panel.getVistaTrPanel().fillData();
+						panel.getCapaTrPanel().fillData((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+						panel.getVistaTrPanel().fillData((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+						panel.setManual_tr(false);
+						panel.setEpsg_tr(false);
+						panel.setNads_tr(false);
+						panel.setRecents_tr(false);
+						panel.setCompuesta_tr(true);
+						
+					}
+	        		panel.getJButtonNext().setEnabled(true);
+	        		panel.getJButtonAccept().setEnabled(true);
+	        	}
+	        	panel.getJComboOptions().setEnabled(true);
+        		 		
+	        }
+		}
+		
+		if (e.getSource() == panel.getCrsMainPanel().getEpsgPanel().getJTable().getSelectionModel()){
+			String[] not_soported = {"engineering", "vertical", "compound", "geocentric", "geographic 3D"};
+			boolean soported = true;
+			boolean soported2 = false;
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+			if (lsm.isSelectionEmpty()) {
+				panel.getCrsMainPanel().getEpsgPanel().selectedRowTable = -1;
+				panel.getCrsMainPanel().getEpsgPanel().setCodeCRS(-1);
+	        	panel.getJButtonAccept().setEnabled(false);
+	        	panel.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(false);
+	        	panel.getJComboOptions().setEnabled(false);
+	        	panel.getJButtonNext().setEnabled(false);
+	        	panel.getJComboOptions().setSelectedIndex(0);	        
+			}
+			else {
+				panel.getCrsMainPanel().getEpsgPanel().selectedRowTable = lsm.getMinSelectionIndex();	        	
+	        	String crs_kind = (String)panel.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(panel.getCrsMainPanel().getEpsgPanel().selectedRowTable,2);
+	        	for (int i = 0; i < not_soported.length; i++) {
+	        		if (crs_kind.equals(not_soported[i])) 
+	        			soported = false;	        		
+	        	}
+	        	for (int i=0; i< valid_method_code.length;i++) {
+	        		if (panel.getCrsMainPanel().getEpsgPanel().getProjectionCode((String)panel.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(panel.getCrsMainPanel().getEpsgPanel().selectedRowTable,0)) == valid_method_code[i]) {
+	        			soported2 = true;
+	        		}
+	        	}
+	        	if (crs_kind.equals("geographic 2D")) {
+	        		soported2 = true;
+	        	}
+	        	if (soported && soported2){
+	        		panel.getCrsMainPanel().getEpsgPanel().setCodeCRS(Integer.parseInt((String)panel.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(panel.getCrsMainPanel().getEpsgPanel().selectedRowTable,0)));
+	        		panel.getCrsMainPanel().getEpsgPanel().setWKT();        		
+	        		panel.getJButtonAccept().setEnabled(true);
+	            	int base = panel.getCrsMainPanel().getEpsgPanel().getCodeCRS();						
+					//panel.compareDatum(panel.getCrsMainPanel().getEpsgPanel().getWKT());
+	            	IWindow activeWindow = PluginServices.getMDIManager().getActiveWindow();
+			    	BaseView activeView = (com.iver.cit.gvsig.project.documents.view.gui.View) activeWindow;
+			    	String authority = ((ICrs) activeView.getMapControl().getProjection()).getCrsWkt().getAuthority()[0];
+	            	/*if (authority.equals("EPSG")){
+	            		panel.getJComboOptions().setEnabled(true);
+	            		panel.getJButtonAccept().setEnabled(true);
+	            	}
+	            	else {
+		        		panel.getJComboOptions().setSelectedIndex(0);	        		
+		        		panel.getJComboOptions().setEnabled(false);
+		        		panel.getJButtonAccept().setEnabled(true);
+		        		panel.getJButtonAccept().setEnabled(true);	        			        		
+		        		panel.getJButtonNext().setEnabled(false);
+		        	}	*/  
+			    	panel.getJComboOptions().setEnabled(true);
+            		panel.getJButtonAccept().setEnabled(true);
+	        		panel.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(true);
+	        	}
+	        	else {
+	        		JOptionPane.showMessageDialog(panel, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+	        		panel.getCrsMainPanel().getEpsgPanel().setCodeCRS(-1);
+	        		panel.getCrsMainPanel().getEpsgPanel().setCodeCRS(0);
+	        		panel.getJButtonAccept().setEnabled(false);
+	        		panel.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(false);
+	        	}	        				        	  
+		    } 
+		}
+		
+		if (e.getSource() == panel.getCrsMainPanel().getIauPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();				
+			String[] not_soported = {"Oblique_Cylindrical_Equal_Area"};
+			boolean soported = true;
+	        if (lsm.isSelectionEmpty()) {
+	        	panel.getCrsMainPanel().getIauPanel().selectedRowTable = -1;
+	        	panel.getCrsMainPanel().getIauPanel().setCodeCRS(-1);
+	        	panel.getCrsMainPanel().getIauPanel().getInfoCrs().setEnabled(false);
+	        	panel.getJButtonAccept().setEnabled(false);		        	
+	        	panel.getJComboOptions().setEnabled(false);     
+	        	panel.getJButtonNext().setEnabled(false);
+	        	panel.getJComboOptions().setSelectedIndex(0);	        	
+	        } 
+	        else {        	
+	        	panel.getCrsMainPanel().getIauPanel().selectedRowTable = lsm.getMinSelectionIndex();
+	        	panel.getCrsMainPanel().getIauPanel().setCodeCRS(Integer.parseInt((String)panel.getCrsMainPanel().getIauPanel().sorter.getValueAt(panel.getCrsMainPanel().getIauPanel().selectedRowTable,0)));
+	        	panel.getCrsMainPanel().getIauPanel().setWKT();
+	        	CrsWkt crs = new CrsWkt(panel.getCrsMainPanel().getIauPanel().getWKT());
+	        	String crs_kind = crs.getProjection();
+	        	for (int i = 0; i < not_soported.length; i++) {
+	        		if (crs_kind.equals(not_soported[i]))
+	        			soported = false;	        		
+	        	}
+	        	if (soported){
+	        		panel.getCrsMainPanel().getIauPanel().getInfoCrs().setEnabled(true);
+	        		panel.getJComboOptions().setEnabled(true);
+	        		panel.getJButtonAccept().setEnabled(true);	
+	        	}
+	        	else {
+	        		JOptionPane.showMessageDialog(panel, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+	        		panel.getCrsMainPanel().getIauPanel().setCodeCRS(-1);
+	        		panel.getCrsMainPanel().getIauPanel().setCodeCRS(0);
+	        		panel.getCrsMainPanel().getIauPanel().getInfoCrs().setEnabled(false);
+	        		panel.getJComboOptions().setEnabled(false);	        		
+	        		panel.getJButtonAccept().setEnabled(false);	        		
+	        	}	        		            	
+	        }
+		}
+		
+		if (e.getSource() == panel.getCrsMainPanel().getEsriPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();				
+			String[] not_soported = {"Oblique_Cylindrical_Equal_Area"};
+			boolean soported = true;
+	        if (lsm.isSelectionEmpty()) {
+	        	panel.getCrsMainPanel().getEsriPanel().selectedRowTable = -1;
+	        	panel.getCrsMainPanel().getEsriPanel().setCodeCRS(-1);
+	        	panel.getCrsMainPanel().getEsriPanel().getInfoCrs().setEnabled(false);
+	        	panel.getJButtonAccept().setEnabled(false);		        	
+	        	panel.getJComboOptions().setEnabled(false);     
+	        	panel.getJButtonNext().setEnabled(false);
+	        	panel.getJComboOptions().setSelectedIndex(0);	        	
+	        } 
+	        else {        	
+	        	panel.getCrsMainPanel().getEsriPanel().selectedRowTable = lsm.getMinSelectionIndex();
+	        	panel.getCrsMainPanel().getEsriPanel().setCodeCRS(Integer.parseInt((String)panel.getCrsMainPanel().getEsriPanel().sorter.getValueAt(panel.getCrsMainPanel().getEsriPanel().selectedRowTable,0)));
+	        	panel.getCrsMainPanel().getEsriPanel().setWKT();
+	        	CrsWkt crs = new CrsWkt(panel.getCrsMainPanel().getEsriPanel().getWKT());
+	        	String crs_kind = crs.getProjection();
+	        	for (int i = 0; i < not_soported.length; i++) {
+	        		if (crs_kind.equals(not_soported[i]))
+	        			soported = false;	        		
+	        	}
+	        	if (soported){
+	        		panel.getCrsMainPanel().getEsriPanel().getInfoCrs().setEnabled(true);
+	        		panel.getJComboOptions().setEnabled(true);
+	        		panel.getJButtonAccept().setEnabled(true);	
+	        	}
+	        	else {
+	        		JOptionPane.showMessageDialog(panel, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+	        		panel.getCrsMainPanel().getEsriPanel().setCodeCRS(-1);
+	        		panel.getCrsMainPanel().getEsriPanel().setCodeCRS(0);
+	        		panel.getCrsMainPanel().getEsriPanel().getInfoCrs().setEnabled(false);
+	        		panel.getJComboOptions().setEnabled(false);	        		
+	        		panel.getJButtonAccept().setEnabled(false);	        		
+	        	}	        		            	
+	        }
+		}
+		
+		if (e.getSource() == panel.getCrsMainPanel().getNewCrsPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();				
+			if (lsm.isSelectionEmpty()) {
+	        	panel.getCrsMainPanel().getNewCrsPanel().selectedRowTable = -1;
+	        	panel.getCrsMainPanel().getNewCrsPanel().setCodeCRS(-1);
+	        	panel.getCrsMainPanel().getNewCrsPanel().getInfoCrs().setEnabled(false);
+	        	panel.getCrsMainPanel().getNewCrsPanel().getBtnEditar().setEnabled(false);
+	        	panel.getCrsMainPanel().getNewCrsPanel().getBtnEliminar().setEnabled(false);
+	        	panel.getJButtonAccept().setEnabled(false);		        	
+	        	panel.getJComboOptions().setEnabled(false);     
+	        	panel.getJButtonNext().setEnabled(false);
+	        	panel.getJComboOptions().setSelectedIndex(0);	        	
+	        } 
+	        else {        	
+	        	panel.getCrsMainPanel().getNewCrsPanel().selectedRowTable = lsm.getMinSelectionIndex();
+	        	panel.getCrsMainPanel().getNewCrsPanel().setCodeCRS(Integer.parseInt((String)panel.getCrsMainPanel().getNewCrsPanel().sorter.getValueAt(panel.getCrsMainPanel().getNewCrsPanel().selectedRowTable,0)));
+	        	panel.getCrsMainPanel().getNewCrsPanel().getInfoCrs().setEnabled(true);
+	        	panel.getCrsMainPanel().getNewCrsPanel().setWKT();
+	        	panel.getCrsMainPanel().getNewCrsPanel().getBtnEditar().setEnabled(true);
+	        	panel.getCrsMainPanel().getNewCrsPanel().getBtnEliminar().setEnabled(true);
+	        	panel.getJComboOptions().setEnabled(true);        		
+	        	panel.getJButtonAccept().setEnabled(true);	        	        		            	
+	        }
+		}
+		
+		
+		if (e.getSource() == panel.getEpsgTrPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+	        if (lsm.isSelectionEmpty()) {
+	        	panel.getEpsgTrPanel().selectedRowTable = -1;	        	
+	        	panel.getJButtonAccept().setEnabled(false);
+	        } 
+	        else {
+	        	panel.getEpsgTrPanel().selectedRowTable = lsm.getMinSelectionIndex();
+	        	panel.getEpsgTrPanel().setTrasformation_code(Integer.parseInt((String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,0)));
+	            String sentence = "SELECT target_crs_code " +
+								"FROM epsg_coordoperation " +                        
+								"WHERE coord_op_code = " + panel.getEpsgTrPanel().getTransformation_code() ;
+	            ResultSet result = Query.select(sentence,panel.getEpsgTrPanel().connect.getConnection());
+	            try {
+					result.next();
+					int tar = result.getInt("target_crs_code");
+					if (tar == panel.getEpsgTrPanel().crs_target) 
+						panel.getEpsgTrPanel().inverseTranformation = false;					
+					else panel.getEpsgTrPanel().inverseTranformation = true;
+				} catch (SQLException e1) {							
+					e1.printStackTrace();
+				}
+				panel.getJButtonAccept().setEnabled(true);
+	        }
+		}
+		
+		/*
+		 * una vez cambiamos la transformacion a elegir, habra que ver que parametros
+		 * tenemos que definir para que cuando aceptemos hayan sido definidos
+		 * anteriormente
+		 */
+		if (e.getSource() == panel.getRecentsTrPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+	        if (lsm.isSelectionEmpty()) {
+	        	panel.getRecentsTrPanel().selectedRowTable = -1;
+	        	panel.getRecentsTrPanel().setCode(0);
+	        	panel.getJButtonAccept().setEnabled(false);
+	        	panel.getRecentsTrPanel().getJButtonInfo().setEnabled(false);
+	        } 
+	        else {
+	        	panel.getRecentsTrPanel().selectedRowTable = lsm.getMinSelectionIndex();
+	        	String[] cad = ((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,2)).split(":");	        	
+	        	panel.getRecentsTrPanel().setCode(Integer.parseInt(cad[1]));
+	        	String[] transformation = ((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0)).split(":");
+	        	if (transformation[0].equals("EPSG")){	        		
+	        		panel.getRecentsTrPanel().setTrCode(Integer.parseInt(transformation[1]));
+					String sentence = "SELECT target_crs_code " +
+									"FROM epsg_coordoperation " +                        
+									"WHERE coord_op_code = " + panel.getRecentsTrPanel().getTrCode();
+				    ResultSet result = Query.select(sentence,panel.getRecentsTrPanel().connect.getConnection());
+				    
+					try {
+						result.next();						
+						int tar = result.getInt("target_crs_code");
+						int crs_target = Integer.parseInt(((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,3)).split(":")[1]);
+						int crs_base = -1;
+						sentence = "SELECT source_geogcrs_code " +
+								  "FROM epsg_coordinatereferencesystem " +	                              
+	                              "WHERE coord_ref_sys_code = " + crs_target;
+						result = Query.select(sentence,panel.getRecentsTrPanel().connect.getConnection());
+						try {
+							result.next();
+							crs_base = result.getInt("source_geogcrs_code");
+						} catch (SQLException e1) {
+							crs_base = -1;
+						}						
+						
+						if (tar == crs_target || tar == crs_base) 
+							panel.getRecentsTrPanel().setInverseTransformation(false);					
+						else panel.getRecentsTrPanel().setInverseTransformation(true);
+						} catch (SQLException e1) {
+							// TODO Auto-generated catch block
+							e1.printStackTrace();
+						}	
+	        	}
+	        	panel.getRecentsTrPanel().getJButtonInfo().setEnabled(true);	        	
+	        	panel.getJButtonAccept().setEnabled(true);
+	        }
+		}
+	}
+	
+	/**
+	 * Metodo que sirve para cuando seleccionamos un crs con transformacion
+	 * salga en el combobox de las transformaciones la reciente utilizada
+	 * y actualizada
+	 * @return
+	 */
+	private String getCorrectItem (){
+		String item = ((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+		if (item.startsWith(PluginServices.getText(this, "EPSG"))) {
+			panel.getJComboOptions().setSelectedIndex(2);
+			return "EPSG";
+		}
+		else if (item.startsWith(PluginServices.getText(this, "NADGR"))) {
+			panel.getJComboOptions().setSelectedIndex(5);
+			return "NADGR";
+		}
+		else if (item.startsWith(PluginServices.getText(this, "USR"))) {
+			panel.getJComboOptions().setSelectedIndex(3);
+			return "USR";
+		}
+		else if (item.startsWith(PluginServices.getText(this, "COMP"))) {
+			panel.getJComboOptions().setSelectedIndex(4);
+			return "COMP";
+		}
+		return "";
+	}	
+
+	/**
+	 * Manejador de los eventos relacionados con el cambio de opcin
+	 * dentro del combobox de eleccin de repositorio, y del combobox
+	 * de eleccin del archivo .gsb para el panel de transformacin
+	 * de nadgrids.
+	 */
+	public void itemStateChanged(ItemEvent e) {
+		if (e.getSource() == panel.getCrsMainPanel().getJComboOptions()) {
+			CardLayout cl = (CardLayout)(panel.getCrsMainPanel().getJPanelMain().getLayout());
+			String op = (String)e.getItem();		
+			if (op.equals("EPSG")){
+				String[] not_soported = {"engineering", "vertical", "compound", "geocentric", "geographic 3D"};
+				
+				boolean soported = true;
+				boolean soported2 = false;
+				panel.getCrsMainPanel().getEpsgPanel().connection();
+				if(panel.getCrsMainPanel().getEpsgPanel().getJTable().getSelectedRowCount()>0) {
+					panel.getCrsMainPanel().getEpsgPanel().selectedRowTable = panel.getCrsMainPanel().getEpsgPanel().getJTable().getSelectedRow();	        	
+		        	String crs_kind = (String)panel.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(panel.getCrsMainPanel().getEpsgPanel().selectedRowTable,2);
+		        	for (int i = 0; i < not_soported.length; i++) {
+		        		if (crs_kind.equals(not_soported[i]))
+		        			soported = false;		        		
+		        	}
+		        	for (int i=0; i< valid_method_code.length;i++) {
+		        		if (panel.getCrsMainPanel().getEpsgPanel().getProjectionCode((String)panel.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(panel.getCrsMainPanel().getEpsgPanel().selectedRowTable,0)) == valid_method_code[i]) {
+		        			soported2 = true;
+		        		}
+		        	}
+		        	if (crs_kind.equals("geographic 2D")) {
+		        		soported2 = true;
+		        	}
+		        	if (soported && soported2){
+		        		panel.getCrsMainPanel().getEpsgPanel().setCodeCRS(Integer.parseInt((String)panel.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(panel.getCrsMainPanel().getEpsgPanel().selectedRowTable,0)));
+		        		panel.getCrsMainPanel().getEpsgPanel().setWKT();        		
+		        		panel.getJButtonAccept().setEnabled(true);
+		            	int base = panel.getCrsMainPanel().getEpsgPanel().getCodeCRS();						
+						//panel.compareDatum(panel.getCrsMainPanel().getEpsgPanel().getWKT());
+		            	panel.getJComboOptions().setEnabled(true);
+		            	if (panel.getJComboOptions().getSelectedIndex() > 0) {
+				    		panel.getJButtonAccept().setEnabled(false);			
+							panel.getJButtonNext().setEnabled(true);
+							panel.getJButtonNext().setEnabled(true);
+			    		} else {
+			    			panel.getJButtonAccept().setEnabled(true);
+			    			panel.getJButtonAccept().setEnabled(true);						
+							panel.getJButtonNext().setEnabled(false);
+			    		}
+		        		//panel.getJButtonAccept().setEnabled(true);
+		        		panel.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(true);
+		        	}
+		        	else {
+		        		JOptionPane.showMessageDialog(panel, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+								JOptionPane.WARNING_MESSAGE);
+		        		panel.getCrsMainPanel().getEpsgPanel().setCodeCRS(-1);
+		        		panel.getCrsMainPanel().getEpsgPanel().setCodeCRS(0);
+		        		panel.getJButtonAccept().setEnabled(false);
+		        		panel.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(false);
+		        	}		        	
+				}
+				else{
+					panel.getJButtonNext().setEnabled(false);
+					panel.getJComboOptions().setEnabled(false);
+					panel.getJComboOptions().setSelectedIndex(0);
+					panel.getJButtonAccept().setEnabled(false);
+				}
+			} else if (op.equals("IAU2000")) {
+				panel.getCrsMainPanel().getIauPanel().connection();
+				if(panel.getCrsMainPanel().getIauPanel().getJTable().getSelectedRowCount()>0) {
+					panel.getCrsMainPanel().getIauPanel().selectedRowTable = panel.getCrsMainPanel().getIauPanel().getJTable().getSelectedRow();;
+		        	panel.getCrsMainPanel().getIauPanel().setCodeCRS(Integer.parseInt((String)panel.getCrsMainPanel().getIauPanel().sorter.getValueAt(panel.getCrsMainPanel().getIauPanel().selectedRowTable,0)));
+		        	panel.getCrsMainPanel().getIauPanel().setWKT();  
+		    		panel.getJComboOptions().setEnabled(true);
+		    		if (panel.getJComboOptions().getSelectedIndex() > 0) {
+			    		panel.getJButtonAccept().setEnabled(false);			
+						panel.getJButtonNext().setEnabled(true);
+						panel.getJButtonNext().setEnabled(true);
+		    		} else {
+		    			panel.getJButtonAccept().setEnabled(true);
+		    			panel.getJButtonAccept().setEnabled(true);						
+						panel.getJButtonNext().setEnabled(false);
+		    		}
+		    		//panel.getJButtonAccept().setEnabled(true);			
+					//panel.getJButtonNext().setEnabled(false);
+				}
+				else {
+					panel.getJButtonNext().setEnabled(false);
+					panel.getJComboOptions().setEnabled(false);
+					panel.getJComboOptions().setSelectedIndex(0);
+					panel.getJButtonAccept().setEnabled(false);
+				}
+			}
+			else if (op.equals("Recientes")) {
+				if(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getJTable().getSelectedRowCount()>0) {
+					panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().initCrs();		        	
+		        	String sour =  panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs().getCrsWkt().getAuthority()[0]; //(String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable,0);
+		        	IWindow activeWindow = PluginServices.getMDIManager().getActiveWindow();
+			    	BaseView activeView = (com.iver.cit.gvsig.project.documents.view.gui.View) activeWindow;
+			    	String authority = ((ICrs) activeView.getMapControl().getProjection()).getCrsWkt().getAuthority()[0];
+		        	/*if (sour.equals("EPSG") && authority.equals("EPSG")){
+		        		//panel.compareDatum(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs().getWKT());
+		        		panel.getJComboOptions().setEnabled(true);
+		        		panel.getJButtonAccept().setEnabled(true);
+		        	}
+		        	else {
+		        		panel.getJComboOptions().setSelectedIndex(0);	        		
+		        		panel.getJComboOptions().setEnabled(false);
+		        		panel.getJButtonAccept().setEnabled(true);
+		        		panel.getJButtonAccept().setEnabled(true);	        			        		
+		        		panel.getJButtonNext().setEnabled(false);
+		        	}	*/	
+			    	panel.getJComboOptions().setEnabled(true);
+			    	if (panel.getJComboOptions().getSelectedIndex() > 0) {
+			    		panel.getJButtonAccept().setEnabled(false);			
+						panel.getJButtonNext().setEnabled(true);
+						panel.getJButtonNext().setEnabled(true);
+		    		} else {
+		    			panel.getJButtonAccept().setEnabled(true);
+		    			panel.getJButtonNext().setEnabled(false);
+		    		}
+	        		//panel.getJButtonAccept().setEnabled(true);
+				}			
+				else {
+					panel.getJButtonNext().setEnabled(false);
+					panel.getJComboOptions().setEnabled(false);
+					panel.getJComboOptions().setSelectedIndex(0);
+					panel.getJButtonAccept().setEnabled(false);
+				}
+			}
+			else if (op.equals("ESRI")) {
+				panel.getCrsMainPanel().getEsriPanel().connection();
+				if(panel.getCrsMainPanel().getEsriPanel().getJTable().getSelectedRowCount()>0) {
+					panel.getCrsMainPanel().getEsriPanel().selectedRowTable = panel.getCrsMainPanel().getEsriPanel().getJTable().getSelectedRow();;
+		        	panel.getCrsMainPanel().getEsriPanel().setCodeCRS(Integer.parseInt((String)panel.getCrsMainPanel().getEsriPanel().sorter.getValueAt(panel.getCrsMainPanel().getEsriPanel().selectedRowTable,0)));
+		        	panel.getCrsMainPanel().getEsriPanel().setWKT();  
+		    		panel.getJComboOptions().setEnabled(true);
+		    		if (panel.getJComboOptions().getSelectedIndex() > 0) {
+			    		panel.getJButtonAccept().setEnabled(false);			
+						panel.getJButtonNext().setEnabled(true);
+		    		} else {
+		    			panel.getJButtonAccept().setEnabled(true);
+		    			panel.getJButtonNext().setEnabled(false);
+		    		}
+		    		//panel.getJButtonAccept().setEnabled(true);			
+					//panel.getJButtonNext().setEnabled(false);
+				}
+				else {
+					panel.getJButtonNext().setEnabled(false);
+					panel.getJComboOptions().setEnabled(false);
+					panel.getJComboOptions().setSelectedIndex(0);
+					panel.getJButtonAccept().setEnabled(false);
+				}
+			}
+			
+			else if (op.equals(PluginServices.getText(this, "newCRS"))) {
+				panel.getCrsMainPanel().getNewCrsPanel().connection();
+				if(panel.getCrsMainPanel().getNewCrsPanel().getJTable().getSelectedRowCount()>0) {
+					if (panel.getCrsMainPanel().getNewCrsPanel().getSearchTextField().getText().equals(""))
+						panel.getCrsMainPanel().getNewCrsPanel().initializeTable();
+					panel.getCrsMainPanel().getNewCrsPanel().selectedRowTable = panel.getCrsMainPanel().getNewCrsPanel().getJTable().getSelectedRow();;
+		        	panel.getCrsMainPanel().getNewCrsPanel().setCodeCRS(Integer.parseInt((String)panel.getCrsMainPanel().getNewCrsPanel().sorter.getValueAt(panel.getCrsMainPanel().getNewCrsPanel().selectedRowTable,0)));
+		        	panel.getCrsMainPanel().getNewCrsPanel().setWKT();  
+		    		panel.getJComboOptions().setEnabled(true);
+		    		if (panel.getJComboOptions().getSelectedIndex() > 0) {
+			    		panel.getJButtonAccept().setEnabled(false);			
+						panel.getJButtonNext().setEnabled(true);
+		    		} else {
+		    			panel.getJButtonAccept().setEnabled(true);
+		    			panel.getJButtonNext().setEnabled(false);
+		    		}
+				}
+				else {
+					panel.getJButtonNext().setEnabled(false);
+					panel.getJComboOptions().setEnabled(false);
+					panel.getJComboOptions().setSelectedIndex(0);
+					panel.getJButtonAccept().setEnabled(false);
+				}
+			}
+		    cl.show(panel.getCrsMainPanel().getJPanelMain(), (String)e.getItem());
+		    panel.getCrsMainPanel().setDataSource((String)e.getItem());
+		}
+	    	    
+	    if (e.getSource() == panel.getNadsTrPanel().getJComboNadFile()){
+			if (panel.getNadsTrPanel().getJComboNadFile().getSelectedIndex()!=0){
+				panel.getNadsTrPanel().setNadFile(panel.getNadsTrPanel().getJComboNadFile().getSelectedItem().toString());//nadFile = getJComboNadFile().getSelectedItem().toString();
+				panel.getNadsTrPanel().getTreePanel().setRoot(PluginServices.getText(this,"grids_en")+": "+panel.getNadsTrPanel().getNadFile());//nadFile);
+				panel.getNadsTrPanel().initializeTree();
+				// Guardar en persistencia nadFile:
+				panel.getNadsTrPanel().saveNadFileName(panel.getNadsTrPanel().getNadFile());//nadFile);
+				panel.getJButtonAccept().setEnabled(true);
+			}
+			else{
+				panel.getNadsTrPanel().setNadFile(null);//nadFile = null;
+				panel.getNadsTrPanel().getTreePanel().setRoot("");
+				panel.getJButtonAccept().setEnabled(false);
+			}
+			
+		}
+	}
+		
+	/**
+	 * Mtodo para manejar el doble click sobre las tablas existentes en
+	 * el panel de transformacin. Aceptar el CRS seleccionado, as como
+	 * la transformacin en el caso de que elijamos transformacin EPSG.
+	 */
+	public void mouseClicked(MouseEvent e) {
+		// TODO Auto-generated method stub
+		if (panel.getJButtonAccept().isEnabled()) {
+			if (e.getSource() == panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getJTable()){
+				if (e.getClickCount() == 2){
+					if (panel.isEpsg_tr()) {			
+						TransEPSG epsgParams = new TransEPSG(panel.getEpsgTrPanel().getTransformation_code(),panel.getEpsgTrPanel().connect, panel.getEpsgTrPanel().inverseTranformation);
+						panel.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+						panel.setProjection(panel.getEpsgTrPanel().getProjection());
+						panel.setEpsg_tr(false);
+						
+						/*
+						 * Actualizar Transformaciones recientes
+						 */
+						String authority = "EPSG";
+			    		String name = (String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,1);
+			    		int code = panel.getEpsgTrPanel().getTransformation_code();
+			    		String crsSource = "EPSG:"+String.valueOf(panel.getEpsgTrPanel().getSource()); 	    			
+			    		String crsTarget = "EPSG:"+String.valueOf(panel.getEpsgTrPanel().getTarget()); 	    			
+			    		String details = (String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,5);
+			    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+			    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+			    		trPersistence.addTrData(trData);
+			    		
+					}
+					else if (panel.isManual_tr()) {
+						boolean domain = panel.getManualTrPanel().correctJTextField();
+						if (domain && panel.getManualTrPanel().correctDomain()){
+							panel.setProjection(panel.getManualTrPanel().getProjection());
+							panel.setManual_tr(false);
+						}
+						else if (!domain) {
+							JOptionPane.showMessageDialog(panel, 
+									PluginServices.getText(this,"numeric_format"), 
+									"Warning...", JOptionPane.WARNING_MESSAGE);					
+							return;
+						}				
+						else {
+							JOptionPane.showMessageDialog(panel, 
+									PluginServices.getText(this,"incorrect_domain"), 
+									"Warning...", JOptionPane.WARNING_MESSAGE);					
+							return;
+						}
+						
+						/*
+						 * Actualizar Transformaciones recientes
+						 */
+						String authority = "USR";
+			    		String name = PluginServices.getText(this,"manual");
+			    		int code = 0;
+			    		String crsSource = panel.getManualTrPanel().getSourceAbrev();
+			    		String crsTarget = panel.getManualTrPanel().getTargetAbrev();
+			    		String details = panel.getManualTrPanel().getValues();
+			    		 
+			    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+			    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+			    		trPersistence.addTrData(trData);
+					}
+					else if (panel.isNads_tr()) {
+						panel.setProjection(panel.getNadsTrPanel().getProjection());
+						panel.setTargetNad(panel.getNadsTrPanel().getNad());
+						panel.setNads_tr(false);
+						
+						/*
+						 * Actualizar Transformaciones recientes
+						 */
+						String authority = "NADGR";
+			    		String name = "----";
+			    		int code = 0;
+			    		String crsSource = panel.getNadsTrPanel().getSourceAbrev();
+			    		String crsTarget = panel.getNadsTrPanel().getTargetAbrev();
+			    		String details = "";
+			    		if (panel.getNadsTrPanel().getNad())
+			    			details = panel.getNadsTrPanel().getNadFile()+ " ("+panel.getNadsTrPanel().getTargetAbrev() +")";
+			    		else
+			    			details = panel.getNadsTrPanel().getNadFile()+ " ("+panel.getNadsTrPanel().getSourceAbrev() +")"; 
+			    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+			    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+			    		trPersistence.addTrData(trData);
+					}
+					/*
+					 * Ver que es necesario cuando aceptas en el panel de transformaciones
+					 * recientes.
+					 */
+					else if (panel.isRecents_tr()) {
+						String[] transformation = ((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0)).split(":");
+						if (transformation[0].equals("USR")){
+			        		panel.getRecentsTrPanel().setParamsManual((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4));
+			        		panel.setProjection(panel.getRecentsTrPanel().getProjection());
+			        	}
+						if (transformation[0].equals("EPSG")){
+							TransEPSG epsgParams = new TransEPSG(panel.getRecentsTrPanel().getTrCode(),panel.getRecentsTrPanel().connect, panel.getRecentsTrPanel().getInverseTransformation());
+							panel.getRecentsTrPanel().setParamsEPGS(epsgParams.getParamValue());
+							panel.setProjection(panel.getRecentsTrPanel().getProjection());
+			        	}
+						if (transformation[0].equals("NADGR")){
+							panel.setProjection(panel.getRecentsTrPanel().getProjectionNad((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4)));
+						}
+						if (transformation[0].equals("COMP")) {
+							panel.setProjection(panel.getRecentsTrPanel().getProjectionComplex((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4)));
+						}
+						//panel.setProjection(panel.getRecentsTrPanel().getProjection());
+						panel.setRecents_tr(false);
+						
+						/*
+						 * Actualizar Transformaciones recientes
+						 */
+						String authCode = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0);
+						String authority = authCode.split(":")[0];
+			    		String name = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,1);
+			    		int code = Integer.parseInt(authCode.split(":")[1]);
+			    		String crsSource = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,2);
+			    		String crsTarget = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,3);
+			    		String details = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4);	    		
+			    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+			    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+			    		trPersistence.addTrData(trData);
+					}else if(panel.isCompuesta_tr()){
+						//Selecciona transformacin compuesta
+						//Mostrar el panel de transformacin de la Capa
+						panel.setProjection(panel.getVistaTrPanel().getProjection());
+						//panel.setTargetNad(panel.getNadsTrPanel().getNad());
+						panel.setCompuesta_tr(false);			
+						panel.setVista_tr(false);
+						
+						/**
+						 * para actualizar las transformaciones recientes, tendremos
+						 * que coger las dos transformaciones utilizadas...
+						 */
+						
+						/*					
+						 * Actualizar Transformaciones recientes
+						 */
+						String authorityLayer = null;
+			    		String nameLayer = null;
+			    		int codeLayer = 0;
+			    		String crsSourceLayer = null;
+			    		String crsTargetLayer = null;
+			    		String detailsLayer = "";
+			    		
+						if(panel.getCapaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"recents_transformation"))){
+							String[] transform = ((String)panel.getCapaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getRecentsTrPanel().selectedRowTable,0)).split(":");
+							
+							authorityLayer = PluginServices.getText(this, transform[0]);						
+							nameLayer = (String)panel.getCapaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getRecentsTrPanel().selectedRowTable,1);
+							crsSourceLayer = (String)panel.getCapaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getRecentsTrPanel().selectedRowTable,2);
+							crsTargetLayer = (String)panel.getCapaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getRecentsTrPanel().selectedRowTable,3);
+							detailsLayer = (String)panel.getCapaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getRecentsTrPanel().selectedRowTable,4);
+						}
+						else if(panel.getCapaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_epsg"))){
+							authorityLayer = "EPSG";
+				    		nameLayer = (String)panel.getCapaTrPanel().getEpsgTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getEpsgTrPanel().selectedRowTable,1);
+				    		codeLayer = panel.getCapaTrPanel().getEpsgTrPanel().getTransformation_code();
+				    		crsSourceLayer = "EPSG:"+String.valueOf(panel.getCapaTrPanel().getEpsgTrPanel().getSource()); 	    			
+				    		crsTargetLayer = "EPSG:"+String.valueOf(panel.getCapaTrPanel().getEpsgTrPanel().getTarget()); 	    			
+				    		detailsLayer = (String)panel.getCapaTrPanel().getEpsgTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getEpsgTrPanel().selectedRowTable,5);
+				    		
+						}
+						else if(panel.getCapaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_manual"))){
+							authorityLayer = "USR";
+				    		nameLayer = PluginServices.getText(this,"manual");
+				    		codeLayer = 0;
+				    		crsSourceLayer = panel.getCapaTrPanel().getManualTrPanel().getSourceAbrev();
+				    		crsTargetLayer = panel.getCapaTrPanel().getManualTrPanel().getTargetAbrev();
+				    		detailsLayer = panel.getCapaTrPanel().getManualTrPanel().getValues();
+						}
+						else if(panel.getCapaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"nadgrids"))){
+							authorityLayer = "NADGR";
+				    		nameLayer = "----";
+				    		codeLayer = 0;
+				    		crsSourceLayer = panel.getCapaTrPanel().getNadsTrPanel().getSourceAbrev();
+				    		crsTargetLayer = panel.getCapaTrPanel().getNadsTrPanel().getTargetAbrev();
+				    		detailsLayer = panel.getCapaTrPanel().getNadsTrPanel().getNadFile()+ " ("+panel.getCapaTrPanel().getNadsTrPanel().getSourceAbrev() +")";
+						}		    		 
+			    		TrData trDataLayer = new TrData(authorityLayer,codeLayer,nameLayer,crsSourceLayer,crsTargetLayer,detailsLayer);
+			    		
+			    		String authorityView = null;
+			    		String nameView = null;
+			    		int codeView = 0;
+			    		String crsSourceView = null;
+			    		String crsTargetView = null;
+			    		String detailsView = "";
+			    		
+						if(panel.getVistaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"recents_transformation"))){
+							String[] transform = ((String)panel.getVistaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getRecentsTrPanel().selectedRowTable,0)).split(":");
+							
+							authorityView = PluginServices.getText(this, transform[0]);						
+							nameView = (String)panel.getVistaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getRecentsTrPanel().selectedRowTable,1);
+							crsSourceView = (String)panel.getVistaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getRecentsTrPanel().selectedRowTable,2);
+							crsTargetView = (String)panel.getVistaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getRecentsTrPanel().selectedRowTable,3);
+							detailsView = (String)panel.getVistaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getRecentsTrPanel().selectedRowTable,4);
+						}
+						else if(panel.getVistaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_epsg"))){
+							authorityView = "EPSG";
+				    		nameView = (String)panel.getVistaTrPanel().getEpsgTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getEpsgTrPanel().selectedRowTable,1);
+				    		codeView = panel.getVistaTrPanel().getEpsgTrPanel().getTransformation_code();
+				    		crsSourceView = "EPSG:"+String.valueOf(panel.getVistaTrPanel().getEpsgTrPanel().getSource()); 	    			
+				    		crsTargetView = "EPSG:"+String.valueOf(panel.getVistaTrPanel().getEpsgTrPanel().getTarget()); 	    			
+				    		detailsView = (String)panel.getVistaTrPanel().getEpsgTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getEpsgTrPanel().selectedRowTable,5);
+				    		
+						}
+						else if(panel.getVistaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_manual"))){
+							authorityView = "USR";
+				    		nameView = PluginServices.getText(this,"manual");
+				    		codeView = 0;
+				    		crsSourceView = panel.getVistaTrPanel().getManualTrPanel().getSourceAbrev();
+				    		crsTargetView = panel.getVistaTrPanel().getManualTrPanel().getTargetAbrev();
+				    		detailsView = panel.getVistaTrPanel().getManualTrPanel().getValues();
+						}
+						else if(panel.getVistaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"nadgrids"))){
+							authorityView = "NADGR";
+				    		nameView = "----";
+				    		codeView = 0;
+				    		crsSourceView = panel.getVistaTrPanel().getNadsTrPanel().getSourceAbrev();
+				    		crsTargetView = panel.getVistaTrPanel().getNadsTrPanel().getTargetAbrev();
+				    		detailsView = panel.getVistaTrPanel().getNadsTrPanel().getNadFile()+ " ("+panel.getVistaTrPanel().getNadsTrPanel().getTargetAbrev() +")";
+				    	}		    		 
+			    		TrData trDataView = new TrData(authorityView,codeView,nameView,crsSourceView,crsTargetView,detailsView);
+			    		CompTrData comp = new CompTrData(trDataLayer, trDataView);
+			    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+			    		trPersistence.addTrData(comp);
+					}
+					else{
+						panel.setSin_tr(true);
+						panel.setProjection(panel.getProjection());
+					}
+										
+		    		// * Actualizar recientes...
+		    		 
+		    		String authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+		    		String name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+		    		int code = ((ICrs)panel.getProjection()).getCode();
+		    		CrsData crsData = new CrsData(authority,code,name);
+		    		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+		    		persistence.addCrsData(crsData);
+					
+					PluginServices.getMDIManager().closeWindow(panel);
+				}
+			}
+			if (e.getSource() == panel.getCrsMainPanel().getEpsgPanel().getJTable()){
+				if (e.getClickCount() == 2){
+					if (panel.isEpsg_tr()) {			
+						TransEPSG epsgParams = new TransEPSG(panel.getEpsgTrPanel().getTransformation_code(),panel.getEpsgTrPanel().connect, panel.getEpsgTrPanel().inverseTranformation);
+						panel.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+						panel.setProjection(panel.getEpsgTrPanel().getProjection());
+						panel.setEpsg_tr(false);
+						
+						/*
+						 * Actualizar Transformaciones recientes
+						 */
+						String authority = "EPSG";
+			    		String name = (String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,1);
+			    		int code = panel.getEpsgTrPanel().getTransformation_code();
+			    		String crsSource = "EPSG:"+String.valueOf(panel.getEpsgTrPanel().getSource()); 	    			
+			    		String crsTarget = "EPSG:"+String.valueOf(panel.getEpsgTrPanel().getTarget());
+			    		String details = (String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,5);;
+			    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+			    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+			    		trPersistence.addTrData(trData);
+					}
+					else if (panel.isManual_tr()) {
+						panel.setProjection(panel.getManualTrPanel().getProjection());
+						panel.setManual_tr(false);
+					}
+					else if (panel.isNads_tr()) {
+						panel.setProjection(panel.getNadsTrPanel().getProjection());
+						panel.setTargetNad(panel.getNadsTrPanel().getNad());
+						panel.setNads_tr(false);
+					}
+					else{
+						panel.setSin_tr(true);
+						panel.setProjection(panel.getProjection());
+					}
+					
+		    		 //* Actualizar recientes...
+		    		 
+		    		String authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+		    		String name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+		    		int code = ((ICrs)panel.getProjection()).getCode();
+		    		CrsData crsData = new CrsData(authority,code,name);
+		    		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+		    		persistence.addCrsData(crsData);
+					
+					PluginServices.getMDIManager().closeWindow(panel);
+				}
+			}
+			if (e.getSource() == panel.getCrsMainPanel().getIauPanel().getJTable()){
+				if (e.getClickCount() == 2){
+					if (panel.isEpsg_tr()) {			
+						TransEPSG epsgParams = new TransEPSG(panel.getEpsgTrPanel().getTransformation_code(),panel.getEpsgTrPanel().connect, panel.getEpsgTrPanel().inverseTranformation);
+						panel.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+						panel.setProjection(panel.getEpsgTrPanel().getProjection());
+						panel.setEpsg_tr(false);
+					}
+					else if (panel.isManual_tr()) {
+						panel.setProjection(panel.getManualTrPanel().getProjection());
+						panel.setManual_tr(false);
+					}
+					else if (panel.isNads_tr()) {
+						panel.setProjection(panel.getNadsTrPanel().getProjection());
+						panel.setTargetNad(panel.getNadsTrPanel().getNad());
+						panel.setNads_tr(false);
+					}
+					else{
+						panel.setSin_tr(true);
+						panel.setProjection(panel.getProjection());
+					}
+					
+		    		 //* Actualizar recientes...
+		    		 
+		    		String authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+		    		String name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+		    		int code = ((ICrs)panel.getProjection()).getCode();
+		    		CrsData crsData = new CrsData(authority,code,name);
+		    		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+		    		persistence.addCrsData(crsData);
+					
+					PluginServices.getMDIManager().closeWindow(panel);
+				}
+			}
+			if (e.getSource() == panel.getCrsMainPanel().getEsriPanel().getJTable()){
+				if (e.getClickCount() == 2){
+					if (panel.isEpsg_tr()) {			
+						TransEPSG epsgParams = new TransEPSG(panel.getEpsgTrPanel().getTransformation_code(),panel.getEpsgTrPanel().connect, panel.getEpsgTrPanel().inverseTranformation);
+						panel.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+						panel.setProjection(panel.getEpsgTrPanel().getProjection());
+						panel.setEpsg_tr(false);
+					}
+					else if (panel.isManual_tr()) {
+						panel.setProjection(panel.getManualTrPanel().getProjection());
+						panel.setManual_tr(false);
+					}
+					else if (panel.isNads_tr()) {
+						panel.setProjection(panel.getNadsTrPanel().getProjection());
+						panel.setTargetNad(panel.getNadsTrPanel().getNad());
+						panel.setNads_tr(false);
+					}
+					else{
+						panel.setSin_tr(true);
+						panel.setProjection(panel.getProjection());
+					}
+					
+		    		 //* Actualizar recientes...
+		    		 
+		    		String authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+		    		String name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+		    		int code = ((ICrs)panel.getProjection()).getCode();
+		    		CrsData crsData = new CrsData(authority,code,name);
+		    		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+		    		persistence.addCrsData(crsData);
+					
+					PluginServices.getMDIManager().closeWindow(panel);
+				}
+			}
+			if (e.getSource() == panel.getCrsMainPanel().getNewCrsPanel().getJTable()){
+				if (e.getClickCount() == 2){
+					if (panel.isEpsg_tr()) {			
+						TransEPSG epsgParams = new TransEPSG(panel.getEpsgTrPanel().getTransformation_code(),panel.getEpsgTrPanel().connect, panel.getEpsgTrPanel().inverseTranformation);
+						panel.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+						panel.setProjection(panel.getEpsgTrPanel().getProjection());
+						panel.setEpsg_tr(false);
+					}
+					else if (panel.isManual_tr()) {
+						panel.setProjection(panel.getManualTrPanel().getProjection());
+						panel.setManual_tr(false);
+					}
+					else if (panel.isNads_tr()) {
+						panel.setProjection(panel.getNadsTrPanel().getProjection());
+						panel.setTargetNad(panel.getNadsTrPanel().getNad());
+						panel.setNads_tr(false);
+					}
+					else{
+						panel.setSin_tr(true);
+						panel.setProjection(panel.getProjection());
+					}
+					
+		    		 //* Actualizar recientes...
+		    		 
+		    		String authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+		    		String name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+		    		int code = ((ICrs)panel.getProjection()).getCode();
+		    		CrsData crsData = new CrsData(authority,code,name);
+		    		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+		    		persistence.addCrsData(crsData);
+					
+					PluginServices.getMDIManager().closeWindow(panel);
+				}
+			}
+		}
+		if (e.getSource() == panel.getEpsgTrPanel().getJTable()){
+			if (e.getClickCount() == 2){
+				TransEPSG epsgParams = new TransEPSG(panel.getEpsgTrPanel().getTransformation_code(),panel.getEpsgTrPanel().connect, panel.getEpsgTrPanel().inverseTranformation);
+				panel.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+				panel.setProjection(panel.getEpsgTrPanel().getProjection());
+				panel.setEpsg_tr(false);
+				
+				/*
+				 * Actualizar Transformaciones recientes
+				 */
+				String authority = "EPSG";
+	    		String name = (String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,1);
+	    		int code = panel.getEpsgTrPanel().getTransformation_code();
+	    		String crsSource = "EPSG:"+String.valueOf(panel.getEpsgTrPanel().getSource()); 	    			
+	    		String crsTarget = "EPSG:"+String.valueOf(panel.getEpsgTrPanel().getTarget());
+	    		String details = (String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,5);;
+	    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+	    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+	    		trPersistence.addTrData(trData);
+				
+				/*
+	    		 * Actualizar Crss recientes...
+	    		 */
+	    		authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+	    		name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+	    		code = ((ICrs)panel.getProjection()).getCode();
+	    		CrsData crsData = new CrsData(authority,code,name);
+	    		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+	    		persistence.addCrsData(crsData);
+				
+				PluginServices.getMDIManager().closeWindow(panel);
+			}
+		}
+		if (e.getSource() == panel.getRecentsTrPanel().getJTable()){
+			if (e.getClickCount() == 2){
+				String[] transf = ((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0)).split(":");
+				if (transf[0].equals("USR")){
+	        		panel.getRecentsTrPanel().setParamsManual((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4));
+	        		panel.setProjection(panel.getRecentsTrPanel().getProjection());
+	        	}
+				if (transf[0].equals("EPSG")){
+					TransEPSG epsgParams = new TransEPSG(panel.getRecentsTrPanel().getTrCode(),panel.getEpsgTrPanel().connect, panel.getRecentsTrPanel().getInverseTransformation());
+					panel.getRecentsTrPanel().setParamsEPGS(epsgParams.getParamValue());
+					panel.setProjection(panel.getRecentsTrPanel().getProjection());
+	        	}
+				if (transf[0].equals("NADGR")){
+					panel.setProjection(panel.getRecentsTrPanel().getProjectionNad((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4)));
+				}
+				//panel.setProjection(panel.getRecentsTrPanel().getProjection());
+				panel.setRecents_tr(false);				
+				
+				/*
+				 * Actualizar Transformaciones recientes
+				 */
+				String authCode = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0);
+				String authority = authCode.split(":")[0];
+	    		String name = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,1);
+	    		int code = Integer.parseInt(authCode.split(":")[1]);
+	    		String crsSource = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,2);
+	    		String crsTarget = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,3);
+	    		String details = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4);	    		
+	    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+	    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+	    		trPersistence.addTrData(trData);
+								
+				/*
+	    		 * Actualizar recientes...
+	    		 */
+	    		authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+	    		name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+	    		code = ((ICrs)panel.getProjection()).getCode();
+	    		CrsData crsData = new CrsData(authority,code,name);
+	    		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+	    		persistence.addCrsData(crsData);
+				
+				PluginServices.getMDIManager().closeWindow(panel);
+			}
+		}
+	}
+
+	public void mouseEntered(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mouseExited(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mousePressed(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mouseReleased(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void keyPressed(KeyEvent arg0) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	/**
+	 * Mtodo para cuando en la tranformacin manual, no se hayan insertado
+	 * valores de transformacin, no se habilite el botn de aceptar.
+	 */
+	public void keyReleased(KeyEvent e) {
+		if(!panel.getManualTrPanel().getStatus()) 
+			panel.getJButtonAccept().setEnabled(false);		
+		else panel.getJButtonAccept().setEnabled(true);		
+	}
+
+	public void keyTyped(KeyEvent arg0) {
+		// TODO Auto-generated method stub
+		
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/listeners/CRSMainTrPanelListener.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/listeners/TransformationCompuestaPanelListener.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/listeners/TransformationCompuestaPanelListener.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/listeners/TransformationCompuestaPanelListener.java	(revision 25287)
@@ -0,0 +1,511 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.listeners;
+
+import java.awt.CardLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import javax.swing.JComboBox;
+import javax.swing.ListSelectionModel;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+
+import org.gvsig.crs.gui.CRSMainTrPanel;
+import org.gvsig.crs.gui.panels.InfoCRSPanel;
+import org.gvsig.crs.gui.panels.InfoTransformationsRecentsPanel;
+import org.gvsig.crs.gui.panels.TransformationCapaPanel;
+import org.gvsig.crs.gui.panels.TransformationVistaPanel;
+import org.gvsig.crs.ogr.TransEPSG;
+
+import com.iver.andami.PluginServices;
+
+import es.idr.teledeteccion.connection.Query;
+
+/**
+ * Esta clase contiene todos los listeners necesarios para el manejo 
+ * de los eventos del panel de la definicion de una transformacion
+ * compuesta entre los crs de la vista y de la capa 
+ *  
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ *
+ */
+
+public class TransformationCompuestaPanelListener implements ActionListener, 
+ListSelectionListener, ItemListener, KeyListener {
+
+	TransformationCapaPanel capa = null;
+	TransformationVistaPanel vista = null;
+	private CRSMainTrPanel panel = null;	
+	boolean condition = false;
+	
+	
+	public TransformationCompuestaPanelListener(TransformationCapaPanel p, CRSMainTrPanel pa) {
+		capa = p;
+		panel = pa;
+	}
+	
+	public TransformationCompuestaPanelListener(TransformationVistaPanel p, CRSMainTrPanel pa) {
+		vista = p;
+		panel = pa;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		if (capa != null) {			
+			if(	e.getSource() == capa.getRecentsTrPanel().getJButtonInfo()){
+				String[] data = new String[5];
+				data[0] = (String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,0);
+				data[1] = (String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,1);
+				data[2] = (String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,2);
+				data[3] = (String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,3);
+				data[4] = (String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,4);
+				
+				//Mostrar el panel de informacin de las transformaciones recientes
+				InfoCRSPanel info = new InfoCRSPanel(data[2].split(":")[0], Integer.parseInt(data[2].split(":")[1]) , data[0]+" <--> "+ data[4]);
+				PluginServices.getMDIManager().addWindow(info);
+			}
+			//Al cambiar el item seleccionado del combo
+			if(e.getSource().equals(capa.getJComboOptions())){
+				CardLayout cl = (CardLayout)(capa.getPCenter().getLayout());
+				if(capa.getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"recents_transformation"))){
+					//Mostrar el panel de transformacin reciente
+					 cl.show(capa.getPCenter(), "recents");
+					 if (capa.getRecentsTrPanel().selectedRowTable == -1) {
+						 capa.setSourceTransformation(null);
+						 panel.getJButtonNext().setEnabled(false);
+					 } else {
+						String[] transform = ((String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,0)).split(":");
+						if (transform[0].equals("USR")){
+							capa.getRecentsTrPanel().setParamsManual((String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,4));
+			        		capa.setSourceTransformation(capa.getRecentsTrPanel().getParams());
+			        	}
+						if (transform[0].equals("EPSG")){
+							TransEPSG epsgParams = new TransEPSG(capa.getRecentsTrPanel().getTrCode(),capa.getEpsgTrPanel().connect, capa.getRecentsTrPanel().getInverseTransformation());
+							capa.getRecentsTrPanel().setParamsEPGS(epsgParams.getParamValue());
+							capa.setSourceTransformation(capa.getRecentsTrPanel().getParams());						
+			        	}
+						if (transform[0].equals("NADGR")){
+							String p = (String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,4);
+							capa.setSourceTransformation(capa.getNadsParams(p));
+						}
+						panel.getJButtonNext().setEnabled(true);
+					 }
+				}
+				else if(capa.getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_epsg"))){
+					//mostrar el panel de transformacin epsg
+					 cl.show(capa.getPCenter(), "epsg");
+					 if (capa.getEpsgTrPanel().selectedRowTable == -1) {
+						 capa.setSourceTransformation(null);
+						 panel.getJButtonNext().setEnabled(false);
+					 } else {
+						TransEPSG epsgParams = new TransEPSG(capa.getEpsgTrPanel().getTransformation_code(),capa.getEpsgTrPanel().connect, capa.getEpsgTrPanel().inverseTranformation);
+						capa.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+						capa.setSourceTransformation(capa.getParamsEpsg(capa.getEpsgTrPanel().getValues()));
+						panel.getJButtonNext().setEnabled(true);
+					 }
+				}
+				else if(capa.getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_manual"))){
+					//mostrar el panel de transformacin manual
+					cl.show(capa.getPCenter(), "manual");
+					if(!capa.getManualTrPanel().getStatus()) 
+						panel.getJButtonNext().setEnabled(false);		
+					else {
+						panel.getJButtonNext().setEnabled(true);
+						capa.setSourceTransformation(capa.getManualParams());
+					}					
+		        	
+				}
+				else if(capa.getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"nadgrids"))){
+					//mostrar el panel de nadgrids
+					 cl.show(capa.getPCenter(), "nad");
+					 if (capa.getNadsTrPanel().getJComboNadFile().getSelectedIndex()!=0) {
+						 capa.setSourceTransformation("+nadgrids="+capa.getNadsTrPanel().getNadFile());
+						 panel.getJButtonNext().setEnabled(true);
+					 }					 
+					 else {
+						 capa.setSourceTransformation(null);	
+						 panel.getJButtonNext().setEnabled(false);
+					 }
+				}
+			}
+		}
+		
+		if (vista != null) {			
+			if(	e.getSource() == vista.getRecentsTrPanel().getJButtonInfo()){
+				String[] data = new String[5];
+				data[0] = (String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,0);
+				data[1] = (String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,1);
+				data[2] = (String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,2);
+				data[3] = (String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,3);
+				data[4] = (String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,4);
+				
+				//Mostrar el panel de informacin de las transformaciones recientes
+				InfoCRSPanel info = new InfoCRSPanel(data[2].split(":")[0], Integer.parseInt(data[2].split(":")[1]) , data[0]+" <--> "+ data[4]);
+				PluginServices.getMDIManager().addWindow(info);
+			}
+			//Al cambiar el item seleccionado del combo
+			if(e.getSource().equals(vista.getJComboOptions())){
+				CardLayout cl = (CardLayout)(vista.getPCenter().getLayout());
+				if(vista.getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"recents_transformation"))){
+					//Mostrar el panel de transformacin reciente
+					 cl.show(vista.getPCenter(), "recents");
+					 if (vista.getRecentsTrPanel().selectedRowTable == -1) {
+						 vista.setTargetTransformation(null);
+						 panel.getJButtonAccept().setEnabled(false);
+					 } else {
+						String[] transform = ((String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,0)).split(":");
+						if (transform[0].equals("USR")){
+							vista.getRecentsTrPanel().setParamsManual((String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,4));
+							vista.setTargetTransformation(vista.getRecentsTrPanel().getParams());
+			        	}
+						if (transform[0].equals("EPSG")){
+							TransEPSG epsgParams = new TransEPSG(vista.getRecentsTrPanel().getTrCode(),vista.getEpsgTrPanel().connect, vista.getRecentsTrPanel().getInverseTransformation());
+							vista.getRecentsTrPanel().setParamsEPGS(epsgParams.getParamValue());
+							vista.setTargetTransformation(vista.getRecentsTrPanel().getParams());						
+			        	}
+						if (transform[0].equals("NADGR")){
+							String p = (String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,4);
+							vista.setTargetTransformation(vista.getNadsParams(p));
+						}
+						 panel.getJButtonAccept().setEnabled(true);
+					 }
+				}
+				else if(vista.getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_epsg"))){
+					//mostrar el panel de transformacin epsg
+					 cl.show(vista.getPCenter(), "epsg");
+					 if (vista.getEpsgTrPanel().selectedRowTable == -1) {
+						 vista.setTargetTransformation(null);
+						 panel.getJButtonAccept().setEnabled(false);
+					 } else {
+						TransEPSG epsgParams = new TransEPSG(vista.getEpsgTrPanel().getTransformation_code(),vista.getEpsgTrPanel().connect, vista.getEpsgTrPanel().inverseTranformation);
+						vista.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+						vista.setTargetTransformation(vista.getParamsEpsg(vista.getEpsgTrPanel().getValues()));
+						panel.getJButtonAccept().setEnabled(true);
+					 }
+					 
+		        }
+				else if(vista.getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_manual"))){
+					//mostrar el panel de transformacin manual
+					 cl.show(vista.getPCenter(), "manual");
+					 if(!vista.getManualTrPanel().getStatus()) 
+							panel.getJButtonAccept().setEnabled(false);		
+						else {
+							panel.getJButtonAccept().setEnabled(true);
+							vista.setTargetTransformation(vista.getManualParams());
+						}
+				}
+				else if(vista.getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"nadgrids"))){
+					//mostrar el panel de nadgrids
+					 cl.show(vista.getPCenter(), "nad");
+					 if (vista.getNadsTrPanel().getJComboNadFile().getSelectedIndex()!=0) {
+						 vista.setTargetTransformation("+nadgrids="+vista.getNadsTrPanel().getNadFile());
+						 panel.getJButtonAccept().setEnabled(true);
+					 }					 
+					 else {
+						 vista.setTargetTransformation(null);	
+						 panel.getJButtonAccept().setEnabled(false);
+					 }
+				}
+			}
+		}
+	}
+
+	public void valueChanged(ListSelectionEvent e) {
+		if (capa != null) {
+			if (e.getSource() == capa.getEpsgTrPanel().getJTable().getSelectionModel()){
+				ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+		        if (lsm.isSelectionEmpty()) {
+		        	capa.getEpsgTrPanel().selectedRowTable = -1;	        	
+		        	panel.getJButtonNext().setEnabled(false);
+		        	if (panel.getJButtonAccept().isEnabled()) {
+		        		condition = true;
+		        	}
+		        	panel.getJButtonAccept().setEnabled(false);
+		        } 
+		        else {
+		        	capa.getEpsgTrPanel().selectedRowTable = lsm.getMinSelectionIndex();
+		        	capa.getEpsgTrPanel().setTrasformation_code(Integer.parseInt((String)capa.getEpsgTrPanel().sorter.getValueAt(capa.getEpsgTrPanel().selectedRowTable,0)));
+		            String sentence = "SELECT target_crs_code " +
+									"FROM epsg_coordoperation " +                        
+									"WHERE coord_op_code = " + capa.getEpsgTrPanel().getTransformation_code() ;
+		            ResultSet result = Query.select(sentence,capa.getEpsgTrPanel().connect.getConnection());
+		            try {
+						result.next();
+						int tar = result.getInt("target_crs_code");
+						if (tar == capa.getEpsgTrPanel().crs_target) 
+							capa.getEpsgTrPanel().inverseTranformation = false;					
+						else capa.getEpsgTrPanel().inverseTranformation = true;
+					} catch (SQLException e1) {							
+						e1.printStackTrace();
+					}
+										
+					TransEPSG epsgParams = new TransEPSG(capa.getEpsgTrPanel().getTransformation_code(),capa.getEpsgTrPanel().connect, capa.getEpsgTrPanel().inverseTranformation);
+					capa.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+					capa.setSourceTransformation(capa.getParamsEpsg(capa.getEpsgTrPanel().getValues()));
+					if (condition) {
+						panel.getJButtonAccept().setEnabled(true);
+						condition = false;
+					}
+					panel.getJButtonNext().setEnabled(true);					
+		        }
+			}
+			
+			/*
+			 * una vez cambiamos la transformacion a elegir, habra que ver que parametros
+			 * tenemos que definir para que cuando aceptemos hayan sido definidos
+			 * anteriormente
+			 */
+			if (e.getSource() == capa.getRecentsTrPanel().getJTable().getSelectionModel()){
+				ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+		        if (lsm.isSelectionEmpty()) {
+		        	capa.getRecentsTrPanel().selectedRowTable = -1;
+		        	capa.getRecentsTrPanel().setCode(0);
+		        	panel.getJButtonNext().setEnabled(false);
+		        	capa.getRecentsTrPanel().getJButtonInfo().setEnabled(false);
+		        	if (panel.getJButtonAccept().isEnabled()) {
+		        		condition = true;
+		        	}
+		        	panel.getJButtonAccept().setEnabled(false);
+		        } 
+		        else {
+		        	capa.getRecentsTrPanel().selectedRowTable = lsm.getMinSelectionIndex();
+		        	String[] cad = ((String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,2)).split(":");	        	
+		        	capa.getRecentsTrPanel().setCode(Integer.parseInt(cad[1]));
+		        	String[] transformation = ((String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,0)).split(":");
+		        	if (transformation[0].equals("EPSG")){	        		
+		        		capa.getRecentsTrPanel().setTrCode(Integer.parseInt(transformation[1]));	
+		        	}
+		        	capa.getRecentsTrPanel().getJButtonInfo().setEnabled(true);	        	
+		        			        	
+		        	String[] transform = ((String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,0)).split(":");
+					if (transform[0].equals("USR")){
+						capa.getRecentsTrPanel().setParamsManual((String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,4));
+		        		capa.setSourceTransformation(capa.getRecentsTrPanel().getParams());
+		        	}
+					if (transform[0].equals("EPSG")){
+						TransEPSG epsgParams = new TransEPSG(capa.getRecentsTrPanel().getTrCode(),capa.getEpsgTrPanel().connect, capa.getRecentsTrPanel().getInverseTransformation());
+						capa.getRecentsTrPanel().setParamsEPGS(epsgParams.getParamValue());
+						capa.setSourceTransformation(capa.getRecentsTrPanel().getParams());						
+		        	}
+					if (transform[0].equals("NADGR")){
+						String p = (String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,4);
+						capa.setSourceTransformation(capa.getNadsParams(p));
+					}					
+		        	panel.getJButtonNext().setEnabled(true);
+		        	if (condition = true) {
+						panel.getJButtonAccept().setEnabled(true);
+						condition = false;
+					}
+		        }
+			}
+		}
+		
+		if (vista != null) {
+			if (e.getSource() == vista.getEpsgTrPanel().getJTable().getSelectionModel()){
+				ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+		        if (lsm.isSelectionEmpty()) {
+		        	vista.getEpsgTrPanel().selectedRowTable = -1;	        	
+		        	panel.getJButtonAccept().setEnabled(false);
+		        } 
+		        else {
+		        	vista.getEpsgTrPanel().selectedRowTable = lsm.getMinSelectionIndex();
+		        	vista.getEpsgTrPanel().setTrasformation_code(Integer.parseInt((String)vista.getEpsgTrPanel().sorter.getValueAt(vista.getEpsgTrPanel().selectedRowTable,0)));
+		            String sentence = "SELECT target_crs_code " +
+									"FROM epsg_coordoperation " +                        
+									"WHERE coord_op_code = " + vista.getEpsgTrPanel().getTransformation_code() ;
+		            ResultSet result = Query.select(sentence,vista.getEpsgTrPanel().connect.getConnection());
+		            try {
+						result.next();
+						int tar = result.getInt("target_crs_code");
+						if (tar == vista.getEpsgTrPanel().crs_target) 
+							vista.getEpsgTrPanel().inverseTranformation = false;					
+						else vista.getEpsgTrPanel().inverseTranformation = true;
+					} catch (SQLException e1) {							
+						e1.printStackTrace();
+					}
+					
+					/**
+					 * revisar esto
+					 */
+					TransEPSG epsgParams = new TransEPSG(vista.getEpsgTrPanel().getTransformation_code(),vista.getEpsgTrPanel().connect, vista.getEpsgTrPanel().inverseTranformation);
+					vista.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+					vista.setTargetTransformation(vista.getParamsEpsg(vista.getEpsgTrPanel().getValues()));
+					panel.getJButtonAccept().setEnabled(true);
+		        }
+			}
+			
+			/*
+			 * una vez cambiamos la transformacion a elegir, habra que ver que parametros
+			 * tenemos que definir para que cuando aceptemos hayan sido definidos
+			 * anteriormente
+			 */
+			if (e.getSource() == vista.getRecentsTrPanel().getJTable().getSelectionModel()){
+				ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+		        if (lsm.isSelectionEmpty()) {
+		        	vista.getRecentsTrPanel().selectedRowTable = -1;
+		        	vista.getRecentsTrPanel().setCode(0);
+		        	panel.getJButtonAccept().setEnabled(false);
+		        	vista.getRecentsTrPanel().getJButtonInfo().setEnabled(false);
+		        } 
+		        else {
+		        	vista.getRecentsTrPanel().selectedRowTable = lsm.getMinSelectionIndex();
+		        	String[] cad = ((String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,2)).split(":");	        	
+		        	vista.getRecentsTrPanel().setCode(Integer.parseInt(cad[1]));
+		        	String[] transformation = ((String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,0)).split(":");
+		        	if (transformation[0].equals("EPSG")){	        		
+		        		vista.getRecentsTrPanel().setTrCode(Integer.parseInt(transformation[1]));	
+		        	}
+		        	vista.getRecentsTrPanel().getJButtonInfo().setEnabled(true);	        	
+		        	
+		        	/**
+		        	 * revisar esto
+		        	 */
+		        	String[] transform = ((String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,0)).split(":");
+					if (transform[0].equals("USR")){
+						vista.getRecentsTrPanel().setParamsManual((String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,4));
+						vista.setTargetTransformation(vista.getRecentsTrPanel().getParams());
+		        	}
+					if (transform[0].equals("EPSG")){
+						TransEPSG epsgParams = new TransEPSG(vista.getRecentsTrPanel().getTrCode(),vista.getEpsgTrPanel().connect, vista.getRecentsTrPanel().getInverseTransformation());
+						vista.getRecentsTrPanel().setParamsEPGS(epsgParams.getParamValue());
+						vista.setTargetTransformation(vista.getRecentsTrPanel().getParams());						
+		        	}
+					if (transform[0].equals("NADGR")){
+						String p = (String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,4);
+						vista.setTargetTransformation(vista.getNadsParams(p));
+					}
+		        	
+		        	panel.getJButtonAccept().setEnabled(true);
+		        }
+			}
+		}
+	}
+
+	public void itemStateChanged(ItemEvent e) {
+		if (capa != null) {
+			if (e.getSource() == capa.getNadsTrPanel().getJComboNadFile()){
+				if (capa.getNadsTrPanel().getJComboNadFile().getSelectedIndex()!=0){
+					capa.getNadsTrPanel().setNadFile(capa.getNadsTrPanel().getJComboNadFile().getSelectedItem().toString());//nadFile = getJComboNadFile().getSelectedItem().toString();
+					capa.getNadsTrPanel().getTreePanel().setRoot(PluginServices.getText(this,"grids_en")+": "+capa.getNadsTrPanel().getNadFile());//nadFile);
+					capa.getNadsTrPanel().initializeTree();
+					// Guardar en persistencia nadFile:
+					capa.getNadsTrPanel().saveNadFileName(capa.getNadsTrPanel().getNadFile());//nadFile);
+					capa.setSourceTransformation("+nadgrids="+capa.getNadsTrPanel().getNadFile());
+					panel.getJButtonNext().setEnabled(true);
+					if(condition) {
+						panel.getJButtonAccept().setEnabled(true);
+						condition = false;
+					}
+				}
+				else{
+					capa.getNadsTrPanel().setNadFile(null);//nadFile = null;
+					capa.getNadsTrPanel().getTreePanel().setRoot("");
+					capa.setSourceTransformation(null);					
+					panel.getJButtonNext().setEnabled(false);
+					if (panel.getJButtonAccept().isEnabled())
+						condition = true;
+					panel.getJButtonAccept().setEnabled(false);
+				}
+				
+			}
+		}
+		
+		if (vista != null) {
+			if (e.getSource() == vista.getNadsTrPanel().getJComboNadFile()){
+				if (vista.getNadsTrPanel().getJComboNadFile().getSelectedIndex()!=0){
+					vista.getNadsTrPanel().setNadFile(vista.getNadsTrPanel().getJComboNadFile().getSelectedItem().toString());//nadFile = getJComboNadFile().getSelectedItem().toString();
+					vista.getNadsTrPanel().getTreePanel().setRoot(PluginServices.getText(this,"grids_en")+": "+vista.getNadsTrPanel().getNadFile());//nadFile);
+					vista.getNadsTrPanel().initializeTree();
+					// Guardar en persistencia nadFile:
+					vista.getNadsTrPanel().saveNadFileName(vista.getNadsTrPanel().getNadFile());//nadFile);
+					vista.setTargetTransformation("+nadgrids="+vista.getNadsTrPanel().getNadFile());
+					panel.getJButtonAccept().setEnabled(true);
+				}
+				else{
+					vista.getNadsTrPanel().setNadFile(null);//nadFile = null;
+					vista.getNadsTrPanel().getTreePanel().setRoot("");
+					vista.setTargetTransformation(null);
+					panel.getJButtonAccept().setEnabled(false);
+				}
+				
+			}
+		}
+	}
+
+	public void keyPressed(KeyEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void keyReleased(KeyEvent e) {
+		if (capa != null) {
+			if(!capa.getManualTrPanel().getStatus()) 
+				panel.getJButtonNext().setEnabled(false);		
+			else {
+				panel.getJButtonNext().setEnabled(true);
+				capa.setSourceTransformation(capa.getManualParams());
+			}
+		}
+		
+		if (vista != null) {
+			if(!vista.getManualTrPanel().getStatus()) 
+				panel.getJButtonAccept().setEnabled(false);		
+			else {
+				panel.getJButtonAccept().setEnabled(true);
+				vista.setTargetTransformation(vista.getManualParams());
+			}
+		}		
+	}
+
+	public void keyTyped(KeyEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/listeners/TransformationCompuestaPanelListener.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/listeners/ImportNewCrsDialogListener.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/listeners/ImportNewCrsDialogListener.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/listeners/ImportNewCrsDialogListener.java	(revision 25287)
@@ -0,0 +1,176 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.listeners;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+
+import javax.swing.JOptionPane;
+import javax.swing.ListSelectionModel;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.dialog.ImportNewCrsDialog;
+import org.gvsig.crs.persistence.CrsData;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+
+import com.iver.andami.PluginServices;
+
+/**
+ * Listeners para el manejo de las importaciones de las partes correspondientes
+ * a los crs definidos por el usuario
+ * 
+ * @author Jose Luis Gomez Martinez (joseluis.gomez@uclm.es)
+ *
+ */
+
+public class ImportNewCrsDialogListener implements ActionListener,
+ListSelectionListener, MouseListener {
+
+	ImportNewCrsDialog dialog = null;	
+	
+	public ImportNewCrsDialogListener(ImportNewCrsDialog d) {
+		dialog = d;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		if (e.getSource() == dialog.getJButtonAccept()){			
+			PluginServices.getMDIManager().closeWindow(dialog);
+		}
+		
+		if (e.getSource() == dialog.getJButtonCancel()) {
+			dialog.setCode(-1);
+			PluginServices.getMDIManager().closeWindow(dialog);
+		}		
+	}
+
+	public void valueChanged(ListSelectionEvent e) {
+		if (e.getSource() == dialog.getEpsgPanel().getJTable().getSelectionModel()){
+			String[] not_soported= new String[6];// = {"engineering", "vertical", "compound", "geocentric"};
+			boolean soported = true;
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+			if (dialog.getOption().equals(PluginServices.getText(this, "projection"))) {
+				not_soported[0] = "engineering";
+				not_soported[1]= "vertical";
+				not_soported[2] = "compound";
+				not_soported[3] ="geocentric";
+				not_soported[4]= "geographic 3D";
+				not_soported[5] = "geographic 2D";
+			} else {
+				not_soported[0] = "engineering";
+				not_soported[1]= "vertical";
+				not_soported[2] = "compound";
+				not_soported[3] ="geocentric";
+				not_soported[4]= "geographic 3D";				
+			}
+			
+	        if (lsm.isSelectionEmpty()) {	        	
+	        	dialog.getEpsgPanel().setCodeCRS(-1);
+	        	dialog.getJButtonAccept().setEnabled(false);        	
+	        	dialog.getEpsgPanel().getInfoCrs().setEnabled(false);
+	        	dialog.setCode(-1);     	        	
+	        } 
+	        else {	        	
+	        	dialog.getEpsgPanel().selectedRowTable = lsm.getMinSelectionIndex();
+	        	String crs_kind = (String)dialog.getEpsgPanel().sorter.getValueAt(dialog.getEpsgPanel().selectedRowTable,2);	        	
+	        	for (int i = 0; i < not_soported.length; i++) {
+	        		if (crs_kind.equals(not_soported[i]))
+	        			soported = false;	        		
+	        	}
+	        	if (soported){
+	        		int code = Integer.parseInt((String)dialog.getEpsgPanel().sorter.getValueAt(dialog.getEpsgPanel().selectedRowTable,0));
+	        		dialog.setCode(code);
+	        		dialog.getEpsgPanel().setCodeCRS(code);
+	        		dialog.getJButtonAccept().setEnabled(true);
+	            	dialog.getEpsgPanel().getInfoCrs().setEnabled(true);
+	            	
+	        	}
+	        	else {
+	        		if (dialog.getOption().equals(PluginServices.getText(this, "projection"))) {
+	        			JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,"crs_not_projected"), "Warning...",
+								JOptionPane.WARNING_MESSAGE);
+	        		} else {        			
+	        			JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+	        		}
+	        		dialog.setCode(-1);
+	        		dialog.getEpsgPanel().setCodeCRS(-1);
+	        		dialog.getJButtonAccept().setEnabled(false);
+	        		dialog.getEpsgPanel().getInfoCrs().setEnabled(false);
+	        	}	        	
+	        }
+		}
+		
+	}
+
+	public void mouseClicked(MouseEvent e) {
+		if (e.getSource() == dialog.getEpsgPanel().getJTable()){
+			if (e.getClickCount() == 2){				
+				PluginServices.getMDIManager().closeWindow(dialog);	
+		    }
+		}
+	}
+
+	public void mouseEntered(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mouseExited(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mousePressed(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mouseReleased(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/gui/listeners/ImportNewCrsDialogListener.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/CompTrData.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/CompTrData.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/CompTrData.java	(revision 25287)
@@ -0,0 +1,43 @@
+package org.gvsig.crs.persistence;
+
+/**
+ * Clase que contiene los datos de una Transformaci�n compuestas que son 
+ * utilizados por el mecanismo de persistencia para almacenar las 
+ * Transformaciones recientemente usadas. 
+ * 
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ *
+ */
+public class CompTrData extends TrData {
+	
+	TrData 			firstTr 		= null;
+	TrData 			secondTr 		= null;
+	public CompTrData(String authority, int code, String name, String crsSource, String crsTarget, String details, TrData firstTr, TrData secondTr) {
+		super(authority, code, name, crsSource, crsTarget, details);
+		this.firstTr = firstTr;
+		this.secondTr = secondTr;
+	}
+	
+	public CompTrData(TrData firstTr, TrData secondTr) {
+		super("COMP", 0, "----", firstTr.getCrsSource(), secondTr.getCrsTarget(),
+				firstTr.getDetails()+" @ "+secondTr.getDetails());
+		this.firstTr = firstTr;
+		this.secondTr = secondTr;
+	}
+
+	public TrData getFirstTr() {
+		return firstTr;
+	}
+
+	public void setFirstTr(TrData firstTr) {
+		this.firstTr = firstTr;
+	}
+
+	public TrData getSecondTr() {
+		return secondTr;
+	}
+
+	public void setSecondTr(TrData secondTr) {
+		this.secondTr = secondTr;
+	}
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/CompTrData.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/RecentTrsPersistence.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/RecentTrsPersistence.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/RecentTrsPersistence.java	(revision 25287)
@@ -0,0 +1,327 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+*
+* Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ib��ez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha
+*   Campus Universitario s/n
+*   02071 Alabacete
+*   Spain
+*
+*   +34 967 599 200
+*/
+
+package org.gvsig.crs.persistence;
+
+import java.util.Arrays;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Set;
+
+import com.iver.andami.PluginServices;
+import com.iver.utiles.DateTime;
+import com.iver.utiles.XMLEntity;
+
+/**
+ * This class is used to save a list of Transfomations (using the
+ * Andami persistence model) to the plugins-persistence.xml file.
+ * It has methods to create a set of TrData objects  from an
+ * xml file. It can also save a set of TrData objects in an
+ * xml file.
+ *
+ * @author Diego Guerrero Sevilla diego.guerrero@uclm.es
+ */
+public class RecentTrsPersistence {
+	private XMLEntity xml = null;
+	private XMLEntity recentsXml = null;
+	private PluginServices ps = null;
+	private static final String TR_RECENTS = "recentTransformations";
+	private static final String TR_AUTHORITY = "authority";
+	private static final String TR_NAME = "name";
+	private static final String TR_CODE = "code";
+	private static final String TR_CRS_SOURCE = "crsSource";
+	private static final String TR_CRS_TARGET = "crsTarget";
+	private static final String TR_DETAILS = "details";
+	private static final String TR_DATE = "date";
+	
+	
+	/**
+	 * Constructor
+	 */
+	public RecentTrsPersistence(){
+		ps = PluginServices.getPluginServices("org.gvsig.crs");
+		xml = ps.getPersistentXML();
+		for (int child = 0; child<xml.getChildrenCount();child++)
+			if (xml.getChild(child).getPropertyValue(0).equals(TR_RECENTS))
+				recentsXml = xml.getChild(child); 
+		if (recentsXml == null){
+			XMLEntity xmlEntity = new XMLEntity();
+			xmlEntity.putProperty("groupName", TR_RECENTS);
+			xml.addChild(xmlEntity); 
+			recentsXml = xmlEntity;
+		}
+	}
+
+	/**
+	 * This methos is used to save the information in an XML file
+	 */
+	public void setPersistent(){
+		ps.setPersistentXML(xml);
+	}
+
+	/**
+	 * This method saves an array of TrData using the Anadami
+	 * persistence model
+	 * @param tr
+	 * Array of trData to save.
+	 */
+	public void setArrayOfTrData(TrData[] trs){
+		recentsXml.getXmlTag().removeAllXmlTag();
+
+		for (int i=0 ; i<trs.length ; i++){
+			recentsXml.addChild(trDataToXml(trs[i]));
+		}
+
+	}
+
+	/**
+	 * This method adds a TrData using the Anadami
+	 * persistence model. If the Transformation exists just actualizes
+	 * the type name and the wkt string.
+	 * @param tr
+	 * TrData
+	 */
+	public void addTrData(TrData tr){
+		TrData[] trs = getArrayOfTrData();
+
+		boolean found = false;
+
+		for (int i = 0; i < trs.length; i++) {
+			if (trs[i].getAuthority().equals(tr.getAuthority())&& trs[i].getCode()==tr.getCode() 
+					&& trs[i].getCrsSource().equals(tr.getCrsSource()) && trs[i].getCrsTarget().equals(tr.getCrsTarget()) && trs[i].getDetails().equals(tr.getDetails())) {
+				found = true;
+				trs[i].setName(tr.getName());
+				trs[i].setProperies(tr.getProperies());
+				trs[i].updateLastAccess();
+				setArrayOfTrData(trs);
+			}
+		}
+		
+		if (!found) {
+			if (trs.length<10){ //L�mitie de almacenamiento: 10 Transf.
+				TrData[] newTrs = new TrData[trs.length + 1];
+				System.arraycopy(trs, 0, newTrs, 0, trs.length);
+				newTrs[trs.length] = tr;
+				setArrayOfTrData(newTrs);
+			}
+			else {
+				Arrays.sort(trs);
+				trs[0]=tr;
+				setArrayOfTrData(trs);
+			}
+		}
+	}
+
+
+
+	/**
+	 * This method returns an array of TrData objects that
+	 * have been saved using the Andami persistence model.
+	 * @return
+	 * TrData[]
+	 */
+	public TrData[] getArrayOfTrData(){
+		TrData[] trs = new TrData[recentsXml.getChildrenCount()];
+		for (int i=0 ; i<recentsXml.getChildrenCount() ; i++){
+			trs[i] = xmlToTrData(recentsXml.getChild(i));
+		}
+		
+		/*
+		 * Ordenar el array por fechas
+		 */
+		Arrays.sort(trs);
+		
+		return trs;
+	}
+
+
+	/**
+	 * This method creates and returns a new XMLEntity.
+	 * @param tr
+	 * TrData with all the Transformation information
+	 * @return
+	 * XMLEntity
+	 */
+	public XMLEntity trDataToXml(TrData tr){
+		String dFormat="Y-m-d H:i:s.Z";
+	
+		XMLEntity xmlEnt = new XMLEntity();
+		xmlEnt.putProperty(TR_AUTHORITY,tr.getAuthority());
+		xmlEnt.putProperty(TR_CODE,Integer.toString(tr.getCode()));
+		xmlEnt.putProperty(TR_NAME,(tr.getName()));
+		xmlEnt.putProperty(TR_CRS_SOURCE,(tr.getCrsSource()));
+		xmlEnt.putProperty(TR_CRS_TARGET,(tr.getCrsTarget()));
+		xmlEnt.putProperty(TR_DETAILS,(tr.getDetails()));
+		xmlEnt.putProperty(TR_DATE,DateTime.dateToString(tr.getDate(),dFormat));
+		Set keys = tr.getProperies().keySet();
+		Iterator it = keys.iterator();
+	    while (it.hasNext()) {
+	    	String next = (String)it.next();
+	    	xmlEnt.putProperty(next,
+	    			tr.getProperies().get(next));
+	    }	
+	    
+	    if (tr instanceof CompTrData) {
+	    	CompTrData compTr = (CompTrData) tr;
+	    	xmlEnt.addChild(trDataToXml(compTr.getFirstTr()));
+	    	xmlEnt.addChild(trDataToXml(compTr.getSecondTr()));
+		}
+	    
+		return xmlEnt;
+	}
+
+	/**
+	 * This method creates a new TrData from a XMLEntity
+	 * @param xmlEnt
+	 * XMLRntity that contains the Tr information
+	 * @return
+	 * TrData
+	 */
+	public TrData xmlToTrData(XMLEntity xmlEnt){
+		
+		TrData trData = null;
+		
+		Properties props = null;
+		
+		String authority = "";
+		int code = 0;
+		String name = "";
+		String crsSource = "";
+		String crsTarget = "";
+		String details = "";
+		Date date = null;
+
+		authority = xmlEnt.getStringProperty(TR_AUTHORITY);
+		code = Integer.valueOf(xmlEnt.getStringProperty(TR_CODE)).intValue();
+		name = xmlEnt.getStringProperty(TR_NAME);
+		crsSource = xmlEnt.getStringProperty(TR_CRS_SOURCE);
+		crsTarget = xmlEnt.getStringProperty(TR_CRS_TARGET);
+		details = xmlEnt.getStringProperty(TR_DETAILS);
+		date = DateTime.stringToDate(xmlEnt.getStringProperty(TR_DATE));
+		
+		if (xmlEnt.getChildrenCount()==2){
+			authority = xmlEnt.getChild(0).getStringProperty(TR_AUTHORITY);
+			code = Integer.valueOf(xmlEnt.getChild(0).getStringProperty(TR_CODE)).intValue();
+			name = xmlEnt.getChild(0).getStringProperty(TR_NAME);
+			crsSource = xmlEnt.getChild(0).getStringProperty(TR_CRS_SOURCE);
+			crsTarget = xmlEnt.getChild(0).getStringProperty(TR_CRS_TARGET);
+			details = xmlEnt.getChild(0).getStringProperty(TR_DETAILS);
+			date = DateTime.stringToDate(xmlEnt.getChild(0).getStringProperty(TR_DATE));
+			TrData firstTr = new TrData(authority,code,name,crsSource,crsTarget,details,date);
+			
+			props = new Properties();
+			for (int i=0 ; i<xmlEnt.getPropertyCount() ; i++){
+				String property = xmlEnt.getChild(0).getPropertyName(i);
+				if (!((property.equals(TR_AUTHORITY)) ||
+					(property.equals(TR_CODE)) ||
+					(property.equals(TR_NAME)) ||
+					(property.equals(TR_CRS_SOURCE)) ||
+					(property.equals(TR_CRS_TARGET)) ||
+					(property.equals(TR_DETAILS)) ||
+					(property.equals(TR_DATE)))){
+						props.put(property,xmlEnt.getChild(0).getStringProperty(property));
+					}					
+			}
+			firstTr.setProperies(props);
+			
+			authority = xmlEnt.getChild(1).getStringProperty(TR_AUTHORITY);
+			code = Integer.valueOf(xmlEnt.getChild(1).getStringProperty(TR_CODE)).intValue();
+			name = xmlEnt.getChild(1).getStringProperty(TR_NAME);
+			crsSource = xmlEnt.getChild(1).getStringProperty(TR_CRS_SOURCE);
+			crsTarget = xmlEnt.getChild(1).getStringProperty(TR_CRS_TARGET);
+			details = xmlEnt.getChild(1).getStringProperty(TR_DETAILS);
+			date = DateTime.stringToDate(xmlEnt.getChild(1).getStringProperty(TR_DATE));
+			TrData secondTr = new TrData(authority,code,name,crsSource,crsTarget,details,date);
+			
+			props = new Properties();
+			for (int i=0 ; i<xmlEnt.getPropertyCount() ; i++){
+				String property = xmlEnt.getChild(0).getPropertyName(i);
+				if (!((property.equals(TR_AUTHORITY)) ||
+					(property.equals(TR_CODE)) ||
+					(property.equals(TR_NAME)) ||
+					(property.equals(TR_CRS_SOURCE)) ||
+					(property.equals(TR_CRS_TARGET)) ||
+					(property.equals(TR_DETAILS)) ||
+					(property.equals(TR_DATE)))){
+						props.put(property,xmlEnt.getChild(0).getStringProperty(property));
+					}					
+			}
+			secondTr.setProperies(props);
+			
+			trData = new CompTrData(firstTr,secondTr);
+		}
+		else{
+			authority = xmlEnt.getStringProperty(TR_AUTHORITY);
+			code = Integer.valueOf(xmlEnt.getStringProperty(TR_CODE)).intValue();
+			name = xmlEnt.getStringProperty(TR_NAME);
+			crsSource = xmlEnt.getStringProperty(TR_CRS_SOURCE);
+			crsTarget = xmlEnt.getStringProperty(TR_CRS_TARGET);
+			details = xmlEnt.getStringProperty(TR_DETAILS);
+			date = DateTime.stringToDate(xmlEnt.getStringProperty(TR_DATE));	
+			
+			trData = new TrData(authority,code,name,crsSource,crsTarget,details,date);
+		}
+		
+		props = new Properties();
+		for (int i=0 ; i<xmlEnt.getPropertyCount() ; i++){
+			String property = xmlEnt.getPropertyName(i);
+			if (!((property.equals(TR_AUTHORITY)) ||
+				(property.equals(TR_CODE)) ||
+				(property.equals(TR_NAME)) ||
+				(property.equals(TR_CRS_SOURCE)) ||
+				(property.equals(TR_CRS_TARGET)) ||
+				(property.equals(TR_DETAILS)) ||
+				(property.equals(TR_DATE)))){
+					props.put(property,xmlEnt.getStringProperty(property));
+				}					
+		}
+		trData.setProperies(props);
+		return trData;
+	}
+
+	public XMLEntity getXml() {
+		return xml;
+	}
+
+	public void setXml(XMLEntity xml) {
+		this.xml = xml;
+	}
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/RecentTrsPersistence.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/package.html
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/package.html	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/package.html	(revision 25287)
@@ -0,0 +1,4 @@
+<html>
+	<body>Clases relacionadas con la persistencia de la extensi�n CRS.
+</body>
+</html>

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/package.html
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/TrData.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/TrData.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/TrData.java	(revision 25287)
@@ -0,0 +1,167 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.persistence;
+
+import java.util.Date;
+import java.util.Properties;
+
+import com.iver.utiles.DateTime;
+
+/**
+ * Esta clase contiene los datos de una Transformaci�n que son utilizados 
+ * por el mecanismo de persistencia para almacenar las Transformaciones
+ * recientemente usadas. 
+ * 
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ */
+public class TrData implements Comparable{
+	
+	private String authority = null;
+	private int code = 0;
+	private String name = null;
+	private String crsSource = null;
+	private String crsTarget = null;
+	private String details = null;
+	private Date date = null;
+	private Properties properies = new Properties();
+	
+	
+	
+	public TrData(String authority, int code, String name, String crsSource, String crsTarget, String details) {
+		super();
+		this.authority = authority;
+		this.code = code;
+		this.name = name;
+		this.crsSource= crsSource;
+		this.crsTarget = crsTarget;
+		this.details = details;
+		this.date = DateTime.getCurrentDate();
+	}
+	
+	public TrData(String authority, int code, String name,String crsSource, String crsTarget, String detalis, Date date) {
+		super();
+		this.authority = authority;
+		this.code = code;
+		this.name = name;
+		this.crsSource= crsSource;
+		this.crsTarget = crsTarget;
+		this.details = detalis;
+		this.date = date;
+	}
+
+	public TrData() {
+	}
+	
+	public String getAuthority() {
+		return authority;
+	}
+	
+	public int getCode() {
+		return code;
+	}
+	
+	public String getName() {
+		return name;
+	}
+	
+	/**
+	 * @return Returns the properies.
+	 */
+	public Properties getProperies() {
+		return properies;
+	}
+
+	/**
+	 * @param properies The properies to set.
+	 */
+	public void setProperies(Properties properies) {
+		this.properies = properies;
+	}
+
+	public void setAuthority(String authority) {
+		this.authority = authority;
+	}
+
+	public void setCode(int code) {
+		this.code = code;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public Date getDate() {
+		return date;
+	} 
+	
+	public void updateLastAccess() {        
+		date = DateTime.getCurrentDate();
+	}
+
+	public int compareTo(Object o) {
+		TrData trData = (TrData)o;
+		return this.date.compareTo(trData.getDate());
+	}
+
+	public String getCrsSource() {
+		return crsSource;
+	}
+
+	public void setCrsSource(String crsSource) {
+		this.crsSource = crsSource;
+	}
+
+	public String getCrsTarget() {
+		return crsTarget;
+	}
+
+	public void setCrsTarget(String crsTarget) {
+		this.crsTarget = crsTarget;
+	}
+
+	public String getDetails() {
+		return details;
+	}
+
+	public void setDetails(String details) {
+		this.details = details;
+	} 
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/TrData.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/RecentCRSsPersistence.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/RecentCRSsPersistence.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/RecentCRSsPersistence.java	(revision 25287)
@@ -0,0 +1,238 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+*
+* Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ib��ez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha
+*   Campus Universitario s/n
+*   02071 Alabacete
+*   Spain
+*
+*   +34 967 599 200
+*/
+
+package org.gvsig.crs.persistence;
+
+import java.util.Arrays;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Set;
+
+import com.iver.andami.PluginServices;
+import com.iver.utiles.DateTime;
+import com.iver.utiles.XMLEntity;
+
+/**
+ * This class is used to save a list of CRSs (using the
+ * Andami persistence model) to the plugins-persistence.xml file.
+ * It has methods to create a set of CrsData objects  from an
+ * xml file. It can also save a set of CRSs objects in an
+ * xml file.
+ *
+ * @author Diego Guerrero Sevilla diego.guerrero@uclm.es
+ */
+public class RecentCRSsPersistence {
+	private XMLEntity xml = null;
+	private XMLEntity recentsXml = null;
+	private PluginServices ps = null;
+	private static final String CRS_RECENTS = "recentCrss";
+	private static final String CRS_AUTHORITY = "authority";
+	private static final String CRS_NAME = "name";
+	private static final String CRS_CODE = "code";
+	private static final String CRS_DATE = "date";
+	
+	
+	/**
+	 * Constructor
+	 */
+	public RecentCRSsPersistence(){
+		ps = PluginServices.getPluginServices("org.gvsig.crs");
+		xml = ps.getPersistentXML();
+		for (int child = 0; child<xml.getChildrenCount();child++)
+			if (xml.getChild(child).getPropertyValue(0).equals(CRS_RECENTS))
+				recentsXml = xml.getChild(child); 
+		if (recentsXml == null){
+			XMLEntity xmlEntity = new XMLEntity();
+			xmlEntity.putProperty("groupName", CRS_RECENTS);
+			xml.addChild(xmlEntity); 
+			recentsXml = xmlEntity;
+		}
+	}
+
+	/**
+	 * This methos is used to save the information in an XML file
+	 */
+	public void setPersistent(){
+		ps.setPersistentXML(xml);
+	}
+
+	/**
+	 * This method saves an array of CrsData using the Anadami
+	 * persistence model
+	 * @param crsss
+	 * Array of crss
+	 */
+	public void setArrayOfCrsData(CrsData[] crss){
+		recentsXml.getXmlTag().removeAllXmlTag();
+
+		for (int i=0 ; i<crss.length ; i++){
+			recentsXml.addChild(crsDataToXml(crss[i]));
+		}
+
+	}
+
+	/**
+	 * This method adds a CrsData using the Anadami
+	 * persistence model. If the Crs exists just actualizes
+	 * the type name and the wkt string.
+	 * @param crs
+	 * CrsData
+	 */
+	public void addCrsData(CrsData crs){
+		CrsData[] crss = getArrayOfCrsData();
+
+		boolean found = false;
+
+		for (int i = 0; i < crss.length; i++) {
+			if (crss[i].getAuthority().equals(crs.getAuthority())&& crss[i].getCode()==crs.getCode()) {
+				found = true;
+				crss[i].setName(crs.getName());
+				crss[i].setProperies(crs.getProperies());
+				crss[i].updateLastAccess();
+				setArrayOfCrsData(crss);
+			}
+		}
+		
+		if (!found) {
+			if (crss.length<10){ //L�mite de almacenamiento: 10 CRSs
+				CrsData[] newCrss = new CrsData[crss.length + 1];
+				System.arraycopy(crss, 0, newCrss, 0, crss.length);
+				newCrss[crss.length] = crs;
+				setArrayOfCrsData(newCrss);
+			}
+			else {
+				Arrays.sort(crss);
+				crss[0]=crs;
+				setArrayOfCrsData(crss);
+			}
+		}
+	}
+
+
+
+	/**
+	 * This method returns an array of CrsData objects that
+	 * have been saved using the Andami persistence model.
+	 * @return
+	 * CrsData[]
+	 */
+	public CrsData[] getArrayOfCrsData(){
+		CrsData[] crss = new CrsData[recentsXml.getChildrenCount()];
+		for (int i=0 ; i<recentsXml.getChildrenCount() ; i++){
+			crss[i] = xmlToCrsData(recentsXml.getChild(i));
+		}
+		
+		/*
+		 * Ordenar el array por fechas
+		 */
+		Arrays.sort(crss);
+		
+		return crss;
+	}
+
+
+	/**
+	 * This method creates and returns a new XMLEntity.
+	 * @param crs
+	 * CrsData with all the Crs information
+	 * @return
+	 * XMLEntity
+	 */
+	public XMLEntity crsDataToXml(CrsData crs){
+		String dFormat="Y-m-d H:i:s.Z";
+	
+		XMLEntity xmlEnt = new XMLEntity();
+		xmlEnt.putProperty(CRS_AUTHORITY,crs.getAuthority());
+		xmlEnt.putProperty(CRS_CODE,Integer.toString(crs.getCode()));
+		xmlEnt.putProperty(CRS_NAME,(crs.getName()));
+		xmlEnt.putProperty(CRS_DATE,DateTime.dateToString(crs.getDate(),dFormat));
+		Set keys = crs.getProperies().keySet();
+		Iterator it = keys.iterator();
+	    while (it.hasNext()) {
+	    	String next = (String)it.next();
+	    	xmlEnt.putProperty(next,
+	    			crs.getProperies().get(next));
+	    }		   
+		return xmlEnt;
+	}
+
+	/**
+	 * This method creates a new CrsData from a XMLEntity
+	 * @param xmlEnt
+	 * XMLRntity that contains the Crs information
+	 * @return
+	 * CrsData
+	 */
+	public CrsData xmlToCrsData(XMLEntity xmlEnt){
+		String authority = "";
+		int code = 0;
+		String name = "";
+		Date date = null;
+
+		authority = xmlEnt.getStringProperty(CRS_AUTHORITY);
+		code = Integer.valueOf(xmlEnt.getStringProperty(CRS_CODE)).intValue();
+		name = xmlEnt.getStringProperty(CRS_NAME);
+		date = DateTime.stringToDate(xmlEnt.getStringProperty(CRS_DATE));
+		
+		CrsData crsData = new CrsData(authority,code,name,date);
+		
+		Properties props = new Properties();
+		for (int i=0 ; i<xmlEnt.getPropertyCount() ; i++){
+			String property = xmlEnt.getPropertyName(i);
+			if (!((property.equals(CRS_AUTHORITY)) ||
+				(property.equals(CRS_CODE)) ||
+				(property.equals(CRS_NAME)) ||
+				(property.equals(CRS_DATE)))){
+					props.put(property,xmlEnt.getStringProperty(property));
+				}					
+		}
+		crsData.setProperies(props);
+		return crsData;
+	}
+
+	public XMLEntity getXml() {
+		return xml;
+	}
+
+	public void setXml(XMLEntity xml) {
+		this.xml = xml;
+	}
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/RecentCRSsPersistence.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/CrsData.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/CrsData.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/CrsData.java	(revision 25287)
@@ -0,0 +1,137 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.persistence;
+
+import java.util.Date;
+import java.util.Properties;
+
+import com.iver.utiles.DateTime;
+
+/**
+ * Esta clase contiene los datos de un CRS que son utilizados 
+ * por el mecanismo de persistencia para almacenar los CRSs
+ * recientemente utilizados. 
+ * 
+ * @author Diego Guerrero Sevilla diego.guerrero@uclm.es
+ */
+public class CrsData implements Comparable{
+	
+	private String authority = null;
+	private int code = 0;
+	private String name = null;
+	private Date date = null;
+	private Properties properies = new Properties();
+	
+	
+	
+	public CrsData(String authority, int code, String name) {
+		super();
+		// TODO Auto-generated constructor stub
+		this.authority = authority;
+		this.code = code;
+		this.name = name;
+		this.date = DateTime.getCurrentDate();
+	}
+	
+	public CrsData(String authority, int code, String name, Date date) {
+		super();
+		// TODO Auto-generated constructor stub
+		this.authority = authority;
+		this.code = code;
+		this.name = name;
+		this.date = date;
+	}
+
+	public CrsData() {
+		// TODO Auto-generated constructor stub
+	}
+	
+	public String getAuthority() {
+		return authority;
+	}
+	
+	public int getCode() {
+		return code;
+	}
+	
+	public String getName() {
+		return name;
+	}
+	
+	/**
+	 * @return Returns the properies.
+	 */
+	public Properties getProperies() {
+		return properies;
+	}
+
+	/**
+	 * @param properies The properies to set.
+	 */
+	public void setProperies(Properties properies) {
+		this.properies = properies;
+	}
+
+	public void setAuthority(String authority) {
+		this.authority = authority;
+	}
+
+	public void setCode(int code) {
+		this.code = code;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public Date getDate() {
+		return date;
+	} 
+	
+	public void updateLastAccess() {        
+		date = DateTime.getCurrentDate();
+	}
+
+	public int compareTo(Object o) {
+		CrsData crsData = (CrsData)o;
+		return this.date.compareTo(crsData.getDate());
+	} 
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/persistence/CrsData.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/InitialWarningExtension.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/InitialWarningExtension.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/InitialWarningExtension.java	(revision 25287)
@@ -0,0 +1,207 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+
+/* CVS MESSAGES:
+*
+* $Id: InitialWarningExtension.java 8765 2006-11-15 00:08:29Z jjdelcerro $
+* $Log$
+* Revision 1.3.4.1  2006-11-15 00:08:08  jjdelcerro
+* *** empty log message ***
+*
+* Revision 1.4  2006/10/02 13:52:34  jaume
+* organize impots
+*
+* Revision 1.3  2006/08/29 07:56:27  cesar
+* Rename the *View* family of classes to *Window* (ie: SingletonView to SingletonWindow, ViewInfo to WindowInfo, etc)
+*
+* Revision 1.2  2006/08/29 07:13:53  cesar
+* Rename class com.iver.andami.ui.mdiManager.View to com.iver.andami.ui.mdiManager.IWindow
+*
+* Revision 1.1  2006/05/25 16:27:21  jaume
+* *** empty log message ***
+*
+*
+*/
+package org.gvsig.crs;
+
+import java.awt.Color;
+import java.awt.Window;
+
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JWindow;
+import javax.swing.border.TitledBorder;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.plugins.Extension;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+
+public class InitialWarningExtension extends Extension {
+//	public static Preferences fPrefs = Preferences.userRoot().node( "gvsig.initial_warkning" );
+//	private boolean show = fPrefs.getBoolean( "show_panel", true);
+	private DlgWaring dlgWarning;
+    /**
+	 * @see com.iver.andami.plugins.IExtension#isEnabled()
+	 */
+	public boolean isEnabled() {
+		return true;
+	}
+
+	/**
+	 * @see com.iver.mdiApp.plugins.IExtension#isVisible()
+	 */
+	public boolean isVisible() {
+		return true;
+	}
+
+	/**
+	 * @see com.iver.andami.plugins.IExtension#initialize()
+	 */
+	public void initialize() {
+		dlgWarning = new DlgWaring();
+		dlgWarning.setText(PluginServices.getText(this, "initial_jcrs_warning"));
+		dlgWarning.setVisible(true);
+	}
+
+	/**
+	 * @see com.iver.andami.plugins.IExtension#execute(java.lang.String)
+	 */
+	public void execute(String actionCommand) {
+	}
+    
+	private class DlgWaring extends JWindow{
+
+		private JButton btnOk = null;
+		private JCheckBox chkBoxShowAgain = null;
+		private JLabel lblText = null;
+		private JPanel panel=null;
+		private JPanel panel2;
+		/**
+		 * This is the default constructor
+		 */
+		public DlgWaring() {
+			super((Window)PluginServices.getMainFrame());
+			Window window=(Window)PluginServices.getMainFrame();
+			setLocation(window.getWidth()/2+window.getX()-150,window.getHeight()/2+window.getY()-150);
+			initialize();
+			this.setAlwaysOnTop(true);
+		}
+
+		public void setText(String string) {
+			lblText.setText(string);
+		}
+
+		/**
+		 * This method initializes this
+		 *
+		 * @return void
+		 */
+		private void initialize() {
+			panel=new JPanel();
+			panel.setBackground(Color.black);
+			panel.setLayout(null);
+			panel.setBounds(0,0,300,300);
+			panel2=new JPanel();
+			panel2.setLayout(null);
+			panel2.setBounds(2,2,298,298);
+			lblText = new JLabel();
+			lblText.setBounds(15, 15, 271, 200);
+			lblText.setText("JLabel");
+			lblText.setBorder(new TitledBorder(PluginServices.getText(this, "warning")));
+			panel2.add(lblText);
+			panel2.setSize((int)(panel.getSize().getWidth()-4),(int)(panel.getSize().getHeight()-4));
+			panel.add(panel2);
+			this.setLayout(null);
+			this.setSize(300, 300);
+			this.add(getBtnOk(), null);
+//			this.add(getChkBoxShowAgain(), null);
+			this.add(panel, null);
+		}
+
+		/**
+		 * This method initializes btnOk
+		 *
+		 * @return javax.swing.JButton
+		 */
+		private JButton getBtnOk() {
+			if (btnOk == null) {
+				btnOk = new JButton();
+				btnOk.setBounds(100, 250, 100, 20);
+				btnOk.setText(PluginServices.getText(this, "aceptar"));
+				btnOk.addActionListener(new java.awt.event.ActionListener() {
+					public void actionPerformed(java.awt.event.ActionEvent e) {
+						dlgWarning.setVisible(false);
+						dlgWarning.dispose();
+						//						PluginServices.getMDIManager().closeWindow(dlgWarning);
+					}
+				});
+			}
+			return btnOk;
+		}
+
+		/**
+		 * This method initializes chkBoxShowAgain
+		 *
+		 * @return javax.swing.JCheckBox
+		 */
+//		private JCheckBox getChkBoxShowAgain() {
+//			if (chkBoxShowAgain == null) {
+//				chkBoxShowAgain = new JCheckBox();
+//				chkBoxShowAgain.setBounds(44, 116, 241, 21);
+//				chkBoxShowAgain.setSelected(true);
+//				chkBoxShowAgain.setText(PluginServices.getText(this, "show_this_dialog_next_startup"));
+//			}
+//			return chkBoxShowAgain;
+//		}
+
+		public WindowInfo getWindowInfo() {
+			WindowInfo vi = new WindowInfo(WindowInfo.MODALDIALOG);
+			vi.setWidth(300+8);
+			vi.setHeight(250);
+			vi.setTitle(PluginServices.getText(this, "warning"));
+			return vi;
+		}
+
+	}  //  @jve:decl-index=0:visual-constraint="10,10"
+
+}
Index: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/JCrsExtension.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/JCrsExtension.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/JCrsExtension.java	(revision 25287)
@@ -0,0 +1,136 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+
+package org.gvsig.crs;
+
+import java.util.Arrays;
+import java.util.Iterator;
+
+import org.geotools.factory.FactoryRegistry;
+import org.geotools.referencing.operation.MathTransformProvider;
+import org.gvsig.crs.gui.panels.ProjChooserPanel;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.plugins.Extension;
+import com.iver.cit.gvsig.About;
+import com.iver.cit.gvsig.fmap.crs.CRSFactory;
+import com.iver.cit.gvsig.gui.panels.CRSSelectPanel;
+import com.iver.cit.gvsig.gui.panels.FPanelAbout;
+import com.iver.cit.gvsig.project.Project;
+import com.iver.utiles.XMLEntity;
+
+public class JCrsExtension extends Extension {
+	
+	private static final String DEFAULT_PROJECTION_KEY_NAME = "DefaultProjection";
+	private static final String FACTORY_DEFAULT_PROJECTION = "EPSG:23030";
+
+	public void initialize() {
+		
+		/*
+		 * Se eliminan del registro de geotools las proyecciones que aporta libJCrs para asegurar que 
+		 * son estas �ltimas las que se utilizan. 
+		 */
+		final Class[] categories = {org.geotools.referencing.operation.MathTransformProvider.class};
+		FactoryRegistry registry = new FactoryRegistry(Arrays.asList(categories));
+		Iterator providers = registry.getServiceProviders(MathTransformProvider.class);
+		Iterator providers2 = null;
+		MathTransformProvider provider = null;
+		MathTransformProvider provider2 = null;
+		
+		while (providers.hasNext()){
+			provider = (MathTransformProvider) providers.next(); 
+			if(provider.nameMatches("IDR")){
+				providers2 = registry.getServiceProviders(MathTransformProvider.class);
+				while (providers2.hasNext()){
+					provider2 = (MathTransformProvider) providers2.next();
+					if(provider2.nameMatches(provider.getName().toString()) && !provider2.nameMatches("IDR"))
+						registry.deregisterServiceProvider(provider2, categories[0]);
+				}
+			}
+		}
+		
+		//TODO: Solo para depurar: BORRAR
+		providers = registry.getServiceProviders(MathTransformProvider.class);
+		while (providers.hasNext()) {
+            provider = (MathTransformProvider) providers.next();    
+            System.out.println(provider.toString());
+		}
+		/*
+		 * 
+		 */
+		
+		
+		CRSFactory.cp = new CrsFactory();
+		CRSSelectPanel.registerPanelClass(ProjChooserPanel.class);
+		
+		//	Default Projection
+		PluginServices ps = PluginServices.getPluginServices("com.iver.cit.gvsig");
+		XMLEntity xml = ps.getPersistentXML();
+		String projCode = null; 
+		if (xml.contains(DEFAULT_PROJECTION_KEY_NAME)) {
+			projCode = xml.getStringProperty(DEFAULT_PROJECTION_KEY_NAME);
+		} else {
+			projCode = FACTORY_DEFAULT_PROJECTION;
+		}
+		Project.setDefaultProjection(CRSFactory.getCRS(projCode));
+		
+		About about=(About)PluginServices.getExtension(About.class); 
+		FPanelAbout panelAbout=about.getAboutPanel(); 
+		java.net.URL aboutURL = this.getClass().getResource("/about.htm"); 
+		panelAbout.addAboutUrl("JCRS",aboutURL);
+	}
+
+	public void execute(String actionCommand) {
+	
+
+	}
+
+	public boolean isEnabled() {
+
+		return true;
+	}
+
+	public boolean isVisible() {
+
+		return false;
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src/org/gvsig/crs/JCrsExtension.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/data/sped2et.gsb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/data/sped2et.gsb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/build.xml
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/build.xml	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/build.xml	(revision 25287)
@@ -0,0 +1,128 @@
+<project name="extJCRS" default="generate-without-source" basedir=".">
+    <description>
+        Instala el plugin de JCrs en Andami.
+    </description>
+  <!-- set global properties for this build -->
+  <property name="src" location="src"/>
+  <property name="without_src"  location="without_src"/>
+  <property name="build" location="bin"/>
+  <property name="dist"  location="dist"/>
+  <property name="plugin" value="org.gvsig.crs"/>
+  <property name="extension-dir" location="../_fwAndami/gvSIG/extensiones"/>
+  <property name="andami-dir" location="../_fwAndami"/>
+  <property name="JavaSourceVersion" value="1.5"/>
+  <property name="JavaTargetVersion" value="1.5"/>
+  <property name="debug" value="on"/>
+  <property name="debuglevel" value="line, vars"/>
+  <property name="encoding" value="ISO_8859_1"/>
+
+  <target name="init">
+    <!-- Create the time stamp -->
+    <tstamp/>
+  	<echo>
+  			Compiling ${ant.project.name}...</echo>
+    <!-- Create the build directory structure used by compile -->
+    <mkdir dir="${build}"/>
+    <mkdir dir="${dist}"/>
+  </target>
+	
+	<target name="buildNumber">  
+	  <propertyfile     file="build.number"
+	      comment="Build Number for ANT. Do not edit!">
+	    <entry key="build.number" default="0" type="int" operation="+" />
+	  </propertyfile>
+	  <property file="build.number" />
+	</target>
+
+  <target name="distribution" depends="buildNumber, copy-data-files, generate-without-source">
+  </target>
+
+  <target name="compile"
+          description="compile the source" >
+      <!-- Compile the Java code from ${src} to ${bin} -->
+      <javac      srcdir="${src}"
+                  destdir="${build}"
+                  source="${JavaSourceVersion}"
+                  target="${JavaTargetVersion}"
+                  debug="${debug}"
+                  debuglevel="${debuglevel}"
+                  encoding="${encoding}"
+	   			  classpath="../libFMap/lib/jcrs.jar:${extension-dir}/com.iver.cit.gvsig/lib/fmap.jar:${extension-dir}/com.iver.cit.gvsig/lib/com.iver.cit.gvsig.jar:../libFMap/lib/cms.jar:../_fwAndami/lib/iver-utiles.jar:../libFMap/lib/gdbms-0.8-SNAPSHOT.jar:../_fwAndami/andami.jar"/>
+		<copy todir="${build}">
+			<fileset
+				dir="${src}"
+				excludes="**/*.java"/>
+		</copy>
+
+    </target>
+
+  <target name="generate-without-source" description="generate the distribution without the source file" >
+    <!-- Create the distribution directory -->
+    <mkdir dir="${dist}"/>
+
+  	<copy file="config/about.htm" todir="${dist}" overwrite="yes"/>
+  	<loadproperties srcFile="build.number"/>
+  	<replace casesensitive="true"
+  	  		 file="${dist}/about.htm"
+  	  		 token="#build.number#"
+  	  		 value="${build.number}">
+  	 </replace>
+
+    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
+    <jar jarfile="${dist}/${plugin}.jar" basedir="${build}"/>
+
+  	<copy file="config/config.xml" todir="${dist}"/>
+  	<copy file="build.number" todir="${dist}"/>
+
+  	<copy file="${dist}/${plugin}.jar" todir="lib/"/>
+  	<copy todir="${dist}/images">
+  	  	    	<fileset dir="images/" includes="*"/>
+  	  	</copy>
+  	<copy todir="${dist}">
+    	<fileset dir="config" includes="text*.properties"/>
+  		<fileset dir="config" includes="esri.*"/>
+  		<fileset dir="config" includes="iau2000.*"/>
+  		<fileset dir="config" includes="usr.*"/>
+    </copy>  	
+    <move todir="${extension-dir}/${plugin}/">
+    	<fileset dir="${dist}" includes="**/**"/>
+    </move>
+
+  	<mkdir dir="${extension-dir}/${plugin}/data"/>
+  	<copy todir="${extension-dir}/${plugin}/data">
+  	    	<fileset dir="data" includes="**/**"/>
+  	</copy>
+
+  </target>
+
+	<target name="copy-data-files">
+			<copy file="config/config.xml" todir="${without_src}"/>
+			<copy file="build.number" todir="${without_src}"/>
+			<copy file="config/about.htm" todir="${without_src}"/>
+			<loadproperties srcFile="build.number"/>
+			<replace casesensitive="true"
+	  		file="${without_src}/about.htm"
+	  	  	token="#build.number#"
+	  		value="${build.number}"/>
+			<copy todir="${without_src}">
+				<fileset dir="config" includes="text*.properties"/>
+			</copy>
+			<copy todir="${without_src}/images">
+				<fileset dir="images/" includes="*"/>
+			</copy>
+	</target>
+	
+	<target name="batch-build"
+			description="compile the sources, create the jar file"
+			depends="init,compile,generate-without-source">
+	</target>
+
+	<target name="clean"
+		    description="cleans the build directories">
+		<delete dir="${build}"/>
+		<delete dir="${dist}"/>
+	</target>
+
+</project>
+
+

Property changes on: tags/JCRS_V02_BN11/extJCRS/build.xml
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/.classpath
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/.classpath	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/.classpath	(revision 25287)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry excluding="org/gvsig/crs/test/" kind="src" path="src-test"/>
+	<classpathentry kind="lib" path="/_fwAndami/lib/iver-utiles.jar" sourcepath="/Utiles/src"/>
+	<classpathentry kind="lib" path="/libFMap/lib/geoapi-2.0.jar"/>
+	<classpathentry kind="lib" path="/libFMap/lib/units-0.01.jar"/>
+	<classpathentry kind="lib" path="/libFMap/lib/gt2-main.jar"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/libJCRS"/>
+	<classpathentry kind="src" path="/_fwAndami"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/appgvSIG"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/libFMap"/>
+	<classpathentry kind="lib" path="lib/jGridShiftApi.jar"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/libUI"/>
+	<classpathentry kind="lib" path="/libFMap/lib/cms.jar" sourcepath="/jCMS"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Property changes on: tags/JCRS_V02_BN11/extJCRS/.classpath
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/build.xml
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/build.xml	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/build.xml	(revision 25287)
@@ -0,0 +1,128 @@
+<project name="extJCRS" default="generate-without-source" basedir=".">
+    <description>
+        Instala el plugin de JCrs en Andami.
+    </description>
+  <!-- set global properties for this build -->
+  <property name="src" location="src"/>
+  <property name="without_src"  location="without_src"/>
+  <property name="build" location="bin"/>
+  <property name="dist"  location="dist"/>
+  <property name="plugin" value="org.gvsig.crs"/>
+  <property name="extension-dir" location="../_fwAndami/gvSIG/extensiones"/>
+  <property name="andami-dir" location="../_fwAndami"/>
+  <property name="JavaSourceVersion" value="1.5"/>
+  <property name="JavaTargetVersion" value="1.5"/>
+  <property name="debug" value="on"/>
+  <property name="debuglevel" value="line, vars"/>
+  <property name="encoding" value="ISO_8859_1"/>
+
+  <target name="init">
+    <!-- Create the time stamp -->
+    <tstamp/>
+  	<echo>
+  			Compiling ${ant.project.name}...</echo>
+    <!-- Create the build directory structure used by compile -->
+    <mkdir dir="${build}"/>
+    <mkdir dir="${dist}"/>
+  </target>
+	
+	<target name="buildNumber">  
+	  <propertyfile     file="build.number"
+	      comment="Build Number for ANT. Do not edit!">
+	    <entry key="build.number" default="0" type="int" operation="+" />
+	  </propertyfile>
+	  <property file="build.number" />
+	</target>
+
+  <target name="distribution" depends="buildNumber, copy-data-files, generate-without-source">
+  </target>
+
+  <target name="compile"
+          description="compile the source" >
+      <!-- Compile the Java code from ${src} to ${bin} -->
+      <javac      srcdir="${src}"
+                  destdir="${build}"
+                  source="${JavaSourceVersion}"
+                  target="${JavaTargetVersion}"
+                  debug="${debug}"
+                  debuglevel="${debuglevel}"
+                  encoding="${encoding}"
+	   			  classpath="../libFMap/lib/jcrs.jar:${extension-dir}/com.iver.cit.gvsig/lib/fmap.jar:${extension-dir}/com.iver.cit.gvsig/lib/com.iver.cit.gvsig.jar:../libFMap/lib/cms.jar:../_fwAndami/lib/iver-utiles.jar:../libFMap/lib/gdbms-0.8-SNAPSHOT.jar:../_fwAndami/andami.jar"/>
+		<copy todir="${build}">
+			<fileset
+				dir="${src}"
+				excludes="**/*.java"/>
+		</copy>
+
+    </target>
+
+  <target name="generate-without-source" description="generate the distribution without the source file" >
+    <!-- Create the distribution directory -->
+    <mkdir dir="${dist}"/>
+
+  	<copy file="config/about.htm" todir="${dist}" overwrite="yes"/>
+  	<loadproperties srcFile="build.number"/>
+  	<replace casesensitive="true"
+  	  		 file="${dist}/about.htm"
+  	  		 token="#build.number#"
+  	  		 value="${build.number}">
+  	 </replace>
+
+    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
+    <jar jarfile="${dist}/${plugin}.jar" basedir="${build}"/>
+
+  	<copy file="config/config.xml" todir="${dist}"/>
+  	<copy file="build.number" todir="${dist}"/>
+
+  	<copy file="${dist}/${plugin}.jar" todir="lib/"/>
+  	<copy todir="${dist}/images">
+  	  	    	<fileset dir="images/" includes="*"/>
+  	  	</copy>
+  	<copy todir="${dist}">
+    	<fileset dir="config" includes="text*.properties"/>
+  		<fileset dir="config" includes="esri.*"/>
+  		<fileset dir="config" includes="iau2000.*"/>
+  		<fileset dir="config" includes="usr.*"/>
+    </copy>  	
+    <move todir="${extension-dir}/${plugin}/">
+    	<fileset dir="${dist}" includes="**/**"/>
+    </move>
+
+  	<mkdir dir="${extension-dir}/${plugin}/data"/>
+  	<copy todir="${extension-dir}/${plugin}/data">
+  	    	<fileset dir="data" includes="**/**"/>
+  	</copy>
+
+  </target>
+
+	<target name="copy-data-files">
+			<copy file="config/config.xml" todir="${without_src}"/>
+			<copy file="build.number" todir="${without_src}"/>
+			<copy file="config/about.htm" todir="${without_src}"/>
+			<loadproperties srcFile="build.number"/>
+			<replace casesensitive="true"
+	  		file="${without_src}/about.htm"
+	  	  	token="#build.number#"
+	  		value="${build.number}"/>
+			<copy todir="${without_src}">
+				<fileset dir="config" includes="text*.properties"/>
+			</copy>
+			<copy todir="${without_src}/images">
+				<fileset dir="images/" includes="*"/>
+			</copy>
+	</target>
+	
+	<target name="batch-build"
+			description="compile the sources, create the jar file"
+			depends="init,compile,generate-without-source">
+	</target>
+
+	<target name="clean"
+		    description="cleans the build directories">
+		<delete dir="${build}"/>
+		<delete dir="${dist}"/>
+	</target>
+
+</project>
+
+

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/build.xml
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/.classpath
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/.classpath	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/.classpath	(revision 25287)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry excluding="org/gvsig/crs/test/" kind="src" path="src-test"/>
+	<classpathentry kind="lib" path="/_fwAndami/lib/iver-utiles.jar" sourcepath="/Utiles/src"/>
+	<classpathentry kind="lib" path="/libFMap/lib/geoapi-2.0.jar"/>
+	<classpathentry kind="lib" path="/libFMap/lib/units-0.01.jar"/>
+	<classpathentry kind="lib" path="/libFMap/lib/gt2-main.jar"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/libJCRS"/>
+	<classpathentry kind="src" path="/_fwAndami"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/appgvSIG"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/libFMap"/>
+	<classpathentry kind="lib" path="lib/jGridShiftApi.jar"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/libUI"/>
+	<classpathentry kind="lib" path="/libFMap/lib/cms.jar" sourcepath="/jCMS"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/.classpath
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/.project
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/.project	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/.project	(revision 25287)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>extJCRS</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/.project
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/jgridshift/JGridShiftTest.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/jgridshift/JGridShiftTest.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/jgridshift/JGridShiftTest.java	(revision 25287)
@@ -0,0 +1,40 @@
+package org.gvsig.crs.jgridshift;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+
+import au.com.objectix.jgridshift.GridShift;
+import au.com.objectix.jgridshift.GridShiftFile;
+import au.com.objectix.jgridshift.SubGrid;
+
+public class JGridShiftTest {
+	
+	public static void main(String[] args){
+		//InputStream fis = null;
+		RandomAccessFile raf = null;
+		try {
+			raf = new RandomAccessFile("/home/dguerrero/Desarrollo-gvSIG/crs/workspace/extJCRS/data/sped2et.gsb","r");
+			//fis = new FileInputStream("/home/dguerrero/Desarrollo-gvSIG/crs/workspace/extJCRS/data/sped2et.gsb");
+		} catch (FileNotFoundException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		GridShiftFile gsf = new GridShiftFile();
+		try {
+			gsf.loadGridShiftFile(raf);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+		SubGrid subGrid[] = gsf.getSubGridTree(); 
+		System.out.println(subGrid.length);
+		System.out.println(subGrid[0].getMaxLat());
+		System.out.println(subGrid[0].getMinLat());
+		System.out.println(subGrid[0].getMaxLon());
+		System.out.println(subGrid[0].getMinLon());
+		GridShift gridShift = new GridShift();
+	}
+
+}
Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/test/CSCatClient.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/test/CSCatClient.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/test/CSCatClient.java	(revision 25287)
@@ -0,0 +1,139 @@
+package org.gvsig.crs.test;
+
+
+import java.util.Enumeration;
+import java.util.Hashtable;
+
+import javax.xml.rpc.ParameterMode;
+
+import org.apache.axis.client.Call;
+import org.apache.axis.client.Service;
+import org.apache.axis.encoding.XMLType;
+
+
+/*clase cliente para el servicio web CSCat*/
+
+public class CSCatClient {
+	private String endpoint = null;
+                        
+private int nivel;
+/* dependiendo del nivel del sistema de referencia se accedera
+                                     al catÃ¡logo con parametros diferentes*/             
+                        
+            public CSCatClient(int nivel){
+                                    
+             this.nivel=nivel;
+                                    
+
+            this.endpoint = "http://mapas.topografia.upm.es:9090/swccat/ccat.jws";
+
+             /*Se podria definir un fichero properties para guardar la url con la ruta del servicio
+             y utilizar el endpoint(url) para el mÃ©todo setTargetEndpointAddress de la clase Call
+             en este caso se ha omitido la utilizaciÃ³n del fichero y directamente se utilizarÃ¡ la URL pero serÃ­a:
+                                    
+                        Properties prop=new Properties();
+                        try{                                                                                                       
+                             FileInputStream in=new FileInputStream("C:\\GimmConfig\\rutaCSCat.properties");
+                                                prop.load(in);
+                                                // guardamos en atributo de la clase la url guardada en el fichero properties
+                                                this.endpoint=prop.getProperty("url");
+                                     } catch (Exception e){
+                                                 System.out.println("Error al acceder al fichero "+e.getMessage());
+                                     }*/
+                        }
+                        
+                        
+                        //public String[] csCatAccess(String  proj, Hashtable<String, String> tPROJ4){
+            			public String[] csCatAccess(String  proj, Hashtable tPROJ4){
+                        /*mÃ©todo para acceder al catÃ¡logo*/       
+                                    
+                                    try{
+                                                 Service service = new Service();
+                                                Call call = (Call) service.createCall();
+                                                 call.setTargetEndpointAddress( new java.net.URL("http://mapas.topografia.upm.es:9090/swccat/ccat.jws"));
+                                        
+                                         /*el nombre del metodo a invocar y sus correspondientes parametros se obtienen del archivo WSDL (ver respuesta del servicio WSDL)*/
+
+                                         call.setOperationName("GetCRS");
+                                        
+                                         // Se establecem tanto los parÃ¡metros que necesita el mÃ©todo y sus correspondientes tipos  como el tipo que devuelve segun el WSDL//
+                                      
+                        call.addParameter( "InputFormatId", XMLType.XSD_STRING, ParameterMode.IN );
+                       call.addParameter( "OutputFormatId", XMLType.XSD_STRING, ParameterMode.IN );
+                        call.addParameter( "SourceCRS", XMLType.XSD_STRING, ParameterMode.IN );
+                        call.addParameter( "SourceProjection", XMLType.XSD_STRING, ParameterMode.IN );
+                        call.addParameter( "SourceDatum", XMLType.XSD_STRING, ParameterMode.IN );
+                        call.addParameter( "SourceEllipsoid", XMLType.XSD_STRING, ParameterMode.IN );
+                        call.addParameter( "SourceUnit", XMLType.XSD_STRING, ParameterMode.IN );
+                                                  
+                        call.setReturnType( XMLType.XSD_ANYTYPE);
+                                          
+                                           Object ret;
+
+                        // En el ejemplo se estÃ¡ pidiendo transformar del espacio de nombres PROJ4 a EPSG lo que tenga el parÃ¡metro proj. Es importante destacar que la respuesta es siempre una matriz de String, aunque se espere una sola respuesta.
+
+                                           if (nivel == 1){
+                                        	   	  //ret = (Object) call.invoke ( new Object [] {"IAU2000","PROJ4",proj,"","","",""});
+                                        	   	  //ret = (Object) call.invoke ( new Object [] {"EPSG","ESRI",proj,"","","",""});
+                                                  ret = (Object) call.invoke ( new Object [] {"EPSG","PROJ4",proj,"","","",""});
+                                                  //ret = (Object) call.invoke ( new Object [] {"PROJ4","EPSG",proj,"","","",""});
+                                                  String[] resul=(String[])ret;
+                                                              //System.out.println(resul[0]);  aunque se devuelva un unico valor se almacena en un array
+                                                              return resul;
+                                                             
+                                           } else{  // nivel 2
+                                                  String[] parameters = new String[4];
+                                                  getParameters(tPROJ4, parameters); // metodo para obtener los valores de los parametros para la llamada a invoke segun la estructura de la aplicaciÃ³n
+                                                 
+                                                  /*for (int i = 0; i < parameters.length; i++) {
+                                                              System.out.println(parameters[i]) ;
+                                                              }*/
+                                             
+                                                              // en este caso (nivel 2)  la llamada al metodo se debe realizar dando como argumentos la proyeccion, el datum y ellipsoide
+                                                  ret = (Object) call.invoke ( new Object [] {"PROJ4","EPSG","",parameters[0],parameters[1],parameters[2],parameters[3]});
+                                                  String[] resul=(String[])ret;
+                                                 
+                                                  /*for (int i = 0; i < resul.length; i++) {
+                                                              System.out.println(resul[i]);
+                                                              } */
+                                                 
+                                                  return resul;
+                                           }
+                                        
+                                                }catch (Exception e){
+                                                            System.out.println("Fallo al consultar el catÃ¡logo CsCat");
+                                                            System.out.println(e.getMessage());
+                                                            return null;
+                                                
+                                                }
+                        }
+
+
+                        //private void getParameters(Hashtable<String, String> tproj4, String[] parameters) {
+            			private void getParameters(Hashtable tproj4, String[] parameters) {
+                        // tproj4: tabla Hash que almacena los valores del PROJ4 obtenido para el datum, la proyecciÃ³n, elipsoide y unidades          
+                        
+                                    for (int i = 0; i < parameters.length; i++) {
+                                                parameters[i]="";
+                                    }
+                                    
+                                    Enumeration keysProj = tproj4.keys();
+                                    
+                                    while (keysProj.hasMoreElements()) {
+                                                String key = (String) keysProj.nextElement();
+                                                if (key.indexOf("proj")>0)
+                                                            parameters[0] = (String) tproj4.get(key);
+                                                if (key.indexOf("datum")>0)
+                                                            parameters[1] = (String) tproj4.get(key);
+                                                if (key.indexOf("ellps")>0)
+                                                            parameters[2] = (String) tproj4.get(key);
+                                                if (key.indexOf("units")>0)
+                                                            parameters[3] = (String) tproj4.get(key);
+                                                
+                                    }           
+                                    
+                        }
+
+                        
+
+}
\ No newline at end of file

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/test/CSCatClient.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/test/UpmRepositoryTest.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/test/UpmRepositoryTest.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/test/UpmRepositoryTest.java	(revision 25287)
@@ -0,0 +1,14 @@
+package org.gvsig.crs.test;
+
+public class UpmRepositoryTest {
+
+	/**
+	 * @param args
+	 */
+	public static void main(String[] args) {
+		CSCatClient client = new CSCatClient(1);
+		String result[] = client.csCatAccess("4258", null);
+		System.out.println(result[0]);
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/test/UpmRepositoryTest.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameMain.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameMain.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameMain.java	(revision 25287)
@@ -0,0 +1,48 @@
+package org.gvsig.crs.gui.wizard;
+
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import javax.swing.ImageIcon;
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+
+import org.gvsig.crs.gui.panels.wizard.DefCrsUsr;
+import org.gvsig.crs.gui.panels.wizard.MainPanel;
+
+public class FrameMain {
+
+
+	/**
+	 * @param args
+	 * @throws UnsupportedLookAndFeelException 
+	 * @throws IllegalAccessException 
+	 * @throws InstantiationException 
+	 * @throws ClassNotFoundException 
+	 */
+	public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException {
+		
+			/*
+			 com.sun.java.swing.plaf.motif.MotifLookAndFeel
+			 com.sun.java.swing.plaf.windows.WindowsLookAndFeel
+			 javax.swing.plaf.metal.MetalLookAndFeel
+			 */
+			UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
+	         JFrame frame = new JFrame("Asistente de Definicin de Crs");
+	         //cerrar el formulario
+	         frame.addWindowListener(new WindowAdapter() {
+	             public void windowClosing(WindowEvent e) {System.exit(0);}
+	         });
+	         frame.getContentPane().add(new MainPanel(null));
+	         frame.setSize(300,500);
+	         //colocar en la pantalla
+	         frame.setLocation(300,0);
+	         frame.pack();
+	         frame.setVisible(true);
+	    
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameMain.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/wizard/FramDefinirDatum.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/wizard/FramDefinirDatum.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/wizard/FramDefinirDatum.java	(revision 25287)
@@ -0,0 +1,56 @@
+package org.gvsig.crs.gui.wizard;
+
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import javax.swing.JFrame;
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+
+import org.gvsig.crs.gui.panels.wizard.DefinirDatum;
+
+public class FramDefinirDatum {
+
+
+	/**
+	 * @param args
+	 */
+	public static void main(String[] args) {
+		
+		 JFrame frame = new JFrame("Definicin del Datum");
+				/*
+			 com.sun.java.swing.plaf.motif.MotifLookAndFeel
+			 com.sun.java.swing.plaf.windows.WindowsLookAndFeel
+			 javax.swing.plaf.metal.MetalLookAndFeel
+			 */
+			try {
+				UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
+			} catch (ClassNotFoundException e1) {
+				// TODO Auto-generated catch block
+				e1.printStackTrace();
+			} catch (InstantiationException e1) {
+				// TODO Auto-generated catch block
+				e1.printStackTrace();
+			} catch (IllegalAccessException e1) {
+				// TODO Auto-generated catch block
+				e1.printStackTrace();
+			} catch (UnsupportedLookAndFeelException e1) {
+				// TODO Auto-generated catch block
+				e1.printStackTrace();
+			}
+	         //cerrar el formulario
+	         frame.addWindowListener(new WindowAdapter() {
+	             public void windowClosing(WindowEvent e) {System.exit(0);}
+	         });
+	 
+	         frame.getContentPane().add(new DefinirDatum());
+	         frame.setSize(300,500);
+	         //colocar en la pantalla
+	         frame.setLocation(300,0);
+	         frame.pack();
+	         frame.setVisible(true);
+	    
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/wizard/FramDefinirDatum.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameSistemaCoordenadas.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameSistemaCoordenadas.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameSistemaCoordenadas.java	(revision 25287)
@@ -0,0 +1,35 @@
+package org.gvsig.crs.gui.wizard;
+
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import javax.swing.JFrame;
+import org.gvsig.crs.gui.panels.wizard.DefSistCoordenadas;
+
+/**
+ * Test para el interfaz del wizard de elecci�n del sistema de coordenadas
+ * @author Luisa Marina Fern�ndez Ruiz (luisam.fernandez@uclm.es)
+ *
+ */
+public class FrameSistemaCoordenadas {
+
+	public static void main(String[] args) {
+		
+	         JFrame frame = new JFrame("Definicion del Sistema de Coordenadas");
+	 	
+	         //cerrar el formulario
+	         frame.addWindowListener(new WindowAdapter() {
+	             public void windowClosing(WindowEvent e) {System.exit(0);}
+	         });
+	 
+	         frame.getContentPane().add(new DefSistCoordenadas());
+	         frame.setSize(300,500);
+	         //colocar en la pantalla
+	         frame.setLocation(300,300);
+	         frame.pack();
+	         frame.setVisible(true);
+	    
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameSistemaCoordenadas.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameDefinicionCRS.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameDefinicionCRS.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameDefinicionCRS.java	(revision 25287)
@@ -0,0 +1,47 @@
+package org.gvsig.crs.gui.wizard;
+
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+
+import org.gvsig.crs.gui.panels.wizard.DefCrsUsr;
+
+public class FrameDefinicionCRS {
+
+
+	/**
+	 * @param args
+	 * @throws UnsupportedLookAndFeelException 
+	 * @throws IllegalAccessException 
+	 * @throws InstantiationException 
+	 * @throws ClassNotFoundException 
+	 */
+	public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException {
+		
+			/*
+			 com.sun.java.swing.plaf.motif.MotifLookAndFeel
+			 com.sun.java.swing.plaf.windows.WindowsLookAndFeel
+			 javax.swing.plaf.metal.MetalLookAndFeel
+			 */
+			UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
+	         JFrame frame = new JFrame("Definicin de CRS por el usuario");
+	         //cerrar el formulario
+	         frame.addWindowListener(new WindowAdapter() {
+	             public void windowClosing(WindowEvent e) {System.exit(0);}
+	         });
+	         
+	         frame.getContentPane().add(new DefCrsUsr(null));
+	         frame.setSize(300,500);
+	         //colocar en la pantalla
+	         frame.setLocation(300,300);
+	         frame.pack();
+	         frame.setVisible(true);
+	    
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameDefinicionCRS.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/TransformationVistaPanelTest.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/TransformationVistaPanelTest.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/TransformationVistaPanelTest.java	(revision 25287)
@@ -0,0 +1,31 @@
+package org.gvsig.crs.gui.panels;
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import javax.swing.JFrame;
+
+/**
+ *  Test para el interfaz de transformaci�n de la vista dentro de la transformacion compuesta
+ * @author Luisa Marina Fern�ndez Ruiz (luisam.fernandez@uclm.es)
+ *
+ */
+public class TransformationVistaPanelTest {
+	
+	public static void main(String[] args) {
+		 JFrame frame = new JFrame("Transformaci�n de la Capa");
+		
+//	         //cerrar el formulario
+	         frame.addWindowListener(new WindowAdapter() {
+	             public void windowClosing(WindowEvent e) {System.exit(0);}
+	         });
+	 
+	         frame.getContentPane().add(new TransformationVistaPanel("",null));
+	         frame.setSize(300,500);
+	         //colocar en la pantalla
+	         frame.setLocation(300,0);
+	         frame.pack();
+	         frame.setVisible(true);
+	    
+	}
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/TransformationVistaPanelTest.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/EPSGPanelTest.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/EPSGPanelTest.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/EPSGPanelTest.java	(revision 25287)
@@ -0,0 +1,27 @@
+package org.gvsig.crs.gui.panels;
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import javax.swing.JFrame;
+
+/**
+ * Test para el interfaz de EPSGPanel
+ * @author Luisa Marina Fern�ndez Ruiz (luisam.fernandez@uclm.es)
+ *
+ */
+public class EPSGPanelTest {
+
+	public static void main(String[] args){
+        JFrame frame = new JFrame("UAU200 Panel Test");
+        frame.addWindowListener(new WindowAdapter() {
+            public void windowClosing(WindowEvent e) {System.exit(0);}
+        });
+        frame.getContentPane().add(new EPSGpanel());
+        frame.setLocation(300,0);
+        frame.pack();
+        frame.setVisible(true);
+   
+}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/EPSGPanelTest.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/IAU2000PanelTest.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/IAU2000PanelTest.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/IAU2000PanelTest.java	(revision 25287)
@@ -0,0 +1,28 @@
+package org.gvsig.crs.gui.panels;
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import javax.swing.JFrame;
+/**
+ * Test para el interfaz de IAU200Panel
+ * @author Luisa Marina Fern�ndez Ruiz (luisam.fernandez@uclm.es)
+ *
+ */
+public class IAU2000PanelTest {
+
+	public static void main(String[] args) {
+
+        JFrame frame = new JFrame("UAU200 Panel Test");
+        //cerrar el formulario
+        frame.addWindowListener(new WindowAdapter() {
+            public void windowClosing(WindowEvent e) {System.exit(0);}
+        });
+        frame.getContentPane().add(new IAU2000panel());
+        frame.setLocation(300,0);
+        frame.pack();
+        frame.setVisible(true);
+   
+}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/IAU2000PanelTest.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/ESRIPanelTest.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/ESRIPanelTest.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/ESRIPanelTest.java	(revision 25287)
@@ -0,0 +1,31 @@
+package org.gvsig.crs.gui.panels;
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import javax.swing.JFrame;
+
+
+/**
+ * Test para el interfaz de ESRIPanel
+ * @author Luisa Marina Fern�ndez Ruiz (luisam.fernandez@uclm.es)
+ *
+ */
+public class ESRIPanelTest {
+
+
+	public static void main(String[] args){
+		
+			JFrame frame = new JFrame("ESRI Panel Test");
+	         //cerrar el formulario
+	         frame.addWindowListener(new WindowAdapter() {
+	             public void windowClosing(WindowEvent e) {System.exit(0);}
+	         });
+	         frame.getContentPane().add(new ESRIpanel());
+	         frame.setLocation(300,0);
+	         frame.pack();
+	         frame.setVisible(true);
+	    
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/ESRIPanelTest.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/CrsRecentsPanelTest.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/CrsRecentsPanelTest.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/CrsRecentsPanelTest.java	(revision 25287)
@@ -0,0 +1,30 @@
+package org.gvsig.crs.gui.panels;
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import javax.swing.JFrame;
+
+
+/**
+ * Test para el interfaz de CRSs Recientes
+ * @author Luisa Marina Fern�ndez Ruiz (luisam.fernandez@uclm.es)
+ *
+ */
+public class CrsRecentsPanelTest {
+
+	public static void main(String[] args) {
+        JFrame frame = new JFrame("CrsRecents Test");
+        //cerrar el formulario
+        frame.addWindowListener(new WindowAdapter() {
+            public void windowClosing(WindowEvent e) {System.exit(0);}
+        });
+        frame.getContentPane().add(new CrsRecentsPanel());
+        frame.setLocation(300,0);
+        frame.pack();
+        frame.setVisible(true);
+   
+}
+}
+
+

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/CrsRecentsPanelTest.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/TransformationCapaPanelTest.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/TransformationCapaPanelTest.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/TransformationCapaPanelTest.java	(revision 25287)
@@ -0,0 +1,33 @@
+package org.gvsig.crs.gui.panels;
+
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import javax.swing.JFrame;
+/**
+ * Test para el interfaz de Transformaci�n de la capa dentro de la transformacion compuesta
+ * @author Luisa Marina Fern�ndez Ruiz (luisam.fernandez@uclm.es)
+ *
+ */
+
+public class TransformationCapaPanelTest {
+
+	
+	public static void main(String[] args) {
+		
+		 JFrame frame = new JFrame("Transformaci�n de la Capa");
+	         //cerrar el formulario
+	         frame.addWindowListener(new WindowAdapter() {
+	             public void windowClosing(WindowEvent e) {System.exit(0);}
+	         });
+	 
+	         frame.getContentPane().add(new TransformationCapaPanel("",null));
+	         frame.setSize(300,500);
+	         //colocar en la pantalla
+	         frame.setLocation(300,0);
+	         frame.pack();
+	         frame.setVisible(true);
+	    
+	}
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src-test/org/gvsig/crs/gui/panels/TransformationCapaPanelTest.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/esri.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/config/esri.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/config/esri.properties	(revision 25287)
@@ -0,0 +1,20 @@
+#HSQL database
+#Wed Nov 29 14:18:46 CET 2006
+hsqldb.cache_file_scale=1
+runtime.gc_interval=0
+hsqldb.first_identity=0
+version=1.7.3
+modified=no
+hsqldb.script_format=0
+sql.enforce_size=false
+hsqldb.cache_size_scale=10
+hsqldb.cache_scale=14
+hsqldb.version=1.7.3
+hsqldb.log_size=200
+sql.enforce_strict_size=false
+readonly=true
+hsqldb.compatible_version=1.7.2
+hsqldb.original_version=1.7.3
+sql.compare_in_locale=false
+hsqldb.nio_data_file=true
+hsqldb.cache_version=1.7.0

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/esri.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/db_epsg.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/config/db_epsg.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/config/db_epsg.properties	(revision 25287)
@@ -0,0 +1,20 @@
+#HSQL database
+#Mon Oct 02 11:23:07 CEST 2006
+hsqldb.cache_file_scale=1
+runtime.gc_interval=0
+hsqldb.first_identity=0
+version=1.7.3
+modified=yes
+hsqldb.script_format=0
+sql.enforce_size=false
+hsqldb.cache_size_scale=10
+hsqldb.cache_scale=14
+hsqldb.version=1.7.3
+hsqldb.log_size=200
+sql.enforce_strict_size=false
+readonly=true
+hsqldb.compatible_version=1.7.2
+hsqldb.original_version=1.7.3
+sql.compare_in_locale=false
+hsqldb.nio_data_file=true
+hsqldb.cache_version=1.7.0

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/db_epsg.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_gl.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_gl.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_gl.properties	(revision 25287)
@@ -0,0 +1,165 @@
+#Translations for language [gl]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=Nova vista
+abstract=Resumo
+add=Engadir
+address=Enderezo
+advanced=Avanzada
+advanced_settings=Opci\u00f3ns avanzadas
+ancho_alto=Ancho alto
+anterior=Anterior
+apply=Aplicar
+bands=Bandas
+brillo=Brillo
+brillo_y_contraste=Brillo e Contraste
+browse=Examinar
+cancel=Cancelar
+cannotReproject=Non se pode reproxectar este sistema de coordenadas
+cant_reproject_from_any_of=
+capas=Capas
+city=Cidade
+clear=Limpar
+conectar=Conectar
+connect_error=Erro de conexi\u00f3n
+contact_info=Informaci\u00f3n de contacto
+contact_organization=Organizaci\u00f3n
+contact_person=Nome
+contact_position=Cargo
+contraste=Contraste
+coor_geograficas=Coordenadas xeogr\u00e1ficas
+could_not_find_web_map_context_file=
+countries_of_the_world=Acerbaix\u00e1n;Afganist\u00e1n;Albania;Alema\u00f1a;Alxeria;Andorra;Angola;Antiga e Barbuda;Arabia Saud\u00ed;Armenia;Arxentina;Australia;Austria;Bahamas;Bahrein;Bangladesh;Barbados;Belice;B\u00e9lxica;Ben\u00edn;Bermudas;Bielorrusia;Bolivia;Bosnia Hercegovina;Botsuana;Brasil;Brunei;Bulgaria;Burquina Faso;Burundi;But\u00e1n;Cabo Verde;Camboia;Camer\u00fan;Canad\u00e1;Casaquist\u00e1n;Chad;Chequia;Chile;China;Chipre;Cidade do Vaticano;Cimbabue;Colombia;Comores;Congo;Congo, Rep\u00fablica Democr\u00e1tica do;Corea do Norte;Corea do Sur;Costa do Marfil;Costa Rica;Croacia;Cuba;Curdist\u00e1n;Dinamarca;Dominica;Ecuador;Emiratos \u00c1rabes Unidos;Eritrea;Eslovaquia;Eslovenia;Espa\u00f1a;Estados Unidos de Am\u00e9rica;Estonia;Etiop\u00eda;Exipto;Fidxi;Filipinas;Finlandia;Francia;Gab\u00f3n;Gambia;Ghana;Granada;Grecia;Guadalupe;G\u00fciana;Guinea;Guinea Ecuatorial;Guinea-Bissau;Hait\u00ed;Honduras;Hungr\u00eda;Iemen;Illas Marshall;Illas Salom\u00f3n;India;Indonesia;Ir\u00e1n;Iraq;Irlanda;Islandia;Israel;Italia;Laos;Lesoto;Letonia;L\u00edbano;Liberia;Libia;Liechtenstein;Lituania;Luxemburgo;Macedonia, Antiga Rep\u00fablica Iusgolava de;Madagascar;Malaisia;Malaui;Maldivas;Mal\u00ed;Malta;Marrocos;Mauricio;Mauritania;M\u00e9xico;Micronesia, Estados Federados de;Moldavia;M\u00f3naco;Mongolia;Mozambique;Myanmar;Namibia;Nauru;Nepal;Nicaragua;Niue;N\u00edxer;Nixeria;Noruega;Nova Celandia;O Salvador;Om\u00e1n;Pa\u00edses Baixos;Palestina;Panam\u00e1;Pap\u00faa Nova Guinea;Paquist\u00e1n;Paraguai;Per\u00fa;Polonia;Porto Rico;Portugal;Qatar;Quenia;Quirguicist\u00e1n;Quiribati;Quvait;Reino Unido;Rep\u00fablica Centroafricana;Rep\u00fablica Dominicana;Ruanda;Ruman\u00eda;Rusia;Saint Kitts e Nevis;Samoa Occidental;San Mari\u00f1o;San Vicente e Granadinas;Santa Luc\u00eda;Santo Tom\u00e9 e Pr\u00edncipe;Senegal;Serbia e Montenegro;Serra Leona;Seychelles;Singapur;Siria;Somalia;Sri Lanka;Suacilandia;Sud\u00e1frica;Sud\u00e1n;Suecia;Su\u00edza;Surinam;Tailandia;Taiw\u00e1n;Tanzania;Taxiquist\u00e1n;Timor Leste;Togo;Tonga;Toquelau;Trinidade e Tobago;T\u00fanez;Turcomenist\u00e1n;Turqu\u00eda;Tuvalu;Ucra\u00edna;Uganda;Uruguai;Uzbequist\u00e1n;Vanuatu;Venezuela;Vietnam;Xap\u00f3n;Xeorxia;Xibuti;Xordania;Zambia
+country=Pa\u00eds
+covered_extension=Cobertura da extensi\u00f3n
+created_with=Creado con
+defined_by_view_extent=
+description=Descripci\u00f3n
+description_URL=URL descrici\u00f3n
+dimension=Dimensi\u00f3n
+dimensiones=Dimensi\u00f3ns
+disagregate_layers=
+e-mail=Correo electr\u00f3nico
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Eliminar extremos
+error=Erro
+error_writting_file=Erro ao escribir o arquivo
+estilos=Estilos
+export=Exportar
+export_to_map_context=
+extents_no_coincidentes=Extensi\u00f3ns non coincidentes
+fax=Fax
+Fichero=Arquivo
+fichero_existe=Arquivo existe
+file_name=Arquivo
+file_version=Versi\u00f3n do arquivo
+fit_WMS_layer=Axustar capa WMS
+format=Formato
+formato=Formato
+formatos=Formatos
+georeferenciado=
+height=Alto
+html_in_a_new_view=<HTML>Crea unha vista nova no proxecto. A nova vista conter\u00e1 t\u00f3dalas capas definidas polo arquivo.</HTML>
+html_in_other_view=<HTML>Engade as capas na vista que especifique da lista seguinte\:</HTML>
+html_in_the_current_view=<HTML>Engade as capas definidas no arquivo \u00e1 vista activa.</HTML>
+id=ID
+import=Importar
+import_map_context=Importar mapas dende un arquivo Web Map Context de OGC
+in=en
+info=Informaci\u00f3n
+Informacion=Informaci\u00f3n
+interval=Int\u00e9rvalo
+invalid_dimension_values=
+is_required=\u00e9 obligatorio
+keywords=Palabras clave
+layer=Capa
+layer_abstract=Resumo da capa
+layer_name=Nome da capa
+layer_title=T\u00edtulo da capa
+layers_in_other_view=Capas na vista que eu escolla
+layers_in_the_current_view=Capas na vista actual
+lineal_directo=Lineal directo
+logo_URL=URL logotipo
+m/pixel=metros/pixel
+map_context_file_error=Erro no arquivo Web Map Context
+map_extent=Extensi\u00f3
+map_size_in_pixels=Tama\u00f1o do mapa (p\u00edxeles)
+metadatos=Metadatos
+move_layer_down=Mover abaixo
+move_layer_up=Mover arriba
+must_specify_a_file=Debe especificar un arquivo de destino.
+name=Nome
+none_selected=Ning\u00fan seleccionado
+not_available=Non dispo\u00f1ible
+num_bandas=N\u00famero de bandas
+ogc_mapcontext_file=OGC Web Map Context
+ok=Aceptar
+Ok=Aceptar
+opacidad=Opacidade
+open_layers_as=Abrir as capas como
+options=Opci\u00f3ns
+origen_de_datos=Origen de dades
+postcode=C\u00f3digo postal
+previsualizacion=Previsualizaci\u00f3n
+problems_encountered_while_importing=
+properties=Propiedades
+propiedades_raster=Propiedades do raster
+Proyecciones=
+realce=Realce
+recorte_colas=Recorte colas
+refresh_capabilities=Refrescar cach\u00e9
+refresh_capabilities_tooltip=Marque esta casilla para sobreescribir os datos anteriores.
+remove=Quitar
+seleccionar_srs=Seleccionar SRS
+select_formats=Seleccionar formatos
+select_layers=Seleccionar capas
+selected_dimensions=Dimensi\u00f3ns seleccionadas
+selected_layers=Capas seleccionadas
+server=Servidor
+server_abstract=Resumo do servidor
+server_cant_render_layers=Este servidor non pode renderizar estas capas xuntas. \nFaga petici\u00f3ns separadas para cada capa.
+server_timeout=Rematou o tempo de conexi\u00f3n ao servidor
+server_title=T\u00edtulo do servidor
+server_type=Tipo de servidor
+service_info=Informaci\u00f3n do servicio
+set=Establecer
+settings=Axustes
+settings_editor=Editor de axustes
+show_layer_names=Amosar nomes de capas
+si=
+siguiente=Seguinte
+single_value=Valor simple
+state_or_province=Estado/Provincia
+style=Estilo
+tamano=Tama\u00f1o\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e9fono
+tipo_dato=Tipo dato
+title=T\u00edtulo
+to=Hata
+transparencia=Transparencia
+unknown_response_format=Formato de resposta desco\u00f1ecido
+unsupported_crs=
+unsupported_map_context_version=
+unsupported_version=Versi\u00f3n non soportada
+use_custom_size=Tama\u00f1o personalizado
+use_full_extent=
+use_view_size=Tama\u00f1o da vista
+value=Valor
+version=Versi\u00f3n
+version_conflict=Conflicto de versi\u00f3n
+view=Vista
+Vista=Vista
+web_map_context=Web Map Context
+web_map_context_settings=Propiedades Web Map Context
+width=Ancho
+wms_cant_connect=
+wms_not_queryable=Este servidor non acepta petici\u00f3ns deste tipo
+wms_properties=Propiedades WMS
+wms_server_error=Erro do servidor WMS
+wms_transparency=Transparenza
+WMSLayer=Capa WMS
+xmax=xmax
+xmin=xmin
+ymax=ymax
+ymin=ymin

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_gl.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_en.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_en.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_en.properties	(revision 25287)
@@ -0,0 +1,381 @@
+#Translations for language [en]
+#Fri Oct 10 09:47:23 CEST 2008
+
+abrir=Open
+advertencia_nad=WARNING:The transformation will be applied only into the limits of the grids. 
+angle=Angle
+anterior=Previous
+aplicar_capa=CRS of the layer
+aplicar_vista=CRS of the layer
+apply=Apply
+area=Area
+browse=Browse
+buscar=Search
+calculated_in=Calculated for
+cancel=Cancel
+codeSelectedCrs=Selectec CRS code
+code_transformation=Transformation code
+codigo=Code
+COMP=COMP
+compound=Compound
+coordinate_reference_systems= Coordinate Reference Systems
+criterio_busqueda= Search criteria
+crs_layer=CRS of the layer
+crs_no_selected=CRS not selected
+crs_not_projected=CRS not proyected
+crs_not_soported=CRS not supported
+crs_view=CRS of the view
+crsAndTransformation=CRS and Transformation
+crsRepeat=Repeated CRS
+crsview=CrsView
+datum=Datum
+deleteUsr="Delete user CRS"?
+descripcion=Description
+description_area=Description of the area
+detalles=Details
+details=Details
+detailsTransformation=Details of the transformation
+ellipsoid=Ellipsoid
+EPSG=EPSG
+error_adding_default_value_to_projection_parameter=Error inserting default value in projection parameter
+error_adding_max_value_to_projection_parameter=Error inserting maximun value in projection parameter
+error_adding_min_value_to_projection_parameter=Error inserting minimun value in projection parameter
+error_adding_parameter_projection_name=Error inserting projection parameter name
+error_adding_projection_acronym=Error inserting projection acronym
+error_adding_projection_name=Error inserting projection name
+error_adding_projection_parameter=Error inserting projection parameter 
+error_adding_unit_name=Error inserting unit name 
+error_obtaining_default_value_to_projection_parameter=Error getting default value in projection parameter
+error_obtaining_max_value_to_projection_parameter=Error getting maximun value in projection parameter
+error_obtaining_min_value_to_projection_parameter=Error getting minimun value in projection parameter
+error_obtaining_projection_acronym=Error getting projection acronym
+error_obtaining_projection_name=Error getting projection name
+error_obtaining_projection_parameter_name=Error getting Error projection parameter name
+error_obtaining_unit_list_of_projection_parameter=Error getting the list of projection parameter units
+error_obtaining_unit_name=Error getting unit name 
+error_prime_meridiam_parameters=Error in prime-meridian parameter. 
+ESRI=ESRI
+fill_name=Fill name
+finalizar=Finish
+fuente=Source
+geogcs=Geogcs
+greenwichLongitude=Meridian length
+grids_en=Grids on
+IAU2000=IAU2000
+in=in
+in_proj4_projection=In proj4 Projection
+incorrect_domain=Incorrect domain
+infocrs=Info CRS
+infoCRS=CRS Information
+Informacion=Information
+info_transformations=Transformation Information
+initial_jcrs_warning=<html><b>\u00a1ATENCI\u00d3N\!</b><br>Testing verison of JCRS Plugin. It may contain important errors.</html>
+invFlattening=Inverse flattening
+inv_f=Inverse flattening
+importar=Import
+importarRejilla=Import grid
+lat_max=Maximun latitude
+lat_min=Minimun latitude
+latitude_of_standar_parallel=Latitude of standar parallel
+long=Longitude
+long_max=Maximun Longitude
+long_min=Minimun Longitude
+Mercator=Mercator
+name=Name
+nadfile_not_found= Grids File not found.
+nadfile_bad_format=Invalid Grids File format.
+nadgrids=Grid NTv2
+nadgrids_file=Grids File
+nameDatum=Datum name
+nameSelectedCrs=CRS name
+name_transformation=Transformation name
+newCRS=User CRS
+no=No
+no_results=Results not found.
+node_count=Number of nodes.
+nombre=Name
+not_admit_azimut_close_to=not admit azimut close to
+not_admit_different_azimut_and_spin_axis=not admit different azimut and spin axis
+not_admit_scale_factor_and_latitude_of_origin=not admit scale factor and latitude of origin
+not_admit_latitude_origin_close_to_the_poles=not admit latitude origin close to the poles
+not_admit_parameter=not admit parameter
+not_equal_lat_1_and_lat_2=not equal lat 1 and lat 2
+not_geographic_nor_projected=not geographic nor projected
+not_in_parameter_list=not in parameter list
+not_in_proj4=Not in Proj4
+not_zero_lat_1=lat_1 can't be 0
+not_values_90_or_minus_90_lat_2=lat_2 can't be 90 or -90
+nuevo_crs=New CRS
+numeric_format=This field only accept numeric characters
+Oblique_Mercator=Oblique Mercator
+Oblique_Stereographic=Oblique Stereographic
+ok=Accept
+Ok=Accept
+out_of_domain=out of domain
+parameters=parameters
+por_area=By area
+por_codigo=By code
+por_nombre=By name
+position_out_of_valid_limits=osition out of valid limits
+primem=Primem
+primeMeridian=Prime Meridian
+problem_with_wkt_try_manually=Problem with wkt, try it manually
+proj4Chain=proj4 String
+projcs=Projcs
+projected=Projected
+projection=Projection
+proyeccion_actual=Actual Projection
+recents_transformation=Recent Transformations
+repository=Repository
+scale=Scale (ppm)
+scale_factor=Scale factor
+seleccionar=Select
+seleccion_nadgrids=Grids File calculated for
+selecciona_sistema_de_referencia=Select reference system
+seleccionar_crs=Select CRS
+seleccione_crs_capa=Select layer CRS
+seleccione_crs_vista=Select view CRS
+seleccione_transformacion=Select Tansformation
+seleccionarRejilla=Select grid
+semiMajorAxis=Semi-major axis
+semMay=Semi-major axis
+semMen=Semi.minor axis
+si=Yes
+siguiente=Next
+sin_transformacion=No transformation
+source_crs=Source CRS
+spheroid=Spheroid
+recientes=Recent
+target_crs=Tarjet CRS
+the_parameter=The parameter
+the_projection=the projection
+tipo=Type
+transformation=Transformation
+transformation_code=Transformation code
+transformacion_epsg=EPSG Transformation
+transformacion_manual=Manual Transformation
+transformacion_compuesta= Compound Transformation
+transformation_name=Transformation name
+transformacion_vista=View transformation
+transformacion_capa=Layer transformation
+transformations=Transformations
+type_transformation=Transformation type
+ultimos_crs_utilizados=Recent CRSs
+units=Units
+units_p=Units_p
+user=User
+USR=USR
+valor=Value
+white_Textbox=White textbox
+wkt=WKT
+x_Rotation=X rotation (sexa. sec.)
+x_Translation=X traslation (meters)
+y_Rotation=Y rotation (sexa. sec.)
+y_Translation=Y traslation (meters)
+z_Rotation=Z rotation (sexa. sec.)
+z_Translation=Z traslation(meters)
+Dat_NombreCrs=Name
+Dat_CodeCrs=Code
+Dat_DefinirPor=Defined by
+Dat_nDatum=Datum
+Dat_nElipsoide=Ellipsoid
+Dat_nMeridian=Meridian
+Dat_Datum=Datum name
+Dat_Importar=Import
+Dat_Elips=Ellipsoid name
+Dat_SemMay=Semi-major Axis
+Dat_SemMen=Semi-minor Axis
+Dat_InvF=Inverse Flattening
+Dat_Meridian=Meridian name
+Dat_Long=Longitude
+Dat_InvFToolTipText=Set Inverse Flattening parameter
+Dat_SemMayToolTipText=Set Semi-major Axis parameter 
+Dat_SemMenToolTipText=Set Semi-minor Axis parameter
+SistCoor_titmarco=Coordinate system
+SistCoor_Geografico2D=Geographic 2D
+SistCoor_Proyactado=Projected
+SistCoor_Proyeccion=Projection
+SistCoor_Parametro=Parameter
+SistCoor_Valor=Value
+SistCoor_Unidades=Units
+SistCoor_cbToolTip=Selecciona una opci\u00f3n
+DefCrsUsr_existente=From an existing CRS
+DefCrsUsr_Seleccionar_Crs=Select recent Crs
+DefCrsUsr_nuevo=From user definitions
+DefCrsUsr_wkt=From a WKT String
+DefCrsUsr_importar_wkt=Import Wkt String
+crs_usuario=User CRS
+nombre_proyeccion= Proyection Name
+wz_anterior=Previous
+wz_cancel=Cancel
+wz_fin=Finish
+wz_siguiente=Next
+wz_titulo=User defined CRS
+editar=Edit
+nuevo=New
+eliminar=Remove
+more_info=Extra CRS information
+buscar_por_criterio_seleccion=CRS Search by selected criteria
+
+
+#ANGLE UNITS:
+
+radian=radians
+degree=sexagesimal degrees
+arc-minute=minutes of arc
+arc-second=seconds of arc
+grad=centesimal degrees
+gon=centesimal degrees
+degree_minute_second=degree minute second (sexagesimal)
+degree_minute_second_hemisphere=degree minute second hemisphere (sexagesimal)
+microradian=microradians
+sexagesimal_DMS=sexagesimal DMS
+sexagesimal_DM=sexagesimal DM
+centesimal_minute=centesimal minutes
+centesimal_second=centesimal seconds
+mil_6400=mil 6400
+degree_minute=sexagesimal minutes
+degree_hemisphere=sexagesimal minutes hemisphere
+hemisphere_degree= sexagesimal degrees hemisferio
+degree_minute_hemisphere=--
+hemisphere_degree_minute=--
+hemisphere_degree_minute_second=--
+sexagesimal_DMS.s=sexagesimal DMS.s
+degree_(supplier_to_define_representation)=sexagesimal degrees(DEG)
+
+
+#LENGHT UNITS:
+
+metre=meters
+foot=feet
+US_survey_foot=US survey feet
+Clarke's_foot=Clarke's feet
+fathom=fathoms
+nautical_mile=nautical miles
+German_legal_metre=German legal metres
+US_survey_chain=US survey chains
+US_survey_link=US survey link
+US_survey_mile=US surveymiles
+kilometre=kilometres
+Clarke's_yard=Clarke's yards
+Clarke's_chain=Clarke's chains
+Clarke's_link=Clarke's links
+British_yard_(Sears_1922)=British yards (Sears 1922)
+British_foot_(Sears_1922)=British feet(Sears 1922)
+British_chain_(Sears_1922)=British chains (Sears 1922)
+British_link_(Sears_1922)=British links (Sears 1922)
+British_yard_(Benoit_1895_A)=British yards (Benoit 1895 A)
+British_foot_(Benoit_1895_A)=British feet (Benoit 1895 A)
+British_chain_(Benoit_1895_A)=British chains (Benoit 1895 A)
+British_link_(Benoit_1895_A)=British links(Benoit 1895 A)
+British_yard_(Benoit_1895_B)=British yards(Benoit 1895 B)
+British_foot_(Benoit_1895_B)=Britishfeet(Benoit 1895 B)
+British_chain_(Benoit_1895_B)=British chains (Benoit 1895 B)
+British_link_(Benoit_1895_B)=British links (Benoit 1895 B)
+British_foot_(1865)=Britishfeet (1865)
+Indian_foot=Indian feet
+Indian_foot_(1937)=Indian feet(1937)
+Indian_foot_(1962)=Indian feet(1962)
+Indian_foot_(1975)=Indian feet(1975)
+Indian_yard=Indian yards
+Indian_yard_(1937)=Indian yards(1937)
+Indian_yard_(1962)=Indian yards(1962)
+Indian_yard_(1975)=Indian yards(1975)
+Statute_mile=Statute miles
+Gold_Coast_foot=Gold Coast feet
+British_foot_(1936)=British feet (1936)
+yard=yards
+chain=chains
+link=links
+British_yard_(Sears_1922_truncated)=British yards (Sears 1922 truncated)
+Bin_width_330_US_survey_feet=Bin width 330 US survey feet
+Bin_width_165_US_survey_feet=Bin width 165 US survey feet
+Bin_width_82.5_US_survey_feet=Bin width 82.5 US survey feet
+Bin_width_37.5_metres=Bin width 37.5 metres
+Bin_width_25_metres=Bin width 25 metres
+Bin_width_12.5_metres=Bin width 12.5 metres
+Bin_width_6.25_metresBin width 6.25 metres
+Bin_width_3.125_metres=Bin width 3.125 metres
+British_foot_(Sears_1922_truncated)=British feet (Sears 1922 truncated)
+British_chain_(Sears_1922_truncated)=British chains (Sears 1922 truncated)
+British_link_(Sears_1922_truncated)=British links (Sears 1922 truncated)
+
+# Coordinate System Parameters:
+
+altitude=Altitude
+azimuth=Azimuth
+central_meridian=Central meridian
+Central_meridian=Central meridian
+false_easting=False easting
+false_northing=False northing
+Height=Height
+latitude_of_center=Latitude of center
+Latitude_Of_1st_Point=Latitude of 1st point
+Latitude_Of_2nd_Point=Latitude of 2nd pint
+latitude_of_origin=Latitude of origin
+latitude_of_standard_parallel=Latitude of standard parallel
+longitude_of_center=Longitude of center
+Longitude_Of_1st_Point=Longitude of 1st point
+Longitude_Of_2nd_Point=Longitude of 2nd point
+pseudo_standard_parallel_1=Pseudo standard parallel
+rectified_grid_angle=rectified height
+satellite_height=satelite height
+scale_factor=Scale Factor
+semi_major=Semi Major
+semi_minor=Semi Minor
+standard_parallel_1=Standard parallel 1
+standard_parallel_2=Standard parallel 2
+
+#PROJECTION NAMES:
+
+Aitoff=Aitoff
+Albers_Conic_Equal_Area=Albers Conic Equal Area
+Azimuthal_Equidistant=Azimuthal Equidistant
+Bonne=Bonne
+Cassini_Soldner=Cassini Soldner
+Craster_Parabolic=Craster Parabolic
+Cylindrical_Equal_Area=Cylindrical Equal Area
+Eckert_I=Eckert I
+Eckert_II=Eckert II
+Eckert_III=Eckert III
+Eckert_IV=Eckert IV
+Eckert_V=Eckert V
+Eckert_VI=Eckert VI
+Equidistant_Conic=Equidistant Conic
+Equirectangular=Equirectangular
+GEOS=GEOS
+Gall_Stereographic=Gall Stereographic
+Gnomonic=Gnomonic
+Goode=Goode
+Hammer_Aitoff=Hammer Aitoff
+Krovak=Krovak
+Laborde_Madagascar=Laborde Madagascar
+Lambert_Azimuthal_Equal_Area=Lambert Azimuthal Equal Area
+Lambert_Conformal_Conic=Lambert Conformal Conic
+Lambert_Conformal_Conic_1SP=Lambert Conformal Conic 1SP
+Lambert_Conformal_Conic_2SP=Lambert Conformal Conic 2SP
+Lambert_Conformal_Conic_2SP_Belgium=Lambert Conformal Conic 2SP Belgium
+Lambert_Conic_Near_Conformal=Lambert Conic Near Conformal
+Loximuthal=Loximuthal
+McBryde_Thomas_Flat_Polar_Quartic=McBryde Thomas Flat Polar Quartic
+Mercator_1SP=Mercator 2SP
+Mercator_2SP=Mercator 2SP
+Miller_Cylindrical=Miller Cylindrical
+Mollweide=Mollweide
+Near_Sided_Perspective=Near Sided Perspective
+New_Zealand_Map_Grid=New Zealand Map Grid
+Orthographic=Orthographic
+Polar_Stereographic=Polar Stereographic
+Polyconic=Polyconic
+Quartic_Authalic=Quartic Authalic
+Robinson=Robinson
+Sinusoidal=Sinusoidal
+Stereographic=Stereographic
+Stereographic_North_Pole=Stereographic North Pole
+Stereographic_South_Pole=Stereographic South Pole
+Swiss_Oblique_Cylindrical=Swiss Oblique Cylindrical
+Transverse_Mercator=Transverse Mercator
+VanDerGrinten=VanDerGrinten
+Winkel_I=Winkel I
+Winkel_II=Winkel II
+Winkel_Tripel=Winkel Tripel

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_en.properties
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/about.htm
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/config/about.htm	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/config/about.htm	(revision 25287)
@@ -0,0 +1,39 @@
+<html>
+  <head>
+    <title>Extensi&oacute;n JCRS</title>
+    <meta content="">
+    <style></style>
+  </head>
+  <body>
+<table width="60%" border="0">
+  <tr>
+    <td width="35%"><img src="images/logoidr.png" width="127" height="100"></td>
+    <td width="65%"><div align="right"><img src="images/teledeteccion.png" width="368" height="100"></div></td>
+  </tr>
+  <tr>
+    <td colspan="2"><font face="Arial, Helvetica, sans-serif">&copy; Copyright
+      Generalitat Valenciana, Instituto de Desarrollo Regional, UCLM 2006.</font></td>
+  </tr>
+</table>
+  <h3>Extesi&oacute;n JCRS V 0.2</h3>
+  <h4>&iexcl;Atenci&oacute;n! Esta es una versi&oacute;n para pruebas, puede presentar errores importantes.</h4>
+  <p>Extensi&oacute;n para el manejo de Sistemas de Referencia de Coordenadas:</p> 
+  <ul>
+  	 <li>Nuevos repositorios de CRSs: EPSG, ESRI, IAU2000</li>
+  	 <li>CRSs Definidos por el usuario</li> 
+     <li>Transformaciones EPSG</li>
+     <li>Transformaciones por fichero Rejilla (NTv2)</li>
+     <li>Transformaciones definidas por el usuario</li>
+     <li>Transformaciones compuestas</li>
+     <li>...</li> 
+  </ul>
+  <p>Librer&iacute;as utilizadas:</p> 
+  <ul>
+  	 <li>PROJ.4</li>
+  	 <li>GeoTools</li> 
+     <li>jGridShift</li>
+  </ul>
+  <p>Responsable t&eacute;cnico: Dr. David Hern&aacute;ndez L&oacute;pez (david.hernandez@uclm.es)</p> 
+  <p><br><br><b>Code name: extJCRS-0.2-#build.number#</b></p>
+  </body>
+</html>
\ No newline at end of file

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/about.htm
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/db_esri.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/config/db_esri.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/config/db_esri.properties	(revision 25287)
@@ -0,0 +1,20 @@
+#HSQL database
+#Wed Nov 29 14:18:46 CET 2006
+hsqldb.cache_file_scale=1
+runtime.gc_interval=0
+hsqldb.first_identity=0
+version=1.7.3
+modified=no
+hsqldb.script_format=0
+sql.enforce_size=false
+hsqldb.cache_size_scale=10
+hsqldb.cache_scale=14
+hsqldb.version=1.7.3
+hsqldb.log_size=200
+sql.enforce_strict_size=false
+readonly=true
+hsqldb.compatible_version=1.7.2
+hsqldb.original_version=1.7.3
+sql.compare_in_locale=false
+hsqldb.nio_data_file=true
+hsqldb.cache_version=1.7.0

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/db_esri.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/usr.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/config/usr.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/config/usr.properties	(revision 25287)
@@ -0,0 +1,20 @@
+#HSQL database
+#Mon May 21 10:22:10 CEST 2007
+hsqldb.cache_file_scale=1
+runtime.gc_interval=0
+hsqldb.first_identity=0
+version=1.7.3
+modified=yes
+hsqldb.script_format=0
+sql.enforce_size=false
+hsqldb.cache_size_scale=10
+hsqldb.cache_scale=14
+hsqldb.version=1.7.3
+hsqldb.log_size=200
+sql.enforce_strict_size=false
+readonly=false
+hsqldb.compatible_version=1.7.2
+hsqldb.original_version=1.7.3
+sql.compare_in_locale=false
+hsqldb.nio_data_file=true
+hsqldb.cache_version=1.7.0

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/usr.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/config.xml
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/config/config.xml	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/config/config.xml	(revision 25287)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<plugin-config>
+	<depends plugin-name="com.iver.cit.gvsig"/>
+	<libraries library-dir="."/>
+	<resourceBundle name="text"/>
+	<extensions>
+		<extension class-name="org.gvsig.crs.JCrsExtension"
+			description="M�dulo de JCrs." 
+			active="true" 
+			priority="1">
+		</extension>
+		<extension class-name="org.gvsig.crs.InitialWarningExtension"
+			description="Advertencia JCRS." 
+			active="true" 
+			priority="1">
+		</extension>
+	</extensions>		
+</plugin-config>
\ No newline at end of file

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/config.xml
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_cs.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_cs.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_cs.properties	(revision 25287)
@@ -0,0 +1,165 @@
+#Translations for language [cs]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=
+abstract=Abstrakt
+add=P\u0159idat
+address=Adre\u00e7a
+advanced=
+advanced_settings=
+ancho_alto=\u0160\u00ed\u0159ka X v\u00fd\u0161ka
+anterior=P\u0159edchoz\u00ed
+apply=Pou\u017e\u00edt
+bands=Okraje
+brillo=
+brillo_y_contraste=
+browse=
+cancel=Zru\u0161it
+cannotReproject=Nelze znovuzobrazit sou\u0159adnicov\u00fd syst\u00e9m
+cant_reproject_from_any_of=
+capas=Vrstvy
+city=
+clear=Vy\u010distit
+conectar=Spojit
+connect_error=Chyba spojen\u00ed
+contact_info=
+contact_organization=
+contact_person=Jm\u00e9no
+contact_position=C\u00e0rrec
+contraste=Contrast
+coor_geograficas=Geografick\u00e9 sou\u0159adnice
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=
+covered_extension=Roz\u0161\u00ed\u0159en\u00ed
+created_with=
+defined_by_view_extent=
+description=Popis
+description_URL=
+dimension=Rozm\u011br
+dimensiones=Rozm\u011bry
+disagregate_layers=\u00daprava struktury vrstev
+e-mail=E-mail
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Odstranit hrany
+error=Error
+error_writting_file=
+estilos=Styly
+export=Exportovat
+export_to_map_context=
+extents_no_coincidentes=Zvolen\u00e1 hranice nesouhlas\u00ed s p\u016fvodn\u00edm obr\u00e1zkem.
+fax=Fax
+Fichero=Soubor
+fichero_existe=Zvolen\u00fd soubor ji\u017e existuje jako vrstva
+file_name=
+file_version=
+fit_WMS_layer=Upravit WMS Vrstvu
+format=Form\u00e1t
+formato=Form\u00e1t
+formatos=Form\u00e1ty
+georeferenciado=
+height=
+html_in_a_new_view=
+html_in_other_view=
+html_in_the_current_view=
+id=ID
+import=Import
+import_map_context=
+in=v
+info=Informace
+Informacion=Informace
+interval=Interval
+invalid_dimension_values=
+is_required=\u00e9s obligatori
+keywords=Paraules clau
+layer=Vrstva
+layer_abstract=Abstrakt
+layer_name=N\u00e1zev vrstvy
+layer_title=N\u00e1zev vrstvy
+layers_in_other_view=
+layers_in_the_current_view=
+lineal_directo=P\u0159\u00edmo line\u00e1rn\u00ed
+logo_URL=URL logotip
+m/pixel=metros/pixel
+map_context_file_error=
+map_extent=Roz\u0161\u00ed\u0159en\u00ed
+map_size_in_pixels=
+metadatos=Metadatos
+move_layer_down=Dol\u016f
+move_layer_up=Nahoru
+must_specify_a_file=
+name=Jm\u00e9no
+none_selected=Nic nezvoleno
+not_available=Nen\u00ed k dispozici
+num_bandas=Okrajov\u00e9 hodnoty
+ogc_mapcontext_file=OGC Web Map Context
+ok=Budi\u017e
+Ok=Budi\u017e
+opacidad=Stupe\u0148 pr\u016fsvitnosti
+open_layers_as=
+options=
+origen_de_datos=P\u016fvod dat
+postcode=
+previsualizacion=
+problems_encountered_while_importing=
+properties=Vlastnosti
+propiedades_raster=Vlastnosti rastru
+Proyecciones=
+realce=vylep\u0161en\u00ed
+recorte_colas=O\u0159ez fronty
+refresh_capabilities=Obnovit cache
+refresh_capabilities_tooltip=P\u0159epsat lok\u00e1ln\u00ed data
+remove=Odstranit
+seleccionar_srs=Vybrat SRS
+select_formats=Zvolen\u00e9 form\u00e1ty
+select_layers=Vybrat vrstvu
+selected_dimensions=Zvolen\u00e9 rozm\u011bry
+selected_layers=Zvolen\u00e9 vrstvy
+server=Server
+server_abstract=Shrnut\u00ed
+server_cant_render_layers=Tento WMS nem\u016f\u017ee spojit tyto vrstvy. \nPokuste se odd\u011blit dotazy pro ka\u017edou vrstvu.
+server_timeout=WMS vypr\u0161el \u010dasov\u00fd limit
+server_title=N\u00e1zev
+server_type=Typ serveru
+service_info=Informace o serveru
+set=Nastavit
+settings=Nastaven\u00ed
+settings_editor=Editor nastaven\u00ed
+show_layer_names=
+si=
+siguiente=Dal\u0161\u00ed
+single_value=Jedna hodnota
+state_or_province=Estat/Prov\u00edncia
+style=Styl
+tamano=Velikost\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e8fon
+tipo_dato=Datov\u00fd typ
+title=N\u00e1zev
+to=Do
+transparencia=Pr\u016fhlednost
+unknown_response_format=Nezn\u00e1m\u00fd form\u00e1t odpov\u011bdi
+unsupported_crs=
+unsupported_map_context_version=
+unsupported_version=
+use_custom_size=
+use_full_extent=
+use_view_size=
+value=Hodnota
+version=Versi\u00f3
+version_conflict=Konflikt verz\u00ed
+view=Pohled
+Vista=Pohled
+web_map_context=
+web_map_context_settings=
+width=Ampl\u00e0ria
+wms_cant_connect=Nelze se spojit s WMS
+wms_not_queryable=Server neum\u00ed vyhled\u00e1vat
+wms_properties=WMS vlastnosti
+wms_server_error=Chyba WMS
+wms_transparency=Pr\u016fhlednost
+WMSLayer=WMS vrstva
+xmax=maximum X
+xmin=minimum X
+ymax=maximum Y
+ymin=minimum Y

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_cs.properties
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/esri.script
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/esri.script
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_fr.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_fr.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_fr.properties	(revision 25287)
@@ -0,0 +1,165 @@
+#Translations for language [fr]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=
+abstract=R\u00e9sum\u00e9
+add=Ajouter
+address=Adre\u00e7a
+advanced=
+advanced_settings=
+ancho_alto=Largeur X hauteur
+anterior=Pr\u00e9c\u00e9dent
+apply=Appliquer
+bands=Bandes
+brillo=Brightness
+brillo_y_contraste=
+browse=
+cancel=Annuler
+cannotReproject=No es pot reprojectar aquest sistema de refer\u00e8ncia
+cant_reproject_from_any_of=
+capas=Couches g\u00e9ographiques
+city=
+clear=Effacer
+conectar=Connecter
+connect_error=
+contact_info=
+contact_organization=Organitzaci\u00f3
+contact_person=Nom
+contact_position=C\u00e0rrec
+contraste=Contrast
+coor_geograficas=Coordonn\u00e9es g\u00e9ographiques
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=
+covered_extension=
+created_with=Creat amb
+defined_by_view_extent=
+description=Description
+description_URL=
+dimension=Dimension
+dimensiones=Dimensions
+disagregate_layers=
+e-mail=E-mail
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Eliminer les extr\u00eames
+error=Error
+error_writting_file=
+estilos=Styles
+export=Exporter
+export_to_map_context=
+extents_no_coincidentes=Les dimmensions de l'image selectionn\u00e9e ne co\u00efncident pas avec celles de l'image d'origine.
+fax=Fax
+Fichero=Fichier
+fichero_existe=Le fichier selectionn\u00e9 existe d\u00e9j\u00e0
+file_name=Nom de fichier 
+file_version=
+fit_WMS_layer=Ajuster \u00e0 la couche WMS
+format=Format
+formato=Format
+formatos=Formats
+georeferenciado=
+height=
+html_in_a_new_view=<HTML>Crea una vista nova al projecte. La nova vista contindr\u00e0 totes les capes definides pel fitxer.</HTML>
+html_in_other_view=<HTML>Afegeix les capes a la vista que especifique de les de la llista seg\u00fcent.</HTML>
+html_in_the_current_view=<HTML>Afegeix les capes definides pel fitxer a la actual vista activa.</HTML>
+id=ID
+import=
+import_map_context=
+in=\u00e0 l'int\u00e9rieur
+info=Information
+Informacion=
+interval=Intervalle
+invalid_dimension_values=
+is_required=\u00e9s obligatori
+keywords=Paraules clau
+layer=Couche
+layer_abstract=R\u00e9sum\u00e9
+layer_name=Nom de la couche
+layer_title=Titre de la couche
+layers_in_other_view=Capes la vista que jo trie
+layers_in_the_current_view=
+lineal_directo=Lin\u00e9aire direct
+logo_URL=URL logotip
+m/pixel=metros/pixel
+map_context_file_error=
+map_extent=Extension
+map_size_in_pixels=Tamany del mapa (p\u00edxels)
+metadatos=Metadatos
+move_layer_down=Moure avall
+move_layer_up=Moure amunt
+must_specify_a_file=
+name=Nom
+none_selected=Aucune selection
+not_available=No disponible
+num_bandas=Nombre de bandes
+ogc_mapcontext_file=OGC Web Map Context
+ok=Accepter
+Ok=Accepter
+opacidad=Opacit\u00e9
+open_layers_as=
+options=
+origen_de_datos=Origine des donn\u00e9es
+postcode=
+previsualizacion=
+problems_encountered_while_importing=
+properties=Propri\u00e9t\u00e9s
+propiedades_raster=Propri\u00e9t\u00e9s du raster
+Proyecciones=
+realce=R\u00e9heussement
+recorte_colas=Couper les r\u00e9sidus
+refresh_capabilities=Refrescar mem\u00f2ria cau
+refresh_capabilities_tooltip=Marque esta casella per a sobreescriure les dades anteriores.
+remove=Quitter
+seleccionar_srs=S\u00e9lectionner SRS
+select_formats=S\u00e9lection des formats
+select_layers=S\u00e9lectionner des couches
+selected_dimensions=S\u00e9lectionner une dimension
+selected_layers=Couches s\u00e9lectionn\u00e9es
+server=Serveur
+server_abstract=R\u00e9sum\u00e9
+server_cant_render_layers=Aquest servidor WMS no pot renderitzar aquestes dues capes conjuntament.\nSepareles en dues cosultes diferents.
+server_timeout=WMS d\u00e9lais d\u00e9pass\u00e9
+server_title=Titre
+server_type=Type de server
+service_info=Information sur le service
+set=Etablir
+settings=
+settings_editor=
+show_layer_names=
+si=
+siguiente=Suivant
+single_value=Valeur unique
+state_or_province=
+style=Style
+tamano=Taille\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e8fon
+tipo_dato=Type de donn\u00e9e
+title=Titre
+to=Jusqu'\u00e0
+transparencia=Transparence
+unknown_response_format=
+unsupported_crs=
+unsupported_map_context_version=
+unsupported_version=Versi\u00f3 no suportada
+use_custom_size=
+use_full_extent=
+use_view_size=
+value=Valeur
+version=Versi\u00f3
+version_conflict=Conflicte de versi\u00f3
+view=Vue
+Vista=Vue
+web_map_context=
+web_map_context_settings=
+width=Ampl\u00e0ria
+wms_cant_connect=Cannot connect to WMS
+wms_not_queryable=Aquest servidor no accepta peticions d\u0092aquest tipus
+wms_properties=Propri\u00e9t\u00e9s WMS
+wms_server_error=Error del servidor WMS
+wms_transparency=Transparence
+WMSLayer=Couche WMS
+xmax=X minimum
+xmin=X minimum
+ymax=Y minimum
+ymin=Y minimum

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_fr.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/db_epsg.script
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/db_epsg.script
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_eu.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_eu.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_eu.properties	(revision 25287)
@@ -0,0 +1,165 @@
+#Translations for language [eu]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=Bista berria
+abstract=Laburpena
+add=Gehitu
+address=Helbidea
+advanced=Aurreratua
+advanced_settings=Aukera aurreratuak
+ancho_alto=Zabalera altuera
+anterior=Aurrekoa
+apply=Aplikatu
+bands=Bandak
+brillo=Distira
+brillo_y_contraste=Distira eta kontrastea
+browse=Aztertu
+cancel=Utzi
+cannotReproject=Koordenatu sistema hau ezin da berriro proiektatu
+cant_reproject_from_any_of=
+capas=Geruzak
+city=Herria
+clear=Garbitu
+conectar=Konektatu
+connect_error=Konexio-errorea
+contact_info=Harremanetarako informazioa
+contact_organization=Antolaketa
+contact_person=Izena
+contact_position=Kargua
+contraste=Kontrastea
+coor_geograficas=Koordenatu geografikoak
+could_not_find_web_map_context_file=
+countries_of_the_world=Afganistan;Albania;Aljeria;Ameriketako Samoa;Andorra;Angola;Anguilla;Antartika;Antigua eta Barbuda;Argentina;Armenia;Aruba;Ascension uhartea;Australia;Austria;Azerbaijan;Bahamak;Bahrain;Bangladesh;Barbados;Bielorrusia;Belgika;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia-Herzegovina;Botswana;Bouvet uhartea;Brazil;Indiako ozeanoko Britainiar Lurraldea;Brunei;Bulgaria;Burkina Faso;Burundi;Kanbodia;Kamerun;Kanada;Cabo Verde;Cayman uharteak;Afrika Erdiko Errepublika;Txad;Txile;Txina;Christmas uhartea;Kokoen uhartea(Keeling);Kolonbia;Komoreak;Kongo (KED);Kongo;Cook uharteak;Costa Rica;Boli Kosta;Kroazia;Kuba;Zipre;Txekiar Errepublika;Danimarka;Djibouti;Dominika;Dominikar Errepublika;Ekuador;Egipto;El Salvador;Ekuatore Ginea;Eritrea;Estonia;Etiopia;Falkland uharteak;Faroe uharteak;Fiji;Finlandia;Frantzia;Guyana Frantsesa;Polinesia Frantsesa;Hegoaldeko eta Antartikoko Frantziako lurraldea;Gabon;Gambia;Georgia;Alemania;Ghana;Gibraltar;Grezia;Groenlandia;Grenada;Guadalupe;Guam;Guatemala;Guernesey;Ginea;Ginea-Bissau;Guyana;Haiti;Heard uhartea eta McDonald uharteak;Honduras;Hong Kong SAR;Hungaria;Islandia;India;Indonesia;Iran;Irak;Irlanda;Man uhartea;Israel;Italia;Jamaika;Japonia;Jordania;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kirgizistan;Laos;Latvia;Libano;Lesotho;Liberia;Libia;Liechtenstein;Lituania;Luxenburgo;Macau SAR;Mazedonia;Madagaskar;Malawi;Malaysia;Maldivak;Mali;Malta;Marshall uharteak;Martinika;Mauritania;Maurizio;Mayotte;Mexiko;Mikronesia;Moldavia;Monako;Mongolia;Montserrat;Maroko;Mozambike;Myanmar;Namibia;Nauru;Nepal;Holandarren Antillak;Herbehereak;Kaledonia Berria;Zeelanda Berria;Nikaragua;Niger;Nigeria;Niue;Norfolk uhartea;Ipar Korea;Mariana uharteak;Norvegia;Oman;Pakistan;Palau;Palestinako Agintea;Panama;Papua Ginea Berria;Paraguai;Peru;Filipinak;Pitcairn uharteak;Polonia;Portugal;Puerto Rico;Qatar;Reunion;Errumania;Errusia;Ruanda;Samoa;San Marino;Santo Tome eta Principe;Saudi Arabia;Senegal;Serbia eta Montenegro;Seychelleak;Sierra Leona;Singapur;Eslovakia;Eslovenia;Solomon uharteak;Somalia;Hegoafrika;South Georgia eta hegoaldeko Sandwich uharteak;Espainia;Sri Lanka;Santa Helena;St. Kitts eta Nevis;St. Luzia;Sain-Pierre eta Mikelune;Saint Vincent eta Grenadinak;Sudan;Surinam;Svalbard eta Jan Mayen;Swazilandia;Suedia;Suitza;Siria;Taiwan;Tadjikistan;Tanzania;Thailandia;Timor-Leste;Togo;Tokelau;Tonga;Trinidad eta Tobago;Tristan da Cunha;Tunisia;Turkia;Turkmenistan;Turk eta Caiko uharteak;Tuvalu;Uganda;Ukraina;Arabiar Emirerri Batuak;Britainia Handia;Ameriketako Estatu Batuak;Estatu Batuetako Garrantzia Txikiko Uharte Periferikoak;Uruguai;Uzbekistan;Vanuatu;Vatikano Hiria;Venezuela;Vietnam;Birjina uharteak;Birjina uharteak,Britainia;Wallis eta Futuna;Yemen;Zambia;Zimbabwe
+country=Herrialdea
+covered_extension=Hedaduraren estaldura
+created_with=Honekin sortua\:
+defined_by_view_extent=
+description=Deskripzioa
+description_URL=URL deskribapena
+dimension=Neurria
+dimensiones=Neurriak
+disagregate_layers=Geruzen egitura mantendu
+e-mail=e-posta
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Ezabatu muturrak
+error=Errorea
+error_writting_file=Errorea fitxategia idaztean
+estilos=Estiloak
+export=Esportatu
+export_to_map_context=
+extents_no_coincidentes=Hedadurak ez datoz bat
+fax=Faxa
+Fichero=Fitxategia
+fichero_existe=Fitxategia badago
+file_name=Fitxategia
+file_version=Fitxategiaren bertsioa
+fit_WMS_layer=Doitu WMS geruza
+format=Formatua
+formato=Formatua
+formatos=Formatuak
+georeferenciado=
+height=Altuera
+html_in_a_new_view=Sortu bista berria proiektuan. Bista berrian fitxategiak zehaztutako geruza guztiak jasoko dira.
+html_in_other_view=Gehitu geruzak zerrenda honetan zehaztutako bistan\:
+html_in_the_current_view=<HTML>Fitxategian zehaztutako geruzak aktibo dagoen bistan gehitzen ditu.</HTML>
+id=ID
+import=Inportatu
+import_map_context=Inportatu mapak OGC Web Map Context fitxategi batetik
+in=hemen\:
+info=Informazioa
+Informacion=Informazioa
+interval=Tartea
+invalid_dimension_values=
+is_required=nahitaezkoa da
+keywords=Gako-hitzak
+layer=Geruza
+layer_abstract=Laburpena
+layer_name=Geruzaren izena
+layer_title=Geruzaren izenburua
+layers_in_other_view=Geruzak nik aukeratutako bistan
+layers_in_the_current_view=Oraingo bistako geruzak
+lineal_directo=Zuzeneko lineala
+logo_URL=URL logotipoa
+m/pixel=metros/pixel
+map_context_file_error=Errorea Web Map Context fitxategian
+map_extent=Luzapena
+map_size_in_pixels=Maparen tamaina (pixelak)
+metadatos=Metadatos
+move_layer_down=Behera mugitu
+move_layer_up=Gora mugitu
+must_specify_a_file=Xede fitxategi bat zehaztu behar duzu.
+name=Izena
+none_selected=Ez da bat ere ez hautatu
+not_available=Ez dago erabilgarri
+num_bandas=Banda kopurua
+ogc_mapcontext_file=OGC Web Map Context
+ok=Ados
+Ok=Ados
+opacidad=Opakotasuna
+open_layers_as=Zabaldu geruzak honela\:
+options=Aukerak
+origen_de_datos=Datu-iturburua
+postcode=Posta kodea
+previsualizacion=Aurrebista
+problems_encountered_while_importing=
+properties=Ezaugarriak
+propiedades_raster=Raster-aren ezaugarriak
+Proyecciones=
+realce=Irtengunea
+recorte_colas=Ilarak ebaki
+refresh_capabilities=Eguneratu aurrememoria
+refresh_capabilities_tooltip=Markatu lauki hau aurreko datuen gainean idazteko
+remove=Kendu
+seleccionar_srs=Hautatu SRS
+select_formats=Hautatu formatuak
+select_layers=Hautatu geruzak
+selected_dimensions=Hautatutako dimentsioak
+selected_layers=Hautatutako geruzak
+server=Zerbitzaria
+server_abstract=Aurkibidea
+server_cant_render_layers=Zerbitzari honek ezin ditu geruza horiek batera errendatu. Saia zaitez geruza bakoitzerako eskari bat egiten
+server_timeout=Server timeout
+server_title=Zerbitzariaren izenburua
+server_type=Zerbitzari mota
+service_info=Zerbitzuari buruzko argibideak
+set=Ezarri
+settings=Doikuntzak
+settings_editor=Doikuntza-editorea
+show_layer_names=Erakutsi geruzen izenak
+si=
+siguiente=Hurrengoa
+single_value=Balio bakuna
+state_or_province=Estatua/Probintzia
+style=Estiloa
+tamano=Tamaina\:
+tamPixX=
+tamPixY=
+telephone=Telefonoa
+tipo_dato=Datu mota
+title=Izenburua
+to=Honaino
+transparencia=Gardentasuna
+unknown_response_format=Erantzunaren formatua ezezaguna da
+unsupported_crs=
+unsupported_map_context_version=Web Map Context fitxategiaren bertsioa ezin da jasan
+unsupported_version=Ezin da bertsio hori jasan
+use_custom_size=Tamaina pertsonalizatua
+use_full_extent=
+use_view_size=Bistaren tamaina
+value=Balioa
+version=Bertsioa
+version_conflict=Bertsio-gatazka
+view=Bista
+Vista=Bista
+web_map_context=Web Map Context
+web_map_context_settings=Web Map Context fitxategiaren ezaugarriak
+width=Zabalera
+wms_cant_connect=Ezin izan da WMSrekin konexioa egin
+wms_not_queryable=Zerbitzari honek ez ditu era horretako eskariak onartzen
+wms_properties=WMS ezaugarriak
+wms_server_error=WMS zerbitzariaren errorea
+wms_transparency=Gardentasuna
+WMSLayer=WMS geruza
+xmax=xmax
+xmin=xmin
+ymax=ymax
+ymin=ymin

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_eu.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/db_esri.script
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/db_esri.script
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/iau2000.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/config/iau2000.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/config/iau2000.properties	(revision 25287)
@@ -0,0 +1,20 @@
+#HSQL database
+#Wed Oct 18 12:53:57 CEST 2006
+hsqldb.cache_file_scale=1
+runtime.gc_interval=0
+hsqldb.first_identity=0
+version=1.7.3
+modified=no
+hsqldb.script_format=0
+sql.enforce_size=false
+hsqldb.cache_size_scale=10
+hsqldb.cache_scale=14
+hsqldb.version=1.7.3
+hsqldb.log_size=200
+sql.enforce_strict_size=false
+readonly=true
+hsqldb.compatible_version=1.7.2
+hsqldb.original_version=1.7.3
+sql.compare_in_locale=false
+hsqldb.nio_data_file=true
+hsqldb.cache_version=1.7.0

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/iau2000.properties
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_it.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_it.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_it.properties	(revision 25287)
@@ -0,0 +1,165 @@
+#Translations for language [it]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=
+abstract=Riassunto
+add=Aggiungi
+address=Adre\u00e7a
+advanced=
+advanced_settings=
+ancho_alto=Larghezza X altezza
+anterior=Anteriore
+apply=Applica
+bands=Bande
+brillo=Brightness
+brillo_y_contraste=
+browse=
+cancel=Cancella
+cannotReproject=No es pot reprojectar aquest sistema de refer\u00e8ncia
+cant_reproject_from_any_of=
+capas=Layers
+city=
+clear=Pulisci
+conectar=Connettere
+connect_error=Error de conbexi\u00f3
+contact_info=
+contact_organization=Organitzaci\u00f3
+contact_person=Nome
+contact_position=C\u00e0rrec
+contraste=Contrast
+coor_geograficas=Coordinate geografiche
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=
+covered_extension=Estensione
+created_with=
+defined_by_view_extent=
+description=Descrizione
+description_URL=
+dimension=Dimensione
+dimensiones=Dimensioni
+disagregate_layers=
+e-mail=E-mail
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Elimina gli estremi
+error=Error
+error_writting_file=
+estilos=Stili
+export=Exportar
+export_to_map_context=
+extents_no_coincidentes=L'estensione della immagine selezionata non coincide con la immagine di origine.
+fax=Fax
+Fichero=Archivio
+fichero_existe=Il file selezionato esiste gi\u00e1 come banda del layer
+file_name=
+file_version=
+fit_WMS_layer=Aggiusta layer WMS
+format=Formato
+formato=Formato
+formatos=Formati
+georeferenciado=
+height=
+html_in_a_new_view=<HTML>Crea una vista nova al projecte. La nova vista contindr\u00e0 totes les capes definides pel fitxer.</HTML>
+html_in_other_view=
+html_in_the_current_view=<HTML>Afegeix les capes definides pel fitxer a la actual vista activa.</HTML>
+id=ID
+import=
+import_map_context=
+in=in
+info=Informazione
+Informacion=Informazione
+interval=Intervallo
+invalid_dimension_values=
+is_required=\u00e9s obligatori
+keywords=Paraules clau
+layer=Livello
+layer_abstract=Riassunto
+layer_name=Nome del layer
+layer_title=Titolo del layer
+layers_in_other_view=
+layers_in_the_current_view=
+lineal_directo=Lineare diretto
+logo_URL=URL logotip
+m/pixel=metros/pixel
+map_context_file_error=
+map_extent=Estensione
+map_size_in_pixels=Tamany del mapa (p\u00edxels)
+metadatos=Metadatos
+move_layer_down=Moure avall
+move_layer_up=Moure amunt
+must_specify_a_file=
+name=Nome
+none_selected=Nessuna selezione
+not_available=No disponible
+num_bandas=Numero delle bande
+ogc_mapcontext_file=OGC Web Map Context
+ok=Accetta
+Ok=Accetta
+opacidad=Opacit\u00e1
+open_layers_as=
+options=
+origen_de_datos=Origine dei dati
+postcode=
+previsualizacion=
+problems_encountered_while_importing=
+properties=Proprieta'
+propiedades_raster=Propriet\u00e1 del raster
+Proyecciones=
+realce=Rilievo
+recorte_colas=Ritaglio degli estremi
+refresh_capabilities=Refrescar mem\u00f2ria cau
+refresh_capabilities_tooltip=Marque esta casella per a sobreescriure les dades anteriores.
+remove=Rimuovi
+seleccionar_srs=Selezionare SRS
+select_formats=Seleziona formati
+select_layers=Seleziona Layers
+selected_dimensions=Dimensioni selezionate
+selected_layers=Layers selezionati
+server=Server
+server_abstract=Sommario
+server_cant_render_layers=Aquest servidor WMS no pot renderitzar aquestes dues capes conjuntament.\nSepareles en dues cosultes diferents.
+server_timeout=Tempo massimo di attesa di risposta WMS terminato
+server_title=Titolo
+server_type=Tipo di Server
+service_info=Informazione di servizio
+set=Stabilisci
+settings=
+settings_editor=
+show_layer_names=
+si=
+siguiente=Seguente
+single_value=Valore unico
+state_or_province=
+style=Stile
+tamano=Dimensione\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e8fon
+tipo_dato=Tipo di Dato
+title=Titolo
+to=Fino a
+transparencia=Transparenza
+unknown_response_format=
+unsupported_crs=
+unsupported_map_context_version=
+unsupported_version=Versi\u00f3 no suportada
+use_custom_size=
+use_full_extent=
+use_view_size=
+value=Valore
+version=Versi\u00f3
+version_conflict=Conflicte de versi\u00f3
+view=Vista
+Vista=Vista
+web_map_context=
+web_map_context_settings=
+width=Ampl\u00e0ria
+wms_cant_connect=Non \u00e9 stato possibile realizzare la connessione con il WMS
+wms_not_queryable=Aquest servidor no accepta peticions d\u0092aquest tipus
+wms_properties=Propriet\u00e1 WMS
+wms_server_error=Error del servidor WMS
+wms_transparency=Transparenza
+WMSLayer=WMS layer
+xmax=X massima
+xmin=X minima
+ymax=Y massima
+ymin=Y minima

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_it.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/usr.script
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/usr.script
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text.properties	(revision 25287)
@@ -0,0 +1,382 @@
+#Translations for language [es]
+#Fri Oct 10 09:47:23 CEST 2008
+
+abrir=Abrir
+advertencia_nad=IMPORTANTE: La transformaci\u00f3n se aplicar\u00e1 dentro de los l\u00edmites de las rejillas.
+angle=\u00c1ngulo
+anterior=Anterior
+aplicar_capa=CRS de la capa
+aplicar_vista=CRS de la vista
+apply=Aplicar
+area=\u00e1rea
+browse=Examinar
+buscar=Buscar
+calculated_in=Calculado en
+cancel=Cancelar
+codeSelectedCrs=C\u00f3digo del CRS seleccionado
+code_transformation=C\u00f3digo de la Transformaci\u00f3n
+codigo=C\u00f3digo
+COMP=COMP
+compound=Compuesta
+coordinate_reference_systems= Coordinate Reference Systems
+criterio_busqueda= Criterio de b\u00fasqueda
+crs_layer=CRS de la capa
+crs_no_selected=No se ha seleccionado CRS
+crs_not_projected=CRS no proyectado
+crs_not_soported=CRS no soportado
+crs_view=CRS de la vista
+crsAndTransformation=CRS y Transformaci\u00f3n
+crsRepeat=CRS repetido
+crsview=CrsView
+datum=Datum
+degree=grados
+deleteUsr=\u00bf"Borrar crs de usuario"?
+descripcion=Descripci\u00f3n
+description_area=Descripci\u00f3n del \u00e1rea
+detalles=Detalles
+details=Detalles
+detailsTransformation=Detalles de la transformaci\u00f3n
+ellipsoid=Elipsoide
+EPSG=EPSG
+error_adding_default_value_to_projection_parameter=Error al intentar insertar el valor por defecto al par\u00e1metro de proyecci\u00f3n
+error_adding_max_value_to_projection_parameter=Error al intentar insertar el valor m\u00e1ximo al par\u00e1metro de proyecci\u00f3n
+error_adding_min_value_to_projection_parameter=Error al intentar insertar el valor m\u00ednimo al par\u00e1metro de proyecci\u00f3n
+error_adding_parameter_projection_name=Error al intentar insertar el nombre del par\u00e1metro de proyecci\u00f3n
+error_adding_projection_acronym=Error al intentar insertar el acr\u00f3nimo de la proyecci\u00f3n
+error_adding_projection_name=Error al intentar insertar el nombre de proyecci\u00f3n
+error_adding_projection_parameter=Error al intentar insertar el par\u00e1metro de proyecci\u00f3n
+error_adding_unit_name=Error al intentar insertar el nombre de la unidad
+error_obtaining_default_value_to_projection_parameter=Error al obtener el valor por defecto de par\u00e1metro de proyecci\u00f3n
+error_obtaining_max_value_to_projection_parameter=Error al obtener el valor m\u00e1ximo de par\u00e1metro de proyecci\u00f3n
+error_obtaining_min_value_to_projection_parameter=Error al obtener el valor m\u00ednimo de par\u00e1metro de proyecci\u00f3n
+error_obtaining_projection_acronym=Error al obtener el acr\u00f3nimo de proyecci\u00f3n
+error_obtaining_projection_name=Error al obtener el nombre de la proyecci\u00f3n
+error_obtaining_projection_parameter_name=Error al obtener el nombre del par\u00e1metro de la proyecci\u00f3n
+error_obtaining_unit_list_of_projection_parameter=Error al obtener la lista de unidades de par\u00e1metros de proyecci\u00f3n
+error_obtaining_unit_name=Error al obtener el nombre de unidad
+error_prime_meridiam_parameters=Falla alg\u00fan parametro del prime meridian
+ESRI=ESRI
+fill_name=Rellenar el nombre
+finalizar=Finalizar
+fuente=Fuente
+geogcs=Geogcs
+greenwichLongitude=Longitud del meridiano
+grids_en=Grids en
+IAU2000=IAU2000
+in=en
+in_proj4_projection=En proj4 la proyecci\u00f3n
+incorrect_domain=Dominio Incorrecto
+infocrs=Info CRS
+infoCRS=Informacion del CRS
+Informacion=Informaci\u00f3n
+info_transformations= Informaci\u00f3n de la transformaci\u00f3n
+initial_jcrs_warning=<html><b>\u00a1ATENCI\u00d3N\!</b><br>Est\u00e1 utilizando una Versi\u00f3n en pruebas de la extensi�n JCRS. Puede contener errores importantes.</html>
+invFlattening=Inverso del aplanamiento
+inv_f=Inversa del aplanamiento
+importar=Importar
+importarRejilla=Importar rejilla
+lat_max=Latitud m\u00e1xima
+lat_min=Latitud m\u00ednima
+latitude_of_standar_parallel=latitud del paralelo est\u00e1ndar
+long=Longitud
+long_max=Longitud m\u00e1xima 
+long_min=Longitud m\u00ednima
+Mercator=Mercator
+name=Nombre
+nadfile_not_found=No se encuentra el fichero de rejillas.
+nadfile_bad_format=No se reconoce el formato del fichero de rejillas.
+nadgrids=Rejilla formato NTv2
+nadgrids_file=Fichero de rejillas
+nameDatum=Nombre del datum
+nameSelectedCrs=Nombre del CRS
+name_transformation=Nombre de la Transformaci\u00f3n
+newCRS=CRS de usuario
+no=No
+no_results=No se han encontrado resultados
+node_count=N\u00famero de nodos
+nombre=Nombre
+not_admit_azimut_close_to=no admite azimut pr\u00f3ximo a
+not_admit_different_azimut_and_spin_axis=no admite azimut y giro de ejes diferentes
+not_admit_scale_factor_and_latitude_of_origin=no admite scale_factor!=1.0 y latitude_of_origin!=0.0
+not_admit_latitude_origin_close_to_the_poles=no admite latitud origen pr\u00f3xima a los polos
+not_admit_parameter=no admite el par\u00e1metro
+not_equal_lat_1_and_lat_2=no pueden ser iguales lat_1 y lat_2
+not_geographic_nor_projected=El CRS no es ni geogr\u00e1fico ni proyectado
+not_in_parameter_list=no esta en la lista de parametros
+not_in_proj4=no figura en Proj4
+not_zero_lat_1=lat_1 no puede ser 0
+not_values_90_or_minus_90_lat_2=lat_2 no puede ser 90 o -90
+nuevo_crs=Nuevo CRS
+numeric_format=Este campo solo acepta caracteres num�ricos
+Oblique_Mercator=Obl\u00edcua de Mercator
+Oblique_Stereographic=Stereogr\u00e1fica Obl\u00edcua
+ok=Aceptar
+Ok=Aceptar
+out_of_domain=est\u00e1 fuera de dominio
+parameters=Par\u00e1metros
+por_area=Por \u00e1rea
+por_codigo=Por c\u00f3digo
+por_nombre=Por nombre
+position_out_of_valid_limits=posici\u00f3n fuera de los l\u00edmites v\u00e1lidos
+primem=Primem
+primeMeridian=Meridiano origen
+problem_with_wkt_try_manually=Problemas con wkt, pruebe a crear el CRS manualmente
+proj4Chain=Cadena proj4
+projcs=Projcs
+projected=Proyectado
+projection=Proyecci\u00f3n
+proyeccion_actual=Proyecci\u00f3n actual
+recents_transformation=Transformaciones Recientes
+repository=Repositorio
+scale=Escala (ppm)
+scale_factor=Factor de Escala
+seleccionar=Seleccionar
+seleccion_nadgrids=Fichero rejilla calculado en
+selecciona_sistema_de_referencia=Selecciona Sistema de Referencia
+seleccionar_crs=Selecionar CRS
+seleccione_crs_capa=Seleccione CRS de la capa
+seleccione_crs_vista=Seleccione CRS de la vista
+seleccione_transformacion=Seleccione Transformaci\u00f3n
+seleccionarRejilla=Seleccionar rejilla
+semiMajorAxis=Semieje mayor
+semMay=Semieje Mayor
+semMen=Semieje Menor
+si=S\u00ed
+siguiente=Siguiente
+sin_transformacion=Sin Transformaci\u00f3n
+source_crs=CRS fuente
+spheroid=Esferoide
+recientes=Recientes
+target_crs=CRS destino
+the_parameter=El par\u00e1metro
+the_projection=La proyecci\u00f3n
+tipo=Tipo
+transformation=Transformaci\u00f3n
+transformation_code=C\u00f3digo de la Transformaci\u00f3n
+transformacion_epsg=Transformaci\u00f3n EPSG
+transformacion_manual=Transformaci\u00f3n Manual
+transformacion_compuesta= Transformaci\u00f3n Compuesta
+transformation_name=Nombre de la Transformaci\u00f3n
+transformacion_vista=Transformaci\u00f3n de la Vista
+transformacion_capa=Transformaci\u00f3n de la Capa
+transformations=Transformaciones
+type_transformation=Tipo de la Transofmaci\u00f3n
+ultimos_crs_utilizados=\u00faltimos CRSs utilizados
+units=Unidades
+units_p=Unidades_p
+user=Usuario
+USR=USR
+valor=Valor
+white_Textbox=Campo en blanco
+wkt=WKT
+x_Rotation=Rotaci\u00f3n en x (seg.sexa)
+x_Translation=Translaci\u00f3n en x (metros)
+y_Rotation=Rotaci\u00f3n en y (seg.sexa)
+y_Translation=Translaci\u00f3n en y (metros)
+z_Rotation=Rotaci\u00f3n en z (seg.sexa)
+z_Translation=Translaci\u00f3n en z (metros)
+Dat_NombreCrs=Nombre
+Dat_CodeCrs=C\u00f3digo
+Dat_DefinirPor=Definir por
+Dat_nDatum=Datum
+Dat_nElipsoide=Elipsoide
+Dat_nMeridian=Meridiano
+Dat_Datum=Nombre del Datum
+Dat_Importar=Importar
+Dat_Elips=Nombre del Elipsoide
+Dat_SemMay=Semieje Mayor
+Dat_SemMen=Semieje Menor
+Dat_InvF=Inverso del Aplanamiento
+Dat_Meridian=Nombre del Meridiano
+Dat_Long=Longitud
+Dat_InvFToolTipText=Fijar el par\u00e1metro Inverse Flat
+Dat_SemMayToolTipText=Fijar el par\u00e1metro Semieje Mayor
+Dat_SemMenToolTipText=Fijar el par\u00e1metro Semieje Menor
+SistCoor_titmarco=Sistema de Coordenadas
+SistCoor_Geografico2D=Geogr\u00e1fico 2D
+SistCoor_Proyactado=Proyectado
+SistCoor_Proyeccion=Proyecci\u00f3n
+SistCoor_Parametro=Par\u00e1metro
+SistCoor_Valor=Valor
+SistCoor_Unidades=Unidades
+SistCoor_cbToolTip=Selecciona una opci\u00f3n
+DefCrsUsr_existente=A partir de un CRS Existente
+DefCrsUsr_Seleccionar_Crs=Seleccionar Crs Existente
+DefCrsUsr_nuevo=A partir de definiciones de usuario
+DefCrsUsr_wkt=A partir de una cadena wkt
+DefCrsUsr_importar_wkt=Importar cadena Wkt
+crs_usuario=CRS Usuario
+nombre_proyeccion= Nombre de la Proyecci\u00f3n
+wz_anterior=Anterior
+wz_cancel=Cancelar
+wz_fin=Finalizar
+wz_siguiente=Siguiente
+wz_titulo=Definici\u00f3n de un nuevo CRS por el usuario
+editar=Editar
+nuevo=Nuevo
+eliminar=Eliminar
+more_info=M\u00e1s informaci\u00f3n del Crs seleccionado
+buscar_por_criterio_seleccion=B\u00fasqueda de un Crs seg\u00fan el criterio seleccionado
+
+#UNIDADES ANGULARES:
+
+radian=radianes (RAD)
+degree=grados sexagesimales (DEG)
+arc-minute=minutos de arco
+arc-second=segundos de arco
+grad=grados centesimales (GRAD)
+gon=grados centesimales (GRAD)
+degree_minute_second=grados minutos segundos (sexagesimales)
+degree_minute_second_hemisphere= grados minutos segundos hemnisferio (sexagesimales)
+microradian=microradianes
+sexagesimal_DMS=sexagesimal seudo gg.mmssfs
+sexagesimal_DM=sexagesimal seudo gg.mmfm
+centesimal_minute=minutos centesimales
+centesimal_second=segundos centesimales
+mil_6400=mil�sima artillera
+degree_minute=minutos sexagesimales
+degree_hemisphere=minutos sexagesimales y hemisferio
+hemisphere_degree= grados sexagesimales y hemisferio
+degree_minute_hemisphere=grados sexagesimales (DM) y hemisferio
+hemisphere_degree_minute=sexagesimal (DM) y hemisferio 
+hemisphere_degree_minute_second=sexagesimal (DMS) y hemisferio
+sexagesimal_DMS.s=sexagesimal seudo gg.mmssfs
+degree_(supplier_to_define_representation)=grados sexagesimales (DEG)
+
+#UNIDADES LONGITUD:
+metre=metros
+foot=pies
+US_survey_foot=pies topogr\u00e1ficos estadounidenses
+Clarke's_foot=pies de Clarke
+fathom=brazas
+nautical_mile=millas na\u00faticas
+German_legal_metre=metros legales alemanes
+US_survey_chain=cadenas topogr\u00e1ficas estadounidenses
+US_survey_link=eslabones topogr\u00e1ficos estadounidenses
+US_survey_mile=millas topogr\u00e1ficas estadounidenses
+kilometre=kil\u00f3metros
+Clarke's_yard=yardas de Clarke
+Clarke's_chain=cadenas de Clarke
+Clarke's_link=eslabones de Clarke
+British_yard_(Sears_1922)=yardas brit\u00e1nicas (Sears 1922)
+British_foot_(Sears_1922)=pies brit\u00e1nicos (Sears 1922)
+British_chain_(Sears_1922)=cadenas brit\u00e1nicas (Sears 1922)
+British_link_(Sears_1922)=eslabones brit\u00e1nicos (Sears 1922)
+British_yard_(Benoit_1895_A)=yardas brit\u00e1nicas (Benoit 1895 A)
+British_foot_(Benoit_1895_A)=pies brit\u00e1nicos (Benoit 1895 A)
+British_chain_(Benoit_1895_A)=cadenas brit\u00e1nicas (Benoit 1895 A)
+British_link_(Benoit_1895_A)=eslabones brit\u00e1nicos (Benoit 1895 A)
+British_yard_(Benoit_1895_B)=yardas brit\u00e1nicas (Benoit 1895 B)
+British_foot_(Benoit_1895_B)=pies brit\u00e1nicos (Benoit 1895 B)
+British_chain_(Benoit_1895_B)=cadenas brit\u00e1nicos (Benoit 1895 B)
+British_link_(Benoit_1895_B)=eslabones brit\u00e1nicos (Benoit 1895 B)
+British_foot_(1865)=pies brit\u00e1nicos (1865)
+Indian_foot=pies indios
+Indian_foot_(1937)=pies indios (1937)
+Indian_foot_(1962)=pies indios (1962)
+Indian_foot_(1975)=pies indios (1975)
+Indian_yard=yardas indias
+Indian_yard_(1937)=yardas indias (1937)
+Indian_yard_(1962)=yardas indias (1962)
+Indian_yard_(1975)=yardas indias (1975)
+Statute_mile=millas (Statute)
+Gold_Coast_foot=pies (Gold Coast)
+British_foot_(1936)=pies brit\u00e1nicos (1936)
+yard=yardas
+chain=cadenas
+link=eslabones
+Link=eslabones
+British_yard_(Sears_1922_truncated)=yardas brit\u00e1nicas (Sears 1922 truncadas)
+Bin_width_330_US_survey_feet=pies (Bin width 330 US survey)
+Bin_width_165_US_survey_feet=pies (Bin_width 165 US survey)
+Bin_width_82.5_US_survey_feet=pies (Bin width 82.5 US survey)
+Bin_width_37.5_metres=metros (Bin width 37.5)
+Bin_width_25_metres=metros (Bin width 25)
+Bin_width_12.5_metres=metros (Bin width 12.5)
+Bin_width_6.25_metres=metros (Bin width 6.25)
+Bin_width_3.125_metres=metros (Bin width 3.125)
+British_foot_(Sears_1922_truncated)=pies brit\u00e1nicos (Sears 1922 truncados)
+British_chain_(Sears_1922_truncated)=cadenas brit\u00e1nicas (Sears 1922 truncados)
+British_link_(Sears_1922_truncated)=eslabones brit\u00e1nicos (Sears 1922 truncados)
+
+#PARAMETROS DE LOS SISTEMAS DE COORDENADAS:
+
+altitude=Altitud
+azimuth=Azimut
+central_meridian=Meridiano central
+Central_meridian=Meridiano central
+false_easting=Falso este
+false_northing=Falso norte
+Height=Altitud
+latitude_of_center=Latitud del centro
+Latitude_Of_1st_Point=Latitud del 1er punto
+Latitude_Of_2nd_Point=Latitud del 2d punto
+latitude_of_origin=Latitud del origen
+latitude_of_standard_parallel=Latitud del paralelo estandar
+longitude_of_center=Longitud del centro
+Longitude_Of_1st_Point=Longitud del 1er punto
+Longitude_Of_2nd_Point=Longitud del 2d punto
+pseudo_standard_parallel_1=Pseudo paralelo estandar
+rectified_grid_angle=\u00C1ngulo de grid rectificado
+satellite_height=Altitud de sat�lite
+scale_factor=Factor de escala
+semi_major=Semieje mayor
+semi_minor=Semieje menor
+standard_parallel_1=Paralelo estandar 1
+standard_parallel_2=Paralelo estandar 1
+ 
+#PROJECTION NAMES:
+
+Aitoff=Aitoff
+Albers_Conic_Equal_Area=C\u00F3nica Iso \u00C1rea de Albers
+Azimuthal_Equidistant=Equidistante Azimutal
+Bonne=Bonne
+Cassini_Soldner=Cassini Soldner
+Craster_Parabolic=Parab\u00F3lica de Craster
+Cylindrical_Equal_Area=Cil\u00EDndrica Iso \u00C1rea
+Eckert_I=Eckert I
+Eckert_II=Eckert II
+Eckert_III=Eckert III
+Eckert_IV=Eckert IV
+Eckert_V=Eckert V
+Eckert_VI=Eckert VI
+Equidistant_Conic=C\u00F3nica Equidistante
+Equirectangular=Equirectangular
+GEOS=GEOS
+Gall_Stereographic=Stereographica de Gall
+Gnomonic=Gnomonic
+Goode=Goode
+Hammer_Aitoff=Hammer Aitoff
+Krovak=Krovak
+Laborde_Madagascar=Laborde Madagascar
+Lambert_Azimuthal_Equal_Area=Azimutal Iso \u00C1rea de Lambert
+Lambert_Conformal_Conic=C\u00F3nica Conforme de Lambert
+Lambert_Conformal_Conic_1SP=C\u00F3nica Conforme de Lambert 1SP
+Lambert_Conformal_Conic_2SP=C\u00F3nica Conforme de Lambert 2SP
+Lambert_Conformal_Conic_2SP_Belgium=C\u00F3nica Conforme de Lambert 2SP B\u00E9lgica
+Lambert_Conic_Near_Conformal=C\u00F3nica Near-Conformal de Lambert
+Loximuthal=Loximutal
+McBryde_Thomas_Flat_Polar_Quartic=Cu\u00E1rtica Polar Plana de McBryde Thomas
+Mercator_1SP=Mercator 2SP
+Mercator_2SP=Mercator 2SP
+Miller_Cylindrical=Cil\u00EDndrica de Miller
+Mollweide=Mollweide
+Near_Sided_Perspective=Perspectiva cercana
+New_Zealand_Map_Grid=Nueva Zelanada Map Grid
+Orthographic=Ortogr\u00E1fica
+Polar_Stereographic=Polar Stereogr\u00E1fica
+Polyconic=Polic\u00F3nica 
+Quartic_Authalic=Aut\u00E1lica Cu\u00E1rtica
+Robinson=Robinson
+Sinusoidal=Sinusoidal
+Stereographic=Stereogr\u00E1fica
+Stereographic_North_Pole=Stereogr\u00E1fica Polo Norte
+Stereographic_South_Pole=Stereogr\u00E1fica Polo Sur
+Swiss_Oblique_Cylindrical=Cil\u00EDndrica Obl\u00EDcua Suiza
+Transverse_Mercator=Transversa Mercator
+VanDerGrinten=VanDerGrinten
+Winkel_I=Winkel I
+Winkel_II=Winkel II
+Winkel_Tripel=Winkel Tripel
+
+

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/db_iau2000.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/config/db_iau2000.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/config/db_iau2000.properties	(revision 25287)
@@ -0,0 +1,20 @@
+#HSQL database
+#Wed Oct 18 12:53:57 CEST 2006
+hsqldb.cache_file_scale=1
+runtime.gc_interval=0
+hsqldb.first_identity=0
+version=1.7.3
+modified=no
+hsqldb.script_format=0
+sql.enforce_size=false
+hsqldb.cache_size_scale=10
+hsqldb.cache_scale=14
+hsqldb.version=1.7.3
+hsqldb.log_size=200
+sql.enforce_strict_size=false
+readonly=true
+hsqldb.compatible_version=1.7.2
+hsqldb.original_version=1.7.3
+sql.compare_in_locale=false
+hsqldb.nio_data_file=true
+hsqldb.cache_version=1.7.0

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/db_iau2000.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_ca.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_ca.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_ca.properties	(revision 25287)
@@ -0,0 +1,165 @@
+#Translations for language [ca]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=Vista nova
+abstract=Resum
+add=Afegir
+address=Adre\u00e7a
+advanced=Avan\u00e7ada
+advanced_settings=Opcions avan\u00e7ades
+ancho_alto=Amplada al\u00e7ada
+anterior=Anterior
+apply=Aplicar
+bands=Bandes
+brillo=Brillantor
+brillo_y_contraste=Brillantor i contrast
+browse=Examinar
+cancel=Cancel\u00b7lar
+cannotReproject=No es pot reprojectar este sistema de coordenades
+cant_reproject_from_any_of=
+capas=Capes
+city=Ciutat
+clear=Netejar
+conectar=Connectar
+connect_error=Error de connexi\u00f3
+contact_info=Informaci\u00f3 de contacte
+contact_organization=Organitzaci\u00f3
+contact_person=Nom
+contact_position=C\u00e0rrec
+contraste=Contrast
+coor_geograficas=Coordenades geogr\u00e0fiques
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=Pa\u00eds
+covered_extension=Cobertura de l'extensi\u00f3
+created_with=Creat amb
+defined_by_view_extent=Extensi\u00f3 de la vista
+description=Descripci\u00f3
+description_URL=URL descripci\u00f3
+dimension=Dimensi\u00f3
+dimensiones=Dimensions
+disagregate_layers=Conservar estructura de capes
+e-mail=Correu electr\u00f2nic
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Eliminar extrems
+error=Error
+error_writting_file=Error en escriure el fitxer
+estilos=Estils
+export=Exportar
+export_to_map_context=
+extents_no_coincidentes=Extensions no coincidents
+fax=Fax
+Fichero=Fitxer
+fichero_existe=Hi ha fitxer
+file_name=Fitxer
+file_version=Versi\u00f3 del fitxer
+fit_WMS_layer=Ajustar capa WMS
+format=Format
+formato=Format
+formatos=Formats
+georeferenciado=
+height=Al\u00e7ada
+html_in_a_new_view=<HTML>Crea una vista nova en el projecte. La nova vista contindr\u00e0 totes les capes definides pel fitxer.</HTML>
+html_in_other_view=<HTML>Afig les capes en la vista que especifique de la llista seg\u00fcent\:</HTML>
+html_in_the_current_view=<HTML>Afig les capes definides en el fitxer a la vista activa.</HTML>
+id=ID
+import=Importar
+import_map_context=Importar mapes des d'un fitxer Web Map Context d'OGC
+in=en
+info=Informaci\u00f3
+Informacion=Informaci\u00f3
+interval=Interval
+invalid_dimension_values=
+is_required=\u00e9s obligatori
+keywords=Paraules clau
+layer=Capa
+layer_abstract=Resum de la capa
+layer_name=Nom de la capa
+layer_title=T\u00edtol de la capa
+layers_in_other_view=Capes en la llista que jo elegisca
+layers_in_the_current_view=Capes en la vista actual
+lineal_directo=Lineal directe
+logo_URL=URL logotip
+m/pixel=metros/pixel
+map_context_file_error=Error en el fitxer Web Map Context
+map_extent=Extensi\u00f3
+map_size_in_pixels=Dimensi\u00f3 del mapa (p\u00edxels)
+metadatos=Metadatos
+move_layer_down=Moure amunt
+move_layer_up=Moure avall
+must_specify_a_file=Ha d'especificar un fitxer de dest\u00ed
+name=Nom
+none_selected=Cap seleccionat
+not_available=No disponible
+num_bandas=Nombre de bandes
+ogc_mapcontext_file=OGC Web Map Context
+ok=D'acord
+Ok=D'acord
+opacidad=Opacitat
+open_layers_as=Obrir les capes com a
+options=Opcions
+origen_de_datos=Origen de dades
+postcode=Codi postal
+previsualizacion=Previsualitzaci\u00f3
+problems_encountered_while_importing=
+properties=Propietats
+propiedades_raster=Propietats del raster
+Proyecciones=
+realce=Relleu
+recorte_colas=Retall de cues
+refresh_capabilities=Refrescar la mem\u00f2ria cau
+refresh_capabilities_tooltip=Marque esta casella per a sobreescriure les dades anteriors.
+remove=Llevar
+seleccionar_srs=Seleccioneu SRS
+select_formats=Seleccionar formats
+select_layers=Seleccionar capes
+selected_dimensions=Dimensions seleccionades
+selected_layers=Capes seleccionades
+server=Servidor
+server_abstract=Resum del servidor
+server_cant_render_layers=Este servidor no pot representar estes capes juntes. Prove a fer peticions separades per a cada capa.
+server_timeout=Temps de connexi\u00f3 excedit
+server_title=T\u00edtol del servidor
+server_type=Tipus de servidor
+service_info=Informaci\u00f3 del servici
+set=Establir
+settings=Ajustaments
+settings_editor=Editor d'ajustaments
+show_layer_names=Mostrar noms de capes
+si=
+siguiente=Seg\u00fcent
+single_value=Valor simple
+state_or_province=Estat/Prov\u00edncia
+style=Estil
+tamano=Dimensi\u00f3\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e8fon
+tipo_dato=Tipus de dada
+title=T\u00edtol
+to=Fins a
+transparencia=Transpar\u00e8ncia
+unknown_response_format=Format de resposta desconeguda
+unsupported_crs=
+unsupported_map_context_version=Versi\u00f3 de Web Map Context no suportada
+unsupported_version=Versi\u00f3 no suportada
+use_custom_size=Dimensi\u00f3 personalitzada
+use_full_extent=Extensi\u00f3 total
+use_view_size=Dimensi\u00f3 de la vista
+value=Valor
+version=Versi\u00f3
+version_conflict=Conflicte de versi\u00f3
+view=Vista
+Vista=Vista
+web_map_context=Web Map Context
+web_map_context_settings=Propietats Web Map Context
+width=Amplada
+wms_cant_connect=No es pot realitzar la connexi\u00f3 amb WMS
+wms_not_queryable=Este servidor no accepta peticions d'este tipus
+wms_properties=Propietats WMS
+wms_server_error=Error del servidor WMS
+wms_transparency=Transpar\u00e8ncia
+WMSLayer=Capa WMS
+xmax=X m\u00e0xima
+xmin=X m\u00ednima
+ymax=Y m\u00e0xima
+ymin=Y m\u00ednima

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_ca.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_pt.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_pt.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_pt.properties	(revision 25287)
@@ -0,0 +1,165 @@
+#Translations for language [pt]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=
+abstract=Resumo
+add=Adicionar
+address=Adre\u00e7a
+advanced=
+advanced_settings=
+ancho_alto=Largura X altura
+anterior=Anterior
+apply=Aplicar
+bands=Bandas
+brillo=Brightness
+brillo_y_contraste=
+browse=
+cancel=Cancelar
+cannotReproject=N\u00e3o se pode reprojectar este sistema de coordenadas
+cant_reproject_from_any_of=
+capas=Capas
+city=
+clear=Limpar
+conectar=Conectar
+connect_error=Erro ao conectar
+contact_info=
+contact_organization=Organitzaci\u00f3
+contact_person=Nome
+contact_position=C\u00e0rrec
+contraste=Contrast
+coor_geograficas=Coordenadas geogr\u00e1ficas
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=
+covered_extension=Extens\u00e3o
+created_with=
+defined_by_view_extent=
+description=Descri\u00e7\u00e3o
+description_URL=
+dimension=Dimens\u00e3o
+dimensiones=Dimens\u00f5es
+disagregate_layers=
+e-mail=E-mail
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Remover extremos
+error=Error
+error_writting_file=
+estilos=Estilos
+export=Exportar
+export_to_map_context=
+extents_no_coincidentes=A extens\u00e3o da imagem seleccionada n\u00e3o coincide com a imagem de origem.
+fax=Fax
+Fichero=Ficheiro
+fichero_existe=O ficheiro seleccionado j\u00e1 existe como banda da capa
+file_name=
+file_version=
+fit_WMS_layer=
+format=Formato
+formato=Formato
+formatos=Formatos
+georeferenciado=
+height=
+html_in_a_new_view=<HTML>Crea una vista nova al projecte. La nova vista contindr\u00e0 totes les capes definides pel fitxer.</HTML>
+html_in_other_view=
+html_in_the_current_view=<HTML>Afegeix les capes definides pel fitxer a la actual vista activa.</HTML>
+id=ID
+import=
+import_map_context=
+in=em
+info=Informa\u00e7\u00e3o
+Informacion=Informa\u00e7\u00e3o
+interval=Intervalo
+invalid_dimension_values=
+is_required=\u00e9s obligatori
+keywords=Paraules clau
+layer=Capa
+layer_abstract=Resumo
+layer_name=Nome da capa
+layer_title=Titulo da capa
+layers_in_other_view=
+layers_in_the_current_view=
+lineal_directo=Lineal direito
+logo_URL=URL logotip
+m/pixel=metros/pixel
+map_context_file_error=
+map_extent=Extens\u00e3o
+map_size_in_pixels=Tamany del mapa (p\u00edxels)
+metadatos=Metadatos
+move_layer_down=Mover para baixo
+move_layer_up=Mover para cima
+must_specify_a_file=
+name=Nome
+none_selected=Nenhum seleccionado
+not_available=N\u00e3o dispon\u00edvel
+num_bandas=N\u00famero de bandas
+ogc_mapcontext_file=OGC Web Map Context
+ok=Aceitar
+Ok=Aceitar
+opacidad=Opacidade
+open_layers_as=
+options=
+origen_de_datos=Origem de dados
+postcode=
+previsualizacion=
+problems_encountered_while_importing=
+properties=Propriedades
+propiedades_raster=Propiedades da cobertura
+Proyecciones=
+realce=Realce
+recorte_colas=Recorte de filas
+refresh_capabilities=Actualizar cache
+refresh_capabilities_tooltip=Marque esta op\u00e7\u00e3o para reescrever os dados anteriores.
+remove=Remover
+seleccionar_srs=Seleccionar SRS
+select_formats=Seleccionar formatos
+select_layers=Seleccionar capas
+selected_dimensions=Dimens\u00f5es seleccionadas
+selected_layers=Capas seleccionadas
+server=Servidor
+server_abstract=Sumario
+server_cant_render_layers=Este servidor n\u00e3o pode "renderizar" estas capas juntas. Tenta fazer peti\u00e7\u00f5es separadas para cada capa.
+server_timeout=Alcan\u00e7ado m\u00e1ximo tempo de espera de resposta do WMS
+server_title=Titulo
+server_type=Tipo de servidor
+service_info=Informa\u00e7\u00e3o do servi\u00e7o
+set=Establecer
+settings=
+settings_editor=Editor de ajustes
+show_layer_names=Mostrar nomes
+si=
+siguiente=Seguinte
+single_value=Valor simples
+state_or_province=
+style=Estilo
+tamano=Tamanho\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e8fon
+tipo_dato=Tipo de dado
+title=T\u00edtulo
+to=At\u00e9
+transparencia=Transpar\u00eancia
+unknown_response_format=
+unsupported_crs=
+unsupported_map_context_version=
+unsupported_version=Versi\u00f3 no suportada
+use_custom_size=
+use_full_extent=
+use_view_size=
+value=Valor
+version=Versi\u00f3
+version_conflict=Conflito de vers\u00f5es
+view=Vis\u00e3o
+Vista=Vista
+web_map_context=
+web_map_context_settings=
+width=Ampl\u00e0ria
+wms_cant_connect=N\u00e3o foi poss\u00edvel realizar a conex\u00e3o com WMS
+wms_not_queryable=Este servidor n\u00e3o aceita peti\u00e7\u00f5es deste tipo
+wms_properties=Propriedades WMS
+wms_server_error=Erro do servidor WMS
+wms_transparency=Transpar\u00eancia
+WMSLayer=Capa WMS
+xmax=X m\u00e1xima
+xmin=X m\u00ednima
+ymax=Y m\u00e1xima
+ymin=Y m\u00ednima

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_pt.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/iau2000.script
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/iau2000.script
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_de.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_de.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_de.properties	(revision 25287)
@@ -0,0 +1,165 @@
+#Translations for language [de]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=
+abstract=Zusammenfassung
+add=Hinzuf\u00fcgen
+address=
+advanced=
+advanced_settings=
+ancho_alto=Breite x h\u00f6he
+anterior=Zur\u00fcck
+apply=Anwenden
+bands=Farbstreifen
+brillo=
+brillo_y_contraste=
+browse=
+cancel=Abbrechen
+cannotReproject=Dieses koordinatensystem kann nicht reprojektiert werden.
+cant_reproject_from_any_of=
+capas=Layer
+city=Ciutat
+clear=s\u00e4ubern
+conectar=Verbinden
+connect_error=Verbindungsfehler
+contact_info=
+contact_organization=Organitzaci\u00f3
+contact_person=Name
+contact_position=C\u00e0rrec
+contraste=Contrast
+coor_geograficas=Geografische koordinaten
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=
+covered_extension=Verl\u00e4ngerung
+created_with=
+defined_by_view_extent=
+description=Beschreibung
+description_URL=
+dimension=Dimension
+dimensiones=Dimensionen
+disagregate_layers=
+e-mail=E-mail
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Extreme l\u00f6schen
+error=Error
+error_writting_file=
+estilos=Stile
+export=Exportieren
+export_to_map_context=
+extents_no_coincidentes=Die ausgew\u00e4hlte Bildgr\u00f6\u00dfe stimmt nicht mit dem Originalbild \u00fcberein.
+fax=Fax
+Fichero=Datei
+fichero_existe=Ausgew\u00e4hlte datei existiert schon als layergruppe.
+file_name=
+file_version=
+fit_WMS_layer=WMS-Karte anpassen
+format=Format
+formato=Format
+formatos=Formate
+georeferenciado=
+height=
+html_in_a_new_view=
+html_in_other_view=
+html_in_the_current_view=
+id=ID
+import=Importieren
+import_map_context=
+in=in
+info=Information
+Informacion=Information
+interval=Intervall
+invalid_dimension_values=
+is_required=
+keywords=
+layer=
+layer_abstract=Zusammenfassung
+layer_name=Name des Layers
+layer_title=Layertitel
+layers_in_other_view=
+layers_in_the_current_view=
+lineal_directo=Direktlineal
+logo_URL=URL logotip
+m/pixel=metros/pixel
+map_context_file_error=
+map_extent=Verl\u00e4ngerung
+map_size_in_pixels=
+metadatos=
+move_layer_down=Nach unten verschieben
+move_layer_up=Nach oben verschieben
+must_specify_a_file=
+name=Name
+none_selected=keiner ausgew\u00e4hlt
+not_available=Nicht verf\u00fcgbar
+num_bandas=Anzahl farbstreifen
+ogc_mapcontext_file=OGC Web Map Context
+ok=OK
+Ok=Ok
+opacidad=Lichtundurchl\u00e4ssigkeit
+open_layers_as=
+options=
+origen_de_datos=Herkunft der daten
+postcode=
+previsualizacion=
+problems_encountered_while_importing=
+properties=Eigenschaften
+propiedades_raster=Eigenschaften der rasterung
+Proyecciones=
+realce=Heraushebung
+recorte_colas=Zuschnitt der Randbereiche
+refresh_capabilities=Cache aktualisieren
+refresh_capabilities_tooltip=Markieren Sie dieses Feld, um die lokalen Daten zu \u00fcberschreiben.
+remove=Entfernen
+seleccionar_srs=SRS ausw\u00e4hlen
+select_formats=Formate ausw\u00e4hlen
+select_layers=Layer ausw\u00e4hlen
+selected_dimensions=Dimensionen ausw\u00e4hlen
+selected_layers=Ausgew\u00e4hlte layer
+server=Server
+server_abstract=Zusammenfasssung
+server_cant_render_layers=Dieser WMS-Server kann diese Layer nicht zusammen rendern. Versuchen Sie, die einzelnen Layer abzufragen.
+server_timeout=Der WMS-Server antwortet nicht\: Time out
+server_title=Titel
+server_type=Servertyp
+service_info=Service-Information
+set=Festlegen
+settings=Einstellungen
+settings_editor=Einstellungseditor
+show_layer_names=Namen anzeigen
+si=
+siguiente=Weiter
+single_value=einfacher Wert
+state_or_province=
+style=Stil
+tamano=Gr\u00f6\u00dfe\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e8fon
+tipo_dato=Datentyp
+title=Titel
+to=Bis
+transparencia=Transparenz
+unknown_response_format=Unbekanntes format der antwort
+unsupported_crs=
+unsupported_map_context_version=
+unsupported_version=
+use_custom_size=
+use_full_extent=
+use_view_size=
+value=Wert
+version=Versi\u00f3
+version_conflict=Versionenkonflikt
+view=Ansicht
+Vista=Ansicht
+web_map_context=
+web_map_context_settings=
+width=Ampl\u00e0ria
+wms_cant_connect=Es konnte keine Verbindung zum WMS hergestellt werden.
+wms_not_queryable=Dieser Server aktzeptiert keine Abfragen dieser Art.
+wms_properties=WMS-Eigenschaften
+wms_server_error=WMS-Serverfehler
+wms_transparency=Transparenz
+WMSLayer=WMS-Layer
+xmax=Maximalwert x
+xmin=Minimalwert x
+ymax=Maximalwert y
+ymin=Minimalwert y

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/text_de.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/db_iau2000.script
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/config/db_iau2000.script
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/images/search.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/images/search.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/images/page_left.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/images/page_left.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/images/teledeteccion.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/images/teledeteccion.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/images/buscar.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/images/buscar.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/images/logoidr.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/images/logoidr.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/build.number
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/build.number	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/build.number	(revision 25287)
@@ -0,0 +1,3 @@
+#Build Number for ANT. Do not edit!
+#Fri Oct 03 14:08:27 BST 2008
+build.number=9

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/build.number
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/.project
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/install/.project	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/install/.project	(revision 25287)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>install</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>
Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/install.xml
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/install/install.xml	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/install/install.xml	(revision 25287)
@@ -0,0 +1,86 @@
+<installation version="1.0">
+	<info>
+		<appname>EXTENSION_JCRS</appname> <!-- A SUSTITUR POR EL NOMBRE DE EXTENSION, POR EJEMPLO: "VISOR_RUIDO" -->
+		<appversion>0.1</appversion>
+		<authors>
+			<author name="Generalitat Valenciana. Conselleria d'Infraestructures i Transport" email="" />
+			<author name="Instituto de Desarrollo Regional. Seccio�n de Teledetecci�n y SIG" email="" />
+		</authors>
+		<url>http://www.gvsig.gva.es/</url>
+		<javaversion>1.5</javaversion>
+	</info>
+
+	<guiprefs height="600" resizable="yes" width="800">
+		<laf name="liquid">
+			<os family="unix" />
+		</laf>
+		<laf name="liquid">
+			<os family="windows" />
+		</laf>
+	</guiprefs>
+
+	<locale>
+		<langpack iso3="spa"/>
+		<langpack iso3="val"/>
+		<langpack iso3="eng"/>
+		<langpack iso3="cat"/>
+		<langpack iso3="chn"/>
+		<langpack iso3="cze"/>
+		<langpack iso3="dan"/>
+		<langpack iso3="deu"/>
+		<langpack iso3="fin"/>
+		<langpack iso3="fra"/>
+		<langpack iso3="glg"/>
+		<langpack iso3="hun"/>
+		<langpack iso3="ita"/>
+		<langpack iso3="jpn"/>
+		<langpack iso3="mys"/>
+		<langpack iso3="ned"/>
+		<langpack iso3="nor"/>
+		<langpack iso3="pol"/>
+		<langpack iso3="por"/>
+		<langpack iso3="rom"/>
+		<langpack iso3="rus"/>
+		<langpack iso3="scg"/>
+		<langpack iso3="svk"/>
+		<langpack iso3="swe"/>
+		<langpack iso3="ukr"/>
+	</locale>
+
+	<resources>
+		<res src="resources/gpl.txt" id="LicencePanel.licence"/>
+		<res src="resources/LEEME.html" id="HTMLInfoPanel.info"/>
+		<res src="resources/images/Logo_gvsig_gva.jpg" id="Installer.image"/>
+		<res src="resources/userInputSpec.xml" id="userInputSpec.xml"/>
+		<parsable targetfile="resources/userInputSpec.xml"/>
+		<res src="resources/userInputLang.xml_val" id="userInputLang.xml_val" />
+		<res src="resources/userInputLang.xml_spa" id="userInputLang.xml_spa" />
+	</resources>
+
+	<panels>
+		<panel classname="HTMLInfoPanel"/>
+		<panel classname="LicencePanel"/>
+		<panel classname="PacksPanel"/>
+		<panel classname="UserInputPanel"/>
+		<panel classname="InstallPanel"/>
+		<panel classname="SimpleFinishPanel"/>
+	</panels>
+
+	<packs>
+
+		<pack name="Extension_JCRS" required="yes">  <!--A SUSTITUIR POR LA EXTENSION, EJ: Extension VISOR_RUIDO-->
+			<description>Extensi�n para la gestion de Sistemas de Referencia de Coordenadas (CRSs).</description> <!--A SUSTITUIR POR LA DESCRIPCION, EJ: Extension para manejo de... -->
+			<file targetdir="$INSTALL_PATH/bin/gvSIG/extensiones/" src="extensiones/org.gvsig.crs" override="true"/> 
+			<!--SUSTITUR POR LA EXTENSION, ej: com.iver.ayto.visorRuido-->
+			<!--además, si hay que copiar algo fuera del directorio de la extension, hay que añadirlo-->
+			<file targetdir="$INSTALL_PATH/bin/gvSIG/extensiones/com.iver.cit.gvsig/lib" src="extensiones/com.iver.cit.gvsig/lib/jcrs.jar" override="true"/>
+			<file targetdir="$INSTALL_PATH/bin/gvSIG/extensiones/com.iver.cit.gvsig/lib" src="extensiones/com.iver.cit.gvsig/lib/db_epsg.jar" override="true"/>
+			<file targetdir="$INSTALL_PATH/bin/gvSIG/extensiones/com.iver.cit.gvsig/lib" src="extensiones/com.iver.cit.gvsig/lib/db_esri.jar" override="true"/>
+			<file targetdir="$INSTALL_PATH/bin/gvSIG/extensiones/com.iver.cit.gvsig/lib" src="extensiones/com.iver.cit.gvsig/lib/db_iau2000.jar" override="true"/>
+			<file targetdir="$INSTALL_PATH/bin/gvSIG/extensiones/com.iver.cit.gvsig/lib" src="extensiones/com.iver.cit.gvsig/lib/db_usr.jar" override="true"/>
+		</pack>
+
+
+	</packs>
+
+</installation>
Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/distribucion.sh
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/install/distribucion.sh	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/install/distribucion.sh	(revision 25287)
@@ -0,0 +1,322 @@
+#!/bin/bash
+
+# Si se produce un error, salimos inmediatamente
+set -e
+
+# Obtenemos el locale
+LOC=`echo $LANG | sed 's/_.*//'`
+
+# Comprobar que estamos en el directorio adecuado
+if [ "$LOC" = "es" ] ; then
+  ERROR_BASEDIR="Este script debe invocarse desde el directorio raiz del workspace o desde el directorio \'install\'"
+else
+  ERROR_BASEDIR="This script must be run from the workspace\'s root directory or from the \'install\' directory"
+fi
+[ -d _fwAndami ] && [ -d install ] && cd install
+if [ ! -d instalador-gvSIG-lin ] || [ ! -d instalador-gvSIG-win ] || [ ! -d ../_fwAndami ] ; then
+        echo $ERROR_BASEDIR
+        exit 1 ;
+fi
+
+DIR_BASE=`pwd`
+
+source variables.sh
+# Get a version with format 1_0_alpha
+UNDERSCORE_VERSION=`echo $FULLVERSION | sed 'y/./_/'`
+# Get a version with format 10_alpha
+BRIEFVERSION=`echo $FULLVERSION | sed 's/\.//'`
+# The name of the dir which will be ZIPed, containing the resulting installer
+INSTALLER_DIR="$APPNAME"-$FULLVERSION\_installer
+JARNAME="$APPNAME"-"$FULLVERSION".jar
+# The extension targets on the this version of gvSIG:
+GVSIG_VERSION=1.0
+
+BUILDNUMBER=`sed -n 's/build.number=//p' ../_fwAndami/gvSIG/extensiones/com.iver.cit.gvsig/build.number`
+
+#ZIPNAME="$APPNAME"-"$UNDERSCORE_VERSION"\_"$BUILDNUMBER".zip
+DIR_LIN=instalador-gvSIG-lin
+DIR_WIN=instalador-gvSIG-win
+DIR_MAC=instalador-gvSIG-mac
+WINDOWSZIP="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-windows-i586.7z
+LINUXZIP="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-linux-i586.tgz
+
+LINUXBIN="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-linux-i586.bin
+LINUXBINWITHJRE="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-linux-i586-withjre.bin
+
+WINDOWSEXE="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-windows-i586.exe
+WINDOWSEXEWITHJRE="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-windows-i586-withjre.exe
+
+MAC_10_ZIP="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-mac-10_3.zip
+
+#Directorios
+#OUTPUT_DIR=/mnt/sercartlin/grupo-sig-ca/Testing/Versiones/v"$FULLVERSION"\_"$BUILDNUMBER"
+OUTPUT_DIR="$TARGET_DIR"/v"$FULLVERSION"\_"$BUILDNUMBER"
+PATH_SOURCE_EXT=../_fwAndami/gvSIG/extensiones
+PATH_SOURCE_MANDAT_EXT=../../../../../_fwAndami/gvSIG/extensiones
+
+
+echo "*****************"
+echo "      BASE       "
+echo "*****************"
+# Para Linux
+echo -n "$DIR_BASE"/"$DIR_LIN" "-- "
+cd "$DIR_BASE"/"$DIR_LIN"
+rm bin -rf
+mkdir -p bin/gvSIG/extensiones
+cp installer_files/LEEME installer_files/LLIG-ME installer_files/README bin
+cp resources/gpl.txt bin
+# No enlazamos directamente el directorio lib para no incluir el directorio CVS
+mkdir -p bin/lib
+cd "$DIR_BASE"/"$DIR_LIN"/bin/lib
+for i in ../../../../_fwAndami/lib/*.jar ; do
+  ln -s "$i" .
+done
+for i in ../../../../_fwAndami/lib/*.zip ; do
+  ln -s "$i" .
+done
+cd "$DIR_BASE"/"$DIR_LIN"
+ln -s ../../../_fwAndami/andami.jar bin/
+ln -s ../../../_fwAndami/castor.properties bin/
+#cp resources/andami-config.xml bin
+echo OK.
+
+
+# Para Windows
+echo -n "$DIR_BASE"/"$DIR_WIN" "-- "
+cd "$DIR_BASE"/"$DIR_WIN"
+rm bin -rf
+mkdir -p bin/gvSIG/extensiones
+cp installer_files/LEEME.txt installer_files/LLIG-ME.txt installer_files/README.txt bin
+cp resources/gpl.txt bin
+# No enlazamos directamente el directorio lib para no incluir el directorio CVS
+mkdir -p bin/lib
+cd "$DIR_BASE"/"$DIR_WIN"/bin/lib
+for i in ../../../../_fwAndami/lib/*.jar ; do
+  ln -s "$i" .
+done
+for i in ../../../../_fwAndami/lib/*.zip ; do
+  ln -s "$i" .
+done
+cd "$DIR_BASE"/"$DIR_WIN"
+ln -s ../../../_fwAndami/andami.jar bin
+ln -s ../../../_fwAndami/castor.properties bin/
+#cp resources/andami-config.xml bin
+
+#Copiamos el lanzador y sus tracuciones al tmpResources
+rm -Rf tmpResources
+mkdir tmpResources
+cp -R ../launcher/izpack-launcher-1.3/dist/* ./tmpResources
+mv ./tmpResources/launcher-Win32.exe ./tmpResources/gvSIG.exe
+#Quitamos el ini, manifest y los CVS
+rm ./tmpResources/*.ini ./tmpResources/*.manifest
+find ./tmpResources -name CVS -type d -exec rm -rf {} 2> /dev/null ';' || true
+cp ./resources/gvSIG.ini ./tmpResources/gvSIG.ini
+echo OK.
+
+# Estas extensiones se copian directamente al directorio destino, ya que no vamos a dar
+# opcion a no instalarlas, son obligatorias
+cd "$DIR_BASE"
+i=0
+while [ ! -z ${MANDATORY_EXTENSIONS[$i]} ]
+do
+  echo ln -s "$PATH_SOURCE_MANDAT_EXT"/${MANDATORY_EXTENSIONS[$i]} "$DIR_LIN"/bin/gvSIG/extensiones
+  ln -s "$PATH_SOURCE_MANDAT_EXT"/${MANDATORY_EXTENSIONS[$i]} "$DIR_LIN"/bin/gvSIG/extensiones
+  echo ln -s "$PATH_SOURCE_MANDAT_EXT"/${MANDATORY_EXTENSIONS[$i]} "$DIR_WIN"/bin/gvSIG/extensiones
+  ln -s "$PATH_SOURCE_MANDAT_EXT"/${MANDATORY_EXTENSIONS[$i]} "$DIR_WIN"/bin/gvSIG/extensiones
+  i=`expr $i + 1`
+done
+
+echo "*****************"
+[ $LOC = "es" ] && echo "   EXTENSIONES   "
+[ $LOC != "es" ] && echo "   EXTENSIONS   "
+echo "*****************"
+
+rm -rf $DIR_LIN/extensiones
+mkdir $DIR_LIN/extensiones
+rm -rf $DIR_WIN/extensiones
+mkdir $DIR_WIN/extensiones
+
+i=0
+while [ ! -z ${EXTENSIONS[$i]} ]
+do
+  [ $LOC = "es" ] && echo "Copiando "${EXTENSIONS[$i]}
+  [ $LOC != "es" ] && echo "Copying "${EXTENSIONS[$i]}
+  echo cp "$PATH_SOURCE_EXT"/${EXTENSIONS[$i]} "$DIR_LIN"/extensiones -rf
+  cp "$PATH_SOURCE_EXT"/${EXTENSIONS[$i]} "$DIR_LIN"/extensiones -rf
+  echo cp "$PATH_SOURCE_EXT"/${EXTENSIONS[$i]} "$DIR_WIN"/extensiones -rf
+  cp "$PATH_SOURCE_EXT"/${EXTENSIONS[$i]} "$DIR_WIN"/extensiones -rf
+  i=`expr $i + 1`
+done
+
+## Eliminamos el driver de oracle
+find -L . -name ojdbc14.jar -type f -exec rm -rf {} 2> /dev/null ';' || true
+find -L . -name gt2-oracle-spatial-2.2.1.jar -type f -exec rm -rf {} 2> /dev/null ';' || true
+find -L . -name sdoapi.jar -type f -exec rm -rf {} 2> /dev/null ';' || true
+
+
+echo "*****************"
+echo "    INST-WIN     "
+echo "*****************"
+# Generar el instalador (jar) para windows
+cd "$DIR_BASE"/"$DIR_WIN"
+rm "$JARNAME" -f
+ant -DJARNAME="$JARNAME" -DGVSIG_VERSION="$GVSIG_VERSION" -DAPPNAME="$APPNAME"
+
+echo "*****************"
+echo "    INST-LIN     "
+echo "*****************"
+# Generar el instalador (jar) para Linux
+cd "$DIR_BASE"/"$DIR_LIN"
+rm "$JARNAME" -f
+ant -DJARNAME="$JARNAME" -DGVSIG_VERSION="$GVSIG_VERSION" -DAPPNAME="$APPNAME"
+
+
+echo "******************"
+[ $LOC = "es" ] && echo " GENERAR DISTRIB "
+[ $LOC != "es" ] && echo " GENERATE DISTRIB "
+echo "******************"
+# Generar el tar.gz para Linux y el EXE para Windows
+
+mkdir -p "$OUTPUT_DIR"
+echo "- Linux"
+## Para Linux
+cd "$DIR_BASE"/"$DIR_LIN"
+rm -Rf "$INSTALLER_DIR"
+cp -a installer_files "$INSTALLER_DIR"
+rm -R "$INSTALLER_DIR"/CVS 2> /dev/null && true
+# Set the correct version number in the scripts and files
+if [ -f  "$INSTALLER_DIR"/install.sh ] ; then
+  sed "s/JARNAME/$JARNAME/" "$INSTALLER_DIR"/install.sh > "$INSTALLER_DIR"/install.sh.bak
+  mv "$INSTALLER_DIR"/install.sh.bak "$INSTALLER_DIR"/install.sh ;
+  chmod +x "$INSTALLER_DIR"/install.sh
+fi
+#mv "$JARNAME" "$INSTALLER_DIR"
+cp "$JARNAME" "$INSTALLER_DIR"
+tar -cvzf "$LINUXZIP" "$INSTALLER_DIR"
+rm -Rf "$INSTALLER_DIR"
+mv "$LINUXZIP" "$OUTPUT_DIR"
+
+## Nueva instalacion para linux
+cd "$DIR_BASE"/"$DIR_LIN"
+rm -Rf "$INSTALLER_DIR"
+mkdir -p "$INSTALLER_DIR"/tmp_gvSIGInstall
+cp "$JARNAME" "$INSTALLER_DIR"/tmp_gvSIGInstall
+cd "$INSTALLER_DIR"
+cp -R "$DIR_BASE"/launcher/izpack-launcher-1.3_linux/dist/* ./tmp_gvSIGInstall
+find . -name CVS -type d -exec rm -rf {} 2> /dev/null ';' || true
+
+sed "s/%JARNAME%/$JARNAME/" ./tmp_gvSIGInstall/launcher.ini > ./tmp_gvSIGInstall/launcher.ini.bak
+mv ./tmp_gvSIGInstall/launcher.ini.bak ./tmp_gvSIGInstall/launcher.ini;
+
+tar -cvzf ./tmp.tgz ./tmp_gvSIGInstall
+cp "$DIR_BASE"/"$DIR_LIN"/jre/*-1_4_2_*.gz ./tmp_gvSIGInstall
+tar -cvzf ./tmp_wjre.tgz ./tmp_gvSIGInstall
+echo '#!/bin/sh' > xx.tmp
+lcount=`cat xx.tmp "$DIR_BASE"/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh | wc -l`
+lcount=$(($lcount+2)) # sumamos dos: uno por la linea siguiente y otro para el inicio
+echo "lcount=$lcount" >> xx.tmp
+cat xx.tmp "$DIR_BASE"/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh ./tmp.tgz  > "$LINUXBIN"
+cat xx.tmp "$DIR_BASE"/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh ./tmp_wjre.tgz  > "$LINUXBINWITHJRE"
+rm xx.tmp
+chmod a+x "$LINUXBIN" "$LINUXBINWITHJRE"
+mv "$LINUXBINWITHJRE" "$LINUXBIN" "$OUTPUT_DIR"
+cd "$DIR_BASE"/"$DIR_LIN"
+rm -Rf "$INSTALLER_DIR"
+## Fin Nueva instalacion para linux
+rm "$JARNAME"
+
+
+
+
+## Para Windows
+echo "- Windows"
+#set -x
+cd "$DIR_BASE"/"$DIR_WIN"
+rm -Rf "$INSTALLER_DIR"
+cp -a installer_files "$INSTALLER_DIR"
+
+cp -aR ../launcher/izpack-launcher-1.3/dist/* "$INSTALLER_DIR"
+rm -f "$INSTALLER_DIR"/install.bat
+
+find "$INSTALLER_DIR" -name CVS -type d -exec rm -rf {} 2> /dev/null ';' || true
+
+## hacemos las sustituciones de la variable
+sed "s/%JARNAME%/$JARNAME/" "$INSTALLER_DIR"/launcher-Win32.ini > "$INSTALLER_DIR"/launcher-Win32.ini.bak
+mv "$INSTALLER_DIR"/launcher-Win32.ini.bak "$INSTALLER_DIR"/launcher-Win32.ini;
+
+
+mv "$JARNAME" "$INSTALLER_DIR"
+cd "$INSTALLER_DIR"
+
+if [ -f  "$DIR_BASE"/"$DIR_WIN"/"$WINDOWSZIP" ] ; then
+	rm -f "$DIR_BASE"/"$DIR_WIN"/"$WINDOWSZIP"
+fi
+"$DIR_BASE"/launcher/7z/7za a -r "$DIR_BASE"/"$DIR_WIN"/"$WINDOWSZIP" *
+cd -
+sed "s/%TITLE%/$APPNAME-$BRIEFVERSION\_$BUILDNUMBER/" ../launcher/7z/dist_config.txt > dist_config.txt
+cat ../launcher/7z/7zS.sfx  dist_config.txt "$WINDOWSZIP" > "$WINDOWSEXE"
+
+### paquete con los instalables de JRE, Jai y Jai i/o
+"$DIR_BASE"/launcher/7z/7za a "$DIR_BASE"/"$DIR_WIN"/"$WINDOWSZIP" "$DIR_BASE"/"$DIR_WIN"/jre_installers/*.exe
+cat ../launcher/7z/7zS.sfx  dist_config.txt "$WINDOWSZIP" > "$WINDOWSEXEWITHJRE"
+
+###
+
+
+rm dist_config.txt
+rm "$WINDOWSZIP"
+
+rm -Rf "$INSTALLER_DIR"
+
+mv "$WINDOWSEXE" "$OUTPUT_DIR"
+mv "$WINDOWSEXEWITHJRE" "$OUTPUT_DIR"
+
+# Limpiamos tmpResources
+cd "$DIR_BASE"/"$DIR_WIN"
+rm -r ./tmpResources
+cd -
+
+
+## Para Mac
+echo "- Mac"
+if type ant 2>/dev/null >/dev/null; then
+	cd "$DIR_BASE"/"$DIR_MAC"
+	if ant -Dbuild.number="$BUILDNUMBER" -Djvmversion="1.4+" -f build.xml; then
+		zip -r "$MAC_10_ZIP" gvSIG*.app
+		rm -r gvSIG*.app
+		mv "$MAC_10_ZIP" "$OUTPUT_DIR"
+	else
+		echo "No se ha generado el paquete para Mac 10 . Compruebe que su ant tiene jarbundler instalado
+
+			  Nota: debemos tener incluido en el ANT_HOME/lib el
+	    	  jar jarbundler-1.9.jar que se puede encontrar en http://jarbundler.sourceforge.net/
+	    "
+
+	fi
+
+else
+	    echo "No se ha encontrado el ant en el path de ejecucion:
+	    Es necesario para poder generar la distribucion para el Mac.
+
+	    Nota: debemos tener tambien incluido en el ANT_HOME/lib el
+	    jar jarbundler-1.9.jar que se puede encontrar en http://jarbundler.sourceforge.net/
+	    "
+fi
+
+
+## Limpiamos
+
+rm -rf $DIR_LIN/extensiones
+rm -rf $DIR_LIN/bin
+rm -rf $DIR_WIN/extensiones
+rm -rf $DIR_WIN/bin
+
+echo "*****************"
+echo "    FIN     "
+echo "*****************"
+
+echo ""
+echo "Generados los ficheros:"
+echo "$OUTPUT_DIR"
+ls -lh "$OUTPUT_DIR"
+cd "$DIR_BASE"
Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/HOWTO-Generate Distribution
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/install/HOWTO-Generate Distribution	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/install/HOWTO-Generate Distribution	(revision 25287)
@@ -0,0 +1,25 @@
+========================
+	DISTRIBUCION SVN
+========================
+
+* Para la generación de distribucines se ha usado el RapidSVN.
+* Abrir el RapidSVN, una vez conectado con el repositorio, ir a Tags y crear
+la carpeta tmp_build(si ya esta habrá que eliminarla antes de crearla). En comentario
+poner pre_v1_x_Build_x (sustituir x según corresponda).
+* Copiamos todos las carpetas que estan en branches/vX dentro de la carpeta tmp_build
+que acabamos de crear. (la ruta a introducir sería https://gvsig.org/svn/gvSIG/tags/tmp_build)
+* Hacer un switch del workspace: Team->Switch, y hay que cambiar en la ruta la parte "branches/vX"
+por tags/tmp_build. Esto no se realiza sobre todos los proyectos a la vez, segun que plugin SVN 
+se tenga en el Eclipse, se tendrá que hacer proyecto por proyecto, o se podrá hacer por conjuntos 
+de proyectos que comparten la misma carpeta.
+* Generar la distribución. Primero se lanzará el clean_all y build_all (appgvSIG/build.xml)
+y se comprobara que el programa funciona adecuadamente. Después se lanzara el make_binaries_distribution.
+* Lanzamos el distribution_1.5.sh para generar los binarios, los probamos y si todo funciona correctamente
+hacemos commit de los build.number con formato v1_X_Build_X.
+* De nuevo, como se hizo anteriormente, se hara un switch hacia "branches/vX".
+* Se debe renombrar el "tags/tmp_build" por "tags/v1_X_Build_X"
+* Se tiene que hacer une Merge (Team->Merge) seleccionando Advanced:
+	Source 1: Trunk
+	Source 2: "tags/v1_X_Build_X"
+Esto tambien dependiendo del Plugin SVN de Eclipse se hara por proyectos o por conjuntos.
+*Por último hacer commit sobre los cambios oportunos en el Trunk. 
\ No newline at end of file
Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/build.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/install/build.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/install/build.properties	(revision 25287)
@@ -0,0 +1,16 @@
+#SUSTITUIR POR EL DIRECTORIO DE EXTENSION, ej: com.iver.aytovalencia.visor1
+MAIN_INSTALL_PLUGIN=org.gvsig.crs
+
+
+#VERIFICAR LOS NUMEROS DE VERSION
+EXTENSIONS=com.iver.cit.gvsig,${MAIN_INSTALL_PLUGIN}
+version=1.1
+bversion=1_1
+gvSIG.version=1_1_2
+
+#SUSTITUIR POR EL NOMBRE DE PLUGIN, ej: visorRuido
+APPNAME=extensionJCRS
+
+
+#SUSTITUIR POR EL DIRECTORIO DE SALIDA, ej: /tmp/myExtension
+OUTPUT_DIR= /home/jlgomez/extJCRS
Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/distribucion_1.5.sh
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/install/distribucion_1.5.sh	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/install/distribucion_1.5.sh	(revision 25287)
@@ -0,0 +1,327 @@
+#!/bin/bash
+
+# Si se produce un error, salimos inmediatamente
+set -e
+
+# Obtenemos el locale
+LOC=`echo $LANG | sed 's/_.*//'`
+
+# Comprobar que estamos en el directorio adecuado
+if [ "$LOC" = "es" ] ; then
+  ERROR_BASEDIR="Este script debe invocarse desde el directorio raiz del workspace o desde el directorio \'install\'"
+else
+  ERROR_BASEDIR="This script must be run from the workspace\'s root directory or from the \'install\' directory"
+fi
+[ -d _fwAndami ] && [ -d install ] && cd install
+if [ ! -d instalador-gvSIG-lin ] || [ ! -d instalador-gvSIG-win ] || [ ! -d ../_fwAndami ] ; then
+        echo $ERROR_BASEDIR
+        exit 1 ;
+fi
+
+DIR_BASE=`pwd`
+
+source variables.sh
+# Get a version with format 1_x_x
+UNDERSCORE_VERSION=`echo $FULLVERSION | sed 's/\./_/g'`
+# The name of the dir which will be ZIPed, containing the resulting installer
+INSTALLER_DIR="$APPNAME"-$FULLVERSION\_installer
+JARNAME="$APPNAME"-"$FULLVERSION".jar
+# The extension targets on the this version of gvSIG:
+GVSIG_VERSION=1.0
+
+BUILDNUMBER=`sed -n 's/build.number=//p' ../_fwAndami/gvSIG/extensiones/com.iver.cit.gvsig/build.number`
+
+#ZIPNAME="$APPNAME"-"$UNDERSCORE_VERSION"\_"$BUILDNUMBER".zip
+DIR_LIN=instalador-gvSIG-lin
+DIR_WIN=instalador-gvSIG-win
+DIR_MAC=instalador-gvSIG-mac
+BASE_FILE_NAME="$APPNAME"-"$UNDERSCORE_VERSION"-"$BUILDNUMBER"
+WINDOWSZIP="$BASE_FILE_NAME"-windows-i586_j1_5.7z
+LINUXZIP="$BASE_FILE_NAME"-linux-i586_J1_5.tgz
+
+LINUXBIN="$BASE_FILE_NAME"-linux-i586_J1_5.bin
+LINUXBINWITHJRE="$BASE_FILE_NAME"-linux-i586-withjre_J1_5.bin
+
+WINDOWSEXE="$BASE_FILE_NAME"-windows-i586_J1_5.exe
+WINDOWSEXEWITHJRE="$BASE_FILE_NAME"-windows-i586-withjre_J1_5.exe
+
+MAC_10_ZIP="$BASE_FILE_NAME"-mac-10_4.zip
+
+#Directorios
+#OUTPUT_DIR=/mnt/sercartlin/grupo-sig-ca/Testing/Versiones/v"$FULLVERSION"\_"$BUILDNUMBER"
+OUTPUT_DIR="$TARGET_DIR"/v"$FULLVERSION"\_"$BUILDNUMBER"
+PATH_SOURCE_EXT=../_fwAndami/gvSIG/extensiones
+PATH_SOURCE_MANDAT_EXT=../../../../../_fwAndami/gvSIG/extensiones
+
+
+echo "*****************"
+echo "      BASE       "
+echo "*****************"
+# Para Linux
+echo -n "$DIR_BASE"/"$DIR_LIN" "-- "
+cd "$DIR_BASE"/"$DIR_LIN"
+rm bin -rf
+mkdir -p bin/gvSIG/extensiones
+cp installer_files/LEEME installer_files/LLIG-ME installer_files/README bin
+cp resources/gpl.txt bin
+# No enlazamos directamente el directorio lib para no incluir el directorio CVS
+mkdir -p bin/lib
+cd "$DIR_BASE"/"$DIR_LIN"/bin/lib
+for i in ../../../../_fwAndami/lib/*.jar ; do
+  ln -s "$i" .
+done
+for i in ../../../../_fwAndami/lib/*.zip ; do
+  ln -s "$i" .
+done
+cd "$DIR_BASE"/"$DIR_LIN"
+ln -s ../../../_fwAndami/andami.jar bin/
+ln -s ../../../_fwAndami/castor.properties bin/
+#cp resources/andami-config.xml bin
+echo OK.
+
+
+# Para Windows
+echo -n "$DIR_BASE"/"$DIR_WIN" "-- "
+cd "$DIR_BASE"/"$DIR_WIN"
+rm bin -rf
+mkdir -p bin/gvSIG/extensiones
+cp installer_files/LEEME.txt installer_files/LLIG-ME.txt installer_files/README.txt bin
+cp resources/gpl.txt bin
+# No enlazamos directamente el directorio lib para no incluir el directorio CVS
+mkdir -p bin/lib
+cd "$DIR_BASE"/"$DIR_WIN"/bin/lib
+for i in ../../../../_fwAndami/lib/*.jar ; do
+  ln -s "$i" .
+done
+for i in ../../../../_fwAndami/lib/*.zip ; do
+  ln -s "$i" .
+done
+cd "$DIR_BASE"/"$DIR_WIN"
+ln -s ../../../_fwAndami/andami.jar bin
+ln -s ../../../_fwAndami/castor.properties bin/
+#cp resources/andami-config.xml bin
+
+#Copiamos el lanzador y sus tracuciones al tmpResources
+rm -Rf tmpResources
+mkdir tmpResources
+cp -R ../launcher/izpack-launcher-1.3/dist/* ./tmpResources
+mv ./tmpResources/launcher-Win32.exe ./tmpResources/gvSIG.exe
+cp -R ./jre_installers_1.5/jai_imageio-1_0_01-lib-windows ./tmpResources
+#Quitamos el ini, manifest y los CVS
+rm ./tmpResources/*.ini ./tmpResources/*.manifest
+find ./tmpResources -name CVS -type d -exec rm -rf {} 2> /dev/null ';' || true
+find ./tmpResources -name .svn -type d -exec rm -rf {} 2> /dev/null ';' || true
+cp ./resources/gvSIG.ini.J15 ./tmpResources/gvSIG.ini
+echo OK.
+
+# Estas extensiones se copian directamente al directorio destino, ya que no vamos a dar
+# opcion a no instalarlas, son obligatorias
+cd "$DIR_BASE"
+i=0
+while [ ! -z ${MANDATORY_EXTENSIONS[$i]} ]
+do
+  echo ln -s "$PATH_SOURCE_MANDAT_EXT"/${MANDATORY_EXTENSIONS[$i]} "$DIR_LIN"/bin/gvSIG/extensiones
+  ln -s "$PATH_SOURCE_MANDAT_EXT"/${MANDATORY_EXTENSIONS[$i]} "$DIR_LIN"/bin/gvSIG/extensiones
+  echo ln -s "$PATH_SOURCE_MANDAT_EXT"/${MANDATORY_EXTENSIONS[$i]} "$DIR_WIN"/bin/gvSIG/extensiones
+  ln -s "$PATH_SOURCE_MANDAT_EXT"/${MANDATORY_EXTENSIONS[$i]} "$DIR_WIN"/bin/gvSIG/extensiones
+  i=`expr $i + 1`
+done
+
+echo "*****************"
+[ $LOC = "es" ] && echo "   EXTENSIONES   "
+[ $LOC != "es" ] && echo "   EXTENSIONS   "
+echo "*****************"
+
+rm -rf $DIR_LIN/extensiones
+mkdir $DIR_LIN/extensiones
+rm -rf $DIR_WIN/extensiones
+mkdir $DIR_WIN/extensiones
+
+i=0
+while [ ! -z ${EXTENSIONS[$i]} ]
+do
+  [ $LOC = "es" ] && echo "Copiando "${EXTENSIONS[$i]}
+  [ $LOC != "es" ] && echo "Copying "${EXTENSIONS[$i]}
+  echo cp "$PATH_SOURCE_EXT"/${EXTENSIONS[$i]} "$DIR_LIN"/extensiones -rf
+  cp "$PATH_SOURCE_EXT"/${EXTENSIONS[$i]} "$DIR_LIN"/extensiones -rf
+  echo cp "$PATH_SOURCE_EXT"/${EXTENSIONS[$i]} "$DIR_WIN"/extensiones -rf
+  cp "$PATH_SOURCE_EXT"/${EXTENSIONS[$i]} "$DIR_WIN"/extensiones -rf
+  i=`expr $i + 1`
+done
+
+## Eliminamos el driver de oracle
+find -L . -name ojdbc14.jar -type f -exec rm -rf {} 2> /dev/null ';' || true
+find -L . -name gt2-oracle-spatial-2.2.1.jar -type f -exec rm -rf {} 2> /dev/null ';' || true
+find -L . -name sdoapi.jar -type f -exec rm -rf {} 2> /dev/null ';' || true
+
+
+echo "*****************"
+echo "    INST-WIN     "
+echo "*****************"
+# Generar el instalador (jar) para windows
+cd "$DIR_BASE"/"$DIR_WIN"
+rm "$JARNAME" -f
+ant -DJARNAME="$JARNAME" -DGVSIG_VERSION="$GVSIG_VERSION" -DAPPNAME="$APPNAME" -DINSTALL_FILE="install_15.xml"
+
+echo "*****************"
+echo "    INST-LIN     "
+echo "*****************"
+# Generar el instalador (jar) para Linux
+cd "$DIR_BASE"/"$DIR_LIN"
+rm "$JARNAME" -f
+ant -DJARNAME="$JARNAME" -DGVSIG_VERSION="$GVSIG_VERSION" -DAPPNAME="$APPNAME"
+
+
+echo "******************"
+[ $LOC = "es" ] && echo " GENERAR DISTRIB "
+[ $LOC != "es" ] && echo " GENERATE DISTRIB "
+echo "******************"
+# Generar el tar.gz para Linux y el EXE para Windows
+
+mkdir -p "$OUTPUT_DIR"
+echo "- Linux"
+## Para Linux
+cd "$DIR_BASE"/"$DIR_LIN"
+rm -Rf "$INSTALLER_DIR"
+cp -a installer_files "$INSTALLER_DIR"
+rm -R "$INSTALLER_DIR"/CVS 2> /dev/null && true
+# Set the correct version number in the scripts and files
+if [ -f  "$INSTALLER_DIR"/install.sh ] ; then
+  sed "s/JARNAME/$JARNAME/" "$INSTALLER_DIR"/install.sh > "$INSTALLER_DIR"/install.sh.bak
+  mv "$INSTALLER_DIR"/install.sh.bak "$INSTALLER_DIR"/install.sh ;
+  chmod +x "$INSTALLER_DIR"/install.sh
+fi
+#mv "$JARNAME" "$INSTALLER_DIR"
+cp "$JARNAME" "$INSTALLER_DIR"
+tar -cvzf "$LINUXZIP" "$INSTALLER_DIR"
+rm -Rf "$INSTALLER_DIR"
+mv "$LINUXZIP" "$OUTPUT_DIR"
+
+## Nueva instalacion para linux
+cd "$DIR_BASE"/"$DIR_LIN"
+rm -Rf "$INSTALLER_DIR"
+mkdir -p "$INSTALLER_DIR"/tmp_gvSIGInstall
+cp "$JARNAME" "$INSTALLER_DIR"/tmp_gvSIGInstall
+cd "$INSTALLER_DIR"
+cp -R "$DIR_BASE"/launcher/izpack-launcher-1.3_linux/dist/* ./tmp_gvSIGInstall
+find . -name CVS -type d -exec rm -rf {} 2> /dev/null ';' || true
+find . -name .svn -type d -exec rm -rf {} 2> /dev/null ';' || true
+rm ./tmp_gvSIGInstall/launcher.ini
+cp "$DIR_BASE"/"$DIR_LIN"/resources/launcher.ini.j15 ./tmp_gvSIGInstall/launcher.ini
+sed "s/%JARNAME%/$JARNAME/" ./tmp_gvSIGInstall/launcher.ini > ./tmp_gvSIGInstall/launcher.ini.bak
+mv ./tmp_gvSIGInstall/launcher.ini.bak ./tmp_gvSIGInstall/launcher.ini;
+
+tar -cvzf ./tmp.tgz ./tmp_gvSIGInstall
+cp "$DIR_BASE"/"$DIR_LIN"/jre/*-1_5_0_*.gz ./tmp_gvSIGInstall
+tar -cvzf ./tmp_wjre.tgz ./tmp_gvSIGInstall
+echo '#!/bin/sh' > xx.tmp
+lcount=`cat xx.tmp "$DIR_BASE"/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh | wc -l`
+lcount=$(($lcount+2)) # sumamos dos: uno por la linea siguiente y otro para el inicio
+echo "lcount=$lcount" >> xx.tmp
+cat xx.tmp "$DIR_BASE"/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh ./tmp.tgz  > "$LINUXBIN"
+cat xx.tmp "$DIR_BASE"/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh ./tmp_wjre.tgz  > "$LINUXBINWITHJRE"
+rm xx.tmp
+chmod a+x "$LINUXBIN" "$LINUXBINWITHJRE"
+mv "$LINUXBINWITHJRE" "$LINUXBIN" "$OUTPUT_DIR"
+cd "$DIR_BASE"/"$DIR_LIN"
+rm -Rf "$INSTALLER_DIR"
+## Fin Nueva instalacion para linux
+rm "$JARNAME"
+
+
+
+
+## Para Windows
+echo "- Windows"
+#set -x
+cd "$DIR_BASE"/"$DIR_WIN"
+rm -Rf "$INSTALLER_DIR"
+cp -a installer_files "$INSTALLER_DIR"
+
+cp -aR ../launcher/izpack-launcher-1.3/dist/* "$INSTALLER_DIR"
+rm -f "$INSTALLER_DIR"/install.bat
+cp ./resources/launcher-Win32.ini.j15 "$INSTALLER_DIR"/launcher-Win32.ini
+
+find "$INSTALLER_DIR" -name CVS -type d -exec rm -rf {} 2> /dev/null ';' || true
+find "$INSTALLER_DIR" -name .svn -type d -exec rm -rf {} 2> /dev/null ';' || true
+
+## hacemos las sustituciones de la variable
+sed "s/%JARNAME%/$JARNAME/" "$INSTALLER_DIR"/launcher-Win32.ini > "$INSTALLER_DIR"/launcher-Win32.ini.bak
+mv "$INSTALLER_DIR"/launcher-Win32.ini.bak "$INSTALLER_DIR"/launcher-Win32.ini;
+
+
+mv "$JARNAME" "$INSTALLER_DIR"
+cd "$INSTALLER_DIR"
+
+if [ -f  "$DIR_BASE"/"$DIR_WIN"/"$WINDOWSZIP" ] ; then
+	rm -f "$DIR_BASE"/"$DIR_WIN"/"$WINDOWSZIP"
+fi
+"$DIR_BASE"/launcher/7z/7za a -r "$DIR_BASE"/"$DIR_WIN"/"$WINDOWSZIP" *
+cd -
+sed "s/%TITLE%/$APPNAME-$UNDERSCORE_VERSION\_$BUILDNUMBER/" ../launcher/7z/dist_config.txt > dist_config.txt
+cat ../launcher/7z/7zS.sfx  dist_config.txt "$WINDOWSZIP" > "$WINDOWSEXE"
+
+### paquete con los instalables de JRE, Jai y Jai i/o
+"$DIR_BASE"/launcher/7z/7za a "$DIR_BASE"/"$DIR_WIN"/"$WINDOWSZIP" "$DIR_BASE"/"$DIR_WIN"/jre_installers_1.5/*.exe
+cat ../launcher/7z/7zS.sfx  dist_config.txt "$WINDOWSZIP" > "$WINDOWSEXEWITHJRE"
+
+###
+
+
+rm dist_config.txt
+rm "$WINDOWSZIP"
+
+rm -Rf "$INSTALLER_DIR"
+
+mv "$WINDOWSEXE" "$OUTPUT_DIR"
+mv "$WINDOWSEXEWITHJRE" "$OUTPUT_DIR"
+
+# Limpiamos tmpResources
+cd "$DIR_BASE"/"$DIR_WIN"
+rm -r ./tmpResources
+cd -
+
+
+## Para Mac
+echo "- Mac"
+if type ant 2>/dev/null >/dev/null; then
+	cd "$DIR_BASE"/"$DIR_MAC"
+	if ant -Dbuild.number="$BUILDNUMBER" -f build.xml; then
+		zip -rq "$MAC_10_ZIP" gvSIG*.app
+		rm -r gvSIG*.app
+		mv "$MAC_10_ZIP" "$OUTPUT_DIR"
+	else
+		echo "No se ha generado el paquete para Mac 10 . Compruebe que su ant tiene jarbundler instalado
+
+			  Nota: debemos tener incluido en el ANT_HOME/lib el
+	    	  jar jarbundler-1.9.jar que se puede encontrar en http://jarbundler.sourceforge.net/
+	    "
+
+	fi
+
+else
+	    echo "No se ha encontrado el ant en el path de ejecucion:
+	    Es necesario para poder generar la distribucion para el Mac.
+
+	    Nota: debemos tener tambien incluido en el ANT_HOME/lib el
+	    jar jarbundler-1.9.jar que se puede encontrar en http://jarbundler.sourceforge.net/
+	    "
+fi
+
+
+## Limpiamos
+
+rm -rf $DIR_LIN/extensiones
+rm -rf $DIR_LIN/bin
+rm -rf $DIR_WIN/extensiones
+rm -rf $DIR_WIN/bin
+
+echo "*****************"
+echo "    FIN     "
+echo "*****************"
+
+echo ""
+echo "Generados los ficheros:"
+echo "$OUTPUT_DIR"
+ls -lh "$OUTPUT_DIR"
+cd "$DIR_BASE"

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/distribucion_1.5.sh
___________________________________________________________________
Added: svn:executable
   + *

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/configfile
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/configfile	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/configfile	(revision 25287)
@@ -0,0 +1,32 @@
+#fichero ASCII, saltos de linea UNIX (ASCII 10)
+#comentarios en linea empezada con #
+#se aceptan lineas en blanco
+#Formato de parametros: 
+#nombre de parametro en una linea, contenido en siguiente/s linea/s
+#si donde deberia haber "contenido del parametro" hay una linea en blanco, se entiende que se quiere parametro vacio
+#Si un parametro no se define, se supone vacio.
+
+#Parametro oldAndamiMD5 puede tener varios valores (se respetan todos, puede no haber ninguno)
+#MD5 de andami.jar v1.0
+#oldAndamiMD5
+#c5427c92842398101136818b66e7dbc8
+
+#MD5 de andami.jar v1.0.1
+#oldAndamiMD5
+#b5bba7f20d0c2f3faed511c0b66039ef
+
+#Parametro oldVersion contiene un STRING con el que decir al usuario las versiones actualizables (sera igual en todos los idiomas!)
+#puede estar vacio
+#oldVersion
+#1.0 / 1.0.1
+
+#Parametro newName contiene nuevo nombre para bundle actualizado (sin extension)
+#si vacio, no se cambiara el nombre (util para instalar extensiones, que no tienen por que modificar el nombre del gvSIG)
+#newName
+#gvSIG 1.0.2 build 891
+
+#Parametro newSuffix contiene nuevo sufijo para bundle "actualizado" (autoinstaller y/o normal)
+#si vacio, no se cambiara el nombre
+#si se especifica newName y newSuffix, se aplica primero newName y luego newSuffix
+#newSuffix
+#SEXTANTE
Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/images/Logo_gvsig_gva.jpg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/images/Logo_gvsig_gva.jpg
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_cat
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_cat	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_cat	(revision 25287)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Ruta a gvSIG:"/>
+</langpack>
Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_fra
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_fra	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_fra	(revision 25287)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Path to gvSIG:"/>
+</langpack>
Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_eng
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_eng	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_eng	(revision 25287)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Path to gvSIG:"/>
+</langpack>
Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputSpec.xml
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputSpec.xml	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputSpec.xml	(revision 25287)
@@ -0,0 +1,21 @@
+<userInput>
+	<panel order="0">
+		<field 	type="search" 
+				variable="INSTALL_PATH"
+				size="45">
+  			<description align="left" />
+  			<spec 	txt="Path to gvSIG:" 
+		  			id="text.label"
+  					checkfilename="bin/andami.jar"
+        			type="directory" 
+        			result="directory">
+  			<choice value="/usr/local/gvSIG_1.0" os="unix" />
+  			<choice value="/opt/gvSIG_1.0" os="unix" />
+  			<choice value="$USER_HOME/gvSIG_1.0" os="unix" />
+  			<choice value="C:\Archivos de Programa\gvSIG_1.0" os="windows" />
+  			<choice value="C:\Program Files\gvSIG_1.0" os="windows" />
+  			</spec>
+		</field>
+	</panel>
+</userInput>
+
Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/LEEME.html
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/LEEME.html	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/LEEME.html	(revision 25287)
@@ -0,0 +1,62 @@
+<html>
+<head>
+<style type="text/css">
+html, body, h1, h2, h3, h4, div, p, ul, li, input {
+   font-family: Arial, Helvetica, sans-serif;
+}
+
+h1 {
+   font-size: large;
+}
+
+h2 {
+   font-size: large;
+}
+
+h3 {
+   font-size: medium;
+}
+</style>
+</head>
+<body>
+<h1>Gesti&oacute;n de Sistemas de Referencia de Coordenadas (CRSs)</h1>
+
+<h2>Autores:</h2>
+<ul>
+<li>Generalitat Valenciana
+ (Conselleria d'Infraestructures i Transport).</li>
+<li>Instituto de Desarrollo Regional. Secci&oacute;n de Teledetecci&oacute;n y SIG.</li>
+</ul>
+
+<p>Software con licencia GNU/GPL
+(http://www.fsf.org/licensing/licenses/gpl.html)</p>
+
+<p>Información y soporte:
+	http://www.idr-ab.uclm.es/<p>
+	
+<h2>&iexcl;Atenci&oacute;n!: Esta es una versi&oacute;n en pruebas. Puede contener errores importantes.</h2>
+
+<h2>Requisitos de la aplicaci&oacute;n:</h2>
+<h3>Sistema</h3>
+<ul>
+<li>M&iacute;nimos: Pentium III / 256 MB RAM.</li>
+<li>Recomendables: Pentium IV / 512 MB RAM.</li>
+<li>Sistemas operativos: plataformas Windows y Linux.</li>
+</ul>
+
+<h3>Software instalado</h3> (disponible en http://www.gvsig.gva.es o en http://java.sun.com)
+<ul>
+<li>gvSIG-1.1.2</li>
+</ul>
+
+<h2>M&aacute;s informaci&oacute;n y soporte sobre gvSIG en:</h2>
+<h3> Web oficial del proyecto:</h3>
+	http://www.gvsig.gva.es
+
+<h3>Listas de distribuci&oacute;n:</h3>
+<span style="monospace"> http://runas.cap.gva.es/mailman/listinfo/gvsig_usuarios</span> (soporte para usuarios).
+<span style="monospace"> http://runas.cap.gva.es/mailman/listinfo/gvsig_desarrolladores</span> (soporte para desarrolladores).
+<span style="monospace"> http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional</span> (soporte para desarrolladores o usuarios de habla no hispana).
+
+</body>
+</html>
Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_deu
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_deu	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_deu	(revision 25287)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Path to gvSIG:"/>
+</langpack>
Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_ita
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_ita	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_ita	(revision 25287)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Path to gvSIG:"/>
+</langpack>
Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_por
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_por	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_por	(revision 25287)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Path to gvSIG:"/>
+</langpack>
Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/gpl.txt
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/gpl.txt	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/gpl.txt	(revision 25287)
@@ -0,0 +1,125 @@
+	GNU GENERAL PUBLIC LICENSE
+	Version 2, June 1991
+
+	 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
+
+		Preamble
+
+	The licenses for most software are designed to take away your freedom to share and change it.  By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.  This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it.  (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.)  You can apply it to your programs, too.
+
+	When we speak of free software, we are referring to freedom, not price.  Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
+
+	To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
+
+	For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have.  You must make sure that they, too, receive or can get the source code.  And you must show them these terms so they know their
+rights.
+
+	We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
+
+	Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software.  If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
+
+	Finally, any free program is threatened constantly by software	patents.  We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary.  To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
+
+	The precise terms and conditions for copying, distribution and modification follow.
+
+				GNU GENERAL PUBLIC LICENSE
+	TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+	0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License.  The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language.  (Hereinafter, translation is included without limitation in the term "modification".)  Each licensee is addressed as "you".
+
+	Activities other than copying, distribution and modification are not covered by this License; they are outside its scope.  The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
+
+1.	You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
+
+2.	You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
+
+a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
+
+b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
+
+c)	If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License.  (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works.  But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
+
+3.	You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
+
+a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
+
+b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
+
+c)	Accompany it with the information you received as to the offer to distribute corresponding source code.  (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for making modifications to it.  For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable.  However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
+
+If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
+
+4.	You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License.  Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
+
+5.	You are not required to accept this License, since you have not signed it.  However, nothing else grants you permission to modify or distribute the Program or its derivative works.  These actions are prohibited by law if you do not accept this License.  Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
+
+6.	Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions.  You may not impose any further restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to this License.
+
+7.	If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License.  If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all.  For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices.  Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
+
+This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
+
+8.	If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded.  In such case, this License incorporates the limitation as if written in the body of this License.
+
+9.	The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time.  Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation.  If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
+
+10.	If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission.  For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this.  Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
+
+NO WARRANTY
+
+11.	BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+12.	IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+END OF TERMS AND CONDITIONS
+
+How to Apply These Terms to Your New Programs
+
+If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
+
+To do so, attach the following notices to the program.  It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
+
+<one line to give the program's name and a brief idea of what it does.> Copyright (C) <year>  <name of author>
+
+This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
+
+Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License.  Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary.  Here is a sample; alter the names:
+
+Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+<signature of Ty Coon>, 1 April 1989
+Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into proprietary programs.  If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library.  If this is what you want to do, use the GNU Library General Public License instead of this License.
\ No newline at end of file
Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_cze
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_cze	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_cze	(revision 25287)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Path to gvSIG:"/>
+</langpack>
Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_val
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_val	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_val	(revision 25287)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Ruta a gvSIG:"/>
+</langpack>
Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_spa
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_spa	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/install/resources/userInputLang.xml_spa	(revision 25287)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Ruta a gvSIG:"/>
+</langpack>
Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/HOWTO-BUILD.txt
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/install/HOWTO-BUILD.txt	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/install/HOWTO-BUILD.txt	(revision 25287)
@@ -0,0 +1,7 @@
+ C�MO GENERAR EL INSTALADOR:
+ ===========================
+- gvSIG debe estar correctamente construido en ../_fwAndami/bin 
+- En el fichero variables.sh hay algunas variables que nos pueden interesar, que permiten personalizar el nombre del plugin, la versi�n, el directorio destino, etc. La variable  APPNAME normalmente valdr� "gvSIG", pero puede tiener nombre si estamos empaquetando una extensi�n (por ejemplo,  "nomenclatorIGN").
+- Definir los packs adecuados en el fichero XML de configuraci�n (install.xml), y revisar el fichero en general.
+- Definir las extensiones a incluir en el directorio variables.sh.
+- Lanzar el script distribucion.sh.
Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/buildExt.xml
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/install/buildExt.xml	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/install/buildExt.xml	(revision 25287)
@@ -0,0 +1,287 @@
+<project name="instalador-gvSIG" default="init" basedir=".">
+	
+	<dirname file="${ant.file.instalador-gvSIG}" property="base_dir"/>
+	<dirname file="${base_dir}" property="project_dir"/>
+	<dirname file="${project_dir}" property="workspace_dir"/>
+	
+	<import file="${workspace_dir}/binaries/ant/utilities.xml"/>
+	
+	<property file="build.properties"/>
+	<property file="${workspace_dir}/_fwAndami/gvSIG/extensiones/com.iver.cit.gvsig/build.number" prefix="gvSIG."/>
+	<property file="${project_dir}/build.number"/>
+	
+	<property name="dir_inst" location="/usr/local"/>
+	<!--<property name="base_dir" location="./"/>		-->
+	<property name="izpack_dir" location="${workspace_dir}/install/IzPack"/>
+	<property name="dir_libs" location="${izpack_dir}/lib"/>
+	
+	
+	<property name="GVSIG_INSTALLDIR" location="${workspace_dir}/install"/>
+	<property name="ANDAMI_DIR" location="${workspace_dir}/_fwAndami"/>
+	<property name="INSTALLER_DIR" value="${APPNAME}-${version}_installer"/>
+	<property name="JARNAME" value="${APPNAME}-${version}.jar"/>
+	<property name="DIR_LIN_GVSIG" location="${GVSIG_INSTALLDIR}/instalador-gvSIG-lin"/>
+	<property name="DIR_WIN_GVSIG" location="${GVSIG_INSTALLDIR}/instalador-gvSIG-win"/>
+	<property name="baseFileName" value="gvsig_${APPNAME}-${version}-${build.number}"/>
+	<property name="WINDOWSZIP" value="${baseFileName}-windows-i586.7z" />
+	<property name="LINUXBIN" value="${baseFileName}-linux-i586.bin"/>
+	<property name="WINDOWSEXE" value="${baseFileName}-windows-i586.exe"/>
+	<property name="MAC_10_ZIP" value="${baseFileName}-mac-10_4.zip"/>
+	<property name="autoinstalador" value="${APPNAME}_Installer" />
+	<property name="OUTPUT_DIR" location="./dist/v${version}/${build.number}"/> <!--CAMBIAR ESTO SEGUN DIRECTORIO OUTPUT -->
+	
+	<condition property="LAUNCHER7Z" value="${GVSIG_INSTALLDIR}/launcher/7z/7za" else="${GVSIG_INSTALLDIR}/launcher/7z/7z.exe">
+		<os family="unix" />
+	</condition>
+	
+	<taskdef name="izpack" classpath="${dir_libs}/compiler.jar" classname="com.izforge.izpack.ant.IzPackTask"/>
+	
+	
+	<condition property="Lang.Is.Spanish">
+		<contains string="${env.LANG}" substring="es"/>
+	</condition>
+	<condition property="directorio.base">
+		<available file="${base_dir}/install.xml" type="file" />
+	</condition>
+	
+	<target name="E_Spanish" if="Lang.Is.Spanish">
+		<property name="ERROR_BASEDIR" value="En el directorio ${base_dir} no se encuentra el fichero install.xml" />
+	</target>
+	
+	<target name="E_notSpanish" unless="Lang.Is.Spanish">
+		<property name="ERROR_BASEDIR" value="Cannot find install.xml in ${base_dir} folder " />
+	</target>
+	
+	<target name="check" depends="E_Spanish,E_notSpanish">
+		<fail message="${ERROR_BASEDIR}" unless="directorio.base"/>
+	</target>
+	
+	
+	
+	<target name="init" depends="check,CopyFiles,CreateJar,Installation,InstallMac,CleanDir" >
+		
+	</target>
+	<target name="CopyFiles" description="Copia de ficheros de librerias y de las extensiones necesarias">
+		<delete dir="${base_dir}/bin"/>
+		<copy file="${base_dir}/resources/gpl.txt" todir="./bin"/>
+		<mkdir dir="${base_dir}/bin/lib"/>
+		<!-- 		copiamos los jar y zip que tenemos en _fwAndami/lib		 -->
+		<copy todir="${base_dir}/bin/lib">
+			<fileset dir="${ANDAMI_DIR}/lib">
+				<include name="*.jar"/>
+				<include name="*.zip"/>
+			</fileset>
+		</copy>
+		
+		<copy todir="${base_dir}/bin" file="${ANDAMI_DIR}/andami.jar"/>
+		<copy todir="${base_dir}/bin" file="${ANDAMI_DIR}/castor.properties"/>
+		
+		<!-- 		PARA WINDOWS -->
+		
+		
+		<delete dir="${base_dir}/tmpResources"/>
+		<mkdir dir="${base_dir}/tmpResources" />
+		
+		<!-- 	Copiamos el lanzador y sus traduciones al tmpResources,sin copiar el ini, manifest y los CVS (ANT excluye carpetas CVS por defecto -->
+		<copy todir="${base_dir}/tmpResources">
+			<fileset dir="${GVSIG_INSTALLDIR}/launcher/izpack-launcher-1.3/dist/">
+				<include name="**/"/>
+				<exclude name="**/*.ini"/>
+				<exclude name="**/*.manifest"/>
+			</fileset>
+		</copy>
+		<move file="${base_dir}/tmpResources/launcher-Win32.exe" tofile="./tmpResources/gvSIG.exe"/>
+		
+		
+		
+		
+		<for list="${EXTENSIONS}" param="extensions">
+			<sequential>
+				<copy todir="${base_dir}/extensiones/@{extensions}">
+					<fileset dir="${ANDAMI_DIR}/gvSIG/extensiones/@{extensions}"/>
+				</copy>
+				<echo>extension ----> @{extensions} </echo>
+			</sequential>
+		</for>
+	</target>
+	<target name="CreateJar" description="Generacion del instalador Jar">
+		<izpack input="${base_dir}/install.xml"
+			output="${base_dir}/${JARNAME}"
+			installerType="standard"
+			basedir="${base_dir}"
+			izPackDir="${izpack_dir}/"/>
+	</target>
+	<!-- 		generar el tar.gz para linux -->
+	<target name="Installation" description="Generacion de la distribucion">
+		
+		<mkdir dir="${OUTPUT_DIR}" />
+		<delete dir="${base_dir}/${INSTALLER_DIR}"/>
+		<mkdir dir="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall"/>
+		<copy file="${base_dir}/${JARNAME}" todir="./${INSTALLER_DIR}/tmp_gvSIGInstall"/>
+		
+		<!-- 		carpetas CVS no se copiaran, ANT las excluye por defecto -->
+		<copy todir="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall">
+			<fileset dir="${GVSIG_INSTALLDIR}/launcher/izpack-launcher-1.3_linux/dist/"/>
+		</copy>
+		
+		<chmod file="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall/launcher-Linux" perm="ugo+rx"/>
+		<delete file="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall/launcher.ini"/>
+		<copy file="${DIR_LIN_GVSIG}/resources/launcher.ini.j15" tofile="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall/launcher.ini"/>
+		<replace file="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall/launcher.ini" token="%JARNAME%" value="${JARNAME}"/>
+		
+		<!-- 		comprimimos la carpeta tmp_gvSIGInstall en tmp.tgz  -->
+		<tar destfile="${base_dir}/${INSTALLER_DIR}/tmp.tgz"  compression="gzip">
+			<tarfileset dir="${base_dir}/${INSTALLER_DIR}" mode="755" >
+				<include name="tmp_gvSIGInstall/launcher-Linux"/>
+			</tarfileset>
+			<tarfileset dir="${base_dir}/${INSTALLER_DIR}">
+				<include name="tmp_gvSIGInstall/*"/>
+				<exclude name="tmp_gvSIGInstall/launcher-Linux"/>
+			</tarfileset>
+		</tar>
+		<echo message="#!/bin/sh${line.separator}" file="./${INSTALLER_DIR}/xx.tmp" />
+		<echo message="lcount=59${line.separator}" file="./${INSTALLER_DIR}/xx.tmp" append="true" /> <!-- OJO SI SE TOCA EL FICHERO h_gvSIG-install.sh - 59 -> num de lineas del fichero + 2 -->
+		<concat destfile="${base_dir}/${INSTALLER_DIR}/${LINUXBIN}" binary="true" >
+			<fileset file="${base_dir}/${INSTALLER_DIR}/xx.tmp"/>
+			<fileset file="${GVSIG_INSTALLDIR}/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh"/>
+			<fileset file="${base_dir}/${INSTALLER_DIR}/tmp.tgz"/>
+		</concat>
+		<chmod file="${base_dir}/${INSTALLER_DIR}/${LINUXBIN}" perm="ugo+rx"/>
+		<delete file="${base_dir}/${INSTALLER_DIR}/xx.tmp"/>
+		<move file="${base_dir}/${INSTALLER_DIR}/${LINUXBIN}" todir="${OUTPUT_DIR}" />
+		<delete dir="${base_dir}/${INSTALLER_DIR}"/>
+		
+		
+		
+		<!-- 		PARA WINDOWS  -->
+		<delete dir="${base_dir}/${INSTALLER_DIR}"/>
+		<mkdir dir="${base_dir}/${INSTALLER_DIR}"/>
+		<copy todir="${base_dir}/${INSTALLER_DIR}">
+			<fileset dir="${GVSIG_INSTALLDIR}/launcher/izpack-launcher-1.3/dist"/>
+		</copy>
+		<delete file="${base_dir}/${INSTALLER_DIR}/launcher-Win32.ini"/>
+		<copy todir="${base_dir}/${INSTALLER_DIR}/" file="${DIR_WIN_GVSIG}/resources/launcher-Win32.ini.j15"/>
+		<move file="${base_dir}/${INSTALLER_DIR}/launcher-Win32.ini.j15" tofile="${base_dir}/${INSTALLER_DIR}/launcher-Win32.ini"/>
+		<replace file="${base_dir}/${INSTALLER_DIR}/launcher-Win32.ini" token="%JARNAME%" value="${JARNAME}"/>
+		<move file="${base_dir}/${JARNAME}" todir="./${INSTALLER_DIR}"/>
+		<delete file="${base_dir}/${WINDOWSZIP}"/>
+		<exec executable="${LAUNCHER7Z}">
+			<arg line="a -r ${WINDOWSZIP} ./${INSTALLER_DIR}/*"/>
+		</exec>
+		<copy file="${GVSIG_INSTALLDIR}/launcher/7z/dist_config.txt" tofile="./dist_config.txt"/>
+		<replace file="${base_dir}/dist_config.txt" token="%TITLE%" value="${APPNAME}-${bversion}_${build.number}" />
+		<concat destfile="${base_dir}/${WINDOWSEXE}" binary="true">
+			<fileset file="${GVSIG_INSTALLDIR}/launcher/7z/7zS.sfx"/>
+			<fileset file="${base_dir}/dist_config.txt"/>
+			<fileset file="${base_dir}/${WINDOWSZIP}"/>
+		</concat>
+		<move file="${WINDOWSEXE}" todir="${OUTPUT_DIR}"/>
+	</target>
+	
+	<target name="InstallMac" description="Actualizador para MAC">
+		<property name="tmp_mac" location="${base_dir}/tmpResources_mac"/>
+		
+		<delete dir="${tmp_mac}" failonerror="no"/>
+		
+		<mkdir dir="${tmp_mac}"/>
+		
+		
+		<ant antfile="build-updater.xml" dir="${GVSIG_INSTALLDIR}/instalador-gvSIG-mac">
+			<property name="NOMBRE_BUNDLE" value="${autoinstalador}"/>
+			<property name="DIR_DESTINO" value="${tmp_mac}"/>
+		</ant>
+		
+		<copy todir="${tmp_mac}/${autoinstalador}.app/Contents/Resources" file="./resources/configfile" overwrite="yes"/>
+		
+		<replace file="${tmp_mac}/${autoinstalador}.app/Contents/Resources/configfile"
+			 token="%BUILD.NUMBER%"
+			 value="${build.number}"/>
+		
+		
+		<property name="mac_install_path_bin" value="${tmp_mac}/${autoinstalador}.app/Contents/Resources/updates/gvSIGbin"/>
+		<property name="mac_install_path_gvsig" value="${mac_install_path_bin}/gvSIG"/>
+		<property name="mac_install_path_ext" value="${mac_install_path_gvsig}/extensiones"/>
+		
+		<copy todir="${mac_install_path_ext}">
+			<fileset dir="extensiones">
+				<include name="org/gvsig/crs"/>
+			</fileset>
+		</copy>
+
+		<copy todir="${mac_install_path_gvsig}">
+			<fileset dir=".">
+				<include name="extensiones/com.iver.cit.gvsig/lib/jcrs.jar"/>
+				<include name="extensiones/com.iver.cit.gvsig/lib/db_epsg.jar"/>
+				<include name="extensiones/com.iver.cit.gvsig/lib/db_esri.jar"/>
+				<include name="extensiones/com.iver.cit.gvsig/lib/db_iau2000.jar"/>
+				<include name="extensiones/com.iver.cit.gvsig/lib/db_usr.jar"/>
+			</fileset>
+		</copy>
+		<!-- Copiar en los directorios los ficheros a instalar:   
+		     ${mac_install_path_bin} ==> directorio 'bin' de la instalacion (donde esta andami.jar)
+		     ${mac_install_path_gvsig} ==> directorio 'bin/gvSIG' de la instalacion
+		     ${mac_install_path_ext} ==> directorio 'bin/gvSIG/extensiones'
+		     
+		
+		
+		Ejemplos:
+		
+		* Actualizar andami.jar:
+		
+		<copy todir="${mac_install_path_bin}" file="bin/andami.jar"/>
+		
+		
+		* Copiar una libreria al directorio de lib del plugin de gvSIG:
+		
+		<copy todir="${mac_install_path_gvsig}">
+			<fileset dir=".">
+				<include name="extensiones/com.iver.cit.gvsig/lib/myLib.jar"/>
+			</fileset>
+		</copy>
+		
+		* Copiar el directorio entero del plugin 'myPlugin':
+		     
+		<copy todir="${mac_install_path_ext}">
+			<fileset dir="extensiones">
+				<include name="myPlugin/**/**"/>
+			</fileset>
+		</copy>
+
+		* Copiar todos los ficheros 'about.htm'
+		<copy todir="${mac_install_path_ext}">
+			<fileset dir="extensiones">
+				<include name="**/about.htm"/>
+			</fileset>
+		</copy>
+		
+		     
+		     -->
+		
+		
+		
+		<zip destfile="${OUTPUT_DIR}/${MAC_10_ZIP}">
+			<zipfileset dir="${tmp_mac}"
+				    includes="${autoinstalador}.app/**"
+				    excludes="${autoinstalador}.app/Contents/MacOS/*"
+				    />
+			<zipfileset dir="${tmp_mac}"
+				    includes="${autoinstalador}.app/Contents/MacOS/*"
+				    filemode="755"
+				    />
+			
+		</zip>
+		
+		<delete dir="${tmp_mac}"/>
+	</target>
+	
+	<target name="CleanDir" description="Limpiamos los directorios creados">
+		
+		<delete file="${base_dir}/${WINDOWSZIP}" />
+		<delete file="${base_dir}/dist_config.txt" />
+		<delete dir="${base_dir}/${INSTALLER_DIR}" />
+		<delete dir="${base_dir}/tmpResources" />
+		<delete dir="extensiones"/>
+		<delete dir="bin"/>
+	</target>
+	
+</project>
Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/install/variables.sh
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/install/variables.sh	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/install/variables.sh	(revision 25287)
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+export APPNAME=gvSIG
+export FULLVERSION='1.1.2'
+export TARGET_DIR=/tmp/versiones/
+#export TARGET_DIR=/mnt/sercartlin/grupo-sig-ca/Testing/Versiones/
+
+
+## estas extensiones se muestran en los packs, y se puede elegir instalarlos o no
+## (el fichero install.xml también debe estar actualizado para reflejar esto)
+EXTENSIONS=(
+com.iver.cit.gvsig.cad
+com.iver.cit.gvsig.jdbc_spatial
+com.iver.cit.gvsig.wcs
+com.iver.cit.gvsig.wfs2
+com.iver.cit.gvsig.wms
+com.iver.gvsig.datalocator
+com.iver.cit.gvsig.geoprocess
+com.iver.cit.gvsig.geoprocessextensions
+es.gva.cit.gvsig.catalogClient
+org.gvsig.georeferencing
+org.gvsig.rasterTools
+org.gvsig.scripting
+com.iver.gvsig.centerviewpoint
+es.prodevelop.cit.gvsig.arcims
+com.iver.gvsig.expresionfield
+com.iver.cit.gvsig.annotation
+org.gvsig.crs
+com.iver.cit.gvsig.oracle_spatial
+)
+
+## estas extensiones se instalan pero no se muestran en los packs
+MANDATORY_EXTENSIONS=(
+com.iver.cit.gvsig
+com.iver.core
+com.iver.gvsig.addeventtheme
+)
+
Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/lib/jGridShiftApi.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/lib/jGridShiftApi.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/lib/org.gvsig.crs.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/lib/org.gvsig.crs.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/JCrsExtension.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/JCrsExtension.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/JCrsExtension.java	(revision 25287)
@@ -0,0 +1,136 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+
+package org.gvsig.crs;
+
+import java.util.Arrays;
+import java.util.Iterator;
+
+import org.geotools.factory.FactoryRegistry;
+import org.geotools.referencing.operation.MathTransformProvider;
+import org.gvsig.crs.gui.panels.ProjChooserPanel;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.plugins.Extension;
+import com.iver.cit.gvsig.About;
+import com.iver.cit.gvsig.fmap.crs.CRSFactory;
+import com.iver.cit.gvsig.gui.panels.CRSSelectPanel;
+import com.iver.cit.gvsig.gui.panels.FPanelAbout;
+import com.iver.cit.gvsig.project.Project;
+import com.iver.utiles.XMLEntity;
+
+public class JCrsExtension extends Extension {
+	
+	private static final String DEFAULT_PROJECTION_KEY_NAME = "DefaultProjection";
+	private static final String FACTORY_DEFAULT_PROJECTION = "EPSG:23030";
+
+	public void initialize() {
+		
+		/*
+		 * Se eliminan del registro de geotools las proyecciones que aporta libJCrs para asegurar que 
+		 * son estas �ltimas las que se utilizan. 
+		 */
+		final Class[] categories = {org.geotools.referencing.operation.MathTransformProvider.class};
+		FactoryRegistry registry = new FactoryRegistry(Arrays.asList(categories));
+		Iterator providers = registry.getServiceProviders(MathTransformProvider.class);
+		Iterator providers2 = null;
+		MathTransformProvider provider = null;
+		MathTransformProvider provider2 = null;
+		
+		while (providers.hasNext()){
+			provider = (MathTransformProvider) providers.next(); 
+			if(provider.nameMatches("IDR")){
+				providers2 = registry.getServiceProviders(MathTransformProvider.class);
+				while (providers2.hasNext()){
+					provider2 = (MathTransformProvider) providers2.next();
+					if(provider2.nameMatches(provider.getName().toString()) && !provider2.nameMatches("IDR"))
+						registry.deregisterServiceProvider(provider2, categories[0]);
+				}
+			}
+		}
+		
+		//TODO: Solo para depurar: BORRAR
+		providers = registry.getServiceProviders(MathTransformProvider.class);
+		while (providers.hasNext()) {
+            provider = (MathTransformProvider) providers.next();    
+            System.out.println(provider.toString());
+		}
+		/*
+		 * 
+		 */
+		
+		
+		CRSFactory.cp = new CrsFactory();
+		CRSSelectPanel.registerPanelClass(ProjChooserPanel.class);
+		
+		//	Default Projection
+		PluginServices ps = PluginServices.getPluginServices("com.iver.cit.gvsig");
+		XMLEntity xml = ps.getPersistentXML();
+		String projCode = null; 
+		if (xml.contains(DEFAULT_PROJECTION_KEY_NAME)) {
+			projCode = xml.getStringProperty(DEFAULT_PROJECTION_KEY_NAME);
+		} else {
+			projCode = FACTORY_DEFAULT_PROJECTION;
+		}
+		Project.setDefaultProjection(CRSFactory.getCRS(projCode));
+		
+		About about=(About)PluginServices.getExtension(About.class); 
+		FPanelAbout panelAbout=about.getAboutPanel(); 
+		java.net.URL aboutURL = this.getClass().getResource("/about.htm"); 
+		panelAbout.addAboutUrl("JCRS",aboutURL);
+	}
+
+	public void execute(String actionCommand) {
+	
+
+	}
+
+	public boolean isEnabled() {
+
+		return true;
+	}
+
+	public boolean isVisible() {
+
+		return false;
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/JCrsExtension.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/listeners/ImportNewCrsDialogListener.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/listeners/ImportNewCrsDialogListener.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/listeners/ImportNewCrsDialogListener.java	(revision 25287)
@@ -0,0 +1,176 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.listeners;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+
+import javax.swing.JOptionPane;
+import javax.swing.ListSelectionModel;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.dialog.ImportNewCrsDialog;
+import org.gvsig.crs.persistence.CrsData;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+
+import com.iver.andami.PluginServices;
+
+/**
+ * Listeners para el manejo de las importaciones de las partes correspondientes
+ * a los crs definidos por el usuario
+ * 
+ * @author Jose Luis Gomez Martinez (joseluis.gomez@uclm.es)
+ *
+ */
+
+public class ImportNewCrsDialogListener implements ActionListener,
+ListSelectionListener, MouseListener {
+
+	ImportNewCrsDialog dialog = null;	
+	
+	public ImportNewCrsDialogListener(ImportNewCrsDialog d) {
+		dialog = d;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		if (e.getSource() == dialog.getJButtonAccept()){			
+			PluginServices.getMDIManager().closeWindow(dialog);
+		}
+		
+		if (e.getSource() == dialog.getJButtonCancel()) {
+			dialog.setCode(-1);
+			PluginServices.getMDIManager().closeWindow(dialog);
+		}		
+	}
+
+	public void valueChanged(ListSelectionEvent e) {
+		if (e.getSource() == dialog.getEpsgPanel().getJTable().getSelectionModel()){
+			String[] not_soported= new String[6];// = {"engineering", "vertical", "compound", "geocentric"};
+			boolean soported = true;
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+			if (dialog.getOption().equals(PluginServices.getText(this, "projection"))) {
+				not_soported[0] = "engineering";
+				not_soported[1]= "vertical";
+				not_soported[2] = "compound";
+				not_soported[3] ="geocentric";
+				not_soported[4]= "geographic 3D";
+				not_soported[5] = "geographic 2D";
+			} else {
+				not_soported[0] = "engineering";
+				not_soported[1]= "vertical";
+				not_soported[2] = "compound";
+				not_soported[3] ="geocentric";
+				not_soported[4]= "geographic 3D";				
+			}
+			
+	        if (lsm.isSelectionEmpty()) {	        	
+	        	dialog.getEpsgPanel().setCodeCRS(-1);
+	        	dialog.getJButtonAccept().setEnabled(false);        	
+	        	dialog.getEpsgPanel().getInfoCrs().setEnabled(false);
+	        	dialog.setCode(-1);     	        	
+	        } 
+	        else {	        	
+	        	dialog.getEpsgPanel().selectedRowTable = lsm.getMinSelectionIndex();
+	        	String crs_kind = (String)dialog.getEpsgPanel().sorter.getValueAt(dialog.getEpsgPanel().selectedRowTable,2);	        	
+	        	for (int i = 0; i < not_soported.length; i++) {
+	        		if (crs_kind.equals(not_soported[i]))
+	        			soported = false;	        		
+	        	}
+	        	if (soported){
+	        		int code = Integer.parseInt((String)dialog.getEpsgPanel().sorter.getValueAt(dialog.getEpsgPanel().selectedRowTable,0));
+	        		dialog.setCode(code);
+	        		dialog.getEpsgPanel().setCodeCRS(code);
+	        		dialog.getJButtonAccept().setEnabled(true);
+	            	dialog.getEpsgPanel().getInfoCrs().setEnabled(true);
+	            	
+	        	}
+	        	else {
+	        		if (dialog.getOption().equals(PluginServices.getText(this, "projection"))) {
+	        			JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,"crs_not_projected"), "Warning...",
+								JOptionPane.WARNING_MESSAGE);
+	        		} else {        			
+	        			JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+	        		}
+	        		dialog.setCode(-1);
+	        		dialog.getEpsgPanel().setCodeCRS(-1);
+	        		dialog.getJButtonAccept().setEnabled(false);
+	        		dialog.getEpsgPanel().getInfoCrs().setEnabled(false);
+	        	}	        	
+	        }
+		}
+		
+	}
+
+	public void mouseClicked(MouseEvent e) {
+		if (e.getSource() == dialog.getEpsgPanel().getJTable()){
+			if (e.getClickCount() == 2){				
+				PluginServices.getMDIManager().closeWindow(dialog);	
+		    }
+		}
+	}
+
+	public void mouseEntered(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mouseExited(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mousePressed(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mouseReleased(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/listeners/ImportNewCrsDialogListener.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/listeners/CRSSelectionDialogListener.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/listeners/CRSSelectionDialogListener.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/listeners/CRSSelectionDialogListener.java	(revision 25287)
@@ -0,0 +1,537 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+
+package org.gvsig.crs.gui.listeners;
+
+import java.awt.CardLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+
+import javax.swing.JOptionPane;
+import javax.swing.ListSelectionModel;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsWkt;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.CRSSelectionDialog;
+import org.gvsig.crs.persistence.CrsData;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+
+import com.iver.andami.PluginServices;
+
+/**
+ * Esta clase contiene los listeners necesarios para el manejo 
+ * de los eventos del panel de eleccin de CRS de la vista principal.
+ * 
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ *
+ */
+
+public class CRSSelectionDialogListener implements ActionListener,
+		 ListSelectionListener, ItemListener, MouseListener {
+	
+	int[] valid_method_code = {9800, 9801, 9802, 9803, 9804, 9805, 9806, 9807, 9809, 9810, 
+			9811, 9812, 9813, 9814, 9815, 9602, 9659, 9818, 9819, 9820, 9821, 9822, 9823, 
+			9827, 9829};
+	
+	CRSSelectionDialog dialog = null;
+
+	public CRSSelectionDialogListener(CRSSelectionDialog d) {
+		dialog = d;
+	}
+	
+	/**
+	 * Manejador de los eventos relacionados con los botones del panel
+	 * de seleccin de CRS.
+	 */
+	public void actionPerformed(ActionEvent e) {
+		if (e.getSource() == dialog.getCrsMainPanel().getJButtonAccept()){
+			ICrs crs = (ICrs) dialog.getProjection();
+			try {
+				crs.getProj4String();
+			} catch (CrsException e1) {
+				JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,e1.getMessage()), "Warning...",
+						JOptionPane.WARNING_MESSAGE);
+				return;
+			}
+			dialog.setLastProj(crs);
+			dialog.setDataSource(dialog.getCrsMainPanel().getDataSource());
+        	if (dialog.getLastProj() != null){
+        		/*
+        		 * Actualizar recientes...
+        		 */
+        		String authority = ((ICrs)dialog.getLastProj()).getCrsWkt().getAuthority()[0];
+        		String name = ((ICrs)dialog.getLastProj()).getCrsWkt().getName();
+        		int code = ((ICrs)dialog.getLastProj()).getCode();
+        		CrsData crsData = new CrsData(authority,code,name);
+        		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+        		persistence.addCrsData(crsData);
+        		
+        		
+        		PluginServices.getMDIManager().closeWindow(dialog);
+        		dialog.setOkPressed(true);
+			}
+        	else {
+        		dialog.setOkPressed(false);
+        	}	
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getJButtonCancel()){
+			dialog.setProjection(dialog.getLastProj());
+            PluginServices.getMDIManager().closeWindow(dialog);
+            dialog.setOkPressed(false);
+		}
+
+	}
+
+
+	/**
+	 * Maneja los eventos del combobox de eleccin de repositorio para
+	 * la seleccin del CRS de la vista
+	 */
+	public void itemStateChanged(ItemEvent e) {
+		CardLayout cl = (CardLayout)(dialog.getCrsMainPanel().getJPanelMain().getLayout());
+		String op = (String)e.getItem();		
+		if (op.equals("EPSG")){
+			dialog.getCrsMainPanel().getEpsgPanel().connection();	
+			if(dialog.getCrsMainPanel().getEpsgPanel().getJTable().getSelectedRowCount()>0)
+				dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);
+			else
+				dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
+				
+		} else if (op.equals("IAU2000")) {
+			dialog.getCrsMainPanel().getIauPanel().connection();
+			if(dialog.getCrsMainPanel().getIauPanel().getJTable().getSelectedRowCount()>0)
+				dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);
+			else
+				dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
+		}else if (op.equals("Recientes")) {
+			//Comprobar de nuevo recientes por si hemos eliminado alguno de usuario
+			dialog.getCrsMainPanel().getRecentsPanel().loadRecents();
+			if(dialog.getCrsMainPanel().getRecentsPanel().getJTable().getSelectedRowCount()>0)
+				dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);
+			else
+				dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
+		}
+		else if (op.equals("ESRI")) {
+			dialog.getCrsMainPanel().getEsriPanel().connection();
+		if(dialog.getCrsMainPanel().getEsriPanel().getJTable().getSelectedRowCount()>0)
+			dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);
+		else
+			dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
+		}else if (op.equals(PluginServices.getText(this, "newCRS"))) {
+			dialog.getCrsMainPanel().getNewCrsPanel().connection();
+			if(dialog.getCrsMainPanel().getNewCrsPanel().getJTable().getSelectedRowCount()>0) {
+				dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);
+				if (dialog.getCrsMainPanel().getNewCrsPanel().getSearchTextField().getText().equals(""))
+					dialog.getCrsMainPanel().getNewCrsPanel().initializeTable();				
+			}
+			else
+				dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
+		}
+	    cl.show(dialog.getCrsMainPanel().getJPanelMain(), (String)e.getItem());
+	    dialog.getCrsMainPanel().setDataSource((String)e.getItem());
+	}
+
+	/**
+	 * Maneja el evento de cambio de valor de las tablas existentes
+	 * en cada uno de los distintos repositorios para la seleccin
+	 * del CRS de la vista.
+	 */
+	public void valueChanged(ListSelectionEvent e) {
+		if (e.getSource() == dialog.getCrsMainPanel().getRecentsPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+			
+	        if (lsm.isSelectionEmpty()) {
+	        	dialog.getCrsMainPanel().getRecentsPanel().selectedRowTable = -1;
+	        	dialog.getCrsMainPanel().getRecentsPanel().setCodeCRS(-1);
+	        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
+	        	dialog.getCrsMainPanel().getRecentsPanel().getInfoCrs().setEnabled(false);
+	        	dialog.setCode(0);	        	
+	        } 
+	        else {        	
+	        	dialog.getCrsMainPanel().getRecentsPanel().initCrs();	        			        	
+        		dialog.setCode(dialog.getCrsMainPanel().getRecentsPanel().getCodeCRS());
+        		dialog.getCrsMainPanel().getRecentsPanel().getInfoCrs().setEnabled(true);	        	
+            	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);
+	        }
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getIauPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+			String[] not_soported = {"Oblique_Cylindrical_Equal_Area"};
+			boolean soported = true;
+			 if (lsm.isSelectionEmpty()) {
+		        	dialog.getCrsMainPanel().getIauPanel().selectedRowTable = -1;
+		        	dialog.getCrsMainPanel().getIauPanel().setCodeCRS(-1);
+		        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
+		        	dialog.getCrsMainPanel().getIauPanel().getInfoCrs().setEnabled(false);
+		        	dialog.setCode(0);        	
+		        	
+			 } 
+			 else {  
+				 
+				 dialog.getCrsMainPanel().getIauPanel().selectedRowTable = lsm.getMinSelectionIndex();
+				 dialog.getCrsMainPanel().getIauPanel().setCodeCRS(Integer.parseInt((String)dialog.getCrsMainPanel().getIauPanel().sorter.getValueAt(dialog.getCrsMainPanel().getIauPanel().selectedRowTable,0)));
+				 dialog.getCrsMainPanel().getIauPanel().setWKT();
+				 CrsWkt crs = new CrsWkt(dialog.getCrsMainPanel().getIauPanel().getWKT());
+				 String crs_kind = crs.getProjection();
+				 for (int i = 0; i < not_soported.length; i++) {
+					 if (crs_kind.equals(not_soported[i]))
+		        		soported = false;					 
+		        }
+		        if (soported){
+		        	dialog.setCode(dialog.getCrsMainPanel().getIauPanel().getCodeCRS());
+		        	dialog.getCrsMainPanel().getIauPanel().getInfoCrs().setEnabled(true);
+		        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);	
+		        }
+		        else {
+		        	JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+		        	dialog.getCrsMainPanel().getIauPanel().setCodeCRS(-1);
+		        	dialog.getCrsMainPanel().getIauPanel().setCodeCRS(0);
+		        	dialog.getCrsMainPanel().getIauPanel().getInfoCrs().setEnabled(false);
+		        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);	        		
+		        }	        		            	
+		     }
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getEpsgPanel().getJTable().getSelectionModel()){
+			String[] not_soported = {"engineering", "vertical", "compound", "geocentric", "geographic 3D"};
+			
+			String problem = "";
+			boolean soported = true;
+			boolean soported2 = false;
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+								
+	        if (lsm.isSelectionEmpty()) {
+	        	dialog.getCrsMainPanel().getEpsgPanel().selectedRowTable = -1;
+	        	dialog.getCrsMainPanel().getEpsgPanel().setCodeCRS(-1);
+	        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);        	
+	        	dialog.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(false);
+	        	dialog.setCode(0);     	        	
+	        } 
+	        else {	        	
+	        	dialog.getCrsMainPanel().getEpsgPanel().selectedRowTable = lsm.getMinSelectionIndex();
+	        	String crs_kind = (String)dialog.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(dialog.getCrsMainPanel().getEpsgPanel().selectedRowTable,2);	        	
+	        	for (int i = 0; i < not_soported.length; i++) {
+	        		if (crs_kind.equals(not_soported[i])){
+	        			soported = false;
+	        			problem = not_soported[i];
+	        		}
+	        	}
+	        	for (int i=0; i< valid_method_code.length;i++) {
+	        		if (dialog.getCrsMainPanel().getEpsgPanel().getProjectionCode((String)dialog.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(dialog.getCrsMainPanel().getEpsgPanel().selectedRowTable,0)) == valid_method_code[i]) {
+	        			soported2 = true;
+	        		}
+	        	}
+	        	if (crs_kind.equals("geographic 2D")) {
+	        		soported2 = true;
+	        	}
+	        	if (soported && soported2){
+	        		dialog.getCrsMainPanel().getEpsgPanel().setCodeCRS(Integer.parseInt((String)dialog.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(dialog.getCrsMainPanel().getEpsgPanel().selectedRowTable,0)));
+	            	dialog.getCrsMainPanel().getEpsgPanel().setWKT();
+	            	dialog.setCode(dialog.getCrsMainPanel().getEpsgPanel().epsg_code);
+	            	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);
+	            	dialog.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(true);
+	            	
+	        	}
+	        	else {
+	        		JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,"crs_not_soported")+" "+PluginServices.getText(this,problem), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+	        		dialog.getCrsMainPanel().getEpsgPanel().setCodeCRS(-1);
+	        		dialog.setCode(0);
+	        		dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
+	        		dialog.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(false);
+	        	}	        	
+	        }
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getEsriPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+			String[] not_soported = {"Oblique_Cylindrical_Equal_Area"};
+			boolean soported = true;
+			 if (lsm.isSelectionEmpty()) {
+		        	dialog.getCrsMainPanel().getEsriPanel().selectedRowTable = -1;
+		        	dialog.getCrsMainPanel().getEsriPanel().setCodeCRS(-1);
+		        	dialog.getCrsMainPanel().getEsriPanel().getInfoCrs().setEnabled(false);		        	
+		        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);		        	
+		        	dialog.setCode(0);        	
+		        	
+			 } 
+			 else {  
+				 
+				 dialog.getCrsMainPanel().getEsriPanel().selectedRowTable = lsm.getMinSelectionIndex();
+				 dialog.getCrsMainPanel().getEsriPanel().setCodeCRS(Integer.parseInt((String)dialog.getCrsMainPanel().getEsriPanel().sorter.getValueAt(dialog.getCrsMainPanel().getEsriPanel().selectedRowTable,0)));
+				 dialog.getCrsMainPanel().getEsriPanel().setWKT();
+				 CrsWkt crs = new CrsWkt(dialog.getCrsMainPanel().getEsriPanel().getWKT());
+				 String crs_kind = crs.getProjection();
+				 for (int i = 0; i < not_soported.length; i++) {
+					 if (crs_kind.equals(not_soported[i]))
+		        		soported = false;					 
+		        }
+		        if (soported){
+		        	dialog.setCode(dialog.getCrsMainPanel().getEsriPanel().getCodeCRS());
+		        	dialog.getCrsMainPanel().getEsriPanel().getInfoCrs().setEnabled(true);
+		        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);	
+		        }
+		        else {
+		        	JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+		        	dialog.getCrsMainPanel().getEsriPanel().setCodeCRS(-1);
+		        	dialog.getCrsMainPanel().getEsriPanel().setCodeCRS(0);
+		        	dialog.getCrsMainPanel().getEsriPanel().getInfoCrs().setEnabled(false);
+		        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);	        		
+		        }	        		            	
+		     }
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getNewCrsPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+			if (lsm.isSelectionEmpty()) {
+		        	dialog.getCrsMainPanel().getNewCrsPanel().selectedRowTable = -1;
+		        	dialog.getCrsMainPanel().getNewCrsPanel().setCodeCRS(-1);
+		        	dialog.getCrsMainPanel().getNewCrsPanel().getInfoCrs().setEnabled(false);		        	
+		        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
+		        	dialog.getCrsMainPanel().getNewCrsPanel().getBtnEliminar().setEnabled(false);
+		        	dialog.getCrsMainPanel().getNewCrsPanel().getBtnEditar().setEnabled(false);
+		        	dialog.setCode(0);        	
+		        	
+			 } 
+			 else {  
+				 
+				 dialog.getCrsMainPanel().getNewCrsPanel().selectedRowTable = lsm.getMinSelectionIndex();
+				 dialog.getCrsMainPanel().getNewCrsPanel().setCodeCRS(Integer.parseInt((String)dialog.getCrsMainPanel().getNewCrsPanel().sorter.getValueAt(dialog.getCrsMainPanel().getNewCrsPanel().selectedRowTable,0)));
+				 dialog.getCrsMainPanel().getNewCrsPanel().setWKT();
+				 dialog.getCrsMainPanel().getNewCrsPanel().getInfoCrs().setEnabled(true);
+				 dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);	
+				 dialog.getCrsMainPanel().getNewCrsPanel().getBtnEliminar().setEnabled(true);
+				 dialog.getCrsMainPanel().getNewCrsPanel().getBtnEditar().setEnabled(true);
+		     }
+		}
+	}
+		
+	/**
+	 * Controla los eventos relacionados con el doble click para
+	 * la seleccin del CRS de la vista de las tablas del panel de
+	 * seleccin de CRS
+	 */	
+	public void mouseClicked(MouseEvent e) {
+
+		if (e.getSource() == dialog.getCrsMainPanel().getRecentsPanel().getJTable()){
+			if (e.getClickCount() == 2){
+				ICrs crs = (ICrs) dialog.getProjection();
+				try {
+					crs.getProj4String();
+				} catch (CrsException e1) {
+					JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,e1.getMessage()), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+					return;
+				}
+				dialog.setLastProj(crs);
+				dialog.setDataSource(dialog.getCrsMainPanel().getDataSource());
+	        	if (dialog.getLastProj() != null){
+	        		/*
+	        		 * Actualizar recientes...
+	        		 */
+	        		String authority = ((ICrs)dialog.getLastProj()).getCrsWkt().getAuthority()[0];	        		
+	        		String name = ((ICrs)dialog.getLastProj()).getCrsWkt().getName();
+	        		int code = ((ICrs)dialog.getLastProj()).getCode();
+	        		CrsData crsData = new CrsData(authority,code,name);
+	        		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+	        		persistence.addCrsData(crsData);
+	        		
+	        		PluginServices.getMDIManager().closeWindow(dialog);
+	        		dialog.setOkPressed(true);
+				}
+	        	else dialog.setOkPressed(false);	        	
+		    }
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getEpsgPanel().getJTable()){
+			if (e.getClickCount() == 2){
+				ICrs crs = (ICrs) dialog.getProjection();
+				try {
+					crs.getProj4String();
+				} catch (CrsException e1) {
+					JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,e1.getMessage()), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+					return;
+				}
+				dialog.setLastProj(dialog.getProjection());
+				dialog.setDataSource(dialog.getCrsMainPanel().getDataSource());
+	        	if (dialog.getLastProj() != null){
+	        		/*
+	        		 * Actualizar recientes...
+	        		 */
+	        		String authority = ((ICrs)dialog.getLastProj()).getCrsWkt().getAuthority()[0];	        		
+	        		String name = ((ICrs)dialog.getLastProj()).getCrsWkt().getName();
+	        		int code = ((ICrs)dialog.getLastProj()).getCode();
+	        		CrsData crsData = new CrsData(authority,code,name);
+	        		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+	        		persistence.addCrsData(crsData);
+	        		
+	        		PluginServices.getMDIManager().closeWindow(dialog);
+	        		dialog.setOkPressed(true);
+				}
+	        	else dialog.setOkPressed(false);	        		
+		    }
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getIauPanel().getJTable()){
+			if (e.getClickCount() == 2){
+				ICrs crs = (ICrs) dialog.getProjection();
+				try {
+					crs.getProj4String();
+				} catch (CrsException e1) {
+					JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,e1.getMessage()), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+					return;
+				}
+				dialog.setLastProj(dialog.getProjection());
+				dialog.setDataSource(dialog.getCrsMainPanel().getDataSource());
+	        	if (dialog.getLastProj() != null){
+	        		/*
+	        		 * Actualizar recientes...
+	        		 */
+	        		String authority = ((ICrs)dialog.getLastProj()).getCrsWkt().getAuthority()[0];	        		
+	        		String name = ((ICrs)dialog.getLastProj()).getCrsWkt().getName();
+	        		int code = ((ICrs)dialog.getLastProj()).getCode();
+	        		CrsData crsData = new CrsData(authority,code,name);
+	        		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+	        		persistence.addCrsData(crsData);	        		
+	        		
+	        		PluginServices.getMDIManager().closeWindow(dialog);
+	        		dialog.setOkPressed(true);
+				}
+	        	else dialog.setOkPressed(false);	        		
+		    }
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getEsriPanel().getJTable()){
+			if (e.getClickCount() == 2){
+				ICrs crs = (ICrs) dialog.getProjection();
+				try {
+					crs.getProj4String();
+				} catch (CrsException e1) {
+					JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,e1.getMessage()), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+					return;
+				}
+				dialog.setLastProj(dialog.getProjection());
+				dialog.setDataSource(dialog.getCrsMainPanel().getDataSource());
+	        	if (dialog.getLastProj() != null){
+	        		/*
+	        		 * Actualizar recientes...
+	        		 */
+	        		String authority = ((ICrs)dialog.getLastProj()).getCrsWkt().getAuthority()[0];	        		
+	        		String name = ((ICrs)dialog.getLastProj()).getCrsWkt().getName();
+	        		int code = ((ICrs)dialog.getLastProj()).getCode();
+	        		CrsData crsData = new CrsData(authority,code,name);
+	        		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+	        		persistence.addCrsData(crsData);	        		
+	        		
+	        		PluginServices.getMDIManager().closeWindow(dialog);
+	        		dialog.setOkPressed(true);
+				}
+	        	else dialog.setOkPressed(false);	        		
+		    }
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getNewCrsPanel().getJTable()){
+			if (e.getClickCount() == 2){
+				ICrs crs = (ICrs) dialog.getProjection();
+				try {
+					crs.getProj4String();
+				} catch (CrsException e1) {
+					JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,e1.getMessage()), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+					return;
+				}
+				dialog.setLastProj(dialog.getProjection());
+				dialog.setDataSource(dialog.getCrsMainPanel().getDataSource());
+	        	if (dialog.getLastProj() != null){
+	        		/*
+	        		 * Actualizar recientes...
+	        		 */
+	        		String authority = ((ICrs)dialog.getLastProj()).getCrsWkt().getAuthority()[0];	        		
+	        		String name = ((ICrs)dialog.getLastProj()).getCrsWkt().getName();
+	        		int code = ((ICrs)dialog.getLastProj()).getCode();
+	        		CrsData crsData = new CrsData(authority,code,name);
+	        		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+	        		persistence.addCrsData(crsData);	        		
+	        		
+	        		PluginServices.getMDIManager().closeWindow(dialog);
+	        		dialog.setOkPressed(true);
+				}
+	        	else dialog.setOkPressed(false);	        		
+		    }
+		}
+	}
+
+	public void mouseEntered(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mouseExited(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mousePressed(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mouseReleased(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/listeners/CRSSelectionDialogListener.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/listeners/CRSMainTrPanelListener.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/listeners/CRSMainTrPanelListener.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/listeners/CRSMainTrPanelListener.java	(revision 25287)
@@ -0,0 +1,1858 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+
+package org.gvsig.crs.gui.listeners;
+
+import java.awt.CardLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import javax.swing.JComboBox;
+import javax.swing.JOptionPane;
+import javax.swing.ListSelectionModel;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+
+import org.gvsig.crs.CrsGT;
+import org.gvsig.crs.CrsWkt;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.CRSMainTrPanel;
+import org.gvsig.crs.gui.panels.InfoCRSPanel;
+import org.gvsig.crs.ogr.TransEPSG;
+import org.gvsig.crs.persistence.CompTrData;
+import org.gvsig.crs.persistence.CrsData;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+import org.gvsig.crs.persistence.RecentTrsPersistence;
+import org.gvsig.crs.persistence.TrData;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.cit.gvsig.project.documents.view.gui.BaseView;
+
+import es.idr.teledeteccion.connection.Query;
+
+/**
+ * Esta clase contiene todos los listeners necesarios para el manejo 
+ * de los eventos del panel de eleccin de CRS de la capa y de su
+ * tranformacin. 
+ * 
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es) 
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ *
+ */
+
+public class CRSMainTrPanelListener implements ActionListener, 
+			ListSelectionListener, ItemListener, MouseListener, KeyListener{
+
+	int[] valid_method_code = {9800, 9801, 9802, 9803, 9804, 9805, 9806, 9807, 9809, 9810, 
+			9811, 9812, 9813, 9814, 9815, 9602, 9659, 9818, 9819, 9820, 9821, 9822, 9823, 
+			9827, 9829};
+	
+	private CRSMainTrPanel panel = null;
+		
+	public CRSMainTrPanelListener(CRSMainTrPanel p) {
+		panel=p;	
+	}
+	
+	/**
+	 * Manejador de los eventos relacionados con los botones del panel
+	 * de transformacin y al combobox de las transformaciones
+	 */
+	public void actionPerformed(ActionEvent e) {
+		if(	e.getSource() == panel.getJButtonAccept()){
+			if (panel.isEpsg_tr()) {			
+				TransEPSG epsgParams = new TransEPSG(panel.getEpsgTrPanel().getTransformation_code(),panel.getEpsgTrPanel().connect, panel.getEpsgTrPanel().inverseTranformation);
+				panel.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+				panel.setProjection(panel.getEpsgTrPanel().getProjection());
+				panel.setEpsg_tr(false);
+				
+				/*
+				 * Actualizar Transformaciones recientes
+				 */
+				String authority = "EPSG";
+	    		String name = (String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,1);
+	    		int code = panel.getEpsgTrPanel().getTransformation_code();
+	    		String crsSource = "EPSG:"+String.valueOf(panel.getEpsgTrPanel().getSource()); 	    			
+	    		String crsTarget = "EPSG:"+String.valueOf(panel.getEpsgTrPanel().getTarget()); 	    			
+	    		String details = (String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,5);
+	    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+	    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+	    		trPersistence.addTrData(trData);
+				
+	    		
+			}
+			else if (panel.isManual_tr()) {
+				boolean domain = panel.getManualTrPanel().correctJTextField();
+				if (domain && panel.getManualTrPanel().correctDomain()){
+					panel.setProjection(panel.getManualTrPanel().getProjection());
+					panel.setManual_tr(false);
+				}
+				else if (!domain) {
+					JOptionPane.showMessageDialog(panel, 
+							PluginServices.getText(this,"numeric_format"), 
+							"Warning...", JOptionPane.WARNING_MESSAGE);					
+					return;
+				}				
+				else {
+					JOptionPane.showMessageDialog(panel, 
+							PluginServices.getText(this,"incorrect_domain"), 
+							"Warning...", JOptionPane.WARNING_MESSAGE);					
+					return;
+				}
+				
+				/*
+				 * Actualizar Transformaciones recientes
+				 */
+				String authority = "USR";
+	    		String name = PluginServices.getText(this,"manual");
+	    		int code = 0;
+	    		String crsSource = panel.getManualTrPanel().getSourceAbrev();
+	    		String crsTarget = panel.getManualTrPanel().getTargetAbrev();
+	    		String details = panel.getManualTrPanel().getValues();
+	    		 
+	    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+	    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+	    		trPersistence.addTrData(trData);
+				
+			}
+			else if (panel.isNads_tr()) {
+				panel.setProjection(panel.getNadsTrPanel().getProjection());
+				panel.setTargetNad(panel.getNadsTrPanel().getNad());
+				panel.setNads_tr(false);
+				
+				/*
+				 * Actualizar Transformaciones recientes
+				 */
+				String authority = "NADGR";
+	    		String name = "----";
+	    		int code = 0;
+	    		String crsSource = panel.getNadsTrPanel().getSourceAbrev();
+	    		String crsTarget = panel.getNadsTrPanel().getTargetAbrev();
+	    		String details = "";
+	    		if (panel.getNadsTrPanel().getNad())
+	    			details = panel.getNadsTrPanel().getNadFile()+ " ("+panel.getNadsTrPanel().getTargetAbrev() +")";
+	    		else
+	    			details = panel.getNadsTrPanel().getNadFile()+ " ("+panel.getNadsTrPanel().getSourceAbrev() +")"; 
+	    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+	    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+	    		trPersistence.addTrData(trData);
+			}
+			/*
+			 * Ver que es necesario cuando aceptas en el panel de transformaciones
+			 * recientes.
+			 */
+			else if (panel.isRecents_tr()) {
+				String[] transformation = ((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0)).split(":");
+				if (transformation[0].equals("USR")){
+	        		panel.getRecentsTrPanel().setParamsManual((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4));
+	        		panel.setProjection(panel.getRecentsTrPanel().getProjection());
+	        	}
+				if (transformation[0].equals("EPSG")){
+					TransEPSG epsgParams = new TransEPSG(panel.getRecentsTrPanel().getTrCode(),panel.getRecentsTrPanel().connect, panel.getRecentsTrPanel().getInverseTransformation());
+					panel.getRecentsTrPanel().setParamsEPGS(epsgParams.getParamValue());
+					panel.setProjection(panel.getRecentsTrPanel().getProjection());
+	        	}
+				if (transformation[0].equals("NADGR")){
+					panel.setProjection(panel.getRecentsTrPanel().getProjectionNad((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4)));
+				}
+				if (transformation[0].equals("COMP")) {
+					panel.setProjection(panel.getRecentsTrPanel().getProjectionComplex((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4)));
+				}
+				//panel.setProjection(panel.getRecentsTrPanel().getProjection());
+				panel.setRecents_tr(false);
+				
+				/*
+				 * Actualizar Transformaciones recientes
+				 */
+				String authCode = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0);
+				String authority = authCode.split(":")[0];
+	    		String name = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,1);
+	    		int code = Integer.parseInt(authCode.split(":")[1]);
+	    		String crsSource = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,2);
+	    		String crsTarget = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,3);
+	    		String details = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4);	    		
+	    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+	    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+	    		trPersistence.addTrData(trData);
+			}else if(panel.isCompuesta_tr()){
+				//Selecciona transformacin compuesta
+				//Mostrar el panel de transformacin de la Capa
+				panel.setProjection(panel.getVistaTrPanel().getProjection());
+				//panel.setTargetNad(panel.getNadsTrPanel().getNad());
+				panel.setCompuesta_tr(false);			
+				panel.setVista_tr(false);
+				
+				/**
+				 * para actualizar las transformaciones recientes, tendremos
+				 * que coger las dos transformaciones utilizadas...
+				 */
+				
+				/*					
+				 * Actualizar Transformaciones recientes
+				 */
+				String authorityLayer = null;
+	    		String nameLayer = null;
+	    		int codeLayer = 0;
+	    		String crsSourceLayer = null;
+	    		String crsTargetLayer = null;
+	    		String detailsLayer = "";
+	    		
+				if(panel.getCapaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"recents_transformation"))){
+					String[] transform = ((String)panel.getCapaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getRecentsTrPanel().selectedRowTable,0)).split(":");
+					
+					authorityLayer = PluginServices.getText(this, transform[0]);						
+					nameLayer = (String)panel.getCapaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getRecentsTrPanel().selectedRowTable,1);
+					crsSourceLayer = (String)panel.getCapaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getRecentsTrPanel().selectedRowTable,2);
+					crsTargetLayer = (String)panel.getCapaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getRecentsTrPanel().selectedRowTable,3);
+					detailsLayer = (String)panel.getCapaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getRecentsTrPanel().selectedRowTable,4);
+				}
+				else if(panel.getCapaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_epsg"))){
+					authorityLayer = "EPSG";
+		    		nameLayer = (String)panel.getCapaTrPanel().getEpsgTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getEpsgTrPanel().selectedRowTable,1);
+		    		codeLayer = panel.getCapaTrPanel().getEpsgTrPanel().getTransformation_code();
+		    		crsSourceLayer = "EPSG:"+String.valueOf(panel.getCapaTrPanel().getEpsgTrPanel().getSource()); 	    			
+		    		crsTargetLayer = "EPSG:"+String.valueOf(panel.getCapaTrPanel().getEpsgTrPanel().getTarget()); 	    			
+		    		detailsLayer = (String)panel.getCapaTrPanel().getEpsgTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getEpsgTrPanel().selectedRowTable,5);
+		    		
+				}
+				else if(panel.getCapaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_manual"))){
+					authorityLayer = "USR";
+		    		nameLayer = PluginServices.getText(this,"manual");
+		    		codeLayer = 0;
+		    		crsSourceLayer = panel.getCapaTrPanel().getManualTrPanel().getSourceAbrev();
+		    		crsTargetLayer = panel.getCapaTrPanel().getManualTrPanel().getTargetAbrev();
+		    		detailsLayer = panel.getCapaTrPanel().getManualTrPanel().getValues();
+				}
+				else if(panel.getCapaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"nadgrids"))){
+					authorityLayer = "NADGR";
+		    		nameLayer = "----";
+		    		codeLayer = 0;
+		    		crsSourceLayer = panel.getCapaTrPanel().getNadsTrPanel().getSourceAbrev();
+		    		crsTargetLayer = panel.getCapaTrPanel().getNadsTrPanel().getTargetAbrev();
+		    		detailsLayer = panel.getCapaTrPanel().getNadsTrPanel().getNadFile()+ " ("+panel.getCapaTrPanel().getNadsTrPanel().getSourceAbrev() +")";
+				}		    		 
+	    		TrData trDataLayer = new TrData(authorityLayer,codeLayer,nameLayer,crsSourceLayer,crsTargetLayer,detailsLayer);
+	    		
+	    		String authorityView = null;
+	    		String nameView = null;
+	    		int codeView = 0;
+	    		String crsSourceView = null;
+	    		String crsTargetView = null;
+	    		String detailsView = "";
+	    		
+				if(panel.getVistaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"recents_transformation"))){
+					String[] transform = ((String)panel.getVistaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getRecentsTrPanel().selectedRowTable,0)).split(":");
+					
+					authorityView = PluginServices.getText(this, transform[0]);						
+					nameView = (String)panel.getVistaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getRecentsTrPanel().selectedRowTable,1);
+					crsSourceView = (String)panel.getVistaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getRecentsTrPanel().selectedRowTable,2);
+					crsTargetView = (String)panel.getVistaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getRecentsTrPanel().selectedRowTable,3);
+					detailsView = (String)panel.getVistaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getRecentsTrPanel().selectedRowTable,4);
+				}
+				else if(panel.getVistaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_epsg"))){
+					authorityView = "EPSG";
+		    		nameView = (String)panel.getVistaTrPanel().getEpsgTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getEpsgTrPanel().selectedRowTable,1);
+		    		codeView = panel.getVistaTrPanel().getEpsgTrPanel().getTransformation_code();
+		    		crsSourceView = "EPSG:"+String.valueOf(panel.getVistaTrPanel().getEpsgTrPanel().getSource()); 	    			
+		    		crsTargetView = "EPSG:"+String.valueOf(panel.getVistaTrPanel().getEpsgTrPanel().getTarget()); 	    			
+		    		detailsView = (String)panel.getVistaTrPanel().getEpsgTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getEpsgTrPanel().selectedRowTable,5);
+		    		
+				}
+				else if(panel.getVistaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_manual"))){
+					authorityView = "USR";
+		    		nameView = PluginServices.getText(this,"manual");
+		    		codeView = 0;
+		    		crsSourceView = panel.getVistaTrPanel().getManualTrPanel().getSourceAbrev();
+		    		crsTargetView = panel.getVistaTrPanel().getManualTrPanel().getTargetAbrev();
+		    		detailsView = panel.getVistaTrPanel().getManualTrPanel().getValues();
+				}
+				else if(panel.getVistaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"nadgrids"))){
+					authorityView = "NADGR";
+		    		nameView = "----";
+		    		codeView = 0;
+		    		crsSourceView = panel.getVistaTrPanel().getNadsTrPanel().getSourceAbrev();
+		    		crsTargetView = panel.getVistaTrPanel().getNadsTrPanel().getTargetAbrev();
+		    		detailsView = panel.getVistaTrPanel().getNadsTrPanel().getNadFile()+ " ("+panel.getVistaTrPanel().getNadsTrPanel().getTargetAbrev() +")";
+		    	}		    		 
+	    		TrData trDataView = new TrData(authorityView,codeView,nameView,crsSourceView,crsTargetView,detailsView);
+	    		CompTrData comp = new CompTrData(trDataLayer, trDataView);
+	    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+	    		trPersistence.addTrData(comp);
+			}
+			else{
+				panel.setSin_tr(true);
+				panel.setProjection(panel.getProjection());	
+				/*
+	    		 * Actualizar recientes...
+	    		 */
+	    		String authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+	    		String name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+	    		int code = ((ICrs)panel.getProjection()).getCode();
+	    		CrsData crsData = new CrsData(authority,code,name);
+	    		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+	    		persistence.addCrsData(crsData);
+			}			
+			
+			/*
+    		 * Actualizar recientes...
+    		 
+    		String authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+    		String name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+    		int code = ((ICrs)panel.getProjection()).getCode();
+    		CrsData crsData = new CrsData(authority,code,name);
+    		RecentCRSsPersistence persistence = new RecentCRSsPersistence(RecentCRSsPersistence.pluginClassInstance);
+    		persistence.addCrsData(crsData);*/
+			
+			PluginServices.getMDIManager().closeWindow(panel);
+		}
+		
+		if(	e.getSource() == panel.getJButtonBefore()){
+			CardLayout cl = (CardLayout)(panel.getJPanelMain().getLayout());		    
+			if(panel.getNewSelection().equals(PluginServices.getText(this, "transformacion_compuesta")) && panel.isVista_tr()) {	
+				cl.show(panel.getJPanelMain(), "capa");
+				panel.setVista_tr(false);	        	
+				panel.getJButtonNext().setEnabled(true);
+				panel.getJButtonAccept().setEnabled(false);
+			    panel.getJButtonBefore().setEnabled(true);
+			} else {
+				cl.show(panel.getJPanelMain(), "primero");
+			    if (!panel.getDataSource().equals(PluginServices.getText(this,"recientes"))){
+					panel.setEpsg_tr(false);
+		        	panel.setNads_tr(false);
+		        	panel.setManual_tr(false);
+		        	panel.setRecents_tr(false);
+		        	panel.setCapa_tr(false);
+		        	panel.setVista_tr(false);		        	
+			    }
+			    /**
+			     * mirar si el panel es el de recientes, el item seleccionado
+			     * y actualizar estado de los botones...
+			     */
+			    else {
+			    	panel.setEpsg_tr(false);
+		        	panel.setNads_tr(false);
+		        	panel.setManual_tr(false);
+		        	panel.setRecents_tr(false);
+		        	panel.setCapa_tr(false);
+		        	panel.setVista_tr(false);
+		        	int sel = panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable;
+		        	panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getJTable().setRowSelectionInterval(0, 0);
+		        	panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getJTable().setRowSelectionInterval(sel, sel);
+			    }
+			    
+			   //panel.getJButtonAccept().setEnabled(false);
+	        	//panel.getJButtonNext().setEnabled(true);			    
+			    panel.getJButtonBefore().setEnabled(false);
+			}
+		}
+		
+		if(	e.getSource() == panel.getJButtonCancel()){
+			panel.setCancelYes(true);
+			panel.setProjection(panel.getCrsfirst());
+			PluginServices.getMDIManager().closeWindow(panel);
+		}
+
+		if(	e.getSource() == panel.getJButtonNext()){
+			panel.getJButtonNext().setEnabled(false);
+			//panel.getJButtonAccept().setEnabled(true);
+			panel.getJButtonBefore().setEnabled(true);
+			if (panel.getNewSelection().equals(PluginServices.getText(this,"transformacion_manual"))) {
+				CardLayout cl = (CardLayout)(panel.getJPanelMain().getLayout());
+				if (panel.getDataSource().equals(PluginServices.getText(this,"EPSG"))){
+					panel.getManualTrPanel().setWKT(panel.getCrsMainPanel().getEpsgPanel().getWKT());
+					panel.getManualTrPanel().setCode(panel.getCrsMainPanel().getEpsgPanel().epsg_code);
+					panel.getManualTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"recientes"))) {
+					if (panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs() instanceof CrsGT) {
+						panel.getManualTrPanel().setWKT(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs());
+					}
+					else {
+						panel.getManualTrPanel().setWKT(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs().getWKT());
+					}
+					/**
+					 * En el caso de haber elegido un crs con transformacion reciente
+					 * vamos a cargar los datos.
+					 */
+					if (!((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3)).equals(PluginServices.getText(this, "sin_transformacion"))) {
+						if (getCorrectOption().equals(PluginServices.getText(this, "USR")))
+							panel.getManualTrPanel().fillData((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+						else
+							panel.getManualTrPanel().resetData();
+					} else
+						panel.getManualTrPanel().resetData();
+					panel.getManualTrPanel().setCode(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+					panel.getManualTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"IAU2000"))) {
+					panel.getManualTrPanel().setWKT(panel.getCrsMainPanel().getIauPanel().getWKT());
+					panel.getManualTrPanel().setCode(panel.getCrsMainPanel().getIauPanel().getCodeCRS());
+					panel.getManualTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"ESRI"))) {
+					panel.getManualTrPanel().setWKT(panel.getCrsMainPanel().getEsriPanel().getWKT());
+					panel.getManualTrPanel().setCode(panel.getCrsMainPanel().getEsriPanel().getCodeCRS());
+					panel.getManualTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"newCRS"))) {
+					panel.getManualTrPanel().setWKT(panel.getCrsMainPanel().getNewCrsPanel().getWKT());
+					panel.getManualTrPanel().setCode(panel.getCrsMainPanel().getNewCrsPanel().getCodeCRS());
+					panel.getManualTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				if(!panel.getManualTrPanel().getStatus()) {
+					panel.getJButtonAccept().setEnabled(false);
+				}
+				panel.setManual_tr(true);
+			    cl.show(panel.getJPanelMain(), "manual");		    
+			}		
+			else if(panel.getNewSelection().equals(PluginServices.getText(this,"nadgrids"))){
+				CardLayout cl = (CardLayout)(panel.getJPanelMain().getLayout());
+				if (panel.getDataSource().equals(PluginServices.getText(this,"EPSG"))){
+					panel.getNadsTrPanel().setWKT(panel.getCrsMainPanel().getEpsgPanel().getWKT());
+					panel.getNadsTrPanel().setSourceAbrev(PluginServices.getText(this,"EPSG"), ""+panel.getCrsMainPanel().getEpsgPanel().epsg_code);
+					panel.getNadsTrPanel().setCode(panel.getCrsMainPanel().getEpsgPanel().epsg_code);
+					panel.getNadsTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"recientes"))) {
+					panel.getNadsTrPanel().setWKT(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs().getWKT());
+					String sour = (String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable,0);		        	
+					panel.getNadsTrPanel().setSourceAbrev(PluginServices.getText(this,sour), ""+panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+					panel.getNadsTrPanel().setCode(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+					panel.getNadsTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+					/**
+					 * En el caso de haber elegido un crs con transformacion reciente
+					 * vamos a cargar los datos.
+					 */
+					if (!((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3)).equals(PluginServices.getText(this, "sin_transformacion"))) {
+						if (getCorrectOption().equals(PluginServices.getText(this, "NADGR")))
+							panel.getNadsTrPanel().fillData((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+						else
+							panel.getNadsTrPanel().resetData();
+					} else
+						panel.getNadsTrPanel().resetData();
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"IAU2000"))) {
+					panel.getNadsTrPanel().setWKT(panel.getCrsMainPanel().getIauPanel().getWKT());
+					panel.getNadsTrPanel().setSourceAbrev(PluginServices.getText(this,"IAU2000"), ""+panel.getCrsMainPanel().getIauPanel().getCodeCRS());
+					panel.getNadsTrPanel().setCode(panel.getCrsMainPanel().getIauPanel().getCodeCRS());
+					panel.getNadsTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"ESRI"))) {
+					panel.getNadsTrPanel().setWKT(panel.getCrsMainPanel().getEsriPanel().getWKT());
+					panel.getNadsTrPanel().setSourceAbrev(PluginServices.getText(this,"ESRI"), ""+panel.getCrsMainPanel().getEsriPanel().getCodeCRS());
+					panel.getNadsTrPanel().setCode(panel.getCrsMainPanel().getEsriPanel().getCodeCRS());
+					panel.getNadsTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"newCRS"))) {
+					panel.getNadsTrPanel().setWKT(panel.getCrsMainPanel().getNewCrsPanel().getWKT());
+					panel.getNadsTrPanel().setSourceAbrev(PluginServices.getText(this,"USR"), ""+panel.getCrsMainPanel().getNewCrsPanel().getCodeCRS());
+					panel.getNadsTrPanel().setCode(panel.getCrsMainPanel().getNewCrsPanel().getCodeCRS());
+					panel.getNadsTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				if (panel.getNadsTrPanel().getJComboNadFile().getSelectedIndex() == 0)
+					panel.getJButtonAccept().setEnabled(false);
+				else panel.getJButtonAccept().setEnabled(true);
+				panel.setNads_tr(true);
+			    cl.show(panel.getJPanelMain(), "nad");		    
+			}
+			else if(panel.getNewSelection().equals(PluginServices.getText(this,"transformacion_epsg"))){
+				CardLayout cl = (CardLayout)(panel.getJPanelMain().getLayout());
+				if (panel.getDataSource().equals(PluginServices.getText(this,"EPSG"))){
+					panel.getEpsgTrPanel().setWKT(panel.getCrsMainPanel().getEpsgPanel().getWKT());
+					panel.getEpsgTrPanel().setSource(PluginServices.getText(this,"EPSG"),panel.getCrsMainPanel().getEpsgPanel().epsg_code);
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"recientes"))) {
+					panel.getEpsgTrPanel().setWKT(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs().getWKT());
+					String sour = (String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable,0);		        	
+					panel.getEpsgTrPanel().setSource(PluginServices.getText(this,sour),panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+					/**
+					 * En el caso de haber elegido un crs con transformacion reciente
+					 * vamos a cargar los datos.
+					 */
+					if (!((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3)).equals(PluginServices.getText(this, "sin_transformacion"))) {
+						if (getCorrectOption().equals(PluginServices.getText(this, "EPSG")))
+							panel.getEpsgTrPanel().fillData((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+						else
+							panel.getEpsgTrPanel().resetData();
+					} else
+						panel.getEpsgTrPanel().resetData();
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"IAU2000"))) {
+					panel.getEpsgTrPanel().setWKT(panel.getCrsMainPanel().getIauPanel().getWKT());
+					panel.getEpsgTrPanel().setSource(PluginServices.getText(this,"IAU2000"),panel.getCrsMainPanel().getIauPanel().getCodeCRS());					
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"ESRI"))) {
+					panel.getEpsgTrPanel().setWKT(panel.getCrsMainPanel().getEsriPanel().getWKT());
+					panel.getEpsgTrPanel().setSource(PluginServices.getText(this,"ESRI"),panel.getCrsMainPanel().getEsriPanel().getCodeCRS());					
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"newCRS"))) {
+					panel.getEpsgTrPanel().setWKT(panel.getCrsMainPanel().getNewCrsPanel().getWKT());
+					panel.getEpsgTrPanel().setSource(PluginServices.getText(this,"USR"),panel.getCrsMainPanel().getNewCrsPanel().getCodeCRS());					
+				}
+				
+				int numr = panel.getEpsgTrPanel().dtm.getRowCount();
+				if (numr == 0 )
+					panel.getJButtonAccept().setEnabled(false);
+				panel.setEpsg_tr(true);				
+			    cl.show(panel.getJPanelMain(), "epsg");		    			
+			}
+			/*
+			 * Parte necesaria para la transformacion reciente, cuando se vaya a cargar
+			 * el panel, tendremos que ver que hay que pasarle.
+			 */
+			else if(panel.getNewSelection().equals(PluginServices.getText(this, "recents_transformation"))) {
+				CardLayout cl = (CardLayout)(panel.getJPanelMain().getLayout());
+				if (panel.getDataSource().equals(PluginServices.getText(this,"EPSG"))){
+					panel.getRecentsTrPanel().setWKT(panel.getCrsMainPanel().getEpsgPanel().getWKT());
+					panel.getRecentsTrPanel().loadRecents(PluginServices.getText(this,"EPSG")+":"+panel.getCrsMainPanel().getEpsgPanel().getCodeCRS(),panel.getCrsWkt_target().getAuthority()[0]+":"+panel.getCrsWkt_target().getAuthority()[1]);
+					//panel.getRecentsTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"recientes"))) {
+					panel.getRecentsTrPanel().setWKT(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs().getWKT());
+					String sour = (String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable,0);		        	
+					panel.getRecentsTrPanel().loadRecents(PluginServices.getText(this,sour)+":"+panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS(),panel.getCrsWkt_target().getAuthority()[0]+":"+panel.getCrsWkt_target().getAuthority()[1]);
+					//panel.getRecentsTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"IAU2000"))) {
+					panel.getRecentsTrPanel().setWKT(panel.getCrsMainPanel().getIauPanel().getWKT());
+					panel.getRecentsTrPanel().loadRecents(PluginServices.getText(this,"IAU2000")+":"+panel.getCrsMainPanel().getIauPanel().getCodeCRS(),panel.getCrsWkt_target().getAuthority()[0]+":"+panel.getCrsWkt_target().getAuthority()[1]);					
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"ESRI"))) {
+					panel.getRecentsTrPanel().setWKT(panel.getCrsMainPanel().getEsriPanel().getWKT());
+					panel.getRecentsTrPanel().loadRecents(PluginServices.getText(this,"ESRI")+":"+panel.getCrsMainPanel().getEsriPanel().getCodeCRS(),panel.getCrsWkt_target().getAuthority()[0]+":"+panel.getCrsWkt_target().getAuthority()[1]);					
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"newCRS"))) {
+					panel.getRecentsTrPanel().setWKT(panel.getCrsMainPanel().getNewCrsPanel().getWKT());
+					panel.getRecentsTrPanel().loadRecents(PluginServices.getText(this,"USR")+":"+panel.getCrsMainPanel().getNewCrsPanel().getCodeCRS(),panel.getCrsWkt_target().getAuthority()[0]+":"+panel.getCrsWkt_target().getAuthority()[1]);					
+				}
+				
+				int numr = panel.getRecentsTrPanel().dtm.getRowCount();
+				if (numr == 0 )
+					panel.getJButtonAccept().setEnabled(false);
+				panel.setRecents_tr(true);				
+			    cl.show(panel.getJPanelMain(), "recents");
+			}
+			//Si se selecciona la opcin de transformacin compuesta
+			else if(panel.getNewSelection().equals(PluginServices.getText(this, "transformacion_compuesta"))) {
+				//vamos a definir los crs fuentes para los dos paneles para
+				//las transformaciones de la capa y la vista
+				if (!panel.isCapa_tr()) {
+					if (panel.getDataSource().equals(PluginServices.getText(this,"EPSG"))){
+						panel.getCapaTrPanel().setCrs_source(PluginServices.getText(this,"EPSG")+":"+panel.getCrsMainPanel().getEpsgPanel().epsg_code);
+						panel.getVistaTrPanel().setCrs_source(PluginServices.getText(this,"EPSG")+":"+panel.getCrsMainPanel().getEpsgPanel().epsg_code);
+						panel.getCapaTrPanel().fillData();
+						panel.getVistaTrPanel().fillData();
+					}
+					else if (panel.getDataSource().equals(PluginServices.getText(this,"recientes"))) {
+						String sour = (String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable,0);					
+						panel.getCapaTrPanel().setCrs_source(PluginServices.getText(this,sour)+":"+panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+						panel.getVistaTrPanel().setCrs_source(PluginServices.getText(this,sour)+":"+panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+						panel.getCapaTrPanel().fillData();
+						panel.getVistaTrPanel().fillData();
+						/**
+						 * En el caso de haber elegido un crs con transformacion reciente
+						 * vamos a cargar los datos.
+						 */
+						if (!((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3)).equals(PluginServices.getText(this, "sin_transformacion"))) {
+							if (getCorrectOption().equals(PluginServices.getText(this, "COMP"))) {
+								panel.getCapaTrPanel().fillData((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+								panel.getVistaTrPanel().fillData((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+								panel.getJButtonAccept().setEnabled(true);								
+							} else {
+								panel.getCapaTrPanel().resetData();
+								panel.getVistaTrPanel().resetData();
+							}							
+						} else {
+							panel.getCapaTrPanel().resetData();
+							panel.getVistaTrPanel().resetData();
+						}
+					}
+					else if (panel.getDataSource().equals(PluginServices.getText(this,"IAU2000"))) {
+						panel.getCapaTrPanel().setCrs_source(PluginServices.getText(this,"IAU2000")+":"+panel.getCrsMainPanel().getIauPanel().getCodeCRS());
+						panel.getVistaTrPanel().setCrs_source(PluginServices.getText(this,"IAU2000")+":"+panel.getCrsMainPanel().getIauPanel().getCodeCRS());
+						panel.getCapaTrPanel().fillData();
+						panel.getVistaTrPanel().fillData();
+					}
+					else if (panel.getDataSource().equals(PluginServices.getText(this,"ESRI"))) {
+						panel.getCapaTrPanel().setCrs_source(PluginServices.getText(this,"ESRI")+":"+panel.getCrsMainPanel().getEsriPanel().getCodeCRS());
+						panel.getVistaTrPanel().setCrs_source(PluginServices.getText(this,"ESRI")+":"+panel.getCrsMainPanel().getEsriPanel().getCodeCRS());
+						panel.getCapaTrPanel().fillData();
+						panel.getVistaTrPanel().fillData();
+					}
+					else if (panel.getDataSource().equals(PluginServices.getText(this,"newCRS"))) {
+						panel.getCapaTrPanel().setCrs_source(PluginServices.getText(this,"USR")+":"+panel.getCrsMainPanel().getNewCrsPanel().getCodeCRS());
+						panel.getVistaTrPanel().setCrs_source(PluginServices.getText(this,"USR")+":"+panel.getCrsMainPanel().getNewCrsPanel().getCodeCRS());
+						panel.getCapaTrPanel().fillData();
+						panel.getVistaTrPanel().fillData();
+					}		
+				}
+				
+				if(panel.isCapa_tr()){
+					//En este caso se esta mostrando el panel de seleccion de la transformacin de la capa
+					panel.setVista_tr(true);					
+					panel.getVistaTrPanel().setSourceTransformation(panel.getCapaTrPanel().getSourceTransformation());
+					CardLayout cl = (CardLayout)(panel.getJPanelMain().getLayout());
+					cl.show(panel.getJPanelMain(), "vista");
+					panel.getJButtonNext().setEnabled(false);
+					if (panel.getVistaTrPanel().isSthSelected())
+						panel.getJButtonAccept().setEnabled(true);
+				}else{					
+					if (panel.getCapaTrPanel().getRecentCompTransformation()) {
+						panel.getJButtonAccept().setEnabled(true);
+						panel.getJButtonNext().setEnabled(true);
+					}
+					else {
+						panel.getJButtonAccept().setEnabled(false);
+						if (panel.getCapaTrPanel().isSthSelected())
+							panel.getJButtonNext().setEnabled(true);
+					}
+					panel.setCompuesta_tr(true);
+					panel.setEpsg_tr(false);
+					panel.setNads_tr(false);
+					panel.setManual_tr(false);
+					panel.setRecents_tr(false);
+					panel.setCapa_tr(true);					
+					CardLayout cl = (CardLayout)(panel.getJPanelMain().getLayout());
+					cl.show(panel.getJPanelMain(), "capa");
+				}
+			}
+			
+		}	
+		if(	e.getSource() == panel.getJComboOptions()){
+			JComboBox cb = (JComboBox)e.getSource();
+			panel.setNewSelection((String)cb.getSelectedItem());
+		    if (panel.getNewSelection().equals(PluginServices.getText(this,"sin_transformacion"))){
+				panel.getJButtonAccept().setEnabled(true);
+				panel.getJButtonNext().setEnabled(false);
+				panel.setEpsg_tr(false);
+				panel.setNads_tr(false);
+				panel.setManual_tr(false);
+				panel.setRecents_tr(false);
+				panel.setCapa_tr(false);
+				panel.setCompuesta_tr(false);
+				panel.setVista_tr(false);
+			}
+		    else {
+		    	if (panel.getNewSelection().equals(PluginServices.getText(this,"recents_transformation"))) {
+		    		panel.setEpsg_tr(false);
+					panel.setNads_tr(false);
+					panel.setManual_tr(false);
+					panel.setRecents_tr(true);
+					panel.setCapa_tr(false);
+					panel.setCompuesta_tr(false);
+					panel.setVista_tr(false);
+		    	}
+		    	else if (panel.getNewSelection().equals(PluginServices.getText(this,"transformacion_epsg"))) {
+		    		panel.setEpsg_tr(true);
+					panel.setNads_tr(false);
+					panel.setManual_tr(false);
+					panel.setRecents_tr(false);
+					panel.setCapa_tr(false);
+					panel.setCompuesta_tr(false);
+					panel.setVista_tr(false);
+		    	}
+		    	else if (panel.getNewSelection().equals(PluginServices.getText(this,"transformacion_manual"))) {
+		    		panel.setEpsg_tr(false);
+					panel.setNads_tr(false);
+					panel.setManual_tr(true);
+					panel.setRecents_tr(false);
+					panel.setCapa_tr(false);
+					panel.setCompuesta_tr(false);
+					panel.setVista_tr(false);
+		    	}
+		    	else if (panel.getNewSelection().equals(PluginServices.getText(this,"transformacion_compuesta"))) {
+		    		panel.setEpsg_tr(false);
+					panel.setNads_tr(false);
+					panel.setManual_tr(false);
+					panel.setRecents_tr(false);
+					panel.setCapa_tr(false);
+					panel.setCompuesta_tr(true);
+					panel.setVista_tr(false);
+		    	}
+		    	else if (panel.getNewSelection().equals(PluginServices.getText(this,"nadgrids"))) {
+		    		panel.setEpsg_tr(false);
+					panel.setNads_tr(true);
+					panel.setManual_tr(false);
+					panel.setRecents_tr(false);
+					panel.setCapa_tr(false);
+					panel.setCompuesta_tr(false);
+					panel.setVista_tr(false);
+		    	}
+		    	panel.getJButtonAccept().setEnabled(false);
+		    	panel.getJButtonNext().setEnabled(true);
+		    }
+		}
+		if(	e.getSource() == panel.getRecentsTrPanel().getJButtonInfo()){
+			String[] data = new String[5];
+			data[0] = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0);
+			data[1] = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,1);
+			data[2] = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,2);
+			data[3] = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,3);
+			data[4] = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4);
+			
+			//Mostrar el panel de informacin de las transformaciones recientes
+			//InfoTransformationsRecentsPanel info = new InfoTransformationsRecentsPanel(data);
+			InfoCRSPanel info = new InfoCRSPanel(data[2].split(":")[0], Integer.parseInt(data[2].split(":")[1]) , data[0]+" <--> "+ data[4]);
+			PluginServices.getMDIManager().addWindow(info);
+		}
+	}
+	
+	/**
+	 * Metodo que nos servira para conocer si tras la seleccion de crs mas la
+	 * transformacion, hemos decidido cambiar de transformacion
+	 * @return
+	 */
+	private String getCorrectOption (){
+		String item = ((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+		if (item.startsWith(PluginServices.getText(this, "EPSG"))) {
+			return "EPSG";
+		}
+		else if (item.startsWith(PluginServices.getText(this, "NADGR"))) {
+			return "NADGR";
+		}
+		else if (item.startsWith(PluginServices.getText(this, "USR"))) {
+			return "USR";
+		}
+		else if (item.startsWith(PluginServices.getText(this, "COMP"))) {
+			return "COMP";
+		}
+		return "";
+	}
+
+	/**
+	 * Manejador de los eventos relacionados al cambio de valor
+	 * dentro de las tablas del panel de tranformaciones.
+	 */
+	public void valueChanged(ListSelectionEvent e) {
+		if (e.getSource() == panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+	        if (lsm.isSelectionEmpty()) {
+	        	panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable = -1;
+	        	panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().setCodeCRS(-1);
+	        	panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getInfoCrs().setEnabled(false);
+	        	panel.getJButtonAccept().setEnabled(false);		        	
+	        	panel.getJComboOptions().setEnabled(false); 
+	        	panel.getJButtonNext().setEnabled(false);
+	        	panel.getJComboOptions().setSelectedIndex(0);	        	
+	        } 
+	        else {
+	        	panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().initCrs();		        			        	
+	        	panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getInfoCrs().setEnabled(true);
+	        	if (((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3)).equals(PluginServices.getText(this, "sin_transformacion"))) {
+	        		if (panel.getJComboOptions().getSelectedIndex() == 0) {
+	        			panel.getJButtonAccept().setEnabled(true);
+	        			panel.getJButtonNext().setEnabled(false);
+	        		} else{
+	        			panel.getJButtonAccept().setEnabled(false);
+	        			panel.getJButtonNext().setEnabled(true);
+	        		}
+	        	} else {
+	        		String option = getCorrectItem();
+	        		if (option.equals("USR")) {
+	        			if (panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs() instanceof CrsGT) {
+							panel.getManualTrPanel().setWKT(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs());
+						}
+						else {
+							panel.getManualTrPanel().setWKT(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs().getWKT());
+						}						
+						panel.getManualTrPanel().setCode(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+						panel.getManualTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+					
+	        			/**
+	        			 * Rellenamos los datos con anterioridad para si acepta poder
+	        			 * reutilizar el mecanismo que ya tenemos.
+	        			 */
+						panel.getManualTrPanel().fillData((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+						panel.setManual_tr(true);
+						panel.setEpsg_tr(false);
+						panel.setNads_tr(false);
+						panel.setRecents_tr(false);
+						panel.setCompuesta_tr(false);
+					} else if (option.equals("EPSG")) {
+						panel.getEpsgTrPanel().setWKT(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs().getWKT());
+						String sour = (String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable,0);		        	
+						panel.getEpsgTrPanel().setSource(PluginServices.getText(this,sour),panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+						
+						panel.getEpsgTrPanel().fillData((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+						
+						panel.setManual_tr(false);
+						panel.setEpsg_tr(true);
+						panel.setNads_tr(false);
+						panel.setRecents_tr(false);
+						panel.setCompuesta_tr(false);
+					} else if (option.equals("NADGR")) {
+						panel.getNadsTrPanel().setWKT(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs().getWKT());
+						String sour = (String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable,0);		        	
+						panel.getNadsTrPanel().setSourceAbrev(PluginServices.getText(this,sour), ""+panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+						panel.getNadsTrPanel().setCode(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+						panel.getNadsTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+						
+						panel.getNadsTrPanel().fillData((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+						
+						panel.setManual_tr(false);
+						panel.setEpsg_tr(false);
+						panel.setNads_tr(true);
+						panel.setRecents_tr(false);
+						panel.setCompuesta_tr(false);
+						
+					} else if (option.equals("COMP")) {
+						String sour = (String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable,0);					
+						panel.getCapaTrPanel().setCrs_source(PluginServices.getText(this,sour)+":"+panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+						panel.getVistaTrPanel().setCrs_source(PluginServices.getText(this,sour)+":"+panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCodeCRS());
+						panel.getCapaTrPanel().fillData();
+						panel.getVistaTrPanel().fillData();
+						panel.getCapaTrPanel().fillData((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+						panel.getVistaTrPanel().fillData((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+						panel.setManual_tr(false);
+						panel.setEpsg_tr(false);
+						panel.setNads_tr(false);
+						panel.setRecents_tr(false);
+						panel.setCompuesta_tr(true);
+						
+					}
+	        		panel.getJButtonNext().setEnabled(true);
+	        		panel.getJButtonAccept().setEnabled(true);
+	        	}
+	        	panel.getJComboOptions().setEnabled(true);
+        		 		
+	        }
+		}
+		
+		if (e.getSource() == panel.getCrsMainPanel().getEpsgPanel().getJTable().getSelectionModel()){
+			String[] not_soported = {"engineering", "vertical", "compound", "geocentric", "geographic 3D"};
+			boolean soported = true;
+			boolean soported2 = false;
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+			if (lsm.isSelectionEmpty()) {
+				panel.getCrsMainPanel().getEpsgPanel().selectedRowTable = -1;
+				panel.getCrsMainPanel().getEpsgPanel().setCodeCRS(-1);
+	        	panel.getJButtonAccept().setEnabled(false);
+	        	panel.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(false);
+	        	panel.getJComboOptions().setEnabled(false);
+	        	panel.getJButtonNext().setEnabled(false);
+	        	panel.getJComboOptions().setSelectedIndex(0);	        
+			}
+			else {
+				panel.getCrsMainPanel().getEpsgPanel().selectedRowTable = lsm.getMinSelectionIndex();	        	
+	        	String crs_kind = (String)panel.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(panel.getCrsMainPanel().getEpsgPanel().selectedRowTable,2);
+	        	for (int i = 0; i < not_soported.length; i++) {
+	        		if (crs_kind.equals(not_soported[i])) 
+	        			soported = false;	        		
+	        	}
+	        	for (int i=0; i< valid_method_code.length;i++) {
+	        		if (panel.getCrsMainPanel().getEpsgPanel().getProjectionCode((String)panel.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(panel.getCrsMainPanel().getEpsgPanel().selectedRowTable,0)) == valid_method_code[i]) {
+	        			soported2 = true;
+	        		}
+	        	}
+	        	if (crs_kind.equals("geographic 2D")) {
+	        		soported2 = true;
+	        	}
+	        	if (soported && soported2){
+	        		panel.getCrsMainPanel().getEpsgPanel().setCodeCRS(Integer.parseInt((String)panel.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(panel.getCrsMainPanel().getEpsgPanel().selectedRowTable,0)));
+	        		panel.getCrsMainPanel().getEpsgPanel().setWKT();        		
+	        		panel.getJButtonAccept().setEnabled(true);
+	            	int base = panel.getCrsMainPanel().getEpsgPanel().getCodeCRS();						
+					//panel.compareDatum(panel.getCrsMainPanel().getEpsgPanel().getWKT());
+	            	IWindow activeWindow = PluginServices.getMDIManager().getActiveWindow();
+			    	BaseView activeView = (com.iver.cit.gvsig.project.documents.view.gui.View) activeWindow;
+			    	String authority = ((ICrs) activeView.getMapControl().getProjection()).getCrsWkt().getAuthority()[0];
+	            	/*if (authority.equals("EPSG")){
+	            		panel.getJComboOptions().setEnabled(true);
+	            		panel.getJButtonAccept().setEnabled(true);
+	            	}
+	            	else {
+		        		panel.getJComboOptions().setSelectedIndex(0);	        		
+		        		panel.getJComboOptions().setEnabled(false);
+		        		panel.getJButtonAccept().setEnabled(true);
+		        		panel.getJButtonAccept().setEnabled(true);	        			        		
+		        		panel.getJButtonNext().setEnabled(false);
+		        	}	*/  
+			    	panel.getJComboOptions().setEnabled(true);
+            		panel.getJButtonAccept().setEnabled(true);
+	        		panel.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(true);
+	        	}
+	        	else {
+	        		JOptionPane.showMessageDialog(panel, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+	        		panel.getCrsMainPanel().getEpsgPanel().setCodeCRS(-1);
+	        		panel.getCrsMainPanel().getEpsgPanel().setCodeCRS(0);
+	        		panel.getJButtonAccept().setEnabled(false);
+	        		panel.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(false);
+	        	}	        				        	  
+		    } 
+		}
+		
+		if (e.getSource() == panel.getCrsMainPanel().getIauPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();				
+			String[] not_soported = {"Oblique_Cylindrical_Equal_Area"};
+			boolean soported = true;
+	        if (lsm.isSelectionEmpty()) {
+	        	panel.getCrsMainPanel().getIauPanel().selectedRowTable = -1;
+	        	panel.getCrsMainPanel().getIauPanel().setCodeCRS(-1);
+	        	panel.getCrsMainPanel().getIauPanel().getInfoCrs().setEnabled(false);
+	        	panel.getJButtonAccept().setEnabled(false);		        	
+	        	panel.getJComboOptions().setEnabled(false);     
+	        	panel.getJButtonNext().setEnabled(false);
+	        	panel.getJComboOptions().setSelectedIndex(0);	        	
+	        } 
+	        else {        	
+	        	panel.getCrsMainPanel().getIauPanel().selectedRowTable = lsm.getMinSelectionIndex();
+	        	panel.getCrsMainPanel().getIauPanel().setCodeCRS(Integer.parseInt((String)panel.getCrsMainPanel().getIauPanel().sorter.getValueAt(panel.getCrsMainPanel().getIauPanel().selectedRowTable,0)));
+	        	panel.getCrsMainPanel().getIauPanel().setWKT();
+	        	CrsWkt crs = new CrsWkt(panel.getCrsMainPanel().getIauPanel().getWKT());
+	        	String crs_kind = crs.getProjection();
+	        	for (int i = 0; i < not_soported.length; i++) {
+	        		if (crs_kind.equals(not_soported[i]))
+	        			soported = false;	        		
+	        	}
+	        	if (soported){
+	        		panel.getCrsMainPanel().getIauPanel().getInfoCrs().setEnabled(true);
+	        		panel.getJComboOptions().setEnabled(true);
+	        		panel.getJButtonAccept().setEnabled(true);	
+	        	}
+	        	else {
+	        		JOptionPane.showMessageDialog(panel, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+	        		panel.getCrsMainPanel().getIauPanel().setCodeCRS(-1);
+	        		panel.getCrsMainPanel().getIauPanel().setCodeCRS(0);
+	        		panel.getCrsMainPanel().getIauPanel().getInfoCrs().setEnabled(false);
+	        		panel.getJComboOptions().setEnabled(false);	        		
+	        		panel.getJButtonAccept().setEnabled(false);	        		
+	        	}	        		            	
+	        }
+		}
+		
+		if (e.getSource() == panel.getCrsMainPanel().getEsriPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();				
+			String[] not_soported = {"Oblique_Cylindrical_Equal_Area"};
+			boolean soported = true;
+	        if (lsm.isSelectionEmpty()) {
+	        	panel.getCrsMainPanel().getEsriPanel().selectedRowTable = -1;
+	        	panel.getCrsMainPanel().getEsriPanel().setCodeCRS(-1);
+	        	panel.getCrsMainPanel().getEsriPanel().getInfoCrs().setEnabled(false);
+	        	panel.getJButtonAccept().setEnabled(false);		        	
+	        	panel.getJComboOptions().setEnabled(false);     
+	        	panel.getJButtonNext().setEnabled(false);
+	        	panel.getJComboOptions().setSelectedIndex(0);	        	
+	        } 
+	        else {        	
+	        	panel.getCrsMainPanel().getEsriPanel().selectedRowTable = lsm.getMinSelectionIndex();
+	        	panel.getCrsMainPanel().getEsriPanel().setCodeCRS(Integer.parseInt((String)panel.getCrsMainPanel().getEsriPanel().sorter.getValueAt(panel.getCrsMainPanel().getEsriPanel().selectedRowTable,0)));
+	        	panel.getCrsMainPanel().getEsriPanel().setWKT();
+	        	CrsWkt crs = new CrsWkt(panel.getCrsMainPanel().getEsriPanel().getWKT());
+	        	String crs_kind = crs.getProjection();
+	        	for (int i = 0; i < not_soported.length; i++) {
+	        		if (crs_kind.equals(not_soported[i]))
+	        			soported = false;	        		
+	        	}
+	        	if (soported){
+	        		panel.getCrsMainPanel().getEsriPanel().getInfoCrs().setEnabled(true);
+	        		panel.getJComboOptions().setEnabled(true);
+	        		panel.getJButtonAccept().setEnabled(true);	
+	        	}
+	        	else {
+	        		JOptionPane.showMessageDialog(panel, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+	        		panel.getCrsMainPanel().getEsriPanel().setCodeCRS(-1);
+	        		panel.getCrsMainPanel().getEsriPanel().setCodeCRS(0);
+	        		panel.getCrsMainPanel().getEsriPanel().getInfoCrs().setEnabled(false);
+	        		panel.getJComboOptions().setEnabled(false);	        		
+	        		panel.getJButtonAccept().setEnabled(false);	        		
+	        	}	        		            	
+	        }
+		}
+		
+		if (e.getSource() == panel.getCrsMainPanel().getNewCrsPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();				
+			if (lsm.isSelectionEmpty()) {
+	        	panel.getCrsMainPanel().getNewCrsPanel().selectedRowTable = -1;
+	        	panel.getCrsMainPanel().getNewCrsPanel().setCodeCRS(-1);
+	        	panel.getCrsMainPanel().getNewCrsPanel().getInfoCrs().setEnabled(false);
+	        	panel.getCrsMainPanel().getNewCrsPanel().getBtnEditar().setEnabled(false);
+	        	panel.getCrsMainPanel().getNewCrsPanel().getBtnEliminar().setEnabled(false);
+	        	panel.getJButtonAccept().setEnabled(false);		        	
+	        	panel.getJComboOptions().setEnabled(false);     
+	        	panel.getJButtonNext().setEnabled(false);
+	        	panel.getJComboOptions().setSelectedIndex(0);	        	
+	        } 
+	        else {        	
+	        	panel.getCrsMainPanel().getNewCrsPanel().selectedRowTable = lsm.getMinSelectionIndex();
+	        	panel.getCrsMainPanel().getNewCrsPanel().setCodeCRS(Integer.parseInt((String)panel.getCrsMainPanel().getNewCrsPanel().sorter.getValueAt(panel.getCrsMainPanel().getNewCrsPanel().selectedRowTable,0)));
+	        	panel.getCrsMainPanel().getNewCrsPanel().getInfoCrs().setEnabled(true);
+	        	panel.getCrsMainPanel().getNewCrsPanel().setWKT();
+	        	panel.getCrsMainPanel().getNewCrsPanel().getBtnEditar().setEnabled(true);
+	        	panel.getCrsMainPanel().getNewCrsPanel().getBtnEliminar().setEnabled(true);
+	        	panel.getJComboOptions().setEnabled(true);        		
+	        	panel.getJButtonAccept().setEnabled(true);	        	        		            	
+	        }
+		}
+		
+		
+		if (e.getSource() == panel.getEpsgTrPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+	        if (lsm.isSelectionEmpty()) {
+	        	panel.getEpsgTrPanel().selectedRowTable = -1;	        	
+	        	panel.getJButtonAccept().setEnabled(false);
+	        } 
+	        else {
+	        	panel.getEpsgTrPanel().selectedRowTable = lsm.getMinSelectionIndex();
+	        	panel.getEpsgTrPanel().setTrasformation_code(Integer.parseInt((String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,0)));
+	            String sentence = "SELECT target_crs_code " +
+								"FROM epsg_coordoperation " +                        
+								"WHERE coord_op_code = " + panel.getEpsgTrPanel().getTransformation_code() ;
+	            ResultSet result = Query.select(sentence,panel.getEpsgTrPanel().connect.getConnection());
+	            try {
+					result.next();
+					int tar = result.getInt("target_crs_code");
+					if (tar == panel.getEpsgTrPanel().crs_target) 
+						panel.getEpsgTrPanel().inverseTranformation = false;					
+					else panel.getEpsgTrPanel().inverseTranformation = true;
+				} catch (SQLException e1) {							
+					e1.printStackTrace();
+				}
+				panel.getJButtonAccept().setEnabled(true);
+	        }
+		}
+		
+		/*
+		 * una vez cambiamos la transformacion a elegir, habra que ver que parametros
+		 * tenemos que definir para que cuando aceptemos hayan sido definidos
+		 * anteriormente
+		 */
+		if (e.getSource() == panel.getRecentsTrPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+	        if (lsm.isSelectionEmpty()) {
+	        	panel.getRecentsTrPanel().selectedRowTable = -1;
+	        	panel.getRecentsTrPanel().setCode(0);
+	        	panel.getJButtonAccept().setEnabled(false);
+	        	panel.getRecentsTrPanel().getJButtonInfo().setEnabled(false);
+	        } 
+	        else {
+	        	panel.getRecentsTrPanel().selectedRowTable = lsm.getMinSelectionIndex();
+	        	String[] cad = ((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,2)).split(":");	        	
+	        	panel.getRecentsTrPanel().setCode(Integer.parseInt(cad[1]));
+	        	String[] transformation = ((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0)).split(":");
+	        	if (transformation[0].equals("EPSG")){	        		
+	        		panel.getRecentsTrPanel().setTrCode(Integer.parseInt(transformation[1]));
+					String sentence = "SELECT target_crs_code " +
+									"FROM epsg_coordoperation " +                        
+									"WHERE coord_op_code = " + panel.getRecentsTrPanel().getTrCode();
+				    ResultSet result = Query.select(sentence,panel.getRecentsTrPanel().connect.getConnection());
+				    
+					try {
+						result.next();						
+						int tar = result.getInt("target_crs_code");
+						int crs_target = Integer.parseInt(((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,3)).split(":")[1]);
+						int crs_base = -1;
+						sentence = "SELECT source_geogcrs_code " +
+								  "FROM epsg_coordinatereferencesystem " +	                              
+	                              "WHERE coord_ref_sys_code = " + crs_target;
+						result = Query.select(sentence,panel.getRecentsTrPanel().connect.getConnection());
+						try {
+							result.next();
+							crs_base = result.getInt("source_geogcrs_code");
+						} catch (SQLException e1) {
+							crs_base = -1;
+						}						
+						
+						if (tar == crs_target || tar == crs_base) 
+							panel.getRecentsTrPanel().setInverseTransformation(false);					
+						else panel.getRecentsTrPanel().setInverseTransformation(true);
+						} catch (SQLException e1) {
+							// TODO Auto-generated catch block
+							e1.printStackTrace();
+						}	
+	        	}
+	        	panel.getRecentsTrPanel().getJButtonInfo().setEnabled(true);	        	
+	        	panel.getJButtonAccept().setEnabled(true);
+	        }
+		}
+	}
+	
+	/**
+	 * Metodo que sirve para cuando seleccionamos un crs con transformacion
+	 * salga en el combobox de las transformaciones la reciente utilizada
+	 * y actualizada
+	 * @return
+	 */
+	private String getCorrectItem (){
+		String item = ((String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable, 3));
+		if (item.startsWith(PluginServices.getText(this, "EPSG"))) {
+			panel.getJComboOptions().setSelectedIndex(2);
+			return "EPSG";
+		}
+		else if (item.startsWith(PluginServices.getText(this, "NADGR"))) {
+			panel.getJComboOptions().setSelectedIndex(5);
+			return "NADGR";
+		}
+		else if (item.startsWith(PluginServices.getText(this, "USR"))) {
+			panel.getJComboOptions().setSelectedIndex(3);
+			return "USR";
+		}
+		else if (item.startsWith(PluginServices.getText(this, "COMP"))) {
+			panel.getJComboOptions().setSelectedIndex(4);
+			return "COMP";
+		}
+		return "";
+	}	
+
+	/**
+	 * Manejador de los eventos relacionados con el cambio de opcin
+	 * dentro del combobox de eleccin de repositorio, y del combobox
+	 * de eleccin del archivo .gsb para el panel de transformacin
+	 * de nadgrids.
+	 */
+	public void itemStateChanged(ItemEvent e) {
+		if (e.getSource() == panel.getCrsMainPanel().getJComboOptions()) {
+			CardLayout cl = (CardLayout)(panel.getCrsMainPanel().getJPanelMain().getLayout());
+			String op = (String)e.getItem();		
+			if (op.equals("EPSG")){
+				String[] not_soported = {"engineering", "vertical", "compound", "geocentric", "geographic 3D"};
+				
+				boolean soported = true;
+				boolean soported2 = false;
+				panel.getCrsMainPanel().getEpsgPanel().connection();
+				if(panel.getCrsMainPanel().getEpsgPanel().getJTable().getSelectedRowCount()>0) {
+					panel.getCrsMainPanel().getEpsgPanel().selectedRowTable = panel.getCrsMainPanel().getEpsgPanel().getJTable().getSelectedRow();	        	
+		        	String crs_kind = (String)panel.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(panel.getCrsMainPanel().getEpsgPanel().selectedRowTable,2);
+		        	for (int i = 0; i < not_soported.length; i++) {
+		        		if (crs_kind.equals(not_soported[i]))
+		        			soported = false;		        		
+		        	}
+		        	for (int i=0; i< valid_method_code.length;i++) {
+		        		if (panel.getCrsMainPanel().getEpsgPanel().getProjectionCode((String)panel.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(panel.getCrsMainPanel().getEpsgPanel().selectedRowTable,0)) == valid_method_code[i]) {
+		        			soported2 = true;
+		        		}
+		        	}
+		        	if (crs_kind.equals("geographic 2D")) {
+		        		soported2 = true;
+		        	}
+		        	if (soported && soported2){
+		        		panel.getCrsMainPanel().getEpsgPanel().setCodeCRS(Integer.parseInt((String)panel.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(panel.getCrsMainPanel().getEpsgPanel().selectedRowTable,0)));
+		        		panel.getCrsMainPanel().getEpsgPanel().setWKT();        		
+		        		panel.getJButtonAccept().setEnabled(true);
+		            	int base = panel.getCrsMainPanel().getEpsgPanel().getCodeCRS();						
+						//panel.compareDatum(panel.getCrsMainPanel().getEpsgPanel().getWKT());
+		            	panel.getJComboOptions().setEnabled(true);
+		            	if (panel.getJComboOptions().getSelectedIndex() > 0) {
+				    		panel.getJButtonAccept().setEnabled(false);			
+							panel.getJButtonNext().setEnabled(true);
+							panel.getJButtonNext().setEnabled(true);
+			    		} else {
+			    			panel.getJButtonAccept().setEnabled(true);
+			    			panel.getJButtonAccept().setEnabled(true);						
+							panel.getJButtonNext().setEnabled(false);
+			    		}
+		        		//panel.getJButtonAccept().setEnabled(true);
+		        		panel.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(true);
+		        	}
+		        	else {
+		        		JOptionPane.showMessageDialog(panel, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+								JOptionPane.WARNING_MESSAGE);
+		        		panel.getCrsMainPanel().getEpsgPanel().setCodeCRS(-1);
+		        		panel.getCrsMainPanel().getEpsgPanel().setCodeCRS(0);
+		        		panel.getJButtonAccept().setEnabled(false);
+		        		panel.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(false);
+		        	}		        	
+				}
+				else{
+					panel.getJButtonNext().setEnabled(false);
+					panel.getJComboOptions().setEnabled(false);
+					panel.getJComboOptions().setSelectedIndex(0);
+					panel.getJButtonAccept().setEnabled(false);
+				}
+			} else if (op.equals("IAU2000")) {
+				panel.getCrsMainPanel().getIauPanel().connection();
+				if(panel.getCrsMainPanel().getIauPanel().getJTable().getSelectedRowCount()>0) {
+					panel.getCrsMainPanel().getIauPanel().selectedRowTable = panel.getCrsMainPanel().getIauPanel().getJTable().getSelectedRow();;
+		        	panel.getCrsMainPanel().getIauPanel().setCodeCRS(Integer.parseInt((String)panel.getCrsMainPanel().getIauPanel().sorter.getValueAt(panel.getCrsMainPanel().getIauPanel().selectedRowTable,0)));
+		        	panel.getCrsMainPanel().getIauPanel().setWKT();  
+		    		panel.getJComboOptions().setEnabled(true);
+		    		if (panel.getJComboOptions().getSelectedIndex() > 0) {
+			    		panel.getJButtonAccept().setEnabled(false);			
+						panel.getJButtonNext().setEnabled(true);
+						panel.getJButtonNext().setEnabled(true);
+		    		} else {
+		    			panel.getJButtonAccept().setEnabled(true);
+		    			panel.getJButtonAccept().setEnabled(true);						
+						panel.getJButtonNext().setEnabled(false);
+		    		}
+		    		//panel.getJButtonAccept().setEnabled(true);			
+					//panel.getJButtonNext().setEnabled(false);
+				}
+				else {
+					panel.getJButtonNext().setEnabled(false);
+					panel.getJComboOptions().setEnabled(false);
+					panel.getJComboOptions().setSelectedIndex(0);
+					panel.getJButtonAccept().setEnabled(false);
+				}
+			}
+			else if (op.equals("Recientes")) {
+				if(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getJTable().getSelectedRowCount()>0) {
+					panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().initCrs();		        	
+		        	String sour =  panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs().getCrsWkt().getAuthority()[0]; //(String)panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().selectedRowTable,0);
+		        	IWindow activeWindow = PluginServices.getMDIManager().getActiveWindow();
+			    	BaseView activeView = (com.iver.cit.gvsig.project.documents.view.gui.View) activeWindow;
+			    	String authority = ((ICrs) activeView.getMapControl().getProjection()).getCrsWkt().getAuthority()[0];
+		        	/*if (sour.equals("EPSG") && authority.equals("EPSG")){
+		        		//panel.compareDatum(panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getCrs().getWKT());
+		        		panel.getJComboOptions().setEnabled(true);
+		        		panel.getJButtonAccept().setEnabled(true);
+		        	}
+		        	else {
+		        		panel.getJComboOptions().setSelectedIndex(0);	        		
+		        		panel.getJComboOptions().setEnabled(false);
+		        		panel.getJButtonAccept().setEnabled(true);
+		        		panel.getJButtonAccept().setEnabled(true);	        			        		
+		        		panel.getJButtonNext().setEnabled(false);
+		        	}	*/	
+			    	panel.getJComboOptions().setEnabled(true);
+			    	if (panel.getJComboOptions().getSelectedIndex() > 0) {
+			    		panel.getJButtonAccept().setEnabled(false);			
+						panel.getJButtonNext().setEnabled(true);
+						panel.getJButtonNext().setEnabled(true);
+		    		} else {
+		    			panel.getJButtonAccept().setEnabled(true);
+		    			panel.getJButtonNext().setEnabled(false);
+		    		}
+	        		//panel.getJButtonAccept().setEnabled(true);
+				}			
+				else {
+					panel.getJButtonNext().setEnabled(false);
+					panel.getJComboOptions().setEnabled(false);
+					panel.getJComboOptions().setSelectedIndex(0);
+					panel.getJButtonAccept().setEnabled(false);
+				}
+			}
+			else if (op.equals("ESRI")) {
+				panel.getCrsMainPanel().getEsriPanel().connection();
+				if(panel.getCrsMainPanel().getEsriPanel().getJTable().getSelectedRowCount()>0) {
+					panel.getCrsMainPanel().getEsriPanel().selectedRowTable = panel.getCrsMainPanel().getEsriPanel().getJTable().getSelectedRow();;
+		        	panel.getCrsMainPanel().getEsriPanel().setCodeCRS(Integer.parseInt((String)panel.getCrsMainPanel().getEsriPanel().sorter.getValueAt(panel.getCrsMainPanel().getEsriPanel().selectedRowTable,0)));
+		        	panel.getCrsMainPanel().getEsriPanel().setWKT();  
+		    		panel.getJComboOptions().setEnabled(true);
+		    		if (panel.getJComboOptions().getSelectedIndex() > 0) {
+			    		panel.getJButtonAccept().setEnabled(false);			
+						panel.getJButtonNext().setEnabled(true);
+		    		} else {
+		    			panel.getJButtonAccept().setEnabled(true);
+		    			panel.getJButtonNext().setEnabled(false);
+		    		}
+		    		//panel.getJButtonAccept().setEnabled(true);			
+					//panel.getJButtonNext().setEnabled(false);
+				}
+				else {
+					panel.getJButtonNext().setEnabled(false);
+					panel.getJComboOptions().setEnabled(false);
+					panel.getJComboOptions().setSelectedIndex(0);
+					panel.getJButtonAccept().setEnabled(false);
+				}
+			}
+			
+			else if (op.equals(PluginServices.getText(this, "newCRS"))) {
+				panel.getCrsMainPanel().getNewCrsPanel().connection();
+				if(panel.getCrsMainPanel().getNewCrsPanel().getJTable().getSelectedRowCount()>0) {
+					if (panel.getCrsMainPanel().getNewCrsPanel().getSearchTextField().getText().equals(""))
+						panel.getCrsMainPanel().getNewCrsPanel().initializeTable();
+					panel.getCrsMainPanel().getNewCrsPanel().selectedRowTable = panel.getCrsMainPanel().getNewCrsPanel().getJTable().getSelectedRow();;
+		        	panel.getCrsMainPanel().getNewCrsPanel().setCodeCRS(Integer.parseInt((String)panel.getCrsMainPanel().getNewCrsPanel().sorter.getValueAt(panel.getCrsMainPanel().getNewCrsPanel().selectedRowTable,0)));
+		        	panel.getCrsMainPanel().getNewCrsPanel().setWKT();  
+		    		panel.getJComboOptions().setEnabled(true);
+		    		if (panel.getJComboOptions().getSelectedIndex() > 0) {
+			    		panel.getJButtonAccept().setEnabled(false);			
+						panel.getJButtonNext().setEnabled(true);
+		    		} else {
+		    			panel.getJButtonAccept().setEnabled(true);
+		    			panel.getJButtonNext().setEnabled(false);
+		    		}
+				}
+				else {
+					panel.getJButtonNext().setEnabled(false);
+					panel.getJComboOptions().setEnabled(false);
+					panel.getJComboOptions().setSelectedIndex(0);
+					panel.getJButtonAccept().setEnabled(false);
+				}
+			}
+		    cl.show(panel.getCrsMainPanel().getJPanelMain(), (String)e.getItem());
+		    panel.getCrsMainPanel().setDataSource((String)e.getItem());
+		}
+	    	    
+	    if (e.getSource() == panel.getNadsTrPanel().getJComboNadFile()){
+			if (panel.getNadsTrPanel().getJComboNadFile().getSelectedIndex()!=0){
+				panel.getNadsTrPanel().setNadFile(panel.getNadsTrPanel().getJComboNadFile().getSelectedItem().toString());//nadFile = getJComboNadFile().getSelectedItem().toString();
+				panel.getNadsTrPanel().getTreePanel().setRoot(PluginServices.getText(this,"grids_en")+": "+panel.getNadsTrPanel().getNadFile());//nadFile);
+				panel.getNadsTrPanel().initializeTree();
+				// Guardar en persistencia nadFile:
+				panel.getNadsTrPanel().saveNadFileName(panel.getNadsTrPanel().getNadFile());//nadFile);
+				panel.getJButtonAccept().setEnabled(true);
+			}
+			else{
+				panel.getNadsTrPanel().setNadFile(null);//nadFile = null;
+				panel.getNadsTrPanel().getTreePanel().setRoot("");
+				panel.getJButtonAccept().setEnabled(false);
+			}
+			
+		}
+	}
+		
+	/**
+	 * Mtodo para manejar el doble click sobre las tablas existentes en
+	 * el panel de transformacin. Aceptar el CRS seleccionado, as como
+	 * la transformacin en el caso de que elijamos transformacin EPSG.
+	 */
+	public void mouseClicked(MouseEvent e) {
+		// TODO Auto-generated method stub
+		if (panel.getJButtonAccept().isEnabled()) {
+			if (e.getSource() == panel.getCrsMainPanel().getCrsAndTransformationRecentsPanel().getJTable()){
+				if (e.getClickCount() == 2){
+					if (panel.isEpsg_tr()) {			
+						TransEPSG epsgParams = new TransEPSG(panel.getEpsgTrPanel().getTransformation_code(),panel.getEpsgTrPanel().connect, panel.getEpsgTrPanel().inverseTranformation);
+						panel.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+						panel.setProjection(panel.getEpsgTrPanel().getProjection());
+						panel.setEpsg_tr(false);
+						
+						/*
+						 * Actualizar Transformaciones recientes
+						 */
+						String authority = "EPSG";
+			    		String name = (String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,1);
+			    		int code = panel.getEpsgTrPanel().getTransformation_code();
+			    		String crsSource = "EPSG:"+String.valueOf(panel.getEpsgTrPanel().getSource()); 	    			
+			    		String crsTarget = "EPSG:"+String.valueOf(panel.getEpsgTrPanel().getTarget()); 	    			
+			    		String details = (String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,5);
+			    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+			    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+			    		trPersistence.addTrData(trData);
+			    		
+					}
+					else if (panel.isManual_tr()) {
+						boolean domain = panel.getManualTrPanel().correctJTextField();
+						if (domain && panel.getManualTrPanel().correctDomain()){
+							panel.setProjection(panel.getManualTrPanel().getProjection());
+							panel.setManual_tr(false);
+						}
+						else if (!domain) {
+							JOptionPane.showMessageDialog(panel, 
+									PluginServices.getText(this,"numeric_format"), 
+									"Warning...", JOptionPane.WARNING_MESSAGE);					
+							return;
+						}				
+						else {
+							JOptionPane.showMessageDialog(panel, 
+									PluginServices.getText(this,"incorrect_domain"), 
+									"Warning...", JOptionPane.WARNING_MESSAGE);					
+							return;
+						}
+						
+						/*
+						 * Actualizar Transformaciones recientes
+						 */
+						String authority = "USR";
+			    		String name = PluginServices.getText(this,"manual");
+			    		int code = 0;
+			    		String crsSource = panel.getManualTrPanel().getSourceAbrev();
+			    		String crsTarget = panel.getManualTrPanel().getTargetAbrev();
+			    		String details = panel.getManualTrPanel().getValues();
+			    		 
+			    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+			    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+			    		trPersistence.addTrData(trData);
+					}
+					else if (panel.isNads_tr()) {
+						panel.setProjection(panel.getNadsTrPanel().getProjection());
+						panel.setTargetNad(panel.getNadsTrPanel().getNad());
+						panel.setNads_tr(false);
+						
+						/*
+						 * Actualizar Transformaciones recientes
+						 */
+						String authority = "NADGR";
+			    		String name = "----";
+			    		int code = 0;
+			    		String crsSource = panel.getNadsTrPanel().getSourceAbrev();
+			    		String crsTarget = panel.getNadsTrPanel().getTargetAbrev();
+			    		String details = "";
+			    		if (panel.getNadsTrPanel().getNad())
+			    			details = panel.getNadsTrPanel().getNadFile()+ " ("+panel.getNadsTrPanel().getTargetAbrev() +")";
+			    		else
+			    			details = panel.getNadsTrPanel().getNadFile()+ " ("+panel.getNadsTrPanel().getSourceAbrev() +")"; 
+			    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+			    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+			    		trPersistence.addTrData(trData);
+					}
+					/*
+					 * Ver que es necesario cuando aceptas en el panel de transformaciones
+					 * recientes.
+					 */
+					else if (panel.isRecents_tr()) {
+						String[] transformation = ((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0)).split(":");
+						if (transformation[0].equals("USR")){
+			        		panel.getRecentsTrPanel().setParamsManual((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4));
+			        		panel.setProjection(panel.getRecentsTrPanel().getProjection());
+			        	}
+						if (transformation[0].equals("EPSG")){
+							TransEPSG epsgParams = new TransEPSG(panel.getRecentsTrPanel().getTrCode(),panel.getRecentsTrPanel().connect, panel.getRecentsTrPanel().getInverseTransformation());
+							panel.getRecentsTrPanel().setParamsEPGS(epsgParams.getParamValue());
+							panel.setProjection(panel.getRecentsTrPanel().getProjection());
+			        	}
+						if (transformation[0].equals("NADGR")){
+							panel.setProjection(panel.getRecentsTrPanel().getProjectionNad((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4)));
+						}
+						if (transformation[0].equals("COMP")) {
+							panel.setProjection(panel.getRecentsTrPanel().getProjectionComplex((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4)));
+						}
+						//panel.setProjection(panel.getRecentsTrPanel().getProjection());
+						panel.setRecents_tr(false);
+						
+						/*
+						 * Actualizar Transformaciones recientes
+						 */
+						String authCode = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0);
+						String authority = authCode.split(":")[0];
+			    		String name = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,1);
+			    		int code = Integer.parseInt(authCode.split(":")[1]);
+			    		String crsSource = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,2);
+			    		String crsTarget = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,3);
+			    		String details = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4);	    		
+			    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+			    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+			    		trPersistence.addTrData(trData);
+					}else if(panel.isCompuesta_tr()){
+						//Selecciona transformacin compuesta
+						//Mostrar el panel de transformacin de la Capa
+						panel.setProjection(panel.getVistaTrPanel().getProjection());
+						//panel.setTargetNad(panel.getNadsTrPanel().getNad());
+						panel.setCompuesta_tr(false);			
+						panel.setVista_tr(false);
+						
+						/**
+						 * para actualizar las transformaciones recientes, tendremos
+						 * que coger las dos transformaciones utilizadas...
+						 */
+						
+						/*					
+						 * Actualizar Transformaciones recientes
+						 */
+						String authorityLayer = null;
+			    		String nameLayer = null;
+			    		int codeLayer = 0;
+			    		String crsSourceLayer = null;
+			    		String crsTargetLayer = null;
+			    		String detailsLayer = "";
+			    		
+						if(panel.getCapaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"recents_transformation"))){
+							String[] transform = ((String)panel.getCapaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getRecentsTrPanel().selectedRowTable,0)).split(":");
+							
+							authorityLayer = PluginServices.getText(this, transform[0]);						
+							nameLayer = (String)panel.getCapaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getRecentsTrPanel().selectedRowTable,1);
+							crsSourceLayer = (String)panel.getCapaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getRecentsTrPanel().selectedRowTable,2);
+							crsTargetLayer = (String)panel.getCapaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getRecentsTrPanel().selectedRowTable,3);
+							detailsLayer = (String)panel.getCapaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getRecentsTrPanel().selectedRowTable,4);
+						}
+						else if(panel.getCapaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_epsg"))){
+							authorityLayer = "EPSG";
+				    		nameLayer = (String)panel.getCapaTrPanel().getEpsgTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getEpsgTrPanel().selectedRowTable,1);
+				    		codeLayer = panel.getCapaTrPanel().getEpsgTrPanel().getTransformation_code();
+				    		crsSourceLayer = "EPSG:"+String.valueOf(panel.getCapaTrPanel().getEpsgTrPanel().getSource()); 	    			
+				    		crsTargetLayer = "EPSG:"+String.valueOf(panel.getCapaTrPanel().getEpsgTrPanel().getTarget()); 	    			
+				    		detailsLayer = (String)panel.getCapaTrPanel().getEpsgTrPanel().sorter.getValueAt(panel.getCapaTrPanel().getEpsgTrPanel().selectedRowTable,5);
+				    		
+						}
+						else if(panel.getCapaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_manual"))){
+							authorityLayer = "USR";
+				    		nameLayer = PluginServices.getText(this,"manual");
+				    		codeLayer = 0;
+				    		crsSourceLayer = panel.getCapaTrPanel().getManualTrPanel().getSourceAbrev();
+				    		crsTargetLayer = panel.getCapaTrPanel().getManualTrPanel().getTargetAbrev();
+				    		detailsLayer = panel.getCapaTrPanel().getManualTrPanel().getValues();
+						}
+						else if(panel.getCapaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"nadgrids"))){
+							authorityLayer = "NADGR";
+				    		nameLayer = "----";
+				    		codeLayer = 0;
+				    		crsSourceLayer = panel.getCapaTrPanel().getNadsTrPanel().getSourceAbrev();
+				    		crsTargetLayer = panel.getCapaTrPanel().getNadsTrPanel().getTargetAbrev();
+				    		detailsLayer = panel.getCapaTrPanel().getNadsTrPanel().getNadFile()+ " ("+panel.getCapaTrPanel().getNadsTrPanel().getSourceAbrev() +")";
+						}		    		 
+			    		TrData trDataLayer = new TrData(authorityLayer,codeLayer,nameLayer,crsSourceLayer,crsTargetLayer,detailsLayer);
+			    		
+			    		String authorityView = null;
+			    		String nameView = null;
+			    		int codeView = 0;
+			    		String crsSourceView = null;
+			    		String crsTargetView = null;
+			    		String detailsView = "";
+			    		
+						if(panel.getVistaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"recents_transformation"))){
+							String[] transform = ((String)panel.getVistaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getRecentsTrPanel().selectedRowTable,0)).split(":");
+							
+							authorityView = PluginServices.getText(this, transform[0]);						
+							nameView = (String)panel.getVistaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getRecentsTrPanel().selectedRowTable,1);
+							crsSourceView = (String)panel.getVistaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getRecentsTrPanel().selectedRowTable,2);
+							crsTargetView = (String)panel.getVistaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getRecentsTrPanel().selectedRowTable,3);
+							detailsView = (String)panel.getVistaTrPanel().getRecentsTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getRecentsTrPanel().selectedRowTable,4);
+						}
+						else if(panel.getVistaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_epsg"))){
+							authorityView = "EPSG";
+				    		nameView = (String)panel.getVistaTrPanel().getEpsgTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getEpsgTrPanel().selectedRowTable,1);
+				    		codeView = panel.getVistaTrPanel().getEpsgTrPanel().getTransformation_code();
+				    		crsSourceView = "EPSG:"+String.valueOf(panel.getVistaTrPanel().getEpsgTrPanel().getSource()); 	    			
+				    		crsTargetView = "EPSG:"+String.valueOf(panel.getVistaTrPanel().getEpsgTrPanel().getTarget()); 	    			
+				    		detailsView = (String)panel.getVistaTrPanel().getEpsgTrPanel().sorter.getValueAt(panel.getVistaTrPanel().getEpsgTrPanel().selectedRowTable,5);
+				    		
+						}
+						else if(panel.getVistaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_manual"))){
+							authorityView = "USR";
+				    		nameView = PluginServices.getText(this,"manual");
+				    		codeView = 0;
+				    		crsSourceView = panel.getVistaTrPanel().getManualTrPanel().getSourceAbrev();
+				    		crsTargetView = panel.getVistaTrPanel().getManualTrPanel().getTargetAbrev();
+				    		detailsView = panel.getVistaTrPanel().getManualTrPanel().getValues();
+						}
+						else if(panel.getVistaTrPanel().getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"nadgrids"))){
+							authorityView = "NADGR";
+				    		nameView = "----";
+				    		codeView = 0;
+				    		crsSourceView = panel.getVistaTrPanel().getNadsTrPanel().getSourceAbrev();
+				    		crsTargetView = panel.getVistaTrPanel().getNadsTrPanel().getTargetAbrev();
+				    		detailsView = panel.getVistaTrPanel().getNadsTrPanel().getNadFile()+ " ("+panel.getVistaTrPanel().getNadsTrPanel().getTargetAbrev() +")";
+				    	}		    		 
+			    		TrData trDataView = new TrData(authorityView,codeView,nameView,crsSourceView,crsTargetView,detailsView);
+			    		CompTrData comp = new CompTrData(trDataLayer, trDataView);
+			    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+			    		trPersistence.addTrData(comp);
+					}
+					else{
+						panel.setSin_tr(true);
+						panel.setProjection(panel.getProjection());
+					}
+										
+		    		// * Actualizar recientes...
+		    		 
+		    		String authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+		    		String name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+		    		int code = ((ICrs)panel.getProjection()).getCode();
+		    		CrsData crsData = new CrsData(authority,code,name);
+		    		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+		    		persistence.addCrsData(crsData);
+					
+					PluginServices.getMDIManager().closeWindow(panel);
+				}
+			}
+			if (e.getSource() == panel.getCrsMainPanel().getEpsgPanel().getJTable()){
+				if (e.getClickCount() == 2){
+					if (panel.isEpsg_tr()) {			
+						TransEPSG epsgParams = new TransEPSG(panel.getEpsgTrPanel().getTransformation_code(),panel.getEpsgTrPanel().connect, panel.getEpsgTrPanel().inverseTranformation);
+						panel.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+						panel.setProjection(panel.getEpsgTrPanel().getProjection());
+						panel.setEpsg_tr(false);
+						
+						/*
+						 * Actualizar Transformaciones recientes
+						 */
+						String authority = "EPSG";
+			    		String name = (String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,1);
+			    		int code = panel.getEpsgTrPanel().getTransformation_code();
+			    		String crsSource = "EPSG:"+String.valueOf(panel.getEpsgTrPanel().getSource()); 	    			
+			    		String crsTarget = "EPSG:"+String.valueOf(panel.getEpsgTrPanel().getTarget());
+			    		String details = (String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,5);;
+			    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+			    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+			    		trPersistence.addTrData(trData);
+					}
+					else if (panel.isManual_tr()) {
+						panel.setProjection(panel.getManualTrPanel().getProjection());
+						panel.setManual_tr(false);
+					}
+					else if (panel.isNads_tr()) {
+						panel.setProjection(panel.getNadsTrPanel().getProjection());
+						panel.setTargetNad(panel.getNadsTrPanel().getNad());
+						panel.setNads_tr(false);
+					}
+					else{
+						panel.setSin_tr(true);
+						panel.setProjection(panel.getProjection());
+					}
+					
+		    		 //* Actualizar recientes...
+		    		 
+		    		String authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+		    		String name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+		    		int code = ((ICrs)panel.getProjection()).getCode();
+		    		CrsData crsData = new CrsData(authority,code,name);
+		    		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+		    		persistence.addCrsData(crsData);
+					
+					PluginServices.getMDIManager().closeWindow(panel);
+				}
+			}
+			if (e.getSource() == panel.getCrsMainPanel().getIauPanel().getJTable()){
+				if (e.getClickCount() == 2){
+					if (panel.isEpsg_tr()) {			
+						TransEPSG epsgParams = new TransEPSG(panel.getEpsgTrPanel().getTransformation_code(),panel.getEpsgTrPanel().connect, panel.getEpsgTrPanel().inverseTranformation);
+						panel.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+						panel.setProjection(panel.getEpsgTrPanel().getProjection());
+						panel.setEpsg_tr(false);
+					}
+					else if (panel.isManual_tr()) {
+						panel.setProjection(panel.getManualTrPanel().getProjection());
+						panel.setManual_tr(false);
+					}
+					else if (panel.isNads_tr()) {
+						panel.setProjection(panel.getNadsTrPanel().getProjection());
+						panel.setTargetNad(panel.getNadsTrPanel().getNad());
+						panel.setNads_tr(false);
+					}
+					else{
+						panel.setSin_tr(true);
+						panel.setProjection(panel.getProjection());
+					}
+					
+		    		 //* Actualizar recientes...
+		    		 
+		    		String authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+		    		String name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+		    		int code = ((ICrs)panel.getProjection()).getCode();
+		    		CrsData crsData = new CrsData(authority,code,name);
+		    		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+		    		persistence.addCrsData(crsData);
+					
+					PluginServices.getMDIManager().closeWindow(panel);
+				}
+			}
+			if (e.getSource() == panel.getCrsMainPanel().getEsriPanel().getJTable()){
+				if (e.getClickCount() == 2){
+					if (panel.isEpsg_tr()) {			
+						TransEPSG epsgParams = new TransEPSG(panel.getEpsgTrPanel().getTransformation_code(),panel.getEpsgTrPanel().connect, panel.getEpsgTrPanel().inverseTranformation);
+						panel.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+						panel.setProjection(panel.getEpsgTrPanel().getProjection());
+						panel.setEpsg_tr(false);
+					}
+					else if (panel.isManual_tr()) {
+						panel.setProjection(panel.getManualTrPanel().getProjection());
+						panel.setManual_tr(false);
+					}
+					else if (panel.isNads_tr()) {
+						panel.setProjection(panel.getNadsTrPanel().getProjection());
+						panel.setTargetNad(panel.getNadsTrPanel().getNad());
+						panel.setNads_tr(false);
+					}
+					else{
+						panel.setSin_tr(true);
+						panel.setProjection(panel.getProjection());
+					}
+					
+		    		 //* Actualizar recientes...
+		    		 
+		    		String authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+		    		String name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+		    		int code = ((ICrs)panel.getProjection()).getCode();
+		    		CrsData crsData = new CrsData(authority,code,name);
+		    		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+		    		persistence.addCrsData(crsData);
+					
+					PluginServices.getMDIManager().closeWindow(panel);
+				}
+			}
+			if (e.getSource() == panel.getCrsMainPanel().getNewCrsPanel().getJTable()){
+				if (e.getClickCount() == 2){
+					if (panel.isEpsg_tr()) {			
+						TransEPSG epsgParams = new TransEPSG(panel.getEpsgTrPanel().getTransformation_code(),panel.getEpsgTrPanel().connect, panel.getEpsgTrPanel().inverseTranformation);
+						panel.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+						panel.setProjection(panel.getEpsgTrPanel().getProjection());
+						panel.setEpsg_tr(false);
+					}
+					else if (panel.isManual_tr()) {
+						panel.setProjection(panel.getManualTrPanel().getProjection());
+						panel.setManual_tr(false);
+					}
+					else if (panel.isNads_tr()) {
+						panel.setProjection(panel.getNadsTrPanel().getProjection());
+						panel.setTargetNad(panel.getNadsTrPanel().getNad());
+						panel.setNads_tr(false);
+					}
+					else{
+						panel.setSin_tr(true);
+						panel.setProjection(panel.getProjection());
+					}
+					
+		    		 //* Actualizar recientes...
+		    		 
+		    		String authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+		    		String name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+		    		int code = ((ICrs)panel.getProjection()).getCode();
+		    		CrsData crsData = new CrsData(authority,code,name);
+		    		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+		    		persistence.addCrsData(crsData);
+					
+					PluginServices.getMDIManager().closeWindow(panel);
+				}
+			}
+		}
+		if (e.getSource() == panel.getEpsgTrPanel().getJTable()){
+			if (e.getClickCount() == 2){
+				TransEPSG epsgParams = new TransEPSG(panel.getEpsgTrPanel().getTransformation_code(),panel.getEpsgTrPanel().connect, panel.getEpsgTrPanel().inverseTranformation);
+				panel.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+				panel.setProjection(panel.getEpsgTrPanel().getProjection());
+				panel.setEpsg_tr(false);
+				
+				/*
+				 * Actualizar Transformaciones recientes
+				 */
+				String authority = "EPSG";
+	    		String name = (String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,1);
+	    		int code = panel.getEpsgTrPanel().getTransformation_code();
+	    		String crsSource = "EPSG:"+String.valueOf(panel.getEpsgTrPanel().getSource()); 	    			
+	    		String crsTarget = "EPSG:"+String.valueOf(panel.getEpsgTrPanel().getTarget());
+	    		String details = (String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,5);;
+	    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+	    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+	    		trPersistence.addTrData(trData);
+				
+				/*
+	    		 * Actualizar Crss recientes...
+	    		 */
+	    		authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+	    		name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+	    		code = ((ICrs)panel.getProjection()).getCode();
+	    		CrsData crsData = new CrsData(authority,code,name);
+	    		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+	    		persistence.addCrsData(crsData);
+				
+				PluginServices.getMDIManager().closeWindow(panel);
+			}
+		}
+		if (e.getSource() == panel.getRecentsTrPanel().getJTable()){
+			if (e.getClickCount() == 2){
+				String[] transf = ((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0)).split(":");
+				if (transf[0].equals("USR")){
+	        		panel.getRecentsTrPanel().setParamsManual((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4));
+	        		panel.setProjection(panel.getRecentsTrPanel().getProjection());
+	        	}
+				if (transf[0].equals("EPSG")){
+					TransEPSG epsgParams = new TransEPSG(panel.getRecentsTrPanel().getTrCode(),panel.getEpsgTrPanel().connect, panel.getRecentsTrPanel().getInverseTransformation());
+					panel.getRecentsTrPanel().setParamsEPGS(epsgParams.getParamValue());
+					panel.setProjection(panel.getRecentsTrPanel().getProjection());
+	        	}
+				if (transf[0].equals("NADGR")){
+					panel.setProjection(panel.getRecentsTrPanel().getProjectionNad((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4)));
+				}
+				//panel.setProjection(panel.getRecentsTrPanel().getProjection());
+				panel.setRecents_tr(false);				
+				
+				/*
+				 * Actualizar Transformaciones recientes
+				 */
+				String authCode = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0);
+				String authority = authCode.split(":")[0];
+	    		String name = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,1);
+	    		int code = Integer.parseInt(authCode.split(":")[1]);
+	    		String crsSource = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,2);
+	    		String crsTarget = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,3);
+	    		String details = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4);	    		
+	    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+	    		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+	    		trPersistence.addTrData(trData);
+								
+				/*
+	    		 * Actualizar recientes...
+	    		 */
+	    		authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+	    		name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+	    		code = ((ICrs)panel.getProjection()).getCode();
+	    		CrsData crsData = new CrsData(authority,code,name);
+	    		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+	    		persistence.addCrsData(crsData);
+				
+				PluginServices.getMDIManager().closeWindow(panel);
+			}
+		}
+	}
+
+	public void mouseEntered(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mouseExited(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mousePressed(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mouseReleased(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void keyPressed(KeyEvent arg0) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	/**
+	 * Mtodo para cuando en la tranformacin manual, no se hayan insertado
+	 * valores de transformacin, no se habilite el botn de aceptar.
+	 */
+	public void keyReleased(KeyEvent e) {
+		if(!panel.getManualTrPanel().getStatus()) 
+			panel.getJButtonAccept().setEnabled(false);		
+		else panel.getJButtonAccept().setEnabled(true);		
+	}
+
+	public void keyTyped(KeyEvent arg0) {
+		// TODO Auto-generated method stub
+		
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/listeners/CRSMainTrPanelListener.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/listeners/TransformationCompuestaPanelListener.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/listeners/TransformationCompuestaPanelListener.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/listeners/TransformationCompuestaPanelListener.java	(revision 25287)
@@ -0,0 +1,511 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.listeners;
+
+import java.awt.CardLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import javax.swing.JComboBox;
+import javax.swing.ListSelectionModel;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+
+import org.gvsig.crs.gui.CRSMainTrPanel;
+import org.gvsig.crs.gui.panels.InfoCRSPanel;
+import org.gvsig.crs.gui.panels.InfoTransformationsRecentsPanel;
+import org.gvsig.crs.gui.panels.TransformationCapaPanel;
+import org.gvsig.crs.gui.panels.TransformationVistaPanel;
+import org.gvsig.crs.ogr.TransEPSG;
+
+import com.iver.andami.PluginServices;
+
+import es.idr.teledeteccion.connection.Query;
+
+/**
+ * Esta clase contiene todos los listeners necesarios para el manejo 
+ * de los eventos del panel de la definicion de una transformacion
+ * compuesta entre los crs de la vista y de la capa 
+ *  
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ *
+ */
+
+public class TransformationCompuestaPanelListener implements ActionListener, 
+ListSelectionListener, ItemListener, KeyListener {
+
+	TransformationCapaPanel capa = null;
+	TransformationVistaPanel vista = null;
+	private CRSMainTrPanel panel = null;	
+	boolean condition = false;
+	
+	
+	public TransformationCompuestaPanelListener(TransformationCapaPanel p, CRSMainTrPanel pa) {
+		capa = p;
+		panel = pa;
+	}
+	
+	public TransformationCompuestaPanelListener(TransformationVistaPanel p, CRSMainTrPanel pa) {
+		vista = p;
+		panel = pa;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		if (capa != null) {			
+			if(	e.getSource() == capa.getRecentsTrPanel().getJButtonInfo()){
+				String[] data = new String[5];
+				data[0] = (String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,0);
+				data[1] = (String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,1);
+				data[2] = (String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,2);
+				data[3] = (String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,3);
+				data[4] = (String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,4);
+				
+				//Mostrar el panel de informacin de las transformaciones recientes
+				InfoCRSPanel info = new InfoCRSPanel(data[2].split(":")[0], Integer.parseInt(data[2].split(":")[1]) , data[0]+" <--> "+ data[4]);
+				PluginServices.getMDIManager().addWindow(info);
+			}
+			//Al cambiar el item seleccionado del combo
+			if(e.getSource().equals(capa.getJComboOptions())){
+				CardLayout cl = (CardLayout)(capa.getPCenter().getLayout());
+				if(capa.getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"recents_transformation"))){
+					//Mostrar el panel de transformacin reciente
+					 cl.show(capa.getPCenter(), "recents");
+					 if (capa.getRecentsTrPanel().selectedRowTable == -1) {
+						 capa.setSourceTransformation(null);
+						 panel.getJButtonNext().setEnabled(false);
+					 } else {
+						String[] transform = ((String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,0)).split(":");
+						if (transform[0].equals("USR")){
+							capa.getRecentsTrPanel().setParamsManual((String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,4));
+			        		capa.setSourceTransformation(capa.getRecentsTrPanel().getParams());
+			        	}
+						if (transform[0].equals("EPSG")){
+							TransEPSG epsgParams = new TransEPSG(capa.getRecentsTrPanel().getTrCode(),capa.getEpsgTrPanel().connect, capa.getRecentsTrPanel().getInverseTransformation());
+							capa.getRecentsTrPanel().setParamsEPGS(epsgParams.getParamValue());
+							capa.setSourceTransformation(capa.getRecentsTrPanel().getParams());						
+			        	}
+						if (transform[0].equals("NADGR")){
+							String p = (String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,4);
+							capa.setSourceTransformation(capa.getNadsParams(p));
+						}
+						panel.getJButtonNext().setEnabled(true);
+					 }
+				}
+				else if(capa.getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_epsg"))){
+					//mostrar el panel de transformacin epsg
+					 cl.show(capa.getPCenter(), "epsg");
+					 if (capa.getEpsgTrPanel().selectedRowTable == -1) {
+						 capa.setSourceTransformation(null);
+						 panel.getJButtonNext().setEnabled(false);
+					 } else {
+						TransEPSG epsgParams = new TransEPSG(capa.getEpsgTrPanel().getTransformation_code(),capa.getEpsgTrPanel().connect, capa.getEpsgTrPanel().inverseTranformation);
+						capa.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+						capa.setSourceTransformation(capa.getParamsEpsg(capa.getEpsgTrPanel().getValues()));
+						panel.getJButtonNext().setEnabled(true);
+					 }
+				}
+				else if(capa.getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_manual"))){
+					//mostrar el panel de transformacin manual
+					cl.show(capa.getPCenter(), "manual");
+					if(!capa.getManualTrPanel().getStatus()) 
+						panel.getJButtonNext().setEnabled(false);		
+					else {
+						panel.getJButtonNext().setEnabled(true);
+						capa.setSourceTransformation(capa.getManualParams());
+					}					
+		        	
+				}
+				else if(capa.getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"nadgrids"))){
+					//mostrar el panel de nadgrids
+					 cl.show(capa.getPCenter(), "nad");
+					 if (capa.getNadsTrPanel().getJComboNadFile().getSelectedIndex()!=0) {
+						 capa.setSourceTransformation("+nadgrids="+capa.getNadsTrPanel().getNadFile());
+						 panel.getJButtonNext().setEnabled(true);
+					 }					 
+					 else {
+						 capa.setSourceTransformation(null);	
+						 panel.getJButtonNext().setEnabled(false);
+					 }
+				}
+			}
+		}
+		
+		if (vista != null) {			
+			if(	e.getSource() == vista.getRecentsTrPanel().getJButtonInfo()){
+				String[] data = new String[5];
+				data[0] = (String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,0);
+				data[1] = (String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,1);
+				data[2] = (String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,2);
+				data[3] = (String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,3);
+				data[4] = (String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,4);
+				
+				//Mostrar el panel de informacin de las transformaciones recientes
+				InfoCRSPanel info = new InfoCRSPanel(data[2].split(":")[0], Integer.parseInt(data[2].split(":")[1]) , data[0]+" <--> "+ data[4]);
+				PluginServices.getMDIManager().addWindow(info);
+			}
+			//Al cambiar el item seleccionado del combo
+			if(e.getSource().equals(vista.getJComboOptions())){
+				CardLayout cl = (CardLayout)(vista.getPCenter().getLayout());
+				if(vista.getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"recents_transformation"))){
+					//Mostrar el panel de transformacin reciente
+					 cl.show(vista.getPCenter(), "recents");
+					 if (vista.getRecentsTrPanel().selectedRowTable == -1) {
+						 vista.setTargetTransformation(null);
+						 panel.getJButtonAccept().setEnabled(false);
+					 } else {
+						String[] transform = ((String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,0)).split(":");
+						if (transform[0].equals("USR")){
+							vista.getRecentsTrPanel().setParamsManual((String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,4));
+							vista.setTargetTransformation(vista.getRecentsTrPanel().getParams());
+			        	}
+						if (transform[0].equals("EPSG")){
+							TransEPSG epsgParams = new TransEPSG(vista.getRecentsTrPanel().getTrCode(),vista.getEpsgTrPanel().connect, vista.getRecentsTrPanel().getInverseTransformation());
+							vista.getRecentsTrPanel().setParamsEPGS(epsgParams.getParamValue());
+							vista.setTargetTransformation(vista.getRecentsTrPanel().getParams());						
+			        	}
+						if (transform[0].equals("NADGR")){
+							String p = (String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,4);
+							vista.setTargetTransformation(vista.getNadsParams(p));
+						}
+						 panel.getJButtonAccept().setEnabled(true);
+					 }
+				}
+				else if(vista.getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_epsg"))){
+					//mostrar el panel de transformacin epsg
+					 cl.show(vista.getPCenter(), "epsg");
+					 if (vista.getEpsgTrPanel().selectedRowTable == -1) {
+						 vista.setTargetTransformation(null);
+						 panel.getJButtonAccept().setEnabled(false);
+					 } else {
+						TransEPSG epsgParams = new TransEPSG(vista.getEpsgTrPanel().getTransformation_code(),vista.getEpsgTrPanel().connect, vista.getEpsgTrPanel().inverseTranformation);
+						vista.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+						vista.setTargetTransformation(vista.getParamsEpsg(vista.getEpsgTrPanel().getValues()));
+						panel.getJButtonAccept().setEnabled(true);
+					 }
+					 
+		        }
+				else if(vista.getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_manual"))){
+					//mostrar el panel de transformacin manual
+					 cl.show(vista.getPCenter(), "manual");
+					 if(!vista.getManualTrPanel().getStatus()) 
+							panel.getJButtonAccept().setEnabled(false);		
+						else {
+							panel.getJButtonAccept().setEnabled(true);
+							vista.setTargetTransformation(vista.getManualParams());
+						}
+				}
+				else if(vista.getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"nadgrids"))){
+					//mostrar el panel de nadgrids
+					 cl.show(vista.getPCenter(), "nad");
+					 if (vista.getNadsTrPanel().getJComboNadFile().getSelectedIndex()!=0) {
+						 vista.setTargetTransformation("+nadgrids="+vista.getNadsTrPanel().getNadFile());
+						 panel.getJButtonAccept().setEnabled(true);
+					 }					 
+					 else {
+						 vista.setTargetTransformation(null);	
+						 panel.getJButtonAccept().setEnabled(false);
+					 }
+				}
+			}
+		}
+	}
+
+	public void valueChanged(ListSelectionEvent e) {
+		if (capa != null) {
+			if (e.getSource() == capa.getEpsgTrPanel().getJTable().getSelectionModel()){
+				ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+		        if (lsm.isSelectionEmpty()) {
+		        	capa.getEpsgTrPanel().selectedRowTable = -1;	        	
+		        	panel.getJButtonNext().setEnabled(false);
+		        	if (panel.getJButtonAccept().isEnabled()) {
+		        		condition = true;
+		        	}
+		        	panel.getJButtonAccept().setEnabled(false);
+		        } 
+		        else {
+		        	capa.getEpsgTrPanel().selectedRowTable = lsm.getMinSelectionIndex();
+		        	capa.getEpsgTrPanel().setTrasformation_code(Integer.parseInt((String)capa.getEpsgTrPanel().sorter.getValueAt(capa.getEpsgTrPanel().selectedRowTable,0)));
+		            String sentence = "SELECT target_crs_code " +
+									"FROM epsg_coordoperation " +                        
+									"WHERE coord_op_code = " + capa.getEpsgTrPanel().getTransformation_code() ;
+		            ResultSet result = Query.select(sentence,capa.getEpsgTrPanel().connect.getConnection());
+		            try {
+						result.next();
+						int tar = result.getInt("target_crs_code");
+						if (tar == capa.getEpsgTrPanel().crs_target) 
+							capa.getEpsgTrPanel().inverseTranformation = false;					
+						else capa.getEpsgTrPanel().inverseTranformation = true;
+					} catch (SQLException e1) {							
+						e1.printStackTrace();
+					}
+										
+					TransEPSG epsgParams = new TransEPSG(capa.getEpsgTrPanel().getTransformation_code(),capa.getEpsgTrPanel().connect, capa.getEpsgTrPanel().inverseTranformation);
+					capa.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+					capa.setSourceTransformation(capa.getParamsEpsg(capa.getEpsgTrPanel().getValues()));
+					if (condition) {
+						panel.getJButtonAccept().setEnabled(true);
+						condition = false;
+					}
+					panel.getJButtonNext().setEnabled(true);					
+		        }
+			}
+			
+			/*
+			 * una vez cambiamos la transformacion a elegir, habra que ver que parametros
+			 * tenemos que definir para que cuando aceptemos hayan sido definidos
+			 * anteriormente
+			 */
+			if (e.getSource() == capa.getRecentsTrPanel().getJTable().getSelectionModel()){
+				ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+		        if (lsm.isSelectionEmpty()) {
+		        	capa.getRecentsTrPanel().selectedRowTable = -1;
+		        	capa.getRecentsTrPanel().setCode(0);
+		        	panel.getJButtonNext().setEnabled(false);
+		        	capa.getRecentsTrPanel().getJButtonInfo().setEnabled(false);
+		        	if (panel.getJButtonAccept().isEnabled()) {
+		        		condition = true;
+		        	}
+		        	panel.getJButtonAccept().setEnabled(false);
+		        } 
+		        else {
+		        	capa.getRecentsTrPanel().selectedRowTable = lsm.getMinSelectionIndex();
+		        	String[] cad = ((String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,2)).split(":");	        	
+		        	capa.getRecentsTrPanel().setCode(Integer.parseInt(cad[1]));
+		        	String[] transformation = ((String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,0)).split(":");
+		        	if (transformation[0].equals("EPSG")){	        		
+		        		capa.getRecentsTrPanel().setTrCode(Integer.parseInt(transformation[1]));	
+		        	}
+		        	capa.getRecentsTrPanel().getJButtonInfo().setEnabled(true);	        	
+		        			        	
+		        	String[] transform = ((String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,0)).split(":");
+					if (transform[0].equals("USR")){
+						capa.getRecentsTrPanel().setParamsManual((String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,4));
+		        		capa.setSourceTransformation(capa.getRecentsTrPanel().getParams());
+		        	}
+					if (transform[0].equals("EPSG")){
+						TransEPSG epsgParams = new TransEPSG(capa.getRecentsTrPanel().getTrCode(),capa.getEpsgTrPanel().connect, capa.getRecentsTrPanel().getInverseTransformation());
+						capa.getRecentsTrPanel().setParamsEPGS(epsgParams.getParamValue());
+						capa.setSourceTransformation(capa.getRecentsTrPanel().getParams());						
+		        	}
+					if (transform[0].equals("NADGR")){
+						String p = (String)capa.getRecentsTrPanel().sorter.getValueAt(capa.getRecentsTrPanel().selectedRowTable,4);
+						capa.setSourceTransformation(capa.getNadsParams(p));
+					}					
+		        	panel.getJButtonNext().setEnabled(true);
+		        	if (condition = true) {
+						panel.getJButtonAccept().setEnabled(true);
+						condition = false;
+					}
+		        }
+			}
+		}
+		
+		if (vista != null) {
+			if (e.getSource() == vista.getEpsgTrPanel().getJTable().getSelectionModel()){
+				ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+		        if (lsm.isSelectionEmpty()) {
+		        	vista.getEpsgTrPanel().selectedRowTable = -1;	        	
+		        	panel.getJButtonAccept().setEnabled(false);
+		        } 
+		        else {
+		        	vista.getEpsgTrPanel().selectedRowTable = lsm.getMinSelectionIndex();
+		        	vista.getEpsgTrPanel().setTrasformation_code(Integer.parseInt((String)vista.getEpsgTrPanel().sorter.getValueAt(vista.getEpsgTrPanel().selectedRowTable,0)));
+		            String sentence = "SELECT target_crs_code " +
+									"FROM epsg_coordoperation " +                        
+									"WHERE coord_op_code = " + vista.getEpsgTrPanel().getTransformation_code() ;
+		            ResultSet result = Query.select(sentence,vista.getEpsgTrPanel().connect.getConnection());
+		            try {
+						result.next();
+						int tar = result.getInt("target_crs_code");
+						if (tar == vista.getEpsgTrPanel().crs_target) 
+							vista.getEpsgTrPanel().inverseTranformation = false;					
+						else vista.getEpsgTrPanel().inverseTranformation = true;
+					} catch (SQLException e1) {							
+						e1.printStackTrace();
+					}
+					
+					/**
+					 * revisar esto
+					 */
+					TransEPSG epsgParams = new TransEPSG(vista.getEpsgTrPanel().getTransformation_code(),vista.getEpsgTrPanel().connect, vista.getEpsgTrPanel().inverseTranformation);
+					vista.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+					vista.setTargetTransformation(vista.getParamsEpsg(vista.getEpsgTrPanel().getValues()));
+					panel.getJButtonAccept().setEnabled(true);
+		        }
+			}
+			
+			/*
+			 * una vez cambiamos la transformacion a elegir, habra que ver que parametros
+			 * tenemos que definir para que cuando aceptemos hayan sido definidos
+			 * anteriormente
+			 */
+			if (e.getSource() == vista.getRecentsTrPanel().getJTable().getSelectionModel()){
+				ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+		        if (lsm.isSelectionEmpty()) {
+		        	vista.getRecentsTrPanel().selectedRowTable = -1;
+		        	vista.getRecentsTrPanel().setCode(0);
+		        	panel.getJButtonAccept().setEnabled(false);
+		        	vista.getRecentsTrPanel().getJButtonInfo().setEnabled(false);
+		        } 
+		        else {
+		        	vista.getRecentsTrPanel().selectedRowTable = lsm.getMinSelectionIndex();
+		        	String[] cad = ((String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,2)).split(":");	        	
+		        	vista.getRecentsTrPanel().setCode(Integer.parseInt(cad[1]));
+		        	String[] transformation = ((String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,0)).split(":");
+		        	if (transformation[0].equals("EPSG")){	        		
+		        		vista.getRecentsTrPanel().setTrCode(Integer.parseInt(transformation[1]));	
+		        	}
+		        	vista.getRecentsTrPanel().getJButtonInfo().setEnabled(true);	        	
+		        	
+		        	/**
+		        	 * revisar esto
+		        	 */
+		        	String[] transform = ((String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,0)).split(":");
+					if (transform[0].equals("USR")){
+						vista.getRecentsTrPanel().setParamsManual((String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,4));
+						vista.setTargetTransformation(vista.getRecentsTrPanel().getParams());
+		        	}
+					if (transform[0].equals("EPSG")){
+						TransEPSG epsgParams = new TransEPSG(vista.getRecentsTrPanel().getTrCode(),vista.getEpsgTrPanel().connect, vista.getRecentsTrPanel().getInverseTransformation());
+						vista.getRecentsTrPanel().setParamsEPGS(epsgParams.getParamValue());
+						vista.setTargetTransformation(vista.getRecentsTrPanel().getParams());						
+		        	}
+					if (transform[0].equals("NADGR")){
+						String p = (String)vista.getRecentsTrPanel().sorter.getValueAt(vista.getRecentsTrPanel().selectedRowTable,4);
+						vista.setTargetTransformation(vista.getNadsParams(p));
+					}
+		        	
+		        	panel.getJButtonAccept().setEnabled(true);
+		        }
+			}
+		}
+	}
+
+	public void itemStateChanged(ItemEvent e) {
+		if (capa != null) {
+			if (e.getSource() == capa.getNadsTrPanel().getJComboNadFile()){
+				if (capa.getNadsTrPanel().getJComboNadFile().getSelectedIndex()!=0){
+					capa.getNadsTrPanel().setNadFile(capa.getNadsTrPanel().getJComboNadFile().getSelectedItem().toString());//nadFile = getJComboNadFile().getSelectedItem().toString();
+					capa.getNadsTrPanel().getTreePanel().setRoot(PluginServices.getText(this,"grids_en")+": "+capa.getNadsTrPanel().getNadFile());//nadFile);
+					capa.getNadsTrPanel().initializeTree();
+					// Guardar en persistencia nadFile:
+					capa.getNadsTrPanel().saveNadFileName(capa.getNadsTrPanel().getNadFile());//nadFile);
+					capa.setSourceTransformation("+nadgrids="+capa.getNadsTrPanel().getNadFile());
+					panel.getJButtonNext().setEnabled(true);
+					if(condition) {
+						panel.getJButtonAccept().setEnabled(true);
+						condition = false;
+					}
+				}
+				else{
+					capa.getNadsTrPanel().setNadFile(null);//nadFile = null;
+					capa.getNadsTrPanel().getTreePanel().setRoot("");
+					capa.setSourceTransformation(null);					
+					panel.getJButtonNext().setEnabled(false);
+					if (panel.getJButtonAccept().isEnabled())
+						condition = true;
+					panel.getJButtonAccept().setEnabled(false);
+				}
+				
+			}
+		}
+		
+		if (vista != null) {
+			if (e.getSource() == vista.getNadsTrPanel().getJComboNadFile()){
+				if (vista.getNadsTrPanel().getJComboNadFile().getSelectedIndex()!=0){
+					vista.getNadsTrPanel().setNadFile(vista.getNadsTrPanel().getJComboNadFile().getSelectedItem().toString());//nadFile = getJComboNadFile().getSelectedItem().toString();
+					vista.getNadsTrPanel().getTreePanel().setRoot(PluginServices.getText(this,"grids_en")+": "+vista.getNadsTrPanel().getNadFile());//nadFile);
+					vista.getNadsTrPanel().initializeTree();
+					// Guardar en persistencia nadFile:
+					vista.getNadsTrPanel().saveNadFileName(vista.getNadsTrPanel().getNadFile());//nadFile);
+					vista.setTargetTransformation("+nadgrids="+vista.getNadsTrPanel().getNadFile());
+					panel.getJButtonAccept().setEnabled(true);
+				}
+				else{
+					vista.getNadsTrPanel().setNadFile(null);//nadFile = null;
+					vista.getNadsTrPanel().getTreePanel().setRoot("");
+					vista.setTargetTransformation(null);
+					panel.getJButtonAccept().setEnabled(false);
+				}
+				
+			}
+		}
+	}
+
+	public void keyPressed(KeyEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void keyReleased(KeyEvent e) {
+		if (capa != null) {
+			if(!capa.getManualTrPanel().getStatus()) 
+				panel.getJButtonNext().setEnabled(false);		
+			else {
+				panel.getJButtonNext().setEnabled(true);
+				capa.setSourceTransformation(capa.getManualParams());
+			}
+		}
+		
+		if (vista != null) {
+			if(!vista.getManualTrPanel().getStatus()) 
+				panel.getJButtonAccept().setEnabled(false);		
+			else {
+				panel.getJButtonAccept().setEnabled(true);
+				vista.setTargetTransformation(vista.getManualParams());
+			}
+		}		
+	}
+
+	public void keyTyped(KeyEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/listeners/TransformationCompuestaPanelListener.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/CRSMainPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/CRSMainPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/CRSMainPanel.java	(revision 25287)
@@ -0,0 +1,342 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui;
+
+import java.awt.BorderLayout;
+import java.awt.CardLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.panels.CrsAndTransformationRecentsPanel;
+import org.gvsig.crs.gui.panels.CrsRecentsPanel;
+import org.gvsig.crs.gui.panels.EPSGpanel;
+import org.gvsig.crs.gui.panels.ESRIpanel;
+import org.gvsig.crs.gui.panels.IAU2000panel;
+import org.gvsig.crs.gui.panels.NewCRSPanel;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+
+/**
+ * Clase que genera el panel principal para la seleccin de CRS 
+ * 
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ * @author Luisa Marina Fernandez (luisam.fernandez@uclm.es)
+ *
+ */
+public class CRSMainPanel extends JPanel implements IWindow {
+		
+	private static final long serialVersionUID = 1L;
+	
+	private JComboBox jComboOptions = null;	
+	private JPanel Combopanel = null;	
+	private JPanel USGSpanel = null;	
+	
+	final String recientes = PluginServices.getText(this,"recientes");
+	final String epsg = PluginServices.getText(this,"EPSG"); 
+	final String usgs = PluginServices.getText(this,"USGS");
+	final String esri = PluginServices.getText(this,"ESRI");
+	final String iau2000 = PluginServices.getText(this,"IAU2000");
+	final String newCRS = PluginServices.getText(this,"newCRS");
+	
+	//String[] selection = {recientes, epsg, usgs, esri, iau2000, newCRS};
+	String[] selection = {recientes, epsg, esri, iau2000, newCRS};//, esri};
+	
+	boolean inAnApplet = true;	
+	public CrsRecentsPanel crsRecentsPanel = null;
+	public CrsAndTransformationRecentsPanel crsAndTransformationRecentsPanel = null;
+	public EPSGpanel epsgPanel = null;
+	public ESRIpanel esriPanel = null;
+	public IAU2000panel iauPanel = null;
+	public NewCRSPanel newCrsPanel=null;
+	
+	private JPanel jPanelMain = null;	
+	
+	private JPanel jPanelButtons;
+	private JButton jButtonAccept;
+	private JButton jButonCancel;
+	
+	private ICrs viewCrs;
+	
+	String dataSource = "";
+
+	public CRSMainPanel(ICrs crs) {
+		viewCrs = crs;
+		crsRecentsPanel = new CrsRecentsPanel();
+		epsgPanel = new EPSGpanel();
+		esriPanel = new ESRIpanel();
+		iauPanel = new IAU2000panel();
+		newCrsPanel=new NewCRSPanel(viewCrs);
+		
+		this.add(vista(), BorderLayout.NORTH);		
+		this.add(getJPanelButtons(), BorderLayout.SOUTH);
+		
+	    setDataSource(selection[0]);
+	}
+	
+	public CRSMainPanel(int target, ICrs crs) {
+		viewCrs = crs;
+		crsAndTransformationRecentsPanel = new CrsAndTransformationRecentsPanel();
+		epsgPanel = new EPSGpanel();
+		esriPanel = new ESRIpanel();
+		iauPanel = new IAU2000panel();
+		newCrsPanel=new NewCRSPanel(viewCrs);
+		
+		setDataSource(selection[0]);
+	}
+	
+	/**
+	 * Panel con los controles necesarios para visualizarlo en el panel de 
+	 * seleccin de CRS y transformacin de la capa a aadir
+	 * @return
+	 */
+	public JPanel capa(){
+		JPanel p = new JPanel();
+		//**p.setPreferredSize(new Dimension(550, 320));
+		//**p.setLayout(new GridLayout(0,1));
+		//p.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
+		p.setLayout(new BorderLayout());
+		//p.setBorder(BorderFactory.createTitledBorder(PluginServices.getText(this,"seleccione_crs_capa")));//,
+								/*BorderFactory.createEmptyBorder(1,1,1,1)),
+								p.getBorder()));*/
+		p.add(getCombopanel(),BorderLayout.NORTH);
+		p.add(getJPanelLayerMain(),BorderLayout.CENTER);
+		return p;
+	}
+	
+	public JPanel vista(){
+		JPanel p = new JPanel();
+		//p.setPreferredSize(new Dimension(550, 320));
+		//p.setLayout(new GridLayout(0,1));
+		//p.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
+		/*p.setBorder(
+			    BorderFactory.createCompoundBorder(
+						BorderFactory.createCompoundBorder(
+								BorderFactory.createTitledBorder(PluginServices.getText(this,"seleccione_crs_vista")),
+								BorderFactory.createEmptyBorder(2,2,2,2)),
+								p.getBorder()));*/
+		p.setLayout(new BorderLayout());
+		p.add(getCombopanel(),BorderLayout.NORTH);
+		p.add(getJPanelMain(),BorderLayout.CENTER);
+		return p;
+	}
+	
+	public JPanel getJPanelMain(){
+		if (jPanelMain == null){
+			jPanelMain = new JPanel();
+			jPanelMain.setLayout(new CardLayout());
+			jPanelMain.setPreferredSize(new Dimension(525, 230));	
+			jPanelMain.add(recientes, crsRecentsPanel);
+			jPanelMain.add(epsg, epsgPanel);
+			jPanelMain.add(newCRS,newCrsPanel);
+			jPanelMain.add(esri, esriPanel);
+			jPanelMain.add(usgs, getJPanelUSGS());
+			jPanelMain.add(iau2000, iauPanel);
+		}
+		
+		return jPanelMain;		
+	}
+	
+	public JPanel getJPanelLayerMain(){
+		if (jPanelMain == null){
+			jPanelMain = new JPanel();
+			jPanelMain.setLayout(new CardLayout());
+			jPanelMain.setPreferredSize(new Dimension(525, 230));	
+			jPanelMain.add(recientes, crsAndTransformationRecentsPanel);
+			jPanelMain.add(epsg, epsgPanel);
+			jPanelMain.add(newCRS,newCrsPanel);
+			jPanelMain.add(esri, esriPanel);
+			jPanelMain.add(usgs, getJPanelUSGS());
+			jPanelMain.add(iau2000, iauPanel);
+		}
+		
+		return jPanelMain;		
+	}
+	
+	public JPanel getCombopanel(){
+		if (Combopanel == null){
+			Combopanel = new JPanel();
+			Combopanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,5));
+			Combopanel.add(getJLabelTipo());
+			Combopanel.add(getJComboOptions());
+		}
+		
+		return Combopanel;
+	}
+	
+	private JLabel getJLabelTipo(){
+		JLabel jLabelTipo = new JLabel();
+		jLabelTipo.setPreferredSize(new Dimension(50,25));
+		jLabelTipo.setText(PluginServices.getText(this,"tipo")+":");
+		return jLabelTipo;
+	}
+	
+	public JComboBox getJComboOptions(){
+		if (jComboOptions == null){
+			jComboOptions = new JComboBox(selection);
+			jComboOptions.setPreferredSize(new Dimension(100,25));			
+			jComboOptions.setEditable(false);
+			jComboOptions.setSelectedIndex(0);					
+		}
+		return jComboOptions;
+	}
+			
+	public JPanel getJPanelUSGS() {	
+		if (USGSpanel == null){
+			USGSpanel = new JPanel();
+			USGSpanel.setLayout(new GridLayout(3,4));
+			USGSpanel.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
+			USGSpanel.setPreferredSize(new Dimension(525, 400));			
+		}	
+		return USGSpanel;
+	}			
+	
+	private JPanel getJPanelButtons() {
+		if(jPanelButtons == null) {
+			jPanelButtons = new JPanel();
+			jPanelButtons.setLayout(new FlowLayout(FlowLayout.RIGHT));
+			//jPanelButtons.setPreferredSize(new Dimension(525,50));
+			jPanelButtons.add(getJButtonCancel(),null);
+			jPanelButtons.add(getJButtonAccept(),null);			
+		}
+		return jPanelButtons;
+	}
+	
+	public JButton getJButtonCancel() {
+		if(jButonCancel == null) {
+			jButonCancel = new JButton();
+			jButonCancel.setText(PluginServices.getText(this,"cancel"));
+			jButonCancel.setPreferredSize(new Dimension(100,25));
+			jButonCancel.setMnemonic('C');
+			jButonCancel.setToolTipText("Cancel");			
+		}
+		return jButonCancel;
+	}
+	
+	public void cancelButton_actionPerformed(ActionEvent e) {		
+		 PluginServices.getMDIManager().closeWindow(this);
+	}
+	
+	public JButton getJButtonAccept() {
+		if(jButtonAccept == null) {
+			jButtonAccept = new JButton();
+			jButtonAccept.setText(PluginServices.getText(this,"ok"));
+			jButtonAccept.setPreferredSize(new Dimension(100,25));
+			jButtonAccept.setEnabled(false);
+			jButtonAccept.setMnemonic('A');
+			jButtonAccept.setToolTipText(PluginServices.getText(this,"ok"));			
+		}
+		return jButtonAccept;
+	}
+	
+	public ICrs getProjection() {
+		if (getDataSource().equals(PluginServices.getText(this,"EPSG"))){
+			return epsgPanel.getProjection();
+		}
+		else if (getDataSource().equals(PluginServices.getText(this,"IAU2000"))) {
+			return iauPanel.getProjection();
+		}
+		else if (getDataSource().equals(PluginServices.getText(this,"recientes"))) {
+			return crsRecentsPanel.getProjection();
+		}
+		else if (getDataSource().equals(PluginServices.getText(this,"ESRI"))) {
+			return esriPanel.getProjection();
+		}
+		else if (getDataSource().equals(PluginServices.getText(this,"newCRS"))) {
+			return newCrsPanel.getProjection();
+		}
+		return null;
+	}
+	
+	public void setProjection(IProjection crs) {
+		//setCrs((ICrs) crs);
+	}
+	
+	public void setDataSource(String sour){
+		dataSource = sour;
+	}
+	
+	public String getDataSource(){
+		return dataSource;
+	}
+
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle(PluginServices.getText(this, "seleccionar_crs"));
+		return m_viewinfo;
+	}
+
+	public EPSGpanel getEpsgPanel() {
+		return epsgPanel;
+	}
+
+	
+
+	public ESRIpanel getEsriPanel() {
+		return esriPanel;
+	}
+	public IAU2000panel getIauPanel() {
+		return iauPanel;
+	}
+
+	public CrsRecentsPanel getRecentsPanel() {
+		return crsRecentsPanel;
+	}
+	
+	public CrsAndTransformationRecentsPanel getCrsAndTransformationRecentsPanel() {
+		return crsAndTransformationRecentsPanel;
+	}
+
+	public NewCRSPanel getNewCrsPanel() {
+		return newCrsPanel;
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/CRSMainPanel.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/CRSSelectionDialog.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/CRSSelectionDialog.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/CRSSelectionDialog.java	(revision 25287)
@@ -0,0 +1,192 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui;
+
+import javax.swing.JPanel;
+import javax.swing.ListSelectionModel;
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.listeners.CRSSelectionDialogListener;
+import org.gvsig.crs.persistence.CrsData;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+
+/**
+ * Dilogo contenedor del panel para la seleccin de CRS. 
+ * (para el CRS de la vista)
+ * 
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ */
+public class CRSSelectionDialog extends JPanel implements  IWindow {
+	
+	private static final long serialVersionUID = 1L;	
+	
+	JPanel contentPane = null;
+	private CRSMainPanel crsMainPanel = null;
+	private IProjection lastProj = null;
+	int code = 0;
+	String dataSource = "";
+	
+	private boolean okPressed = false;
+		
+	public CRSSelectionDialog(ICrs curProj){
+		super();
+		lastProj = curProj;
+		initialize();
+	}
+	
+	public void initialize(){
+		crsMainPanel = new CRSMainPanel((ICrs)lastProj);
+		this.add(getContentPanel(), null);
+		setListeners();	
+		
+	}
+	
+	public void initRecents(ICrs proj) {
+		CrsData crsData = new CrsData(proj.getCrsWkt().getAuthority()[0], proj.getCode(),proj.getCrsWkt().getName());
+		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+		persistence.addCrsData(crsData);
+		
+		crsMainPanel.getRecentsPanel().loadRecents();
+	}
+	
+	public boolean isOkPressed() { return okPressed; }
+			
+    public CRSMainPanel getProjPanel() {
+        return (CRSMainPanel) getContentPanel();
+    }
+
+	public JPanel getContentPanel() {
+	    if (contentPane == null) {
+        	contentPane = crsMainPanel;
+        	
+       }
+      return contentPane;
+    }	
+	
+	public void setListeners(){
+		
+		CRSSelectionDialogListener listener = new CRSSelectionDialogListener(this); 
+		
+		ListSelectionModel rowSM = crsMainPanel.getEpsgPanel().getJTable().getSelectionModel();
+		rowSM.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMiau = crsMainPanel.getIauPanel().getJTable().getSelectionModel();
+		rowSMiau.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMrecents = crsMainPanel.getRecentsPanel().getJTable().getSelectionModel();
+		rowSMrecents.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMesri = crsMainPanel.getEsriPanel().getJTable().getSelectionModel();
+		rowSMesri.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMusr = crsMainPanel.getNewCrsPanel().getJTable().getSelectionModel();
+		rowSMusr.addListSelectionListener(listener);
+		
+		crsMainPanel.getJComboOptions().addItemListener(listener);
+		crsMainPanel.getJButtonAccept().addActionListener(listener);
+        crsMainPanel.getJButtonCancel().addActionListener(listener);
+        crsMainPanel.getEsriPanel().getJTable().addMouseListener(listener);
+        crsMainPanel.getEpsgPanel().getJTable().addMouseListener(listener);
+        crsMainPanel.getRecentsPanel().getJTable().addMouseListener(listener);
+        crsMainPanel.getIauPanel().getJTable().addMouseListener(listener);
+        crsMainPanel.getNewCrsPanel().getJTable().addMouseListener(listener);
+	}
+
+	public void setCode(int cod){
+		code = cod;
+	}
+	
+	public int getCode(){
+		return code;
+	}
+	
+	public IProjection getProjection() {
+		return (IProjection) getProjPanel().getProjection();
+	}
+	/**
+	 * @param proj
+	 */
+	public void setProjection(IProjection proj) {
+		lastProj = proj;
+		getProjPanel().setProjection(proj);
+	}
+	
+	public String getProjectionAbrev(){
+		return (String) getProjPanel().getProjection().getAbrev();
+	}
+
+	
+	
+	public void setDataSource(String sour){
+		dataSource = sour;
+	}
+	
+	public String getDataSource(){
+		return dataSource;
+	}
+	
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle(PluginServices.getText(this, "nuevo_crs"));
+		return m_viewinfo;
+	}
+
+	public IProjection getLastProj() {
+		return lastProj;
+	}
+
+	public void setLastProj(IProjection lastProj) {
+		this.lastProj = lastProj;
+	}
+
+	public void setOkPressed(boolean okPressed) {
+		this.okPressed = okPressed;
+	}
+
+	public CRSMainPanel getCrsMainPanel() {
+		return crsMainPanel;
+	}
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/CRSSelectionDialog.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/package.html
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/package.html	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/package.html	(revision 25287)
@@ -0,0 +1,4 @@
+<html>
+	<body>Clases relacionadas con la interfaz de usuario de la extensi�n CRS.
+</body>
+</html>

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/package.html
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/dialog/ImportNewCrsDialog.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/dialog/ImportNewCrsDialog.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/dialog/ImportNewCrsDialog.java	(revision 25287)
@@ -0,0 +1,187 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.dialog;
+
+import java.awt.BorderLayout;
+import java.awt.CardLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+
+import javax.swing.JButton;
+import javax.swing.JPanel;
+import javax.swing.ListSelectionModel;
+
+import org.gvsig.crs.gui.listeners.ImportNewCrsDialogListener;
+import org.gvsig.crs.gui.panels.EPSGpanel;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+
+/**
+ *  Clase que sirve para ir importando partes de un CRS en la creacion de
+ *  un crs definido por el usuario
+ *  
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ *
+ */
+
+public class ImportNewCrsDialog extends JPanel implements IWindow {
+
+	final String epsg = PluginServices.getText(this,"EPSG");	
+	private EPSGpanel epsgPanel = null;
+	private int crsCode = -1;
+	
+	private JPanel jPanelMain = null;	
+		
+	private JPanel jPanelButtons;
+	private JButton jButtonAccept;
+	private JButton jButonCancel;
+	
+	private String option = "";
+	
+	public ImportNewCrsDialog(String opt) {
+		epsgPanel = new EPSGpanel();
+		epsgPanel.connection();
+		setOption(opt);
+		initialize();
+		setListeners();
+	}
+	
+	public void initialize() {
+		this.setLayout(new GridLayout(0,1));
+		this.add(getJPanelMain(), BorderLayout.CENTER);
+		this.add(getJPanelButtons(), BorderLayout.SOUTH);
+	}
+	
+	public JPanel getJPanelMain(){
+		if (jPanelMain == null){
+			jPanelMain = new JPanel();
+			jPanelMain.setLayout(new CardLayout());
+			jPanelMain.setPreferredSize(new Dimension(525, 230));			
+			jPanelMain.add(epsg, epsgPanel);			
+		}
+		
+		return jPanelMain;		
+	}
+	
+	private JPanel getJPanelButtons() {
+		if(jPanelButtons == null) {
+			jPanelButtons = new JPanel();
+			jPanelButtons.setLayout(new FlowLayout(FlowLayout.RIGHT));
+			//jPanelButtons.setPreferredSize(new Dimension(525,50));
+			jPanelButtons.add(getJButtonCancel(),null);
+			jPanelButtons.add(getJButtonAccept(),null);			
+		}
+		return jPanelButtons;
+	}
+	
+	public JButton getJButtonCancel() {
+		if(jButonCancel == null) {
+			jButonCancel = new JButton();
+			jButonCancel.setText(PluginServices.getText(this,"cancel"));
+			jButonCancel.setPreferredSize(new Dimension(100,25));
+			jButonCancel.setMnemonic('C');
+			jButonCancel.setToolTipText("Cancel");			
+		}
+		return jButonCancel;
+	}
+	
+	public void cancelButton_actionPerformed(ActionEvent e) {		
+		 PluginServices.getMDIManager().closeWindow(this);
+	}
+	
+	public JButton getJButtonAccept() {
+		if(jButtonAccept == null) {
+			jButtonAccept = new JButton();
+			jButtonAccept.setText(PluginServices.getText(this,"ok"));
+			jButtonAccept.setPreferredSize(new Dimension(100,25));
+			jButtonAccept.setEnabled(false);
+			jButtonAccept.setMnemonic('A');
+			jButtonAccept.setToolTipText(PluginServices.getText(this,"ok"));			
+		}
+		return jButtonAccept;
+	}
+	
+	private void setListeners() {
+		ImportNewCrsDialogListener listener = new ImportNewCrsDialogListener(this);
+		
+		getJButtonCancel().addActionListener(listener);
+		getJButtonAccept().addActionListener(listener);
+		
+		ListSelectionModel rowSM = getEpsgPanel().getJTable().getSelectionModel();
+		rowSM.addListSelectionListener(listener);
+		
+		getEpsgPanel().getJTable().addMouseListener(listener);
+        
+	}
+	
+	public void setOption(String opt){
+		this.option = opt;
+	}
+	
+	public String getOption() {
+		return option;
+	}
+	
+	public EPSGpanel getEpsgPanel() {
+		return epsgPanel;
+	}
+	
+	public void setCode(int code) {
+		this.crsCode = code;
+	}
+	
+	public int getCode() {
+		return this.crsCode;
+	}
+		
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle(PluginServices.getText(this, "Importar")+" "+option);
+   		m_viewinfo.setWidth(525);
+   		m_viewinfo.setHeight(320);
+   		return m_viewinfo;
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/dialog/ImportNewCrsDialog.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/dialog/CSSelectionDialog.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/dialog/CSSelectionDialog.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/dialog/CSSelectionDialog.java	(revision 25287)
@@ -0,0 +1,54 @@
+/*
+ * Created on 26-ene-2005
+ */
+package org.gvsig.crs.gui.dialog;
+
+import java.awt.GridLayout;
+
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.CRSSelectionDialog;
+
+
+/**
+ * Dilogo contenedor para la seleccin de CRS. 
+ * Incluye los controles para las transformaciones
+ * para el CRS de la capa)
+ * 
+ * @author Luis W. Sevilla (sevilla_lui@gva.es)
+ */
+public class CSSelectionDialog extends CRSSelectionDialog{
+	
+	private static final long serialVersionUID = 1L;
+	/**
+	 * 
+	 */
+	public CSSelectionDialog(ICrs curProj) {
+		super(curProj);
+		this.init();
+	}
+	/**
+	 * This method initializes this
+	 * 
+	 * @return void
+	 */
+	private void init() {
+		this.setBounds(0, 0, 600, 400);
+		this.setLayout(new GridLayout(0,1));
+//		this.setLayout(new FlowLayout(FlowLayout.CENTER,10,10));
+		
+	}
+	
+	
+	/*public IProjection getProjection() {
+		return (IProjection) getProjPanel().getProjection();
+	}
+	
+	public void setProjection(IProjection proj) {
+		lastProj = proj;
+		getProjPanel().setProjection(proj);
+	}
+	
+	public String getProjectionAbrev(){
+		return  (String) getProjPanel().getProjection().getAbrev();
+	}*/	
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/dialog/CSSelectionDialog.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/dialog/TRSelectionDialog.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/dialog/TRSelectionDialog.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/dialog/TRSelectionDialog.java	(revision 25287)
@@ -0,0 +1,85 @@
+/*
+ * Created on 26-ene-2005
+ */
+package org.gvsig.crs.gui.dialog;
+
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.CRSSelectionTrDialog;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+
+/**
+ * @author Luis W. Sevilla (sevilla_lui@gva.es)
+ */
+public class TRSelectionDialog
+	extends CRSSelectionTrDialog implements IWindow {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	private boolean okPressed = false;
+	private IProjection lastProj = null;
+	boolean targetNad = false;
+	
+	/**
+	 * 
+	 */
+	public TRSelectionDialog(ICrs curproj) {
+		super(curproj);
+		this.init();		
+	}
+	/**
+	 * This method initializes this
+	 * 
+	 * @return void
+	 */
+	private void init() {		
+		this.setBounds(0, 0, 600, 500);
+		this.setLayout(new GridLayout(0,1));
+		this.setLayout(new FlowLayout(FlowLayout.CENTER,10,10));
+		
+				
+	}
+	
+	public boolean isOkPressed() { return okPressed; }
+	
+	public void setTargetNad(boolean tarNad){
+		targetNad = tarNad;
+	}
+	
+	public boolean getTargetNad(){
+		return targetNad;
+	}
+	
+	/**
+	 * @return
+	 */
+	public IProjection getProjection() {
+		return (IProjection) getProjPanel().getProjection();
+	}
+	/**
+	 * @param proj
+	 */
+	public void setProjection(IProjection proj) {
+		lastProj = proj;
+		getProjPanel().setProjection(proj);
+	}
+	
+	public String getProjectionName(){
+		return (String) getProjPanel().getProjection().getCrsWkt().getName();				
+	}
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle(PluginServices.getText(this, "crsAndTransformation"));
+   		//definir anchura y altura
+   		m_viewinfo.setWidth(650);
+   		m_viewinfo.setHeight(350);
+		return m_viewinfo;
+	}
+}
\ No newline at end of file

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/dialog/TRSelectionDialog.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/CRSMainTrPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/CRSMainTrPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/CRSMainTrPanel.java	(revision 25287)
@@ -0,0 +1,565 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui;
+
+import java.awt.BorderLayout;
+import java.awt.CardLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.ListSelectionModel;
+import javax.swing.border.EmptyBorder;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.CrsWkt;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.listeners.CRSMainTrPanelListener;
+import org.gvsig.crs.gui.panels.TransformationCapaPanel;
+import org.gvsig.crs.gui.panels.TransformationEpsgPanel;
+import org.gvsig.crs.gui.panels.TransformationManualPanel;
+import org.gvsig.crs.gui.panels.TransformationNadgridsPanel;
+import org.gvsig.crs.gui.panels.TransformationRecentsPanel;
+import org.gvsig.crs.gui.panels.TransformationVistaPanel;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+
+/**
+ * Clase que genera el panel de transformacin, en el que se incluye la
+ * eleccin del CRS de la capa, as como el de la posibilidad de poder
+ * asignarle una transformacin.
+ * 
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ * @author Luisa Marina Fernandez (luisam.fernandez@uclm.es)
+ *
+ */
+
+public class CRSMainTrPanel extends JPanel implements IWindow{
+
+	private static final long serialVersionUID = 1L;
+	
+	/*
+	 * Para mostrar los parametros si tenemos seleccionada transformacion
+	 */
+	boolean tra = false; 
+	boolean inAnApplet = true;
+	private boolean cancelYes = false;
+	private JButton jButtonCancel = null;
+	private JButton jButtonNext = null;
+	private JButton jButtonAccept = null;
+	private JButton jButtonBefore = null;
+	private JPanel jPanelButtons = null;
+	private JLabel jLabelTrans=null;
+	
+	boolean targetNad = false;	
+	
+	String crs_target = null;
+	CrsWkt crsWkt_target = null;
+		
+	int transformation_code = 0;	
+	
+	//**private JPanel panel = null;
+	CRSMainPanel viewPan = null;
+	
+	private JPanel jPanelMain = null;
+	private TransformationManualPanel manualTrPanel = null;
+	private boolean manual_tr = false;
+	private TransformationEpsgPanel epsgTrPanel = null;
+	private boolean epsg_tr = false;
+	private TransformationNadgridsPanel nadsTrPanel = null;
+	private boolean nads_tr = false;
+	private TransformationRecentsPanel recentsTrPanel = null;
+	private boolean recents_tr = false;
+	private TransformationVistaPanel vistaTrPanel=null;
+	private boolean vista_tr=false;
+	private TransformationCapaPanel capaTrPanel=null;
+	private boolean capa_tr=false;
+	private boolean compuesta_tr=false;
+	
+	
+	private boolean sin_tr = false;
+	private JPanel jPanelCombo = null;
+	private JComboBox jComboOptions = null;
+	
+	private IProjection crsfirst;
+	
+	private CRSMainPanel crsMainPanel;
+	private String newSelection;
+	String dataSource = "";
+	ICrs curProj = null;
+	
+	public CRSMainTrPanel(int target, CrsWkt crsWkttarget, ICrs proj) {			
+		curProj = proj;
+		crsMainPanel = new CRSMainPanel(target, curProj);		
+		viewPan = crsMainPanel;
+		
+		crs_target = crsWkttarget.getAuthority()[0]+":"+crsWkttarget.getAuthority()[1];
+		setCrsWkt_target(crsWkttarget);			
+		//Construir todos los paneles de transformaciones
+		manualTrPanel = new TransformationManualPanel();
+		epsgTrPanel = new TransformationEpsgPanel(crs_target);
+		nadsTrPanel = new TransformationNadgridsPanel(true);
+		recentsTrPanel = new TransformationRecentsPanel();
+		capaTrPanel=new TransformationCapaPanel(crs_target, this);
+		vistaTrPanel=new TransformationVistaPanel(crs_target, this);
+		
+		
+		/*
+		 * esta variable contendr tanto el panel utilizado en CRSViewPanel, como los paneles
+		 * que seran necesarios para realizar las transformaciones
+		 */
+		jPanelMain = new JPanel();
+		jPanelMain.setLayout(new CardLayout());		
+		jPanelMain.add("primero", viewPanel());
+		jPanelMain.add("manual", manualTrPanel);
+		jPanelMain.add("epsg", epsgTrPanel);
+		jPanelMain.add("nad", nadsTrPanel);
+		jPanelMain.add("recents", recentsTrPanel);
+		jPanelMain.add("vista",vistaTrPanel);
+		jPanelMain.add("capa",capaTrPanel);
+		
+		this.setLayout(new BorderLayout());	
+		this.add(jPanelMain, BorderLayout.CENTER);
+		this.add(getButtons(), BorderLayout.SOUTH);
+		
+		setListeners();
+		
+		setDataSource(crsMainPanel.getDataSource());
+		crsMainPanel.getCrsAndTransformationRecentsPanel().loadRecents(crsWkttarget, proj);
+	}
+	
+	/**
+	 * Este mtodo cargar todo el panel utilizado en dicho panel el
+	 *  CRSViewPanel y el combobox de las transformaciones
+	 */
+	private JPanel viewPanel(){
+		JPanel integro = new JPanel();
+		integro.setLayout(new BorderLayout());
+		integro.setBorder(BorderFactory.createTitledBorder(PluginServices.getText(this,"crsAndTransformation")));
+	
+		integro.add(viewPan.capa(),BorderLayout.CENTER);
+		//**integro.add(getJPanel(), null);
+		integro.add(getCombopanel(),BorderLayout.SOUTH);
+		return integro;
+	}
+	
+	/**
+	 * Define el panel en el que se integran el label y el combobox 
+	 * de transformaciones
+	 */
+	public JPanel getCombopanel(){
+		if (jPanelCombo == null){
+			jPanelCombo = new JPanel();
+			jPanelCombo.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
+			jPanelCombo.add(getJLabelTrans());
+			jPanelCombo.add(getJComboOptions());
+		}
+		
+		return jPanelCombo;
+	}
+	/**
+	 * Inicializa la etiqueta 'Seleccione Transformacion'
+	 * @return
+	 */
+	private JLabel getJLabelTrans(){
+		if (jLabelTrans==null){
+			jLabelTrans = new JLabel();
+			jLabelTrans.setPreferredSize(new Dimension(180, 25));
+			jLabelTrans.setText(PluginServices.getText(this, "seleccione_transformacion")+":");
+		}
+		return jLabelTrans;
+	}
+	/**
+	 * Inicializa el comboBox de Tansformaciones
+	 * @return
+	 */
+	public JComboBox getJComboOptions(){
+		if (jComboOptions == null){
+			String[] selection = {PluginServices.getText(this, "sin_transformacion"),
+					PluginServices.getText(this, "recents_transformation"),
+					PluginServices.getText(this, "transformacion_epsg"),
+					PluginServices.getText(this, "transformacion_manual"),
+					PluginServices.getText(this, "transformacion_compuesta"),
+					PluginServices.getText(this, "nadgrids")}; 
+			jComboOptions = new JComboBox(selection);
+			jComboOptions.setPreferredSize(new Dimension(180,25));	
+			jComboOptions.setEnabled(false);
+			jComboOptions.setEditable(false);			
+			jComboOptions.setSelectedIndex(0);
+			newSelection = (String) jComboOptions.getSelectedItem();			
+		}
+		return jComboOptions;
+	}
+	/**
+	 * Agrega los botones: Aceptar, cancelar, siguiente y finalizar
+	 * @return
+	 */
+	private JPanel getButtons() {
+		if(jPanelButtons == null) {
+			jPanelButtons = new JPanel();
+			jPanelButtons.setLayout(new FlowLayout(FlowLayout.RIGHT,10,10));
+			jPanelButtons.add(getJButtonCancel());
+			jPanelButtons.add(getJButtonBefore());
+			jPanelButtons.add(getJButtonNext());
+			jPanelButtons.add(getJButtonAccept());
+		}
+		return jPanelButtons;
+	}
+	/**
+	 * Inicializa el botn 'Anterior'
+	 * @return
+	 */
+	public JButton getJButtonBefore(){
+		if(jButtonBefore == null) {
+			jButtonBefore = new JButton();
+			jButtonBefore.setText(PluginServices.getText(this,"anterior"));
+			jButtonBefore.setMnemonic('B');			
+			jButtonBefore.setPreferredSize(new Dimension(100,25));			
+			jButtonBefore.setEnabled(false);
+		}
+		return jButtonBefore;
+	}
+	/**
+	 * Inicializa el botn 'Finalizar'
+	 * @return
+	 */
+	public JButton getJButtonAccept() {
+		if(jButtonAccept == null) {
+			jButtonAccept = new JButton();
+			jButtonAccept.setText(PluginServices.getText(this,"finalizar"));
+			jButtonAccept.setMnemonic('O');
+			jButtonAccept.setVisible(true);
+			jButtonAccept.setEnabled(false);
+			jButtonAccept.setPreferredSize(new Dimension(100,25));
+		}
+		return jButtonAccept;
+	}
+	/**
+	 * Inicializa el botn 'Siguiente'
+	 * @return
+	 */
+	public JButton getJButtonNext() {
+		if(jButtonNext == null) {
+			jButtonNext = new JButton();
+			jButtonNext.setText(PluginServices.getText(this,"siguiente"));
+			jButtonNext.setMnemonic('S');
+			jButtonNext.setVisible(true);
+			jButtonNext.setPreferredSize(new Dimension(100,25));
+		}
+		return jButtonNext;
+	}
+	/**
+	 * Inicializa el botn 'Cancelar'
+	 * @return
+	 */
+	public JButton getJButtonCancel() {
+		if(jButtonCancel == null) {
+			jButtonCancel = new JButton();
+			jButtonCancel.setText(PluginServices.getText(this,"cancel"));
+			jButtonCancel.setMnemonic('C');
+			jButtonCancel.setPreferredSize(new Dimension(100,25));
+		}
+		return jButtonCancel;
+	}
+	
+	public void setTargetNad(boolean tarNad){
+		targetNad = tarNad;
+	}
+	
+	public boolean getTargetNad(){
+		return targetNad;
+	}
+	
+	/*
+	 * revisar esta solucion
+	 */
+	public ICrs getProjection() {
+		if (sin_tr) {
+			ICrs crs;
+			try {
+				if (getDataSource().equals(PluginServices.getText(this,"EPSG"))){
+					//crs = new CrsFactory().getCRS(crsMainPanel.getEpsgPanel().getCodeCRS(),crsMainPanel.getEpsgPanel().getWKT());
+					crs = new CrsFactory().getCRS("EPSG:"+crsMainPanel.getEpsgPanel().getCodeCRS());
+				}
+				else if (getDataSource().equals(PluginServices.getText(this,"IAU2000"))){
+					//crs = new CrsFactory().getCRS(crsMainPanel.getIauPanel().getCodeCRS(),crsMainPanel.getIauPanel().getWKT());
+					crs = new CrsFactory().getCRS("IAU2000:"+crsMainPanel.getIauPanel().getCodeCRS());
+				} 
+				else if (getDataSource().equals(PluginServices.getText(this,"recientes"))){
+					//crs = new CrsFactory().getCRS(crsMainPanel.getRecentsPanel().getCodeCRS(),crsMainPanel.getRecentsPanel().getCrs().getWKT());
+					crs = new CrsFactory().getCRS(crsMainPanel.getCrsAndTransformationRecentsPanel().getAuthority());
+				} 
+				else if (getDataSource().equals(PluginServices.getText(this,"ESRI"))){
+					//crs = new CrsFactory().getCRS(crsMainPanel.getEsriPanel().getCodeCRS(),crsMainPanel.getEsriPanel().getWKT());
+					crs = new CrsFactory().getCRS("ESRI:"+crsMainPanel.getEsriPanel().getCodeCRS());
+				} 
+				else if (getDataSource().equals(PluginServices.getText(this,"newCRS"))){
+					crs = new CrsFactory().getCRS("USR:"+crsMainPanel.getNewCrsPanel().getCodeCRS());
+				}
+				else {
+					sin_tr = false;
+					return null;
+				}
+				sin_tr = false;
+				return crs;
+			} catch (CrsException e) {
+				e.printStackTrace();
+			}
+			return null;
+		}		
+		return (ICrs) crsfirst;		
+	}
+	
+	public void setProjection(IProjection proj) {
+		crsfirst = proj;
+	}
+	
+	/**
+	 * Mtodo para aplicarle los eventos necesarios en el panel actual. La
+	 * definicin de estos listeners estarn en la clase CRSMainTrPanelListener
+	 *
+	 */
+	private void setListeners(){
+
+		CRSMainTrPanelListener listener = new CRSMainTrPanelListener(this);
+		
+		jButtonAccept.addActionListener(listener);
+		jButtonBefore.addActionListener(listener);
+		jButtonCancel.addActionListener(listener);
+		jButtonNext.addActionListener(listener);
+		crsMainPanel.getJComboOptions().addItemListener(listener);
+		getJComboOptions().addActionListener(listener);
+		getRecentsTrPanel().getJButtonInfo().addActionListener(listener);
+		
+		ListSelectionModel rowSM = crsMainPanel.getEpsgPanel().getJTable().getSelectionModel();
+		rowSM.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMiau = crsMainPanel.getIauPanel().getJTable().getSelectionModel();
+		rowSMiau.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMrecents = crsMainPanel.getCrsAndTransformationRecentsPanel().getJTable().getSelectionModel();
+		rowSMrecents.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMesri = crsMainPanel.getEsriPanel().getJTable().getSelectionModel();
+		rowSMesri.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMusr = crsMainPanel.getNewCrsPanel().getJTable().getSelectionModel();
+		rowSMusr.addListSelectionListener(listener);
+		
+		crsMainPanel.getEsriPanel().getJTable().addMouseListener(listener);
+		crsMainPanel.getEpsgPanel().getJTable().addMouseListener(listener);
+        crsMainPanel.getCrsAndTransformationRecentsPanel().getJTable().addMouseListener(listener);
+        crsMainPanel.getIauPanel().getJTable().addMouseListener(listener);
+        crsMainPanel.getNewCrsPanel().getJTable().addMouseListener(listener);
+        getEpsgTrPanel().getJTable().addMouseListener(listener);
+        getRecentsTrPanel().getJTable().addMouseListener(listener);
+        
+        ListSelectionModel rowSMEpsgTr = getEpsgTrPanel().getJTable().getSelectionModel();
+		rowSMEpsgTr.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMRecentsTr = getRecentsTrPanel().getJTable().getSelectionModel();
+		rowSMRecentsTr.addListSelectionListener(listener);
+		
+		getNadsTrPanel().getJComboNadFile().addItemListener(listener);
+		
+		getManualTrPanel().getTx_Translation().addKeyListener(listener);
+		getManualTrPanel().getTy_Translation().addKeyListener(listener);
+		getManualTrPanel().getTz_Translation().addKeyListener(listener);
+		getManualTrPanel().getTx_Rotation().addKeyListener(listener);
+		getManualTrPanel().getTy_Rotation().addKeyListener(listener);
+		getManualTrPanel().getTz_Rotation().addKeyListener(listener);
+		getManualTrPanel().getTscale().addKeyListener(listener);
+	}
+		
+	public void setDataSource(String sour){
+		dataSource = sour;
+	}
+	
+	public String getDataSource(){
+		return crsMainPanel.getDataSource();
+	}
+	
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle(PluginServices.getText(this,"crsview"));
+		return m_viewinfo;
+	}
+
+	public CRSMainPanel getCrsMainPanel() {
+		return crsMainPanel;
+	}
+
+	public TransformationEpsgPanel getEpsgTrPanel() {
+		return epsgTrPanel;
+	}
+
+	public TransformationManualPanel getManualTrPanel() {
+		return manualTrPanel;
+	}
+
+	public TransformationNadgridsPanel getNadsTrPanel() {
+		return nadsTrPanel;
+	}
+	
+	public TransformationRecentsPanel getRecentsTrPanel() {
+		return recentsTrPanel;
+	}
+
+	public boolean isEpsg_tr() {
+		return epsg_tr;
+	}
+
+	public boolean isManual_tr() {
+		return manual_tr;
+	}
+
+	public boolean isNads_tr() {
+		return nads_tr;
+	}
+	
+	public boolean isRecents_tr() {
+		return recents_tr;
+	}
+
+	public boolean isSin_tr() {
+		return sin_tr;
+	}
+
+	public void setEpsg_tr(boolean epsg_tr) {
+		this.epsg_tr = epsg_tr;
+	}
+
+	public void setManual_tr(boolean manual_tr) {
+		this.manual_tr = manual_tr;
+	}
+
+	public void setNads_tr(boolean nads_tr) {
+		this.nads_tr = nads_tr;
+	}
+	
+	public void setRecents_tr(boolean recents_tr) {
+		this.recents_tr = recents_tr;
+	}
+
+	public void setSin_tr(boolean sin_tr) {
+		this.sin_tr = sin_tr;
+	}
+
+	public boolean isCancelYes() {
+		return cancelYes;
+	}
+
+	public void setCancelYes(boolean cancelYes) {
+		this.cancelYes = cancelYes;
+	}
+
+	public IProjection getCrsfirst() {
+		return crsfirst;
+	}
+
+	public JPanel getJPanelMain() {
+		return jPanelMain;
+	}
+
+	public String getNewSelection() {
+		return newSelection;
+	}
+
+	public void setNewSelection(String newSelection) {
+		this.newSelection = newSelection;
+	}
+	
+	public CrsWkt getCrsWkt_target() {
+		return crsWkt_target;
+	}
+	
+	public void setCrsWkt_target(CrsWkt crsWkt_target) {
+		this.crsWkt_target = crsWkt_target;
+	}
+
+	public TransformationVistaPanel getVistaTrPanel() {
+		return vistaTrPanel;
+	}
+
+	public TransformationCapaPanel getCapaTrPanel() {
+		return capaTrPanel;
+	}
+
+	public boolean isVista_tr() {
+		return vista_tr;
+	}
+
+	public boolean isCapa_tr() {
+		return capa_tr;
+	}
+
+	public boolean isCompuesta_tr() {
+		return compuesta_tr;
+	}
+
+	public void setCapa_tr(boolean capa_tr) {
+		this.capa_tr = capa_tr;
+	}
+
+	public void setCompuesta_tr(boolean compuesta_tr) {
+		this.compuesta_tr = compuesta_tr;
+	}
+
+	public void setVista_tr(boolean vista_tr) {
+		this.vista_tr = vista_tr;
+	}
+
+	/*public EpsgConnection getConnection() {
+		return connection;
+	}
+
+	public void setConnection(EpsgConnection connect) {
+		this.connection = connect;
+	}*/
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/CRSMainTrPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationCapaPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationCapaPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationCapaPanel.java	(revision 25287)
@@ -0,0 +1,424 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.CardLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.ListSelectionModel;
+
+import org.gvsig.crs.gui.CRSMainTrPanel;
+import org.gvsig.crs.gui.listeners.TransformationCompuestaPanelListener;
+import org.gvsig.crs.ogr.TransEPSG;
+import org.gvsig.crs.persistence.CompTrData;
+import org.gvsig.crs.persistence.RecentTrsPersistence;
+import org.gvsig.crs.persistence.TrData;
+
+import com.iver.andami.PluginServices;
+
+
+/**
+ * Clase que define la trandformacion de la capa en una transformacion compuesta 
+ *
+ * @author Jose Luis Gomez Martinez (JoseLuis.Gomez@uclm.es)
+ * @author Luisa Marina Fernandez (luisam.fernandez@uclm.es)
+ *
+ */
+public class TransformationCapaPanel extends JPanel implements ActionListener, ItemListener{
+
+	private static final long serialVersionUID = 1L;
+	private JLabel lblTransCapa=null;
+	private JComboBox jComboOptions=null;
+	private JPanel pNorth=null;
+	private TransformationManualPanel manualTrPanel = null;
+	private TransformationEpsgPanel epsgTrPanel = null;
+	private TransformationNadgridsPanel nadsTrPanel = null;
+	private TransformationRecentsPanel recentsTrPanel = null;
+	private JPanel pCenter=null;
+	private JLabel lblCrsCapa = null;
+	private JLabel lblCrsCapaCode = null;
+	
+	String crs_target = null;
+	String crs_source = null;
+	String sourceTransformation = null;
+	CRSMainTrPanel crsMainTrPanel = null;
+	
+	boolean recentCompTransformation = false;
+	
+	public TransformationCapaPanel(String target, CRSMainTrPanel p) {
+		super();
+		crsMainTrPanel = p;
+		setCrs_target(target);
+		manualTrPanel = new TransformationManualPanel();
+		epsgTrPanel = new TransformationEpsgPanel(target);
+		nadsTrPanel = new TransformationNadgridsPanel(false);
+		recentsTrPanel = new TransformationRecentsPanel();
+			
+		setListeners();
+	
+		this.setLayout(new BorderLayout());
+		//Aadir al norte el panel que contiene las diferentes opciones de transformacion
+		this.add(getPNorth(),BorderLayout.NORTH);
+		this.add(getPCenter(),BorderLayout.CENTER);
+	}
+	
+	public JPanel getPCenter() {
+		if (pCenter == null) {
+			pCenter = new JPanel();
+			pCenter.setLayout(new CardLayout());		
+		
+			pCenter.add("recents", recentsTrPanel);
+			pCenter.add("manual", manualTrPanel);
+			pCenter.add("epsg", epsgTrPanel);
+			pCenter.add("nad", nadsTrPanel);
+		}
+		
+		return pCenter;
+	}
+
+	
+	public JLabel getLblTransCapa() {
+		if(lblTransCapa==null){
+			lblTransCapa=new JLabel(PluginServices.getText(this,"transformacion_capa"));
+		}
+		return lblTransCapa;
+	}
+	
+	public JLabel getLblCrsCapa() {
+		if(lblCrsCapa==null){
+			lblCrsCapa=new JLabel(PluginServices.getText(this,"crs_layer")+":");
+		}
+		return lblCrsCapa;
+	}
+	
+	public JLabel getLblCrsCapaCode() {
+		if(lblCrsCapaCode==null){
+			lblCrsCapaCode=new JLabel();
+		}
+		return lblCrsCapaCode;
+	}
+	/**
+	 * Definicion del panel que contiene el Label y el Combo de 
+	 * las transformaciones de la capa
+	 * @return
+	 */
+	public JPanel getPNorth() {
+		if (pNorth==null){
+			pNorth=new JPanel();
+			pNorth.setLayout(new GridLayout(2,1));
+			JPanel p1=new JPanel(new FlowLayout(FlowLayout.LEFT,10,3));
+			p1.add(getLblCrsCapa());
+			p1.add(getLblCrsCapaCode());
+			JPanel p2=new JPanel(new FlowLayout(FlowLayout.LEFT,10,3));
+			p2.add(getLblTransCapa());
+			p2.add(getJComboOptions());
+			
+			pNorth.add(p1);
+			pNorth.add(p2);
+		}
+		return pNorth;
+	}
+	/**
+	 * Definicin del ComboBox que contiene las diferentes transformaciones 
+	 * aplicables a la capa
+	 * @return
+	 */
+
+	public JComboBox getJComboOptions() {
+		if (jComboOptions == null){
+			String[] selection = {PluginServices.getText(this, "recents_transformation"),
+					PluginServices.getText(this, "transformacion_epsg"),
+					PluginServices.getText(this, "transformacion_manual"), 
+					PluginServices.getText(this, "nadgrids")}; 
+			jComboOptions = new JComboBox(selection);
+			jComboOptions.setPreferredSize(new Dimension(180,25));
+			jComboOptions.addActionListener(this);
+			jComboOptions.addItemListener(this);
+			jComboOptions.setSelectedItem(PluginServices.getText(this,"recents_transformation"));
+		}
+		
+		return jComboOptions;
+	}
+	
+	/**
+	 * Mtodo para aplicarle los eventos necesarios en el panel actual. La
+	 * definicin de estos listeners estarn en la clase CRSMainTrPanelListener
+	 *
+	 */
+	private void setListeners(){
+
+		TransformationCompuestaPanelListener listener = new TransformationCompuestaPanelListener(this, crsMainTrPanel);
+		
+		getJComboOptions().addActionListener(listener);
+		getRecentsTrPanel().getJButtonInfo().addActionListener(listener);
+				
+        ListSelectionModel rowSMEpsgTr = getEpsgTrPanel().getJTable().getSelectionModel();
+		rowSMEpsgTr.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMRecentsTr = getRecentsTrPanel().getJTable().getSelectionModel();
+		rowSMRecentsTr.addListSelectionListener(listener);
+		
+		getNadsTrPanel().getJComboNadFile().addItemListener(listener);
+				
+		getManualTrPanel().getTx_Translation().addKeyListener(listener);
+		getManualTrPanel().getTy_Translation().addKeyListener(listener);
+		getManualTrPanel().getTz_Translation().addKeyListener(listener);
+		getManualTrPanel().getTx_Rotation().addKeyListener(listener);
+		getManualTrPanel().getTy_Rotation().addKeyListener(listener);
+		getManualTrPanel().getTz_Rotation().addKeyListener(listener);
+		getManualTrPanel().getTscale().addKeyListener(listener);
+	}
+
+		
+		
+	public void actionPerformed(ActionEvent e) {
+			
+	}
+	
+	public TransformationEpsgPanel getEpsgTrPanel() {
+		return epsgTrPanel;
+	}
+
+	public TransformationManualPanel getManualTrPanel() {
+		return manualTrPanel;
+	}
+
+	public TransformationNadgridsPanel getNadsTrPanel() {
+		return nadsTrPanel;
+	}
+	
+	public TransformationRecentsPanel getRecentsTrPanel() {
+		return recentsTrPanel;
+	}
+	
+	public void setCrs_target(String cod) {
+		crs_target = cod;
+	}
+	
+	public String getCrs_target() {
+		return crs_target;
+	}
+	
+	public void setCrs_source(String authority) {
+		crs_source = authority;
+		getLblCrsCapaCode().setText(authority);
+	}
+	
+	public String getCrs_source() {
+		return crs_source;
+	}
+	
+	public void fillData() {
+		String[] source = getCrs_source().split(":");
+		String[] target = getCrs_target().split(":");		
+		recentsTrPanel.loadRecentsCompuesta(getCrs_source());
+		epsgTrPanel.setSourceCompuesta(getCrs_source());
+		nadsTrPanel.setCode(Integer.parseInt(source[1]));
+		nadsTrPanel.setSourceAbrev(PluginServices.getText(this, source[0]), source[1]);
+		nadsTrPanel.setTargetAbrev(PluginServices.getText(this, target[0]), target[1]);
+		nadsTrPanel.getJComboNadFile().setSelectedIndex(0);
+		manualTrPanel.setCode(Integer.parseInt(source[1]));
+		manualTrPanel.setSourceAbrev(PluginServices.getText(this, source[0]), source[1]);
+		manualTrPanel.setTargetAbrev(PluginServices.getText(this, target[0]), target[1]);
+		getJComboOptions().setSelectedIndex(0);
+		/*
+		 * Se dice que no es una transformacion cogida de las recientes compuestas
+		 * para un correcto funcionamiento de los botones.
+		 */
+		setRecentCompTransformation(false);
+	}
+		
+	public void setSourceTransformation(String trans) {
+		sourceTransformation = trans;
+	}
+	
+	public String getSourceTransformation() {
+		return sourceTransformation;
+	}
+	
+	public String getParamsEpsg(String [] values) {
+		String params = "+towgs84=";
+		params += values[0];
+		for(int i = 1; i < values.length; i++)
+			params +=","+values[i];
+		return params;
+	}
+	
+	public String getManualParams() {
+		if(getManualTrPanel().getTx_Translation().getText().equals("")){
+			getManualTrPanel().getTx_Translation().setText("0");
+		}
+		else if (getManualTrPanel().getTy_Translation().getText().equals("")){
+			getManualTrPanel().getTy_Translation().setText("0");
+		}
+		else if (getManualTrPanel().getTz_Translation().getText().equals("")){
+			getManualTrPanel().getTz_Translation().setText("0");
+		}
+		else if (getManualTrPanel().getTx_Rotation().getText().equals("")){
+			getManualTrPanel().getTx_Rotation().setText("0");
+		}
+		else if (getManualTrPanel().getTy_Rotation().getText().equals("")){
+			getManualTrPanel().getTy_Rotation().setText("0");
+		}
+		else if (getManualTrPanel().getTz_Rotation().getText().equals("")){
+			getManualTrPanel().getTz_Rotation().setText("0");
+		}
+		else if (getManualTrPanel().getTscale().getText().equals("")){
+			getManualTrPanel().getTscale().setText("0");
+		}		
+		String param = "+towgs84="+ getManualTrPanel().getTx_Translation().getText()+","+
+						getManualTrPanel().getTy_Translation().getText()+","+
+						getManualTrPanel().getTz_Translation().getText()+","+
+						getManualTrPanel().getTx_Rotation().getText()+","+
+						getManualTrPanel().getTy_Rotation().getText()+","+
+						getManualTrPanel().getTz_Rotation().getText()+","+
+						getManualTrPanel().getTscale().getText() + " ";
+		return param;		
+	}
+	
+	public String getNadsParams(String info) {
+		String[] partes = info.split("\\(");
+		String nadFile = partes[0];		
+		return "+nadgrids="+nadFile;
+	}
+	
+	/**
+	 * cuando utilizamos crs+transformacion, cargamos los paneles para que
+	 * el usuario pueda consultar la transformacion utilizada...
+	 * @param details
+	 */
+	public void fillData(String details) {
+		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+		TrData crsTrDataArray[] = trPersistence.getArrayOfTrData();
+		CompTrData comp = null;
+		
+		for (int iRow = crsTrDataArray.length-1; iRow >= 0; iRow--) {
+			if (details.equals(crsTrDataArray[iRow].getAuthority()+":"+crsTrDataArray[iRow].getCode()+" <--> "+crsTrDataArray[iRow].getDetails()) && crsTrDataArray[iRow].getAuthority().equals(PluginServices.getText(this, "COMP"))) {
+				comp = (CompTrData) crsTrDataArray[iRow];				
+				break;
+			}
+		}
+		if (comp.getFirstTr().getAuthority().equals(PluginServices.getText(this, "EPSG"))) {
+			getJComboOptions().setSelectedIndex(1);
+			int cod = Integer.parseInt(comp.getFirstTr().getCrsSource().split(":")[1]);
+			String code = String.valueOf(comp.getFirstTr().getCode());
+			//getEpsgTrPanel().setSource(PluginServices.getText(this, "EPSG"), cod);
+			for (int i=0; i< getEpsgTrPanel().getJTable().getRowCount(); i++) {
+				if (code.equals((String)getEpsgTrPanel().getJTable().getValueAt(i, 0))) {
+					//seleccionarlo						
+					getEpsgTrPanel().getJTable().setRowSelectionInterval(i,i);
+					break;						
+				}
+			}
+		} else if (comp.getFirstTr().getAuthority().equals(PluginServices.getText(this, "USR"))) {
+			getJComboOptions().setSelectedIndex(2);
+			String data = comp.getFirstTr().getDetails();
+			data = data.trim().substring(1, data.length()-1);
+			String values[] = data.split(",");
+			getManualTrPanel().getTx_Translation().setText(values[0]);
+			getManualTrPanel().getTy_Translation().setText(values[1]);
+			getManualTrPanel().getTz_Translation().setText(values[2]);
+			getManualTrPanel().getTx_Rotation().setText(values[3]);
+			getManualTrPanel().getTy_Rotation().setText(values[4]);
+			getManualTrPanel().getTz_Rotation().setText(values[5]);
+			getManualTrPanel().getTscale().setText(values[6]);
+			
+		} else if (comp.getFirstTr().getAuthority().equals(PluginServices.getText(this, "NADGR"))) {
+			getJComboOptions().setSelectedIndex(3);
+			String data[] = comp.getFirstTr().getDetails().split(" ");
+			String fichero = data[0];
+			String[] authority = data[1].substring(1,data[1].length()-1).split(":");
+			//Mirar como indicarle el CRS al que se le aplica...			
+			getNadsTrPanel().setSourceAbrev(authority[0], authority[1]);
+			
+			for (int i = 0; i< getNadsTrPanel().getJComboNadFile().getItemCount(); i++) {
+				if (fichero.equals((String)getNadsTrPanel().getJComboNadFile().getItemAt(i))) {
+					getNadsTrPanel().getJComboNadFile().setSelectedIndex(i);
+					break;
+				}
+			}			
+		}
+		/*
+		 * Por aquí solo pasa cuando se ha seleccionado una transformación compuesta de recientes.
+		 * Pondremos el valor de que es un crs compuesto reciente a true para que el botón de siguiente
+		 * salga habilitado.
+		 */
+		setRecentCompTransformation(true);
+	}
+	
+	public void setRecentCompTransformation(boolean state) {
+		recentCompTransformation = state;
+	}
+	
+	public boolean getRecentCompTransformation() {
+		return recentCompTransformation;
+	}
+	
+	public void resetData() {
+		fillData();
+	}
+	
+	public boolean isSthSelected() {
+		if (getRecentsTrPanel().selectedRowTable == -1)
+			return false;
+		return true;
+	}
+
+	public void itemStateChanged(ItemEvent e) {
+		/*
+		 * Cambio en la seleccion del tipo de transformacion en la capa dentro de una transformacion
+		 * compuesta. Se podria utilizar para conocer si hay algo seleccionado o no para el correcto
+		 * funcionamiento del panel de botones... De momento vacio porque funciona bien.
+		 */		
+	}
+	
+	
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationCapaPanel.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/ProjChooserPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/ProjChooserPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/ProjChooserPanel.java	(revision 25287)
@@ -0,0 +1,252 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+package org.gvsig.crs.gui.panels;
+
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionListener;
+
+import org.gvsig.gui.beans.swing.JButton;
+import javax.swing.JLabel;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.dialog.CSSelectionDialog;
+import org.gvsig.crs.gui.dialog.TRSelectionDialog;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.cit.gvsig.project.documents.gui.FOpenDialog;
+import com.iver.cit.gvsig.gui.panels.CRSSelectPanel;
+import com.iver.cit.gvsig.project.documents.view.gui.View;
+
+/**
+ * @author Luis W. Sevilla (sevilla_lui@gva.es)
+ */
+public class ProjChooserPanel extends CRSSelectPanel {
+    
+	private static final long serialVersionUID = 1L;
+	
+	public  ICrs curProj = null; //(IProjection) new CRSFactory().getCRS("EPSG:23030");
+	
+	private JLabel jLblProj = null;
+	private JLabel jLblProjName = null;
+	private JButton jBtnChangeProj = null;
+	private boolean okPressed = false;
+	private String abrev;
+	boolean panel = false;
+	boolean targetNad = false;
+	String dataSource = "EPSG";
+	
+	private ActionListener actionListener = null;
+	
+	public ProjChooserPanel(IProjection proj) {
+		super(proj);	
+		IProjection pr = proj;
+		IWindow activeWindow = PluginServices.getMDIManager().getActiveWindow();
+    	if (activeWindow instanceof View) {		
+    		View activeView = (com.iver.cit.gvsig.project.documents.view.gui.View) activeWindow;
+    		pr = activeView.getMapControl().getProjection();
+    	}
+    	FOpenDialog.setLastProjection(pr);	
+		setCurProj(pr);
+		initialize();		
+	}
+	
+
+	/**
+	 * This method initializes this
+	 *
+	 * @return void
+	 */
+	private void initialize() {
+		this.setLayout(new GridLayout(3,1));
+        this.setLayout(new FlowLayout(FlowLayout.LEFT, 15, 0));
+        setPreferredSize(new java.awt.Dimension(330,35));
+        this.setSize(new java.awt.Dimension(330,23));
+        this.add(getJLblProjName(), null);
+        this.add(getJLblProj(), null);
+        this.add(getJBtnChangeProj(), null);
+       
+        
+        //cambiar cuando la parte de JLuis se ensamble
+        if(!((ICrs)curProj).getAbrev().equals("EPSG:23030")){
+        	dataSource = curProj.getCrsWkt().getAuthority()[0];
+        	jLblProj.setText(dataSource+":" +String.valueOf(curProj.getCode()));
+        	//jLblProj.setText(((ICrs)curProj).getCrsWkt().getName());
+        }
+        else
+        	jLblProj.setText("EPSG:23030");        
+		initBtnChangeProj();
+	}
+
+	private void initBtnChangeProj() {
+		getJBtnChangeProj().addActionListener(new java.awt.event.ActionListener() {
+			public void actionPerformed(java.awt.event.ActionEvent e) {
+				CSSelectionDialog csSelect = null;
+				TRSelectionDialog trSelect = null;
+				if (!isTransPanelActive()){
+					okPressed = false;
+					csSelect = new CSSelectionDialog((ICrs) curProj);
+					csSelect.setProjection(curProj);
+					csSelect.initRecents(curProj);
+					//csSelect.setLayout(new GridLayout(0,1));
+					
+			        PluginServices.getMDIManager().addWindow(csSelect);
+			        abrev = dataSource+ ":" +String.valueOf(curProj.getCode());
+			        if (csSelect.isOkPressed()) {
+			        	curProj = (ICrs) csSelect.getProjection();
+			        	dataSource = curProj.getCrsWkt().getAuthority()[0];
+			        	//dataSource = csSelect.getDataSource();
+			        	abrev = dataSource+ ":" +String.valueOf(curProj.getCode());
+			        	
+			        	jLblProj.setText(dataSource+ ":" +String.valueOf(curProj.getCode()));//.getAbrev());
+			        	FOpenDialog.setLastProjection(curProj);
+			        	okPressed = true;
+			        	if (actionListener != null) {
+			        		actionListener.actionPerformed(e);
+			        	}
+			        }else			        	
+			        	jLblProj.setText(abrev);  
+				}
+				else {
+					okPressed = false;										
+			    	trSelect = new TRSelectionDialog(curProj);
+					
+					trSelect.setProjection(curProj);
+			        
+					trSelect.setLayout(new GridLayout(0,1));
+					
+					PluginServices.getMDIManager().addWindow(trSelect);
+					setTargetNad(trSelect.getTargetNad());
+			        //abrev = curProj.getAbrev();
+					
+			        if (trSelect.getProjection() != curProj) {
+			        	curProj = (ICrs) trSelect.getProjection();
+			        	dataSource = curProj.getCrsWkt().getAuthority()[0];
+			        	//dataSource = trSelect.getProjPanel().getDataSource();
+			        	//abrev = trSelect.getProjectionName();
+			        	jLblProj.setText(dataSource+ ":" +String.valueOf(curProj.getCode()));//abrev);
+			        	FOpenDialog.setLastProjection(curProj);			        	
+			        	okPressed = true;
+			        	
+			        	if (actionListener != null) {
+			        		actionListener.actionPerformed(e);
+			        	}
+			        }else
+			        	jLblProj.setText(dataSource+ ":" +String.valueOf(curProj.getCode()));//abrev);
+					
+				}
+					        	
+			}
+		});
+	}
+
+	public JLabel getJLblProjName() {
+		if (jLblProjName == null) {
+	        jLblProjName = new JLabel("Proyeccion actual");
+			jLblProjName.setText(PluginServices.getText(this,"proyeccion_actual")); //$NON-NLS-1$
+		}
+		return jLblProjName;
+	}
+	
+	public JLabel getJLabel() {
+		return getJLblProjName();
+	}
+
+	public JLabel getJLblProj() {
+		if (jLblProj == null) {
+	        jLblProj = new JLabel();
+			jLblProj.setText(curProj.getAbrev());
+		}
+		return jLblProj;
+	}
+	public void addBtnChangeProjActionListener(java.awt.event.ActionListener al) {
+		jBtnChangeProj.addActionListener(al);
+	}
+
+	/**
+	 * This method initializes jButton
+	 *
+	 * @return javax.swing.JButton
+	 */
+	public JButton getJBtnChangeProj() {
+		if (jBtnChangeProj == null) {
+			jBtnChangeProj = new JButton();			
+			jBtnChangeProj.setText("..."); //$NON-NLS-1$
+			jBtnChangeProj.setPreferredSize(new Dimension(50, 23));
+		}
+		return jBtnChangeProj;
+	}
+	
+	public void setTargetNad(boolean tarNad){
+		targetNad = tarNad;
+	}
+	
+	public boolean getTargetNad(){
+		return targetNad;
+	}
+	
+	/**
+	 * @return Returns the curProj.
+	 */
+	public IProjection getCurProj() {
+		return curProj;
+	}
+	/**
+	 * @param curProj The curProj to set.
+	 */
+	public void setCurProj(IProjection curProj) {
+		this.curProj = (ICrs) curProj;
+	}
+	/**
+	 * @return Returns the okPressed.
+	 */
+	public boolean isOkPressed() {
+		return okPressed;
+	}
+	/**
+	 * @param actionListener The actionListener to set.
+	 */
+	public void addActionListener(ActionListener actionListener) {
+		this.actionListener = actionListener;
+	}
+}  //  @jve:decl-index=0:visual-constraint="10,10"

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/ProjChooserPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/EPSGpanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/EPSGpanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/EPSGpanel.java	(revision 25287)
@@ -0,0 +1,844 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import javax.swing.BorderFactory;
+import javax.swing.ButtonGroup;
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+import javax.swing.ListSelectionModel;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.ogr.Epsg2wkt;
+import org.gvsig.crs.ogr.CrsEPSG;
+
+import com.iver.andami.PluginServices;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+import es.idr.teledeteccion.connection.EpsgConnection;
+import es.idr.teledeteccion.connection.Query;
+
+/**
+ * Clase perteneciente al panel de eleccin de CRS del repositorio de la
+ * EPSG, realiza la bsqueda y filtra los vlidos.
+ * 
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ * @author Luisa Marina Fernndez (luisam.fernandez@uclm.es)
+ *
+ */
+public class EPSGpanel extends JPanel implements KeyListener, ActionListener{
+
+	private static final long serialVersionUID = 1L;
+	
+	String cadWKT = "";
+	String cad_valida = "";
+	public String key;
+	public String crs_kind = null;
+	String[] soported_crs = {"projected","geographic 2D","geographic 3D", "engineering", "vertical", "compound", "geocentric"};
+	String[] not_soported_crs = {};
+	
+	int iteracion = 0;
+	int transf = 0;
+	int source_cod = 0;
+	int method_code = 0;
+	int datum_code = 0;
+	int projection_conv_code = 0;
+	public int epsg_code  = 0;
+	public int selectedRowTable = -1;
+	private int codeCRS = -1;
+	int[] valid_method_code = {9800, 9801, 9802, 9803, 9804, 9805, 9806, 9807, 9808, 9809, 9810, 
+			9811, 9812, 9813, 9814, 9815, 9816, 9817, 9602, 9659, 9818, 9819, 9820, 9822, 
+			9827};
+	
+	
+	boolean tecla_valida = false;
+	boolean source_yn = false;
+	
+
+	private JRadioButton codeRadioButton = null;
+	private JRadioButton nameRadioButton = null;
+	private JRadioButton areaRadioButton = null;
+	private ButtonGroup optGroup;
+	private JPanel groupRadioButton = null;
+	
+	public EpsgConnection connect = null;
+	public JPanel EPSGpanel = null;
+	private JLabel lblCriterio;
+	private JButton infoCrs = null;
+	private JButton searchButton = null;
+	private JTextField searchTextField = null;
+	public JTable jTable = null;
+	private JScrollPane jScrollPane = null;
+	public DefaultTableModel dtm = null;	
+	public TableSorter sorter = null;
+	
+	private int projectionCode=-1;
+	
+	/**
+	 * Construye el Objeto EpsgPanel
+	 *
+	 */
+	public EPSGpanel(){
+		initialize();
+	}
+	/*
+	 * Define las propiedades y agrega los componentes del EPSGPanel
+	 */
+	private void initialize(){
+		this.setLayout(new BorderLayout());
+		JPanel pNorth=new JPanel();
+		pNorth.setLayout(new GridLayout(2,1));
+		pNorth.setBorder(BorderFactory.createEmptyBorder(3,3,3,3));
+		pNorth.add(getGroupRadioButton());
+		JPanel pInNorth = new JPanel();
+		pInNorth.setLayout(new FlowLayout(FlowLayout.LEFT,10,1));
+		pInNorth.add(getSearchButton());
+		pInNorth.add(getSearchTextField());
+		pNorth.add(pInNorth);
+		this.add(pNorth,BorderLayout.NORTH);
+		this.add(getJScrollPane(), BorderLayout.CENTER);	
+		JPanel pSouth=new JPanel(new FlowLayout(FlowLayout.RIGHT,10,3));
+		pSouth.add(getInfoCrs());
+		this.add(pSouth,BorderLayout.SOUTH);
+	}
+	/**
+	 * Establece la conexin con la Base de Datos de la Epsg
+	 *
+	 */
+	public void connection(){
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+	}
+	 /**
+	  * Inicializa el botn de opcin 'cdigo' 
+	  * @return
+	  */   
+	private JRadioButton getCodeRadioButton() {
+		if (codeRadioButton == null) {
+			codeRadioButton = new JRadioButton();
+			codeRadioButton.setText(PluginServices.getText(this,"por_codigo"));//setText("By Code EPSG");
+			codeRadioButton.setSelected(true);
+			codeRadioButton.addActionListener(this);
+		}
+		return codeRadioButton;
+	}
+	/**
+	 * Inicializa el botn de opcin 'nombre'
+	 * @return
+	 */ 
+	private JRadioButton getNameRadioButton() {
+		if (nameRadioButton == null) {
+			nameRadioButton = new JRadioButton();
+			nameRadioButton.setText(PluginServices.getText(this,"por_nombre"));
+			nameRadioButton.addActionListener(this);
+		}
+		return nameRadioButton;
+	}
+	/**
+	 * Inicializa el botn de opcin 'Area'
+	 * @return
+	 */
+	private JRadioButton getAreaRadioButton() {
+		if (areaRadioButton == null) {
+			areaRadioButton = new JRadioButton();
+			areaRadioButton.setText(PluginServices.getText(this,"por_area"));
+			areaRadioButton.addActionListener(this);
+		}
+		return areaRadioButton;
+	}
+	 /**
+	  * Obtiene el panel con todos los botones de opcin
+	  * @return
+	  */
+	private JPanel getGroupRadioButton() {
+		if (groupRadioButton == null) {
+			groupRadioButton = new JPanel();
+			groupRadioButton.setLayout(new GridLayout(1,4));
+			groupRadioButton.add(getLblCriterio());
+			groupRadioButton.add(getCodeRadioButton());
+			groupRadioButton.add(getNameRadioButton());
+			groupRadioButton.add(getAreaRadioButton());
+			//agrupar los botones
+			getOptGroup();
+		}
+		return groupRadioButton;
+	}
+	/**
+	 * Inicializa el laber 'Criterio de bsqueda'
+	 * @return
+	 */
+	private JLabel getLblCriterio(){
+		lblCriterio = new JLabel();
+		lblCriterio.setText(PluginServices.getText(this, "criterio_busqueda")+":");
+		return lblCriterio;
+	}
+
+	/**
+	 * Mtodo que controla la bsqueda de los CRS siguiendo los criterios
+	 * de bsqueda que le hemos definido. Tambin gestiona los casos en que
+	 * no encuentre CRS, o que los parmetros de bsqueda sean errneos. Si
+	 * encuentra algn CRS pero no es soportado por la aplicacin
+	 * aparecer el mensaje de informacin correspondiente.
+	 *
+	 */
+	private void searchButton() {
+		boolean not_valid = false;
+		boolean not_numeric = false;
+		searchTextField.setBackground(Color.white);
+		
+		if (searchTextField.getText().equals("")) {
+			searchTextField.setBackground(new Color(255,204,204));
+			JOptionPane.showMessageDialog(this, PluginServices.getText(this,"fill_name"), "Warning...", JOptionPane.WARNING_MESSAGE);
+		}		
+		
+		else {
+            //Eliminar filas en cada nueva bsqueda
+			int numRow = dtm.getRowCount();
+			while (numRow != 0) {
+				numRow = numRow - 1;
+				dtm.removeRow(numRow);
+			}
+			
+			if (codeRadioButton.isSelected() && (searchTextField.getText().length()!=searchTextField.getText().replaceAll("[^0-9]", "").length())){
+				not_numeric = true;
+			}
+			
+			//Dependiendo de la opcion se realizada una busqueda
+			ResultSet result = null;
+			ResultSet result2 = null;
+			/*
+			 * variable que indicara si la busqueda se hace primero en epsg_coordinatereferencesystem
+			 * o en epsg_area; esto es debido a que HSQLDB no soporta la bsqueda simultnea en ambas
+			 * tablas, por lo cual hay que separar la bsqueda
+			 */
+			int bus = 2;  			
+			if (codeRadioButton.isSelected() && !not_numeric) {
+				bus=0;
+				key = searchTextField.getText();
+				int code = Integer.parseInt(key);
+				String sentence = "SELECT coord_ref_sys_code, coord_ref_sys_name, coord_ref_sys_kind, area_of_use_code, " +
+								  "source_geogcrs_code, projection_conv_code  " +
+								  "FROM epsg_coordinatereferencesystem " +	                              
+	                              "WHERE coord_ref_sys_code = " + code;
+								
+				result = Query.select(sentence,connect.getConnection());	
+				
+			}
+			
+			else if (nameRadioButton.isSelected()) {
+				bus=0;
+				key = searchTextField.getText();
+				key = key.toLowerCase();
+				String key2 = key.substring(0,1);
+				String key3 = key.substring(1,key.length());
+				key2 = key2.toUpperCase();
+				
+				String sentence = "SELECT coord_ref_sys_code, coord_ref_sys_name, coord_ref_sys_kind, " +
+									"area_of_use_code, source_geogcrs_code, projection_conv_code " +
+				  					"FROM epsg_coordinatereferencesystem " +	                              
+				  					"WHERE (coord_ref_sys_name LIKE '%" + key + "%') OR (coord_ref_sys_name LIKE '%"+ 
+				  					key.toUpperCase() +"%') " +
+				  					"OR (coord_ref_sys_name LIKE '%" + key2+key3 +"%')";
+				result = Query.select(sentence,connect.getConnection());
+			}
+			
+			else if (areaRadioButton.isSelected()) {
+				bus=1;
+				key = searchTextField.getText();
+				key = key.toLowerCase();				
+				String key2 = key.substring(0,1);
+				String key3 = key.substring(1,key.length());
+				key2 = key2.toUpperCase();				
+				
+				String sentence = "SELECT area_name, area_of_use, area_code " +
+	                              "FROM epsg_area " +
+	                              "WHERE (area_name LIKE '%" + key + "%') OR (area_of_use LIKE '%" + key + "%') "+
+	                              "OR (area_name LIKE '%" + key.toUpperCase() + "%') OR (area_of_use LIKE '%" + key.toUpperCase() + "%') "+
+	                              "OR (area_name LIKE '%" + key2+key3 + "%') OR (area_of_use LIKE '%" + key2+key3 + "%') ";
+				result = Query.select(sentence,connect.getConnection());				
+			}
+			
+			if (bus==0){
+				try {
+					while(result.next()) {
+						Object[]data = new Object[5];
+						data[0] = String.valueOf(result.getInt("coord_ref_sys_code"));
+						data[1] = result.getString("coord_ref_sys_name");
+						crs_kind = result.getString("coord_ref_sys_kind");
+						data[2] = crs_kind;
+						projection_conv_code = result.getInt("projection_conv_code");
+						setProjectionCode(projection_conv_code);
+						
+						int area_of_use_code = Integer.parseInt(result.getString("area_of_use_code"));
+										
+						String sentence = "SELECT area_name, area_of_use FROM epsg_area " +
+										"WHERE area_code = "+ area_of_use_code ;
+						
+						result2 = Query.select(sentence,connect.getConnection());
+						while(result2.next()){
+							data[3] = result2.getString("area_name");
+							data[4] = result2.getString("area_of_use");					
+						}
+						if (data[0]!=null /*&& validCRS(projection_conv_code)*/ && valid(crs_kind)){
+							dtm.addRow(data);
+						}
+					}
+				}
+				
+				catch (SQLException e1) {
+					e1.printStackTrace();
+				}
+			}
+			else if (bus==1){
+				try {
+					while(result.next()) {
+						Object[]data = new Object[5];
+						data[3] = result.getString("area_name");
+						data[4] = result.getString("area_of_use");	
+											
+						int area_of_use_code = Integer.parseInt(result.getString("area_code"));
+										
+						String sentence = "SELECT coord_ref_sys_code, coord_ref_sys_name, " +
+										"coord_ref_sys_kind, source_geogcrs_code, projection_conv_code " +
+										"FROM epsg_coordinatereferencesystem " +
+										"WHERE area_of_use_code = "+ area_of_use_code ;
+						
+						result2 = Query.select(sentence,connect.getConnection());
+						while(result2.next()){
+							data[0] = String.valueOf(result2.getInt("coord_ref_sys_code"));
+							data[1] = result2.getString("coord_ref_sys_name");
+							data[2] = result2.getString("coord_ref_sys_kind");
+							crs_kind = (String)data[2];
+							projection_conv_code = result2.getInt("projection_conv_code");
+							setProjectionCode(projection_conv_code);
+						}
+						/*
+						 * Buscaremos solo aquellos CRS cuyas proyecciones esten entre las
+						 * 16 soportadas por proj4 para ello creamos un metodo para validar
+						 * si esta entre estas proyecciones
+						 */						
+						if (data[0]!=null /*&& validCRS(projection_conv_code)*/ && valid(crs_kind)){
+							dtm.addRow(data);
+						}	
+						if (notValid(crs_kind)){
+							not_valid = true;
+						}
+					}
+				} 
+				
+				catch (SQLException e1) {
+					e1.printStackTrace();
+				}
+			}
+			int numr = dtm.getRowCount();			
+			if (not_valid){
+				JOptionPane.showMessageDialog(this, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+						JOptionPane.WARNING_MESSAGE);
+				not_valid = false;
+			}
+			else if (not_numeric) {
+				JOptionPane.showMessageDialog(EPSGpanel.this, 
+						PluginServices.getText(this,"numeric_format"), 
+						"Warning...", JOptionPane.WARNING_MESSAGE);
+				searchTextField.setText("");
+			}
+			else if (numr == 0){
+			JOptionPane.showMessageDialog(this, PluginServices.getText(this,"no_results"), "Warning...",
+					JOptionPane.WARNING_MESSAGE);
+			}
+			else{
+				this.getJTable().setRowSelectionInterval(0,0);
+			}
+		}		
+	}	
+	
+	/**
+	 * metodo auxiliar que hara la comprobacion de si el CRS buscado pertenecera
+	 * a los no soportados por proj4
+	 */
+	private boolean notValid(String kind){		
+		for (int i = 0; i< not_soported_crs.length; i++){
+			if (kind.equals(not_soported_crs[i])){
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	/**
+	 * Metodo que comprueba si el CRS buscado pertenece a algun tipo 
+	 * de los que soporta la aplicacion
+	 */
+	private boolean valid(String kind){		
+		for (int i = 0; i< soported_crs.length; i++){
+			if (kind.equals(soported_crs[i])){
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	/**
+	 * metodo auxiliar que nos servira para comprobar si la proyeccion del CRS seleccionado
+	 * esta entre las 16 con las que trabaja proj4
+	 */
+	private boolean validCRS(int projection_conv_code2) {
+		if (projection_conv_code2 == 0) return true;
+		String sentence = "SELECT coord_op_method_code " +
+							"FROM epsg_coordoperation " +
+							"WHERE coord_op_code = " + projection_conv_code;
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			while (result.next()){
+				method_code = result.getInt("coord_op_method_code");
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+		
+		for (int i = 0; i< valid_method_code.length; i++){
+			if (method_code == valid_method_code[i] ){
+				return true;
+			}
+		}		
+		return false;
+	}
+
+	/**
+	 * Inicializa el botn de bsqueda
+	 * @return
+	 */
+	private JButton getSearchButton() {
+		if (searchButton == null) {
+			searchButton = new JButton();
+			searchButton.setPreferredSize(new Dimension(75,20));
+			searchButton.setText(PluginServices.getText(this,"buscar"));
+			searchButton.setMnemonic('S');
+			searchButton.setToolTipText(PluginServices.getText(this,"buscar_por_criterio_seleccion"));
+			searchButton.addActionListener(this);			
+		}
+		return searchButton;
+	}	
+	/**
+	 * Inicializa el cuadro de texto en el que se introduce el dato a buscar
+	 * @return
+	 */
+	private JTextField getSearchTextField() {
+		if (searchTextField == null) {
+			searchTextField = new JTextField();
+			searchTextField.setPreferredSize(new Dimension(350,20));
+			searchTextField.addKeyListener(this);			
+		}
+		return searchTextField;
+	}
+	/**
+	 * Inicializa la tabla que se utiliza para mostrar 
+	 * los resultados de la bsqueda
+	 * @return
+	 */
+	public JTable getJTable() {
+		if (jTable == null) {
+			String[] columnNames= {PluginServices.getText(this,"codigo"),
+					PluginServices.getText(this,"nombre"),
+					PluginServices.getText(this,"tipo"),
+					PluginServices.getText(this,"area"),
+			PluginServices.getText(this,"descripcion")};
+			Object[][]data = {};			
+			dtm = new DefaultTableModel(data, columnNames)
+			 {
+				private static final long serialVersionUID = 1L;
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}
+				/*
+				 * metodo necesario para cuando utilizamos tablas ordenadas
+				 * ya que sino al ordenar por algun campo no se queda con el orden
+				 * actual al seleccionar una fila (non-Javadoc)
+				 * @see javax.swing.table.TableModel#getColumnClass(int)
+				 */
+				public Class getColumnClass(int column)
+				{
+					return getValueAt(0, column).getClass();
+				}
+				};
+			sorter = new TableSorter(dtm);			
+
+			jTable = new JTable(sorter);
+			//jTable.setPreferredSize(new Dimension(800, 100));
+			sorter.setTableHeader(jTable.getTableHeader());
+			jTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
+			jTable.setCellSelectionEnabled(false);
+			jTable.setRowSelectionAllowed(true);
+			jTable.setColumnSelectionAllowed(false);
+			jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			TableColumn column = null;
+			for (int i = 0; i < columnNames.length; i++) {
+			    column = jTable.getColumnModel().getColumn(i);
+			    if (i == 0) {
+			        column.setPreferredWidth(50); //code column is shorter			     	
+			    }			    	
+			    else if (i == 2) {
+			    	column.setPreferredWidth(80);
+			    }	
+			    else if (i==4){
+			    	column.setPreferredWidth(300);
+			    }
+			    else {
+			        column.setPreferredWidth(140);
+			    }
+			}			
+		}
+		
+		return jTable;
+		
+	}
+	/**
+	 * Establece el cdigo se CRS
+	 * @param code
+	 */
+	public void setCodeCRS(int code) {
+		codeCRS = code;
+	}
+	/**
+	 * Obtiene el cdigo de CRS
+	 * @return
+	 */
+	public int getCodeCRS() {
+		return codeCRS;
+	}	
+	/**
+	 * Inicializa el panel que contiene la tabla de resultados
+	 * @return
+	 */
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane(getJTable(),JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
+			jScrollPane.setPreferredSize(new Dimension(500,150));
+			jScrollPane.setBorder(
+				    BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(3,3,3,3),jScrollPane.getBorder()));
+			
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+	/**
+	 * Inicializa el botn que muestra la informacin de CRS seleccionado
+	 * @return
+	 */
+	public JButton getInfoCrs() {
+		if(infoCrs == null) {
+			infoCrs = new JButton();
+			infoCrs.setPreferredSize(new Dimension(85,20));
+			infoCrs.setText(PluginServices.getText(this,"infocrs"));			
+			infoCrs.setMnemonic('I');
+			infoCrs.setEnabled(false);
+			infoCrs.setToolTipText(PluginServices.getText(this,"more_info"));
+			infoCrs.addActionListener(this);
+		}
+		return infoCrs;
+	}
+	
+	
+	public ICrs getProjection() {
+		try {
+			String txt = getWKT();			
+			//ICrs crs = new CrsFactory().getCRS(epsg_code, txt);
+			ICrs crs = new CrsFactory().getCRS("EPSG:"+epsg_code);
+			return crs ;
+		} catch (CrsException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	/**
+	 * Genera la cadena WKT una vez que escogemos el CRS de la tabla.
+	 * Dicha cadena la generamos con los parmetros cogidos directamente
+	 * del repositorio de la EPSG, y ms adelante volveremos a tratarla
+	 * para pasarla a una cadena legible por la proj4.
+	 *
+	 */
+	public void setWKT(){
+		Epsg2wkt wkt = null;
+						
+		epsg_code = getCodeCRS();
+		if (epsg_code != -1){		
+			/*
+			 * ahora que he escogido, recojo toda la informacion que me va a hacer falta
+			 */
+			String sentence = "SELECT source_geogcrs_code, projection_conv_code, " +
+					"coord_ref_sys_kind, datum_code " +
+							"FROM epsg_coordinatereferencesystem " +
+							"WHERE coord_ref_sys_code = "+ epsg_code ;
+			ResultSet result = Query.select(sentence,connect.getConnection());
+			
+			try {
+				result.next();
+				source_cod = result.getInt("source_geogcrs_code");
+				projection_conv_code = result.getInt("projection_conv_code");
+				crs_kind = result.getString("coord_ref_sys_kind");
+				datum_code = result.getInt("datum_code");
+			} catch (SQLException e1) {
+				e1.printStackTrace();
+			}
+			
+			if (datum_code != 0){
+				source_yn = true;
+			}
+			else if (source_cod != 0){
+				source_yn = false;
+			}
+			else source_yn = true;
+			
+			CrsEPSG ep = new CrsEPSG(epsg_code, source_yn, source_cod, projection_conv_code, connect);
+			
+			if (crs_kind.equals("geographic 2D") || crs_kind.equals("geographic 3D")){
+				wkt = new Epsg2wkt(ep , "geog");			
+			}
+			else if (crs_kind.equals("projected")){
+				wkt = new Epsg2wkt(ep, "proj");
+			}
+			else if (crs_kind.equals("compound")){
+				wkt = new Epsg2wkt(ep,"comp");
+			}
+			else if (crs_kind.equals("geocentric")){
+				wkt = new Epsg2wkt(ep,"geoc");
+			}
+		}
+		else {
+			JOptionPane.showMessageDialog(this, 
+					PluginServices.getText(this,"crs_no_selected."), 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			
+		}
+		cadWKT = wkt.getWKT();
+	}
+		
+	public String getWKT(){
+		return cadWKT;
+	}
+	
+	public void setProjection(IProjection crs) {
+		//setCrs((ICrs) crs);
+	}
+	
+	/**
+	 * Metodo para cargar en el CRS de la capa el CRS de la vista.
+	 * Se utilizar a la hora de arrancar la definicin del CRS de la nueva capa
+	 */	
+	public void loadViewCRS(int code){
+		connection();
+		String sentence = "SELECT coord_ref_sys_code, coord_ref_sys_name, coord_ref_sys_kind, area_of_use_code, " +
+						  "source_geogcrs_code, projection_conv_code  " +
+						  "FROM epsg_coordinatereferencesystem " +	                              
+				        "WHERE coord_ref_sys_code = " + code;
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		
+		try {
+			result.next();
+			Object[]data = new Object[5];
+			data[0] = String.valueOf(result.getInt("coord_ref_sys_code"));
+			data[1] = result.getString("coord_ref_sys_name");
+			crs_kind = result.getString("coord_ref_sys_kind");
+			data[2] = crs_kind;
+			projection_conv_code = result.getInt("projection_conv_code");
+			
+			int area_of_use_code = Integer.parseInt(result.getString("area_of_use_code"));
+							
+			sentence = "SELECT area_name, area_of_use FROM epsg_area " +
+							"WHERE area_code = "+ area_of_use_code ;
+			
+			ResultSet result2 = Query.select(sentence,connect.getConnection());
+			result2.next();
+			data[3] = result2.getString("area_name");
+			data[4] = result2.getString("area_of_use");					
+			
+			dtm.addRow(data);					
+		}
+		
+		catch (SQLException e1) {
+			e1.printStackTrace();
+		}
+	}
+	/**
+	 * Controla si se pulsa intro en el cuadro de texto,
+	 * en ese caso se interpreta como si hubiese pulsado el botn 'Buscar'
+	 */
+	public void keyPressed(KeyEvent e) {	
+		if (e.getSource() == this.getSearchTextField()) {
+			if (e.getKeyCode() == 10) {
+				searchButton();
+			}			
+		}		
+	}
+
+	public void keyReleased(KeyEvent e) {
+		
+	}
+
+	public void keyTyped(KeyEvent e) {
+		
+	}
+
+	/**
+	 * Maneja los eventos de los botones y los radioButtons del panel
+	 * de la EPSG.
+	 */
+	public void actionPerformed(ActionEvent e) {
+		/*Si el objeto que genera el evento es el RadioButton 'Codigo'-->
+		resetea el texto de bsqueda*/
+		if (e.getSource() == this.getCodeRadioButton()) {
+			searchTextField.setText("");
+		}
+		/*Si el objeto que genera el evento es el RadioButton 'Nombre'-->
+		resetea el texto de bsqueda*/
+		if (e.getSource() == this.getNameRadioButton()) {
+			searchTextField.setText("");
+		}
+		/*Si el objeto que genera el evento es el RadioButton 'Area'-->
+		resetea el texto de bsqueda*/
+		if (e.getSource() == this.getAreaRadioButton()) {
+			searchTextField.setText("");
+		}
+		/*Si el objeto que genera el evento es el JButton 'Buscar'-->
+		Comprueba que no est vacio*/
+		if (e.getSource() == this.getSearchButton()) {
+			searchTextField.setBackground(Color.white);
+			if (searchTextField.getText().equals("")) {
+				searchTextField.setBackground(new Color(255,204,204));
+				JOptionPane.showMessageDialog(EPSGpanel.this, 
+						PluginServices.getText(this,"fill_name"), 
+						"Warning...", JOptionPane.WARNING_MESSAGE);
+			}
+			else {
+				searchButton();
+			}
+		}
+		/*Si el objeto que genera el evento es el JButton 'InfoCrs'
+		se muestra la informacin ralicionada con el Crs seleccionado en la tabla*/
+		if (e.getSource() == this.getInfoCrs()) {
+			InfoCRSPanel info = new InfoCRSPanel("EPSG", getCodeCRS());
+			PluginServices.getMDIManager().addWindow(info);
+		}
+	}
+	/**
+	 * Agrupa los botones de opcin
+	 * @return
+	 */
+	public ButtonGroup getOptGroup() {
+		if (optGroup==null){
+			optGroup=new ButtonGroup();
+			optGroup.add(getCodeRadioButton());
+			optGroup.add(getNameRadioButton());
+			optGroup.add(getAreaRadioButton());
+		}
+		return optGroup;
+	}
+	
+	public void setProjectionCode(int projCode) {
+		String sentence = "SELECT coord_op_method_code " +
+			"FROM epsg_coordoperation " +
+			"WHERE coord_op_code = " + projCode;
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			while (result.next()){
+				projectionCode = result.getInt("coord_op_method_code");
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+	}
+	
+	public int getProjectionCode(String code) {
+		int cod= Integer.parseInt(code);
+		
+		String sentence = "SELECT projection_conv_code  " +
+						  "FROM epsg_coordinatereferencesystem " +	                              
+				        "WHERE coord_ref_sys_code = " + code;
+		
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		int projCode = 0;
+		try {
+			while (result.next()){
+				projCode = result.getInt("projection_conv_code");
+			}
+		} catch (SQLException e1) {
+			// TODO Auto-generated catch block
+			e1.printStackTrace();
+		}
+		sentence = "SELECT coord_op_method_code " +
+					"FROM epsg_coordoperation " +
+					"WHERE coord_op_code = " + projCode;
+		
+		result = Query.select(sentence,connect.getConnection());
+		try {
+			while (result.next()){
+				projectionCode = result.getInt("coord_op_method_code");
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+		return projectionCode;
+	}
+}
\ No newline at end of file

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/EPSGpanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TreePanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TreePanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TreePanel.java	(revision 25287)
@@ -0,0 +1,201 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.util.Hashtable;
+
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.JTree;
+import javax.swing.border.EmptyBorder;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeModel;
+
+/**
+ * 
+ * @author Diego Guerrero (diego.guerrero@uclm.es)
+ *
+ */
+public class TreePanel extends JPanel {
+
+	private static final long serialVersionUID = 1L;
+	private int 		wComp = 190;
+	private int 		hComp = 360;
+	private int 		hTree = (int)Math.floor(hComp * 0.68);
+	private int 		hList = 50;
+	private JScrollPane pTree = null;
+	private JScrollPane pList = null;
+	private JTree tree = null;
+	//private JList list = null;
+	private JTextArea list = null;
+	private DefaultMutableTreeNode raiz = null;
+	private Hashtable	map;
+	String rootName = "";
+
+	public TreePanel(String rootName) {
+		super();
+		this.rootName = rootName;
+		initialize();
+	}
+	
+	private void initialize() {
+		map = new Hashtable();
+		raiz =  new DefaultMutableTreeNode(rootName);
+		this.setLayout(new BorderLayout());
+		this.setBorder(new EmptyBorder(0,10,10,10));
+		this.add(getPTree(),BorderLayout.CENTER);
+		this.add(getPList(),BorderLayout.SOUTH);
+	}
+	
+	/**
+	 * This method initializes jPanel	
+	 * 	
+	 * @return javax.swing.JPanel	
+	 */
+	private JScrollPane getPTree() {
+		if (pTree == null) {
+			pTree = new JScrollPane();
+			//pTree.setPreferredSize(new java.awt.Dimension(wComp, hTree));
+			pTree.setViewportBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
+			pTree.setVerticalScrollBarPolicy(javax.swing.JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
+			pTree.setViewportView(getTree());
+		}
+		return pTree;
+	}
+
+	/**
+	 * This method initializes jPanel1	
+	 * 	
+	 * @return javax.swing.JPanel	
+	 */
+	private JScrollPane getPList() {
+		if (pList == null) {
+			pList = new JScrollPane();
+			//pList.setPreferredSize(new java.awt.Dimension(wComp, hList));
+			pList.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
+			pList.setBackground(java.awt.Color.white);
+			pList.setVerticalScrollBarPolicy(javax.swing.JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
+			pList.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
+			pList.setViewportView(getList());
+		}
+		return pList;
+	}
+
+	/**
+	 * This method initializes jTree	
+	 * 	
+	 * @return javax.swing.JTree	
+	 */
+	public JTree getTree() {
+		if (tree == null) {
+			tree = new JTree(raiz);
+		}
+		return tree;
+	}
+
+	/**
+	 * This method initializes jList	
+	 * 	
+	 * @return javax.swing.JList	
+	 */
+	public JTextArea getList() {
+		if (list == null) {
+			list = new JTextArea();
+			list.setLineWrap(true);
+			list.setWrapStyleWord(true);
+			list.setEditable(false);
+		}
+		return list;
+	}
+	
+	public void setPanelSize(int w, int h){
+		wComp = w;
+		hComp = h;
+		hTree = (int)Math.floor(hComp * 0.68);
+		hList = hComp - hTree;
+        this.setPreferredSize(new java.awt.Dimension(wComp, hComp));
+		setPreferredSize(new java.awt.Dimension(wComp, hComp));
+		pTree.setPreferredSize(new java.awt.Dimension(wComp, hTree));
+		pList.setPreferredSize(new java.awt.Dimension(wComp, hList));
+	}
+	
+	/**
+	 * A�ade una nueva categoria al arbol
+	 * @param name	Etiqueta que aparece en el arbol. 
+	 * @param pos	Posici�n en el arbol de la nueva categoria
+	 */
+	public void addClass(String name, int pos){
+		DefaultTreeModel model =(DefaultTreeModel)tree.getModel();
+		DefaultMutableTreeNode r = new DefaultMutableTreeNode( name );
+		model.insertNodeInto(r, raiz, pos);
+	}
+	
+	/**
+	 * A�ade una entrada a una categoria
+	 * @param name Nombre de la entrada a a�adir
+	 * @param parentName Categoria a la que a�adimos
+	 * @param value Valor asociado a la entrada
+	 */
+	public void addEntry(String name, String parentName, String value){
+		DefaultTreeModel model =(DefaultTreeModel)tree.getModel();
+		for(int i = 0; i < model.getChildCount(raiz); i++){
+			if(model.getChild(raiz, i).toString().equals(parentName)){
+				DefaultMutableTreeNode node = (DefaultMutableTreeNode)model.getChild(raiz, i);
+				node.add(new DefaultMutableTreeNode(name));
+				if (value!=null)
+					map.put(name,value);
+			}
+		}
+	}
+	
+	public void setRoot(String name){
+		DefaultTreeModel model =(DefaultTreeModel)tree.getModel();
+		//for (int index = 0; index<model.getChildCount(model.getRoot());index++)
+		//	model.removeNodeFromParent((DefaultMutableTreeNode)model.getChild(raiz, index));
+		rootName=name;
+		raiz =  new DefaultMutableTreeNode(rootName);
+		model.setRoot(raiz);
+		map.clear();
+		
+	}
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TreePanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefSistCoordenadas.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefSistCoordenadas.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefSistCoordenadas.java	(revision 25287)
@@ -0,0 +1,1153 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels.wizard;
+import java.awt.BorderLayout;
+import java.awt.CardLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+
+import javax.swing.BorderFactory;
+import javax.swing.ButtonGroup;
+import javax.swing.DefaultCellEditor;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+import javax.swing.border.TitledBorder;
+import javax.swing.table.DefaultTableCellRenderer;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+import javax.units.ConversionException;
+import javax.units.Unit;
+
+import org.geotools.referencing.crs.DefaultProjectedCRS;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.Proj4;
+import org.gvsig.crs.gui.dialog.ImportNewCrsDialog;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+
+import com.iver.andami.PluginServices;
+
+import es.idr.teledeteccion.connection.EpsgConnection;
+import es.idr.teledeteccion.connection.Query;
+
+
+
+/**
+ * Panel de Definicion del Sistema de Coordenadas
+ * 
+ * @author Luisa Marina Fernandez Ruiz (luisam.fernandez@uclm.es)
+ * @author Jose Luis Gomez Martinez (joseluis.gomez@uclm.es)
+ *
+ */
+public class DefSistCoordenadas extends JPanel implements ActionListener, ItemListener{
+	
+	private static final long serialVersionUID = 1L;
+	private JPanel top;
+	private JPanel proyectadoPanel;
+	//private JPanel geograficoPanel;
+	private JPanel cardPanel;
+	private JRadioButton rbGeografico;
+	private JRadioButton rbProyectado;
+	private ButtonGroup coordGroup;
+	
+	private JButton btnImportar=null;
+	private JLabel lblProyeccion;
+	private JLabel lblNombreProy;
+	private JTextField txtNombreProy;
+	private JComboBox cbProyeccion;
+	private JComboBox cbUnits;
+	private JTable tableParametros;
+	private JScrollPane scrollTable;
+	
+	private DefaultTableModel model = null;
+	
+	private int theigth=140;
+	private int twidth=300;
+	
+	final static String PROYECTADOPANEL = "Proyectado";
+	//final static String GEOGRAFICOPANEL = "Geografico";
+	private String sourceUnit = null;
+	
+	private ArrayList projections = null;
+	private ArrayList trueParametersNames = null;
+	
+	ICrs crs;
+	Proj4 proj4 = null;
+	private int pos;
+	int divider=10000;
+	
+	/**
+     * Small tolerance factor for rounding errors.
+     */
+    private static final double EPS = 1E-8;
+
+	
+	public DefSistCoordenadas() {
+		super();
+		BorderLayout bl=new BorderLayout();
+		try {
+			proj4 = new Proj4();
+		} catch (CrsException e) {
+			e.printStackTrace();
+		}
+		bl.setVgap(5);
+		bl.setHgap(5);
+		this.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+		this.setLayout(bl);
+		this.add(getTop(),BorderLayout.NORTH);
+		
+		//agregar cardPanel en el this
+		this.add(getCardPanel(),BorderLayout.CENTER);
+		
+	}
+	
+	public JPanel getCardPanel() {		
+		if (cardPanel==null) {
+			cardPanel=new JPanel();
+			cardPanel.setLayout(new CardLayout());
+			//agregar los elementos correspondientes en el cardPanel
+			cardPanel.add(PROYECTADOPANEL,getProyectadoPanel());
+			//cardPanel.add(GEOGRAFICOPANEL,getGeograficoPanel());			
+		}
+		return cardPanel;
+	}
+	/**
+	 * Inicializa el radio button  Geogr�fico 2D
+	 * @return
+	 */
+	public JRadioButton getRbGeografico() {
+		if (rbGeografico==null){
+			rbGeografico=new JRadioButton(PluginServices.getText(this,"SistCoor_Geografico2D"));
+			rbGeografico.addActionListener(this);
+		}
+		return rbGeografico;
+	}
+	/**
+	 * Inicializa el radio button Proyectado
+	 * @return
+	 */
+	public JRadioButton getRbProyectado() {
+		if (rbProyectado==null){
+			rbProyectado=new JRadioButton(PluginServices.getText(this,"SistCoor_Proyactado"));
+			rbProyectado.addActionListener(this);
+		}
+		return rbProyectado;
+	}
+	/**
+	 * Inicializa el panel que contiene las opciones 
+	 * si el crs seleccionado es proyectado
+	 * 
+	 */
+	public JPanel getProyectadoPanel() {
+		if(proyectadoPanel==null){
+			proyectadoPanel=new JPanel(new BorderLayout(5,5));
+			proyectadoPanel.setBorder(BorderFactory.createEmptyBorder(0,3,0,3));
+			//Tendra que alinearlo todo a la izquierda
+			JPanel p1=new JPanel(new FlowLayout(FlowLayout.LEFT,3,5));
+			p1.add(getLblNombreProy());
+			p1.add(getTxtNombreProy());
+			p1.add(getBtnImportar());
+			JPanel p2=new JPanel(new FlowLayout(FlowLayout.RIGHT,3,5));
+			p2.add(getLblProyeccion());
+			p2.add(getCbProyeccion());
+			JPanel pNorth=new JPanel(new GridLayout(2,1));
+			pNorth.add(p1);
+			pNorth.add(p2);
+			proyectadoPanel.add(pNorth,BorderLayout.NORTH);
+			proyectadoPanel.add(getScrollTable(),BorderLayout.CENTER);
+		}
+		return proyectadoPanel;
+	}
+	/**
+	 * Inicializa el panel superior donde se define el sistema 
+	 * de coordenadas
+	 * 
+	 */
+	public JPanel getTop() {
+		if(top==null){
+			top=new JPanel();
+			top.add(getRbGeografico());
+			top.add(getRbProyectado());
+			//Agrupar las opciones
+			agruparRadioButtons();
+			top.setBorder(new TitledBorder(PluginServices.getText(this,"SistCoor_titmarco")));
+		}
+		return top;
+	}
+	/**
+	 * Agrupa los radio button
+	 *
+	 */
+	private void agruparRadioButtons() {
+		if (coordGroup==null){
+				coordGroup=new ButtonGroup();
+				//Agrupar los botones de opcion
+				coordGroup.add(getRbProyectado());
+				coordGroup.add(getRbGeografico());
+				getRbProyectado().setSelected(true);
+			}	
+	}
+	/**
+	 * Inicializa el label Proyecci�n
+	 * @return
+	 */
+	public JLabel getLblProyeccion() {
+		if (lblProyeccion==null){
+			lblProyeccion=new JLabel();
+			lblProyeccion.setText(PluginServices.getText(this,"SistCoor_Proyeccion"));
+		}
+		return lblProyeccion;
+	}
+	/**
+	 * Crea la tabla donde se definen los par�metros de la
+	 * proyecci�n seleccionada en el combobox
+	 * @return
+	 */
+	public JTable getTableParametros() {
+		
+		if(tableParametros==null){
+			tableParametros = new JTable();
+			tableParametros.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
+		    model = (DefaultTableModel)tableParametros.getModel();		    
+		    //Crea la tabla con 7 filas
+		    Object[][] data = {
+					{"", "", "Metros"},
+					{"", "", "Metros"},
+					{"", "", "Metros"},
+					{"", "", "Metros"},
+					{"", "", "Metros"},
+					{"", "", "Metros"},
+					{"", "", "Metros"}};
+		    
+			String col1=PluginServices.getText(this,"SistCoor_Parametro");
+			String col2=PluginServices.getText(this,"SistCoor_Valor");
+			String col3=PluginServices.getText(this,"SistCoor_Unidades");
+			Object[] headers = {col1, col2, col3};
+		    
+		     /*Agrega otra fila
+			model.addRow(new Object[]{"fila","","Metros"});*/
+		    //define los items del combo
+		    ArrayList units = obtenerItemsUnidades();
+			String[] items = new String[units.size()];
+			for (int i=0;i<units.size();i++){
+				items[i] = units.get(i).toString();
+			}
+			
+			model = new DefaultTableModel(data, headers) {
+				private static final long serialVersionUID = 1L;
+				public boolean isCellEditable(int row, int column) {
+					if (column == 0 || column == 2)
+						return false;
+					else return true;
+				}
+			 };
+			 tableParametros.setModel(model);
+	        //String[] items = new String[] { "Metros", "Grados", "Kilometros", "Decimetros", "Hect�metros" };
+	       /* TableColumn col = tableParametros.getColumnModel().getColumn(2);
+	        
+	        //ComboBoxEditor editor = new ComboBoxEditor(items);
+	        col.setCellEditor(new DefaultCellEditor(getCbUnits()));
+	        DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
+	       
+	        col.setCellRenderer(renderer);*/
+	        
+	        
+	        //Define el tama�o de la tabla
+			tableParametros.setPreferredScrollableViewportSize(new Dimension(twidth,theigth));
+			//la posicion de las columnas es fija
+			tableParametros.getTableHeader().setReorderingAllowed( false );
+			//Ajustar ancho y alto de las filas y columnas
+			ajustarTamanoTabla();
+			fillTable(getProjection(0));			
+		}
+
+		return tableParametros;
+	}
+	
+	/**
+	 * Contiene los nombres de las distintas unidades
+	 * @return
+	 */
+	public JComboBox getCbUnits() {
+		if (cbUnits==null){
+			ArrayList units = obtenerItemsUnidades();
+			String[] items = new String[units.size()];
+			for (int i=0;i<units.size();i++){
+				items[i] = units.get(i).toString();
+			}
+			cbUnits=new JComboBox(items);
+			cbUnits.setEditable(false);
+			cbUnits.setToolTipText(PluginServices.getText(this,"SistCoor_cbToolTip"));
+			sourceUnit = (String)cbUnits.getItemAt(0);
+			cbUnits.addItemListener(this);
+		}
+		return cbUnits;
+	}
+	
+	/**
+	 * Accede al la base de datos y obtiene los items de
+	 * los combobox
+	 * @return
+	 */
+	private ArrayList obtenerItemsUnidades(){ //unidades de longitud...
+		ArrayList items = new ArrayList();
+				
+		String sentence = "SELECT unit_of_meas_name " +
+		  				"FROM epsg_unitofmeasure ";// +	                              
+		  				//"WHERE unit_of_meas_type = 'length'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			while (result.next()) {
+				String item = result.getString("unit_of_meas_name");
+				items.add(PluginServices.getText(this, item));
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+		return items;
+	}
+	
+	/**
+	 * Accede al la base de datos y obtiene los items de
+	 * los combobox
+	 * @return
+	 */
+	private ArrayList obtenerItemsUnidadesAngular(){ //unidades angulares...
+		ArrayList items = new ArrayList();
+				
+		String sentence = "SELECT unit_of_meas_name " +
+		  				"FROM epsg_unitofmeasure " +	                              
+		  				"WHERE unit_of_meas_type = 'angle'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			while (result.next()) {
+				String item =result.getString("unit_of_meas_name"); 
+				items.add(PluginServices.getText(this, item));
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+		return items;
+	}
+	
+	/**
+	 * Accede al la base de datos y obtiene los items de
+	 * los combobox
+	 * @return
+	 */
+	private ArrayList obtenerItemsUnidadesScale(){ //unidades angulares...
+		ArrayList items = new ArrayList();
+				
+		String sentence = "SELECT unit_of_meas_name " +
+		  				"FROM epsg_unitofmeasure " +	                              
+		  				"WHERE unit_of_meas_type = 'scale'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			while (result.next()) {
+				String item = result.getString("unit_of_meas_name");
+				items.add(PluginServices.getText(this, item));
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+		return items;
+	}
+
+	/**
+	 * Crear scrollPane y agregar la tabla en �l
+	 */
+	public JScrollPane getScrollTable() {
+		if(scrollTable==null){
+			scrollTable = new JScrollPane(getTableParametros());
+			scrollTable.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+		}
+		return scrollTable;
+	}
+	/**
+	 * Contiene los nombres de las distintas proyecciones
+	 * @return
+	 */
+	public JComboBox getCbProyeccion() {
+		if (cbProyeccion==null){
+			ArrayList projections = obtainProjections();
+			String[] items = new String[projections.size()];
+			for (int i=0;i<projections.size();i++){
+				items[i] = projections.get(i).toString();
+			}
+			cbProyeccion=new JComboBox(items);
+			cbProyeccion.setEditable(false);
+			cbProyeccion.setToolTipText(PluginServices.getText(this,"SistCoor_cbToolTip"));
+			cbProyeccion.addItemListener(this);			
+		}
+		return cbProyeccion;
+	}
+	/**
+	 * Inicializa el label que contiene el Nombre de la Proyeccin
+	 * @return
+	 */
+	public JLabel getLblNombreProy() {
+		if(lblNombreProy==null){
+			lblNombreProy=new JLabel(PluginServices.getText(this,"nombre_proyeccion"));
+		}
+		return lblNombreProy;
+	}
+	/**
+	 * Inicializa el cuadro de texto que contiene el nombre de la proyeccin
+	 * @return
+	 */
+	public JTextField getTxtNombreProy() {
+		if(txtNombreProy==null){
+			txtNombreProy=new JTextField();
+			Dimension d=new Dimension(320,20);
+			txtNombreProy.setPreferredSize(d);
+			txtNombreProy.setMinimumSize(d);
+		}
+		return txtNombreProy;
+	}
+	private ArrayList obtainProjections() {
+		ArrayList items = new ArrayList();
+		ArrayList util = new ArrayList();
+		for (int i = 0;i<proj4.getProjectionNameList().size(); i++) {
+			try {
+				items.add(i, PluginServices.getText(this,proj4.getProj4ProjectionName(i)));
+				util.add(i, proj4.getProj4ProjectionName(i));
+			} catch (CrsException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}			
+		}
+		
+		/*String sentence = "SELECT coord_op_method_name " +
+		  				"FROM epsg_coordoperationmethod " +	                              
+		  				"WHERE coord_op_method_code > 9800 "+
+		  				"ORDER BY coord_op_method_name ASC";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		int in=0;
+		try {
+			while (result.next()) {
+				String item = result.getString("coord_op_method_name"); 
+				items.add(in, PluginServices.getText(this, item.replaceAll(" ", "_")));
+				util.add(in, item);
+				in++;
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}*/
+		
+		/*
+		 * Ordenamos los ArrayList por si con las traducciones
+		 * se producen cambios de orden. Pensar en la implementacion...
+		 */
+		String tempItem1,tempItem2, tempUtil1, tempUtil2;
+		for (int i=0; i< items.size()-1; i++) {
+			for (int j=i+1; j< items.size();j++) {
+				tempItem1 = (String)items.get(i);				
+				tempItem2 = (String)items.get(j);
+				tempUtil1 = (String)util.get(i);
+				tempUtil2 = (String)util.get(j);
+				if (((String)items.get(j)).compareTo(tempItem1) < 0) {
+					items.remove(i);
+					items.add(i, tempItem2);
+					items.remove(j);
+					items.add(j, tempItem1);
+					util.remove(i);
+					util.add(i, tempUtil2);
+					util.remove(j);
+					util.add(j, tempUtil1);
+				}
+			}
+		}
+		setProjection(util);
+		return items;
+	}
+	/*
+	 * Redimensiona el tama�o de las filas y columnas de la tabla
+	 *
+	 */
+	public void ajustarTamanoTabla(){
+	    TableColumn column = null;
+	    //Fijar el alto de las filas
+	    getTableParametros().setRowHeight(20);
+	    //Fijar el ancho de las columnas
+	    column = getTableParametros().getColumnModel().getColumn(0);
+	    column.setPreferredWidth(30);
+	    column = getTableParametros().getColumnModel().getColumn(1);
+	    column.setPreferredWidth(90);
+	    column = getTableParametros().getColumnModel().getColumn(2);
+	    column.setPreferredWidth(120);
+
+	}
+	
+	/**
+	 * Fija los eventos de los RadioButtons y dem�s controles
+	 */
+	public void actionPerformed(ActionEvent e) {
+		//MOSTRAR UN PANEL U OTRO
+        CardLayout cl = (CardLayout)(cardPanel.getLayout());
+		if (e.getSource().equals(getRbProyectado())){
+			/*Si est� seleccionada la opcion de Proyectado 
+			se muestra el panel de seleccion de la proyecci�n con sus par�metros*/
+			 //cl.show(cardPanel, PROYECTADOPANEL);
+			habilitarControles();
+		}else if(e.getSource().equals(getRbGeografico())){
+			/*Se muestra el panel de Sistema de Coordenadas Geografico*/
+			 //cl.show(cardPanel, GEOGRAFICOPANEL);
+			deshabilitarControles();
+		} else if (e.getSource().equals(getBtnImportar())) {
+			System.out.println("Importar Proyeccion");
+			ImportNewCrsDialog newCrs = new ImportNewCrsDialog(PluginServices.getText(this, "projection"));
+       	 	PluginServices.getMDIManager().addWindow(newCrs);
+       	 	if (newCrs.getCode() != -1) {
+	       	 	setCrs(newCrs.getCode());
+	       	 	fillData(getCrs());
+       	 	}
+		}
+	}
+
+	/*
+	 * Crear el panel que contiene los componentes de 
+	 * un sistema de coordenadas geografico
+	 * */
+	/*public JPanel getGeograficoPanel() {
+		if(geograficoPanel==null){
+			BorderLayout b=new BorderLayout();
+			b.setVgap(5);
+			b.setHgap(5);
+			geograficoPanel=new JPanel(b);
+			geograficoPanel.add(new JButton("Crear panel Geogr�fico 2D"));
+		}
+		return geograficoPanel;
+	}*/
+	
+	public void fillData(ICrs crs) {
+		if (!crs.getCrsWkt().getProjcs().equals("")) {
+			getRbProyectado().setSelected(true);
+			int index = proj4.findProjection(crs.getCrsWkt().getProjection());
+			String proj2Compare = "";
+			try {
+				proj2Compare = proj4.getProj4ProjectionName(index);
+			} catch (CrsException e1) {
+				e1.printStackTrace();
+			}
+			for (int i = 0; i < getCbProyeccion().getItemCount(); i++) {
+				if (getProjection(i).equals(proj2Compare)) {
+					getCbProyeccion().setSelectedIndex(i);
+					break;
+				}
+			}
+			getTxtNombreProy().setText(crs.getCrsWkt().getProjcs());
+			setPos(proj4.findProjection(crs.getCrsWkt().getProjection()));
+			int numRow = model.getRowCount();
+			while (numRow != 0) {
+				numRow = numRow - 1;
+				model.removeRow(numRow);
+			}
+			Object[] data = new Object[3];
+			data[2] = "Metros";
+			ArrayList trueParametersNames = new ArrayList();			
+			
+			try {				
+			
+				for (int i = 0; i < crs.getCrsWkt().getParam_name().length; i++) {
+					String param = crs.getCrsWkt().getParam_name()[i].trim();
+					if (param.equals("semi_major") || param.equals("semi_minor")) {
+						continue;
+					}
+					trueParametersNames.add(param);
+					data[0] = PluginServices.getText(this, param);
+					data[1] = crs.getCrsWkt().getParam_value()[i];
+					int pos = proj4.findProjectionParameter(param);
+					String unit = proj4.getProjectionParameterUnitList(pos);
+					if (unit.equals("Angular")) 
+						data[2] = "Degree";
+					else if (unit.equals("Unitless"))
+						data[2] = "Unitless";
+					else if (unit.equals("Linear"))
+						data[2] = "Meters";
+					model.addRow(data);
+				}
+				setTrueParametersNames(trueParametersNames);
+			} catch (CrsException e) {
+				e.printStackTrace();
+			}
+		} else {
+			getRbGeografico().setSelected(true);
+			 CardLayout cl = (CardLayout)(cardPanel.getLayout());
+			//cl.show(cardPanel, GEOGRAFICOPANEL);
+			 deshabilitarControles();
+		}
+	}
+	
+	public void fillData(CoordinateReferenceSystem crs) {
+		if (crs instanceof DefaultProjectedCRS) {
+			DefaultProjectedCRS sour = (DefaultProjectedCRS) crs;
+			String[] val = sour.getName().toString().split(":");
+			
+			if (val.length<2)
+				getTxtNombreProy().setText(val[0]);
+			else
+				getTxtNombreProy().setText(val[1]);
+			
+			val = sour.getConversionFromBase().getMethod().getName().toString().split(":");
+			String proj;
+			if (val.length<2) 
+				proj=val[0];
+			else
+				proj=val[1];			
+			
+			int index = proj4.findProjection(proj);
+			String proj2Compare = "";
+			try {
+				proj2Compare = proj4.getProj4ProjectionName(index);
+			} catch (CrsException e1) {
+				e1.printStackTrace();
+			}
+			for (int i = 0; i < getCbProyeccion().getItemCount(); i++) {
+				if (getProjection(i).equals(proj2Compare)) {
+					getCbProyeccion().setSelectedIndex(i);
+					break;
+				}
+			}
+			String[] param_name = new String[sour.getConversionFromBase().getParameterValues().values().size()];
+			String[] param_value= new String[sour.getConversionFromBase().getParameterValues().values().size()];
+			for (int i=0; i< sour.getConversionFromBase().getParameterValues().values().size();i++) {
+				String str = sour.getConversionFromBase().getParameterValues().values().get(i).toString();
+				Unit u = sour.getConversionFromBase().getParameterValues().parameter(str.split("=")[0]).getUnit();
+				double value = sour.getConversionFromBase().getParameterValues().parameter(str.split("=")[0]).doubleValue();
+				value = convert(value, u.toString());
+				param_name[i] = str.split("=")[0];
+				param_value [i] = String.valueOf(value);
+			}
+			
+			setPos(proj4.findProjection(proj));
+			int numRow = model.getRowCount();
+			while (numRow != 0) {
+				numRow = numRow - 1;
+				model.removeRow(numRow);
+			}
+			
+			Object[] data = new Object[3];
+			ArrayList trueParametersNames = new ArrayList();			
+			try {				
+			
+				for (int i = 0; i < param_name.length; i++) {
+					String param = param_name[i].trim();				
+					if (param.equals("semi_major") || param.equals("semi_minor")) {
+						continue;
+					}
+					trueParametersNames.add(param);
+					data[0] = PluginServices.getText(this, param);
+					data[1] = param_value[i];
+					int pos = proj4.findProjectionParameter(param);
+					String unit = proj4.getProjectionParameterUnitList(pos);
+					if (unit.equals("Angular")) 
+						data[2] = "Degree";
+					else if (unit.equals("Unitless"))
+						data[2] = "Unitless";
+					else if (unit.equals("Linear"))
+						data[2] = "Meters";
+					model.addRow(data);
+				}
+				setTrueParametersNames(trueParametersNames);
+			} catch (CrsException e) {
+				e.printStackTrace();
+			}
+		}
+		else {
+			getRbGeografico().setSelected(true);
+			 CardLayout cl = (CardLayout)(cardPanel.getLayout());
+			//cl.show(cardPanel, GEOGRAFICOPANEL);
+			 deshabilitarControles();
+		}
+	}
+	
+	public void fillTable(String projection) {
+		try {			
+			int index = proj4.findProjection(projection);
+			ArrayList params = proj4.getProj4ProjectionParameters(index);
+			ArrayList defaultValuesParams = proj4.getProj4ProjectionParameterDefaultValues(index);
+			setPos(index);
+			String[] parameters = new String[params.size()];
+			String[] defaultValues = new String[params.size()];
+			String[] units = new String[params.size()];
+			for (int i = 0; i < params.size(); i++) {
+				parameters[i] = params.get(i).toString();
+				int pos = proj4.findProjectionParameter(parameters[i]);
+				defaultValues[i] = defaultValuesParams.get(i).toString();
+				units[i] = proj4.getProjectionParameterUnitList(pos);
+				
+			}			
+			int numRow = model.getRowCount();
+			while (numRow != 0) {
+				numRow = numRow - 1;
+				model.removeRow(numRow);
+			}
+			Object[] data = new Object[3];
+			data[1] = ""+0;
+			data[2] = "Metros";
+			String[] items = null;
+			//Estas 5 lineas se eliminaran cuando se pueda utilizar el codigo
+			//del siguiente comentario
+			ArrayList unit = obtenerItemsUnidades();
+			items = new String[unit.size()];
+			for (int j=0;j<unit.size();j++){
+				items[j] = unit.get(j).toString();
+			}
+			/**
+			 * Esto debera ser utilizado cuando podamos distinguir
+			 * entre las unidades. De momento vamos a coger todas
+			 */
+			ArrayList trueParametersNames = new ArrayList();
+			for (int i = 0; i < parameters.length; i++) {
+				trueParametersNames.add(i,parameters[i]);
+				data[0] = PluginServices.getText(this, parameters[i]);
+				data[1] = defaultValues[i];
+				if (units[i].equals("Angular")) {
+					data[2] = "Degree";
+					//define los items del combo
+				    /*unit = obtenerItemsUnidadesAngular();
+					items = new String[unit.size()];
+					for (int j=0;j<unit.size();j++){
+						items[j] = unit.get(j).toString();
+					}*/					
+				}
+				else if (units[i].equals("Unitless")) {
+					data[2] = "Unitless";
+					//define los items del combo
+				    /*unit = obtenerItemsUnidadesScale();
+					items = new String[unit.size()];
+					for (int j=0;j<unit.size();j++){
+						items[j] = unit.get(j).toString();
+					}*/				
+				}
+				else {					
+					data[2] = "Meters";
+					//define los items del combo
+				    /*unit = obtenerItemsUnidades();
+					items = new String[unit.size()];
+					for (int j=0;j<unit.size();j++){
+						items[j] = unit.get(j).toString();
+					}*/					
+				}
+				model.addRow(data);				
+				/*TableColumn col = getTableParametros().getColumnModel().getColumn(2);
+		        
+		        col.setCellEditor(new DefaultCellEditor(getCbUnits()));
+		        DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
+		       
+		        col.setCellRenderer(renderer);
+		        getTableParametros().setCellEditor(new DefaultCellEditor(getCbUnits()));	
+		        */
+			}			
+			setTrueParametersNames(trueParametersNames);			
+		} catch (CrsException e) {
+			e.printStackTrace();
+		}
+	}
+	public void itemStateChanged(ItemEvent e) {
+		if (e.getItemSelectable().equals(cbProyeccion) ) {
+			String op = (String)e.getItem();			
+			int option = ((JComboBox)e.getSource()).getSelectedIndex();
+			fillTable(getProjection(option));
+		}
+		
+		if (e.getItemSelectable().equals(cbUnits) ) {
+			 System.out.println( (String)e.getItem());
+			 double value = Double.valueOf((String)getTableParametros().getValueAt(0, 1)).doubleValue();
+			 value = convertFromMeters(sourceUnit, (String)e.getItem(), value);
+			 sourceUnit = (String)e.getItem();
+			 String val = String.valueOf(value);
+			 getTableParametros().setValueAt(val, 0, 1);
+		}
+	}
+	
+	public void cleanData() {
+		getTxtNombreProy().setText("");
+		getCbProyeccion().setSelectedIndex(0);
+	}
+	
+	public double convert(double value, String measure) throws ConversionException {
+		if (measure.equals("D.MS")) {		
+			value *= this.divider;
+	        int deg,min;
+	        deg = (int) (value/10000); value -= 10000*deg;
+	        min = (int) (value/  100); value -=   100*min;
+	        if (min<=-60 || min>=60) {  // Accepts NaN
+	            if (Math.abs(Math.abs(min) - 100) <= EPS) {
+	                if (min >= 0) deg++; else deg--;
+	                min = 0;
+	            } else {
+	                throw new ConversionException("Invalid minutes: "+min);
+	            }
+	        }
+	        if (value<=-60 || value>=60) { // Accepts NaN
+	            if (Math.abs(Math.abs(value) - 100) <= EPS) {
+	                if (value >= 0) min++; else min--;
+	                value = 0;
+	            } else {
+	                throw new ConversionException("Invalid secondes: "+value);
+	            }
+	        }
+	        value = ((value/60) + min)/60 + deg;
+	        return value;
+		}
+		if (measure.equals("grad") || measure.equals("grade")) 
+			return ((value * 180.0) / 200.0);			
+		if (measure.equals(""+(char)176)) 
+			return value;		
+		if (measure.equals("DMS") ) 
+			return value;		
+		if (measure.equals("m")) 
+			return value;	
+		if (measure.equals("")) 
+			return value;
+		
+		throw new ConversionException("Conversion no contemplada: "+measure);
+    }
+	
+	public double convert2Meters(String unit, double value) {
+		double factor_b = 0;
+		double factor_c = 0;
+		String sentence = "SELECT factor_b, factor_c " +
+			"FROM epsg_unitofmeasure " +	                              
+			"WHERE unit_of_meas_name = '" +unit + "'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+		return ((value*factor_b)/factor_c);
+	}
+	
+	public double convert2Unitless(String unit, double value) {
+		double factor_b = 0;
+		double factor_c = 0;
+		String sentence = "SELECT factor_b, factor_c " +
+			"FROM epsg_unitofmeasure " +	                              
+			"WHERE unit_of_meas_name = '" +unit + "'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+		return ((value*factor_b)/factor_c);
+	}
+	
+	public double convert2Degree(String unit, double value) {
+		double factor_b = 0;
+		double factor_c = 0;
+		String sentence = "SELECT factor_b, factor_c " +
+			"FROM epsg_unitofmeasure " +	                              
+			"WHERE unit_of_meas_name = '" +unit + "'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+		value = ((value*factor_b)/factor_c);
+		return ((value * 180.0) / 200.0);
+	}
+	
+	public double convertFromMeters(String unitSource, String unitTarget, double value) {
+		double factor_b = 0;
+		double factor_c = 0;
+		String sentence = "SELECT factor_b, factor_c " +
+			"FROM epsg_unitofmeasure " +	                              
+			"WHERE unit_of_meas_name = '" +unitSource + "'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+		value = ((value*factor_b)/factor_c);
+		
+		sentence = "SELECT factor_b, factor_c " +
+		"FROM epsg_unitofmeasure " +	                              
+		"WHERE unit_of_meas_name = '" +unitTarget + "'";
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+		return ((value*factor_c)/factor_b);
+	}
+	
+	public double convertFromUnitless(String unitSource, String unitTarget, double value) {
+		double factor_b = 0;
+		double factor_c = 0;
+		String sentence = "SELECT factor_b, factor_c " +
+			"FROM epsg_unitofmeasure " +	                              
+			"WHERE unit_of_meas_name = '" +unitSource + "'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");	
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+		value = ((value*factor_b)/factor_c);
+		
+		sentence = "SELECT factor_b, factor_c " +
+		"FROM epsg_unitofmeasure " +	                              
+		"WHERE unit_of_meas_name = '" +unitTarget + "'";
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+		return ((value*factor_c)/factor_b);
+	}
+	
+	public double convertFromDegree(String unitSource, String unitTarget, double value) {
+		double factor_b = 0;
+		double factor_c = 0;
+		String sentence = "SELECT factor_b, factor_c " +
+			"FROM epsg_unitofmeasure " +	                              
+			"WHERE unit_of_meas_name = '" +unitSource + "'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+		value = ((value*factor_b)/factor_c);
+		
+		sentence = "SELECT factor_b, factor_c " +
+		"FROM epsg_unitofmeasure " +	                              
+		"WHERE unit_of_meas_name = '" +unitTarget + "'";
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+		return ((value*factor_c)/factor_b);
+	}
+	
+	public Proj4 getProj4() {
+		return proj4;
+	}
+	
+	/**
+	 * Contiene la posición de la proyección seleccionada dentro de la lista
+	 * de proyecciones de proj4.
+	 * @param pos
+	 */
+	public void setPos(int pos) {
+		this.pos = pos;
+	}
+	
+	/** Obtiene la posición de la proyección seleccionada dentro de la lista
+	 * de proyecciones de proj4.
+	 */
+	public int getPos() {
+		return this.pos;
+	}
+	
+	/**
+	 * Deshabilita todos los controles del panel
+	 *
+	 */
+	private void deshabilitarControles() {
+		getProyectadoPanel().setEnabled(false);
+		getTableParametros().setEnabled(false);
+		getTableParametros().getTableHeader().setEnabled(false);
+		getTxtNombreProy().setEnabled(false);
+		getLblNombreProy().setEnabled(false);
+		getLblProyeccion().setEnabled(false);
+		getCbProyeccion().setEnabled(false);	
+		getBtnImportar().setEnabled(false);
+	}
+	
+	/**
+	 * Habilita todos los controles del panel.
+	 *
+	 */
+	private void habilitarControles() {	
+		getProyectadoPanel().setEnabled(true);
+		getTableParametros().setEnabled(true);
+		getTableParametros().getTableHeader().setEnabled(true);
+		getTxtNombreProy().setEnabled(true);
+		getLblNombreProy().setEnabled(true);
+		getLblProyeccion().setEnabled(true);
+		getCbProyeccion().setEnabled(true);
+		getBtnImportar().setEnabled(true);
+	}
+	/**
+	 * Inicializa el boton que importa la proyeccion actual
+	 * @return
+	 */
+	public JButton getBtnImportar() {
+		if(btnImportar==null){
+			btnImportar=new JButton("...");
+			btnImportar.addActionListener(this);
+			
+		}
+		return btnImportar;
+	}
+	
+	/**
+	 * CRS que estamos cogiendo para poder rellenar los datos
+	 * @param code
+	 */
+	public void setCrs(int code) {
+		try {
+			crs = new CrsFactory().getCRS("EPSG:"+code);
+		} catch (CrsException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+	}
+	
+	/**
+	 * Obtiene el CRS actual
+	 * @return
+	 */
+	public ICrs getCrs() {
+		return crs;
+	}
+	
+	/**
+	 * Seleccion de la proyeccion que estamos utilizando. Esto lo hacemos para
+	 * obtener la cadena correcta de la proyeccion en lugar de su traduccion
+	 * que se utiliza en el combobox.
+	 * @param proj
+	 */
+	public void setProjection(ArrayList proj) {
+		projections = proj;
+	}
+	
+	/**
+	 * Obtencion de la proyecion utilizada a traves del indice.
+	 * @param indice
+	 * @return
+	 */
+	public String getProjection(int indice) {
+		return (String)projections.get(indice);
+	}
+	
+	/**
+	 * define los parametros utilizados por una proyeccion. Al igual que la
+	 * proyeccion, sirve para coger el valor correcto del parametro en lugar
+	 * de su traduccion en la tabla.
+	 * @param names
+	 */
+	public void setTrueParametersNames(ArrayList names) {
+		this.trueParametersNames = names;
+	}
+	
+	/**
+	 * Consigue los nombres buenos de los parametros utilizados en una proyeccion
+	 * @param indice
+	 * @return
+	 */
+	public String getTrueParametersNames(int indice) {
+		return (String)trueParametersNames.get(indice);
+	}
+
+
+}
+

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefSistCoordenadas.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/MainPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/MainPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/MainPanel.java	(revision 25287)
@@ -0,0 +1,782 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels.wizard;
+
+import java.awt.BorderLayout;
+import java.awt.FlowLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.text.ParseException;
+import java.util.ArrayList;
+
+import javax.swing.JButton;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JTabbedPane;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+
+import org.geotools.referencing.wkt.Parser;
+import org.gvsig.crs.Crs;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+
+import es.idr.teledeteccion.connection.EpsgConnection;
+import es.idr.teledeteccion.connection.Query;
+
+
+/**
+ * 
+ * @author Luisa Marina Fernndez (luisam.fernandez@uclm.es)
+ * @author Jose Luis Gomez Martinez (joseluis.gomez@uclm.es)
+ *
+ */
+public class MainPanel extends JPanel implements ActionListener, ChangeListener, IWindow {
+	
+	private static final long serialVersionUID = 1L;
+	private JTabbedPane pCard;
+	private JPanel pSouth;
+	
+	private JButton btnCancelar;
+	private JButton btnSiguiente;
+	private JButton btnAnterior;
+	private JButton btnFinalizar;
+	
+	private DefCrsUsr pCrsUsr;
+	private DefinirDatum pDatum;
+	private DefSistCoordenadas pSistCoord;
+	private ICrs currentCrs;
+	private String cadWkt = "";
+	private int newCrsCode = -1;
+	private boolean edit = false;
+	
+	public MainPanel(ICrs crs) {
+		super();
+		setCrs(crs);
+		this.setLayout(new BorderLayout());
+		this.add(getPCard(),BorderLayout.CENTER);
+		this.add(getPSouth(),BorderLayout.SOUTH);
+		getPCrsUsr().getRbCadenaWkt().addActionListener(this);
+		getPCrsUsr().getRbCrsExistente().addActionListener(this);
+		getPCrsUsr().getRbNuevoCrs().addActionListener(this);
+	}
+	/**
+	 * Inicilizar el botn Anterior
+	 * @return
+	 */
+	public JButton getBtnAnterior() {
+		if(btnAnterior==null){
+			btnAnterior=new JButton();
+			btnAnterior.setText(PluginServices.getText(this,"wz_anterior"));
+			btnAnterior.addActionListener(this);
+			
+		}
+		return btnAnterior;
+	}
+	/**
+	 * Inicilizar el botn Cancelar
+	 * @return
+	 */
+	public JButton getBtnCancelar() {
+		if(btnCancelar==null){
+			btnCancelar=new JButton();
+			btnCancelar.setText(PluginServices.getText(this,"wz_cancel"));
+			btnCancelar.addActionListener(this);
+		}
+		return btnCancelar;
+	}
+	/**
+	 * Inicilizar el botn Finalizar
+	 * @return
+	 */
+	public JButton getBtnFinalizar() {
+		if(btnFinalizar==null){
+			btnFinalizar=new JButton();
+			btnFinalizar.setText(PluginServices.getText(this,"wz_fin"));
+			btnFinalizar.addActionListener(this);
+		}
+		return btnFinalizar;
+	}
+	/**
+	 * Inicilizar el botn Siguiente
+	 * @return
+	 */
+	public JButton getBtnSiguiente() {
+		if(btnSiguiente==null){
+			btnSiguiente=new JButton();
+			btnSiguiente.setText(PluginServices.getText(this,"wz_siguiente"));
+			btnSiguiente.addActionListener(this);
+		}
+		return btnSiguiente;
+	}
+	/**
+	 * Inicilizar el panel que maneja los subpaneles del asistente
+	 * @return
+	 */
+	public JTabbedPane getPCard() {
+		if(pCard==null){
+			pCard = new JTabbedPane();			
+			pCard.addTab(PluginServices.getText(this,"crs_usuario"),getPCrsUsr());
+			pCard.addTab(PluginServices.getText(this,"Dat_nDatum"),getPDatum());
+			pCard.addTab(PluginServices.getText(this,"SistCoor_titmarco"),getPSistCoord());
+			//Por defecto se muestra la primera pestaa
+			pCard.setSelectedIndex(0);
+			pCard.addChangeListener(this);
+		}
+		return pCard;
+	}
+	/**
+	 * Iniciliza el panel que contiene los botones del asistente
+	 * @return
+	 */
+	public JPanel getPSouth() {
+		if(pSouth==null){
+			pSouth=new JPanel();
+			pSouth.setLayout(new FlowLayout(FlowLayout.RIGHT,5,5));
+			pSouth.add(getBtnCancelar());
+			pSouth.add(getBtnAnterior());
+			pSouth.add(getBtnSiguiente());
+			pSouth.add(getBtnFinalizar());
+			getBtnFinalizar().setVisible(false);
+			getBtnAnterior().setVisible(false);
+		}
+		return pSouth;
+	}
+	public DefCrsUsr getPCrsUsr() {
+		if(pCrsUsr==null){
+			pCrsUsr=new DefCrsUsr(getCrs());
+		}
+		return pCrsUsr;
+	}
+	public DefinirDatum getPDatum() {
+		if(pDatum==null){
+			pDatum=new DefinirDatum();
+		}
+		return pDatum;
+	}
+	public DefSistCoordenadas getPSistCoord() {
+		if(pSistCoord==null){
+			pSistCoord=new DefSistCoordenadas();
+		}
+		return pSistCoord;
+	}
+	public void actionPerformed(ActionEvent e) {
+	
+		if(e.getSource().equals(getBtnAnterior())){
+
+			//Establecer los botones del Wizard
+			getBtnFinalizar().setVisible(false);
+			getBtnSiguiente().setVisible(true);
+			
+			if (getPSistCoord().isShowing() && isEditing()) {
+				getBtnAnterior().setVisible(false);
+			}
+			if(getPDatum().isShowing()){
+				//Se va a mostrar el primer panel del Wizard
+				getBtnAnterior().setVisible(false);
+				if (getPCrsUsr().getRbCadenaWkt().isSelected()) {
+					getBtnFinalizar().setVisible(true);
+				}
+				getPCard().setSelectedComponent(getPCrsUsr());
+			}
+			else if (getPSistCoord().isShowing()) {
+				getPCard().setSelectedComponent(getPDatum());
+			}
+			
+		}else if(e.getSource().equals(getBtnSiguiente())){
+			if (getPCrsUsr().isShowing() && getPCrsUsr().getRbCrsExistente().isSelected() ){
+				getBtnFinalizar().setVisible(false);
+				ICrs crs = getPCrsUsr().getCrs();
+				if (crs != null){
+					fillData(crs);
+				}
+				else fillData(getCrs());
+			}
+			else if (getPCrsUsr().isShowing() && getPCrsUsr().getRbNuevoCrs().isSelected() ){
+				getBtnFinalizar().setVisible(false);
+				cleanData();
+			}
+			else if (getPCrsUsr().isShowing() && getPCrsUsr().getRbCadenaWkt().isSelected()) {
+				if (getPCrsUsr().getTxtAreaWkt().getText().equals("")) {
+					JOptionPane.showMessageDialog(MainPanel.this, 
+							PluginServices.getText(this,"white_Textbox"), 
+							"Warning...", JOptionPane.WARNING_MESSAGE);
+					return;
+				} else {
+					CoordinateReferenceSystem crs = null;
+					String wkt = getPCrsUsr().getTxtAreaWkt().getText();
+					Parser parser = new Parser();
+			        
+					try {
+						crs = parser.parseCoordinateReferenceSystem(wkt);
+					} catch (ParseException e1) {
+						//System.out.println("Cadena WKT no ha podido ser parseada");
+						//e1.printStackTrace();
+						JOptionPane.showMessageDialog(MainPanel.this, 
+								PluginServices.getText(this, "problem_with_wkt_try_manually"), 
+								"Warning...", JOptionPane.WARNING_MESSAGE);					
+						return;					
+					} catch (UnsupportedOperationException e2) {
+						JOptionPane.showMessageDialog(MainPanel.this, 
+								PluginServices.getText(this, "problem_with_wkt_try_manually"), 
+								"Warning...", JOptionPane.WARNING_MESSAGE);					
+						return;
+					}
+					
+					fillData(crs);
+				}
+			}
+			if (getPCrsUsr().isShowing())			
+				getPCard().setSelectedComponent(getPDatum());
+			else if (getPDatum().isShowing())
+				getPCard().setSelectedComponent(getPSistCoord());
+			
+			getBtnAnterior().setVisible(true);
+			//Si aparece el ultimo panel visualizar el botn finalizar
+			if (getPDatum().isShowing()){
+				getBtnFinalizar().setVisible(true);
+				getBtnSiguiente().setVisible(false);
+				getBtnAnterior().setVisible(true);
+			}
+		}else if(e.getSource().equals(getBtnFinalizar())){
+			if (getPCrsUsr().getRbCadenaWkt().isSelected()) {
+				CoordinateReferenceSystem crs = null;
+				String wkt = getPCrsUsr().getTxtAreaWkt().getText();
+				Parser parser = new Parser();
+				if (getPCrsUsr().getTxtAreaWkt().getText().equals("")) {
+						JOptionPane.showMessageDialog(MainPanel.this, 
+								PluginServices.getText(this,"white_Textbox"), 
+								"Warning...", JOptionPane.WARNING_MESSAGE);
+						return;
+				}
+				try {
+					crs = parser.parseCoordinateReferenceSystem(wkt);
+				} catch (ParseException e1) {
+					//System.out.println("Cadena WKT no ha podido ser parseada");
+					//e1.printStackTrace();
+					JOptionPane.showMessageDialog(MainPanel.this, 
+							PluginServices.getText(this, "problem_with_wkt_try_manually"), 
+							"Warning...", JOptionPane.WARNING_MESSAGE);					
+					return;
+				} catch (UnsupportedOperationException e2) {
+					JOptionPane.showMessageDialog(MainPanel.this, 
+							PluginServices.getText(this, "problem_with_wkt_try_manually"), 
+							"Warning...", JOptionPane.WARNING_MESSAGE);					
+					return;
+				}
+				
+				fillData(crs);
+			}
+			
+			//Realizar las acciones de fin del Wizard
+			getDataAndUpdate();	
+			
+		}else if(e.getSource().equals(getBtnCancelar())){
+			//Cerrar el asistente
+			PluginServices.getMDIManager().closeWindow(this);
+		} else if (e.getSource().equals(getPCrsUsr().getRbCadenaWkt())) {			
+			getPCrsUsr().habilitarExistente(false);
+			getPCrsUsr().habilitarWkt(true);
+			getBtnFinalizar().setVisible(true);
+		}
+		else if(e.getSource().equals(getPCrsUsr().getRbCrsExistente())){
+			 getPCrsUsr().habilitarExistente(true);
+			 getPCrsUsr().habilitarWkt(false);
+			 getBtnFinalizar().setVisible(false);
+        }else  if(e.getSource().equals(getPCrsUsr().getRbNuevoCrs())){       	 
+       	 	getPCrsUsr().habilitarExistente(false);
+       	 	getPCrsUsr().habilitarWkt(false);
+       	 	getBtnFinalizar().setVisible(false);
+        }
+	}
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle(PluginServices.getText(this,"wz_titulo"));
+   		m_viewinfo.setWidth(560);
+   		//m_viewinfo.setHeight(425);
+   		m_viewinfo.setHeight(400);
+		return m_viewinfo;
+	}
+	
+	public ICrs getCrs () {
+		return currentCrs;
+	}
+	
+	public void setCrs (ICrs crs) {
+		currentCrs = crs;
+	}
+	
+	public void fillData(ICrs crs) {
+		getPDatum().fillData(crs);
+		getPSistCoord().fillData(crs);
+	}
+	
+	public void fillData(ICrs crs, boolean editing) {
+		getPDatum().fillData(crs, editing);
+		getPSistCoord().fillData(crs);
+	}
+	
+	public void cleanData() {
+		getPDatum().cleanData();
+		getPSistCoord().cleanData();
+	}
+	
+	public void fillData(CoordinateReferenceSystem crs) {		
+		getPDatum().fillData(crs);
+		getPSistCoord().fillData(crs);
+	}
+	
+	private void getDataAndUpdate() {
+		EpsgConnection conn = new EpsgConnection();
+		conn.setConnectionUsr();
+		String codeCrs = "";
+		String sentence;
+		ResultSet result;
+		
+		if (getPDatum().getTxtSemMay().getText().equals("")) {
+			JOptionPane.showMessageDialog(MainPanel.this, 
+					PluginServices.getText(this,"white_Textbox")+": Semieje Mayor", 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			return;
+		}
+		
+		if (getPDatum().getTxtLong().getText().equals("")) {
+			JOptionPane.showMessageDialog(MainPanel.this, 
+					PluginServices.getText(this,"white_Textbox")+": Longitud", 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			return;
+		}
+		
+		if (getPDatum().getTxtCodigoCrs().getText().equals("")) {
+			JOptionPane.showMessageDialog(MainPanel.this, 
+					PluginServices.getText(this,"white_Textbox")+": Codigo CRS", 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			return;
+		}
+		
+		String cadenaNumerica = getPDatum().getTxtSemMay().getText().replaceAll("[^0-9.E-]", "");
+						
+		if (getPDatum().getTxtSemMay().getText().length() != cadenaNumerica.length() || notANumber(cadenaNumerica)) {
+			JOptionPane.showMessageDialog(MainPanel.this, 
+					PluginServices.getText(this,"numeric_format")+": Semieje Mayor", 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			return;
+		}		
+		
+		cadenaNumerica = getPDatum().getTxtLong().getText().replaceAll("[^0-9.E-]", "");
+		
+		if (getPDatum().getTxtLong().getText().length() != cadenaNumerica.length() || notANumber(cadenaNumerica)) {
+		
+			JOptionPane.showMessageDialog(MainPanel.this, 
+					PluginServices.getText(this,"numeric_format")+": Longitud", 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			return;
+		}
+		
+		codeCrs = getPDatum().getTxtCodigoCrs().getText().replaceAll("[^0-9]", "");
+		
+		if (getPDatum().getTxtCodigoCrs().getText().length() != codeCrs.length()) {
+			
+			JOptionPane.showMessageDialog(MainPanel.this, 
+					PluginServices.getText(this,"numeric_format")+": Codigo CRS", 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			return;
+		}
+		
+		double value = Double.valueOf(getPDatum().getTxtSemMay().getText()).doubleValue();
+		//Comprobar si es numerico, o quedarnos con la parte numerica...
+		//searchTextField.getText().length()!=searchTextField.getText().replaceAll("[^0-9]", "").length())
+		String unit = getPDatum().getLengthUnit(getPDatum().getCbSemMay().getSelectedIndex());
+		double semMay = getPDatum().convert2Meters(unit, value);
+		value = Double.valueOf(getPDatum().getTxtLong().getText()).doubleValue();
+		unit = getPDatum().getAngularUnit(getPDatum().getCbLong().getSelectedIndex());
+		double longitude = getPDatum().convert2Degree(unit, value);
+		String spheroidName = getPDatum().getTxtElipsoide().getText();
+		if (spheroidName.equals(""))
+			spheroidName = PluginServices.getText(this, "no_name");
+		String[] spheroid = {spheroidName,
+							""+semMay,getPDatum().getTxtInvF().getText()};
+		String meridianName = getPDatum().getTxtMeridian().getText();
+		if (meridianName.equals(""))
+			meridianName = PluginServices.getText(this, "no_name");
+		String[] primem = {meridianName, ""+longitude};
+		
+		String[] authority = {"\"USR\"", codeCrs};
+		if (!isEditing()){
+			sentence = "SELECT usr_code FROM USR WHERE usr_code = " +authority[1];
+			result = Query.select(sentence, conn.getConnection());
+			try {
+				if (result.next()) {
+					JOptionPane.showMessageDialog(MainPanel.this, 
+							PluginServices.getText(this,"crsRepeat")+": "+authority[1], 
+							"Warning...", JOptionPane.WARNING_MESSAGE);
+					return;
+				}
+			} catch (SQLException e1) {
+				// TODO Auto-generated catch block
+				e1.printStackTrace();
+			}				
+		}
+		String datum = getPDatum().getTxtDatum().getText();
+		if (datum.equals(""))
+			datum = PluginServices.getText(this, "no_name");		
+		
+		if (getPSistCoord().getRbGeografico().isSelected()) {
+			String name = getPDatum().getTxtNombreCrs().getText();
+			if (name.equals(""))
+				name = PluginServices.getText(this, "no_name");
+			cadWkt = "GEOGCS[\"" + name + "\", DATUM[\""+ datum +
+			"\", SPHEROID[\""+ spheroid[0] + "\", "+ spheroid[1] + ", "+ spheroid[2] +"]], " +
+			"PRIMEM[\""+ primem[0] + "\", "+ primem[1] +"], UNIT[\"Degree\", " + (Math.PI/180) +
+			"]]";
+			if (!isEditing()){
+				sentence = "INSERT INTO USR VALUES("+authority[1]+",'" +
+							cadWkt +"','','"+name+"','"+datum+"')";
+			} else { 
+				sentence = "UPDATE USR SET usr_wkt='" +cadWkt +"'," +
+						"usr_proj='',usr_geog='"+getPDatum().getTxtNombreCrs().getText()+"'," +
+						"usr_datum='"+datum+"' " +
+						"WHERE usr_code = " +authority[1];
+			}
+	
+		} else {
+			String name = getPDatum().getTxtNombreCrs().getText();
+			if (name.equals(""))
+				name = PluginServices.getText(this, "no_name");
+			String projection = getPSistCoord().getTxtNombreProy().getText();
+			if (projection.equals(""))
+				projection = PluginServices.getText(this, "no_name");
+			cadWkt = "PROJCS[\""+projection+
+				"\", GEOGCS[\"" + name + "\", DATUM[\""+ datum +
+				"\", SPHEROID[\""+ spheroid[0] + "\", "+ spheroid[1] + ", "+ spheroid[2] +"]], " +
+				"PRIMEM[\""+ primem[0] + "\", "+ primem[1] +"], UNIT[\"Degree\", " + (Math.PI/180) +
+				"]], PROJECTION[\""+ getPSistCoord().getProjection(getPSistCoord().getCbProyeccion().getSelectedIndex()) + "\"], ";
+				
+			
+			ArrayList maxValues = null;
+			ArrayList minValues = null;
+			int paramPos = 0;
+			try {
+				maxValues = getPSistCoord().getProj4().getProj4ProjectionParameterMaxValues(getPSistCoord().getPos());
+				minValues = getPSistCoord().getProj4().getProj4ProjectionParameterMinValues(getPSistCoord().getPos());
+				
+			} catch (CrsException e) {
+				e.printStackTrace();
+			}
+			/*
+			 * falta la parte de los parámetros... metodo para nombres...
+			 */		
+			int j=0;
+			for (int i= 0; i< getPSistCoord().getTableParametros().getRowCount();i++){
+				if (((String)(getPSistCoord().getTableParametros().getValueAt(i,1))).equals("")) {
+					getPSistCoord().getTableParametros().setValueAt("0",i,1);
+				}
+				cadenaNumerica = ((String)(getPSistCoord().getTableParametros().getValueAt(i,1))).replaceAll("[^0-9.E-]", "");
+				
+				if (((String)(getPSistCoord().getTableParametros().getValueAt(i,1))).length() != cadenaNumerica.length() || notANumber(cadenaNumerica)) {
+			
+					JOptionPane.showMessageDialog(MainPanel.this, 
+							PluginServices.getText(this,"numeric_format")+": Parametro "+(String)(getPSistCoord().getTableParametros().getValueAt(i,0)), 
+							"Warning...", JOptionPane.WARNING_MESSAGE);
+					return;
+				}
+				String condition = (String)getPSistCoord().getTableParametros().getValueAt(i, 0);
+				String param = getPSistCoord().getTrueParametersNames(j);
+				paramPos = findPositionParameter(param);
+				if (paramPos != -1) {
+					value = Double.parseDouble(cadenaNumerica);
+					if ((PluginServices.getText(this, condition).trim().equals("semi_major") || (PluginServices.getText(this, condition).trim().equals("semi_minor")))) {
+						continue;
+					}
+					else if (!(param.trim().equals("semi_major") || param.trim().equals("semi_minor"))) {
+						double maxValue = Double.parseDouble((String)maxValues.get(paramPos));
+						double minValue = Double.parseDouble((String) minValues.get(paramPos));
+						if (value > maxValue || value < minValue) {
+							JOptionPane.showMessageDialog(MainPanel.this, 
+									PluginServices.getText(this,"incorrect_domain")+": Parametro "+(String)(getPSistCoord().getTableParametros().getValueAt(i,0)), 
+									"Warning...", JOptionPane.WARNING_MESSAGE);
+							return;
+						}
+						j++;
+						//paramPos ++;
+					}
+									
+					value = 0;
+					unit = "";
+					/**
+					 * Esto está hecho en general, habrá que hacerlo dependiendo del tipo de
+					 * unidad que tenga el parametro
+					 */
+					String type = (String) getPSistCoord().getTableParametros().getValueAt(i, 2);
+					value = Double.parseDouble((String)getPSistCoord().getTableParametros().getValueAt(i, 1));
+					/*if (type.equals("Meters")) {
+						value = Double.parseDouble((String)getPSistCoord().getTableParametros().getValueAt(i, 1));
+						unit = (String)getPSistCoord().getCbUnits().getSelectedItem();
+						value = getPSistCoord().convert2Meters(unit, value);
+					}
+					else if (type.equals("Degree")) {
+						value = Double.parseDouble((String)getPSistCoord().getTableParametros().getValueAt(i, 1));
+						unit = (String)getPSistCoord().getCbUnits().getSelectedItem();
+						value = getPSistCoord().convert2Degree(unit, value);
+					}
+					else if (type.equals("Unitless")) {
+						value = Double.parseDouble((String)getPSistCoord().getTableParametros().getValueAt(i, 1));
+						unit = (String)getPSistCoord().getCbUnits().getSelectedItem();
+						value = getPSistCoord().convert2Unitless(unit, value);
+					}*/
+					
+					cadWkt += "PARAMETER[\""+getPSistCoord().getTrueParametersNames(i)+"\", " + 
+								value+ "], ";				
+				} else {
+					j++;
+				}
+			}
+			
+			cadWkt += "UNIT[\"Meters\", 1.0]]";
+			
+			if (!isEditing()) {
+				sentence = "INSERT INTO USR VALUES("+authority[1]+",'" +
+				cadWkt +"','"+projection+"','"+name+"','"+datum+"')";
+			}
+			else { 
+				sentence = "UPDATE USR SET usr_wkt='" + cadWkt +"'," +
+						"usr_proj='"+projection+"'," +
+						"usr_geog='"+name+"'," +
+						"usr_datum='"+datum+"' " +
+						"WHERE usr_code = " +authority[1];
+			}
+		}		
+		try {
+			conn.update(sentence);
+			conn.shutdown();
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+		setNewCrsCode(Integer.parseInt(authority[1]));
+		try {
+			ICrs crs = new CrsFactory().getCRS("USR:"+authority[1]);			
+			crs.getProj4String();
+		} catch (CrsException e1) {
+			JOptionPane.showMessageDialog(this, PluginServices.getText(this,e1.getMessage()), "Warning...",
+					JOptionPane.WARNING_MESSAGE);
+			conn.setConnectionUsr();			
+			sentence = "DELETE FROM USR WHERE usr_code =" + authority[1];
+			result = Query.select(sentence,conn.getConnection());	
+			try {
+				conn.shutdown();
+			} catch (SQLException arg0) {
+				// TODO Auto-generated catch block
+				arg0.printStackTrace();
+			}
+			return;
+		}
+		PluginServices.getMDIManager().closeWindow(this);
+	}
+	
+	private int findPositionParameter(String param) {
+		ArrayList parameters = new ArrayList();
+		try {
+			parameters = getPSistCoord().getProj4().getProj4ProjectionParameters(getPSistCoord().getPos());
+			int pos = -1;
+			int i = 0;
+			do {
+				pos = getPSistCoord().getProj4().findProjectionParameters(param, parameters.get(i).toString());
+				i++;
+				if (i==parameters.size()) break;
+			} while (pos == -1);
+			if (pos!=-1)
+				param = getPSistCoord().getProj4().getProj4ProjectionParameterName(pos);			
+		} catch (CrsException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		for (int i=0; i< parameters.size(); i++) {
+			String actualParam = ((String)parameters.get(i)).trim();
+			if (actualParam.equals(param)) return i;
+		}
+		return -1;
+	}
+	
+	public void setNewCrsCode(int code) {
+		newCrsCode = code;
+	}
+	
+	public int getNewCrsCode() {
+		return newCrsCode;
+	}
+	
+	private boolean notANumber(String cadenaNumerica) {
+		int puntos = 0;
+		int signos = 0;
+		int letras = 0;
+		for (int i = 0; i< cadenaNumerica.length(); i++) {
+			if (cadenaNumerica.charAt(i) == '.')
+				puntos++;
+			else if (cadenaNumerica.charAt(i) == '-') {
+				if (i==0) {
+					signos++;
+				}
+				else if (i!=0 && cadenaNumerica.charAt(i-1) != 'E') {
+					signos = 2;
+				}
+			}
+			else if (cadenaNumerica.charAt(i) == 'E') {
+				if (i== 0) {
+					letras = 2;
+				}
+				else letras ++;
+			}
+		}
+		
+		if ((letras > 1) || (signos > 1) || (puntos > 1))
+			return true;
+		return false;
+	}
+	
+	public void setEditing(boolean edit) {
+		this.edit = edit;
+	}
+	
+	public boolean isEditing() {
+		return this.edit;
+	}
+	
+	public void setEditingPanel() {
+		pCard.setSelectedComponent(getPDatum());
+		pCard.setEnabledAt(0, false);
+		fillData(getCrs(), true);
+		getPDatum().getTxtCodigoCrs().setEnabled(false);
+		
+	}
+	public void stateChanged(ChangeEvent e) {
+		if (e.getSource() == getPCard()) {
+			if (getPCrsUsr().getHasChanged()) {
+				if (getPCrsUsr().getRbCrsExistente().isSelected()) {
+					ICrs crs = getPCrsUsr().getCrs();
+					if (crs != null) fillData(crs);					
+					else fillData(getCrs());
+					getPCrsUsr().setHasChange(false);
+				}
+				else if (getPCrsUsr().getRbNuevoCrs().isSelected()) {
+					cleanData();
+					getPCrsUsr().setHasChange(false);
+				}
+				else if (getPCrsUsr().getRbCadenaWkt().isSelected()) {
+					cleanData();
+					if (getPCrsUsr().getTxtAreaWkt().getText().equals("")) {
+						JOptionPane.showMessageDialog(MainPanel.this, 
+								PluginServices.getText(this,"white_Textbox"), 
+								"Warning...", JOptionPane.WARNING_MESSAGE);
+						getPCrsUsr().setHasChange(false);
+						getPCard().setSelectedComponent(getPCrsUsr());
+						return;
+					} else {
+						CoordinateReferenceSystem crs = null;
+						String wkt = getPCrsUsr().getTxtAreaWkt().getText();
+						Parser parser = new Parser();
+				        Crs crs2 = null;
+						try {
+							crs = parser.parseCoordinateReferenceSystem(wkt);
+						} catch (ParseException e1) {
+							//System.out.println("Cadena WKT no ha podido ser parseada");
+							//e1.printStackTrace();
+							JOptionPane.showMessageDialog(MainPanel.this, 
+									PluginServices.getText(this, "problem_with_wkt_try_manually"), 
+									"Warning...", JOptionPane.WARNING_MESSAGE);					
+							getPCrsUsr().setHasChange(false);
+							getPCard().setSelectedComponent(getPCrsUsr());
+							return;
+						} catch (UnsupportedOperationException e2) {
+							JOptionPane.showMessageDialog(MainPanel.this, 
+									PluginServices.getText(this, "problem_with_wkt_try_manually"), 
+									"Warning...", JOptionPane.WARNING_MESSAGE);					
+							getPCrsUsr().setHasChange(false);
+							getPCard().setSelectedComponent(getPCrsUsr());
+							return;
+						}						
+						fillData(crs);
+					}
+					getPCrsUsr().setHasChange(false);
+				}
+			}
+			int i = ((JTabbedPane)e.getSource()).getSelectedIndex();
+			if (i==0){
+				getBtnAnterior().setVisible(false);
+				getBtnSiguiente().setVisible(true);
+				if (getPCrsUsr().getRbCadenaWkt().isSelected()){
+					getPCrsUsr().setHasChange(true);
+					getBtnFinalizar().setVisible(true);
+				}
+				else
+					getBtnFinalizar().setVisible(false);
+			}
+			else if (i==1 && !isEditing()) {
+				getBtnAnterior().setVisible(true);
+				getBtnSiguiente().setVisible(true);
+				getBtnFinalizar().setVisible(false);
+				if (getPCrsUsr().getRbCadenaWkt().isSelected()){
+					//getPCrsUsr().setHasChange(true);
+					getBtnFinalizar().setVisible(true);
+				}
+			}
+			else if (i==1 && isEditing()) {
+				getBtnAnterior().setVisible(false);
+				getBtnSiguiente().setVisible(true);
+				getBtnFinalizar().setVisible(false);
+			}
+			else if (i == 2) {				
+				getBtnAnterior().setVisible(true);
+				getBtnSiguiente().setVisible(false);
+				getBtnFinalizar().setVisible(true);				
+			}
+		}
+		
+	}
+	
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/MainPanel.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefinirDatum.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefinirDatum.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefinirDatum.java	(revision 25287)
@@ -0,0 +1,1383 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels.wizard;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+
+import javax.swing.BorderFactory;
+import javax.swing.ButtonGroup;
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JTextField;
+import javax.swing.plaf.basic.BasicComboBoxRenderer;
+import javax.units.ConversionException;
+import javax.units.Unit;
+
+import org.geotools.referencing.crs.AbstractSingleCRS;
+import org.geotools.referencing.datum.DefaultEllipsoid;
+import org.geotools.referencing.datum.DefaultGeodeticDatum;
+import org.geotools.referencing.datum.DefaultPrimeMeridian;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.dialog.ImportNewCrsDialog;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+
+import com.iver.andami.PluginServices;
+import com.iver.utiles.swing.JComboBox;
+
+import es.idr.teledeteccion.connection.EpsgConnection;
+import es.idr.teledeteccion.connection.Query;
+
+/**
+ * Panel de definicin del Datum 
+ * 
+ * @author Luisa Marina Fernandez Ruiz (luisam.fernandez@uclm.es)
+ * @author Jose Luis Gomez Martinez (joseluis.gomez@uclm.es)
+ * 
+ *
+ */
+public class DefinirDatum extends JPanel implements ActionListener, FocusListener, ItemListener, KeyListener{
+	
+	private JTextField txtDatum;
+	private JTextField txtElipsoide;
+	private JTextField txtSemMay;
+	private JTextField txtSemMen;
+	private JTextField txtInvF;
+	private JTextField txtMeridian;
+	private JTextField txtLong;
+	private JTextField txtNombreCrs;
+	private JTextField txtCodigoCrs;
+	
+	private JLabel lblDatum;
+	private JLabel lblElipsoide;
+	private JLabel lblMeridian;
+	private JLabel lblLong;
+	private JLabel lblNombreCrs;
+	private JLabel lblCodigoCrs;
+	private JLabel lblSemiejeMayor;
+	private JLabel lblSemiejeMenor;
+	private JLabel lblInverseFlat;
+	private JLabel lblDefinir;
+	
+	
+	private JButton btnImportDatum;
+	private JButton btnImportElipsoide;
+	private JButton btnImportMeridian;
+	
+	private JComboBox cbSemMay;
+	private JComboBox cbSemMen;
+	private JComboBox cbInvF;
+	private JComboBox cbLong;
+	
+	private JRadioButton rbA_Inv;
+	private JRadioButton rbA_B;
+	private ButtonGroup groupRadioButton;
+	
+	private Dimension bigSize;
+	private Dimension smallSize;
+	private Dimension dimLabels;
+//	private ImageIcon imodify;
+	
+	private static final long serialVersionUID = 1L;
+	ICrs crs = null;
+	
+	private String sourceUnitLong = null;
+	private String sourceUnitSemMay = null;
+	private String sourceUnitSemMen = null;
+	
+	ArrayList lengthUnits = null;
+	ArrayList angularUnits = null;
+	int divider=10000;
+	
+	boolean primera = true;
+	
+	/**
+     * Small tolerance factor for rounding errors.
+     */
+    private static final double EPS = 1E-8;
+
+	public DefinirDatum() {
+		
+		super();
+		//imodify = new ImageIcon(DefinirDatum.class.getClassLoader().getResource("images/search.png"));
+		dimLabels=new Dimension(110,15);
+		this.setLayout(new BorderLayout());
+		this.setBorder(BorderFactory.createEmptyBorder(4,4,4,4));
+		bigSize=new Dimension();
+		bigSize.width=350;
+		smallSize=new Dimension();
+		smallSize.width=130;
+		inicializarNuevo();
+		
+	}
+	private void inicializarNuevo(){
+		JPanel pMain=new JPanel();
+		JPanel pDatum=new JPanel();
+		JPanel pElipsoide=new JPanel();
+		JPanel pMeridian=new JPanel();
+		JPanel pNorthis=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
+		pMain.setLayout(new BorderLayout());
+		
+		pMain.setBorder(BorderFactory.createTitledBorder(PluginServices.getText(this,"Dat_nDatum")));
+		pElipsoide.setBorder(BorderFactory.createTitledBorder(PluginServices.getText(this,"Dat_nElipsoide")));
+		pMeridian.setBorder(BorderFactory.createTitledBorder(PluginServices.getText(this,"Dat_nMeridian")));
+		
+		/*Panel que contiene los datos del Datum*/
+		pDatum.setLayout(new GridLayout(2,1));
+		JPanel pD1=new JPanel(new FlowLayout(FlowLayout.LEFT,10,0));
+		pD1.add(getLblDatum());
+		JPanel pD2=new JPanel(new FlowLayout(FlowLayout.LEFT,10,0));
+		pD2.add(getTxtDatum());
+		pD2.add(getBtnImportDatum());
+		pDatum.add(pD1);
+		pDatum.add(pD2);
+		
+		/*Panel que contiene los datos del Elipsoide*/
+		pElipsoide.setLayout(new GridLayout(6,1));
+		//Crear y agregar los componentes a los subpaneles que componen el panel de definicin del elipsoide
+		JPanel pE1=new JPanel(new FlowLayout(FlowLayout.LEFT,10,2));
+		pE1.add(getLblElipsoide());
+		JPanel pE2=new JPanel(new FlowLayout(FlowLayout.LEFT,10,2));
+		pE2.add(getTxtElipsoide());
+		pE2.add(getBtnImportElipsoide());
+		JPanel pE3=new JPanel(new FlowLayout(FlowLayout.LEFT,10,2));
+		pE3.add(getLblDefinir());
+		pE3.add(getRbA_Inv());
+		pE3.add(getRbA_B());
+		JPanel pE4=new JPanel(new FlowLayout(FlowLayout.LEFT,10,2));
+		//Semieje mayor
+		pE4.add(getLblSemiejeMayor());
+		pE4.add(getTxtSemMay());
+		pE4.add(getCbSemMay());
+		JPanel pE5=new JPanel(new FlowLayout(FlowLayout.LEFT,10,2));
+		pE5.add(getLblInverseFlat());
+		pE5.add(getTxtInvF());
+		JPanel pE6=new JPanel(new FlowLayout(FlowLayout.LEFT,10,2));
+		//Semieje menor
+		pE6.add(getLblSemiejeMenor());
+		pE6.add(getTxtSemMen());
+		pE6.add(getCbSemMen());
+		
+		//Agregar los subpaneles al panel del Elipsoide
+		pElipsoide.add(pE1);
+		pElipsoide.add(pE2);
+		pElipsoide.add(pE3);
+		pElipsoide.add(pE4);
+		pElipsoide.add(pE5);
+		pElipsoide.add(pE6);
+		//Agrupar los Radio Buttoms
+		agruparRadioButtons();
+		
+		/*Panel que contiene los datos del Meridiano*/
+		pMeridian.setLayout(new GridLayout(2,1));
+		JPanel pM1=new JPanel(new FlowLayout(FlowLayout.LEFT,10,3));
+		pM1.add(getLblMeridian());
+		pM1.add(getTxtMeridian());
+		pM1.add(getBtnImportMeridian());
+		JPanel pM2=new JPanel(new FlowLayout(FlowLayout.LEFT,10,3));
+		pM2.add(getLblLong());
+		pM2.add(getTxtLong());
+		pM2.add(getCbLong());
+		pMeridian.add(pM1);
+		pMeridian.add(pM2);
+		pMain.add(pDatum,BorderLayout.NORTH);
+		pMain.add(pElipsoide,BorderLayout.CENTER);
+		pMain.add(pMeridian,BorderLayout.SOUTH);
+		this.add(pMain,BorderLayout.CENTER);
+		//Agregar en norte-this el nombre y el cdigo
+		pNorthis.add(getLblNombreCrs());
+		pNorthis.add(getTxtNombreCrs());
+		pNorthis.add(getLblCodigoCrs());
+		pNorthis.add(getTxtCodigoCrs());
+		this.add(pNorthis,BorderLayout.NORTH);
+		
+	}
+	/**
+	 * Inicializa el botn Importar del datum
+	 * @return
+	 */
+	public JButton getBtnImportDatum() {
+		if(btnImportDatum==null){
+			btnImportDatum=new JButton();
+			btnImportDatum.setText("...");
+			//btnImportDatum.setIcon(imodify);
+			btnImportDatum.addActionListener(this);
+		}
+		return btnImportDatum;
+	}
+	/**
+	 * Inicializa el botn Importar del Elipsoide
+	 * @return
+	 */
+	public JButton getBtnImportElipsoide() {
+		if(btnImportElipsoide==null){
+			btnImportElipsoide=new JButton();
+			btnImportElipsoide.setText("...");
+			//btnImportElipsoide.setIcon(imodify);
+			btnImportElipsoide.addActionListener(this);
+		}
+		return btnImportElipsoide;
+	}
+	/**
+	 * Inicializa el botn Importar del Meridiano
+	 * @return
+	 */
+	public JButton getBtnImportMeridian() {
+		if(btnImportMeridian==null){
+			btnImportMeridian=new JButton();
+			btnImportMeridian.setText("...");
+			//btnImportMeridian.setIcon(imodify);
+			btnImportMeridian.addActionListener(this);
+		}
+		return btnImportMeridian;
+	}
+	/**
+	 * Inicializa el Combo box con las unidades de Inverse Flat
+	 * @return
+	 */
+	public JComboBox getCbInvF() {
+		if (cbInvF==null){
+			ArrayList units = obtenerItemsUnidades();
+			String[] items = new String[units.size()];
+			for (int i=0;i<units.size();i++){
+				items[i] = units.get(i).toString();
+			}
+			cbInvF=new JComboBox(items);
+			/*Seleccionar un item por defecto*/
+			cbInvF.setSelectedIndex(0);
+			cbInvF.addItemListener(this);
+		}
+		return cbInvF;
+	}
+	/**
+	 * Inicializa el Combo box con las unidades de Longitud
+	 * @return
+	 */
+	public JComboBox getCbLong() {
+		if (cbLong==null){
+			ArrayList units = obtenerItemsUnidadesAngle();
+			String[] items = new String[units.size()];
+			String[] tooltips = new String[units.size()];
+			for (int i=0;i<units.size();i++){
+				items[i] = tooltips[i] = units.get(i).toString();
+			}
+			cbLong=new JComboBox(items);
+			cbLong.setRenderer(new ComboBoxTootipRenderer(tooltips));
+			cbLong.setPreferredSize(new Dimension(230, 25));
+			/*Seleccionar un item por defecto*/
+			cbLong.setSelectedIndex(1);
+			cbLong.addItemListener(this);
+			sourceUnitLong = getAngularUnit(cbLong.getSelectedIndex());
+		}
+		return cbLong;
+	}
+	/**
+	 * Inicializa el Combo box con las unidades de Semieje Mayor
+	 * @return
+	 */
+	public JComboBox getCbSemMay() {
+		if (cbSemMay==null){
+			ArrayList units = obtenerItemsUnidades();
+			String[] items = new String[units.size()];
+			String[] tooltips = new String[units.size()];
+			for (int i=0;i<units.size();i++){
+				items[i] = tooltips[i] = units.get(i).toString();
+			}
+			cbSemMay=new JComboBox(items);
+			cbSemMay.setRenderer(new ComboBoxTootipRenderer(tooltips));
+			cbSemMay.setPreferredSize(new Dimension(230, 25));
+			/*Seleccionar un item por defecto*/
+			cbSemMay.setSelectedIndex(0);
+			cbSemMay.addItemListener(this);
+			sourceUnitSemMay = getLengthUnit(cbSemMay.getSelectedIndex());
+		}
+		return cbSemMay;
+	}
+	/**
+	 * Inicializa el Combo box con las unidades de Semieje Menor
+	 * @return
+	 */
+	public JComboBox getCbSemMen() {
+		if (cbSemMen==null){
+			ArrayList units = obtenerItemsUnidades();
+			String[] items = new String[units.size()];
+			String[] tooltips = new String[units.size()];
+			for (int i=0;i<units.size();i++){
+				items[i] = tooltips[i] = units.get(i).toString();
+			}
+			cbSemMen=new JComboBox(items);
+			cbSemMen.setRenderer(new ComboBoxTootipRenderer(tooltips));
+			cbSemMen.setPreferredSize(new Dimension(230, 25));
+			/*Seleccionar un item por defecto*/
+			cbSemMen.setSelectedIndex(0);
+			cbSemMen.addItemListener(this);
+			sourceUnitSemMen = getLengthUnit(cbSemMen.getSelectedIndex());
+		}
+		return cbSemMen;
+	}
+	/*
+	 * Accede al la base de datos y obtiene los items de
+	 * los combobox
+	 * @return
+	 */
+	private ArrayList obtenerItemsUnidades(){ //unidades de longitud...
+		//TODO: Obtener los items del combo de la base de datos
+		ArrayList items = new ArrayList();
+		ArrayList lengthUnits = new ArrayList();
+				
+		String sentence = "SELECT unit_of_meas_name " +
+		  				"FROM epsg_unitofmeasure " +	                              
+		  				"WHERE unit_of_meas_type = 'length'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		int in=0;
+		try {
+			while (result.next()) {
+				String item = result.getString("unit_of_meas_name");
+				items.add(in,PluginServices.getText(this, item.replaceAll(" ", "_")));
+				lengthUnits.add(in, item);
+				in++;
+			}
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		setLengthUnit(lengthUnits);
+		return items;
+	}
+	
+	/*
+	 * Accede al la base de datos y obtiene los items de
+	 * los combobox
+	 * @return
+	 */
+	private ArrayList obtenerItemsUnidadesAngle(){ //unidades angulares...
+		//TODO: Obtener los items del combo de la base de datos
+		ArrayList items = new ArrayList();
+		ArrayList angularUnit = new ArrayList();
+				
+		String sentence = "SELECT unit_of_meas_name " +
+		  				"FROM epsg_unitofmeasure " +	                              
+		  				"WHERE unit_of_meas_type = 'angle' and factor_b is not null and factor_c is not null";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		int in=0;
+		try {
+			while (result.next()) {
+				String item = result.getString("unit_of_meas_name");
+				items.add(in, PluginServices.getText(this, item.replaceAll(" ", "_")));
+				angularUnit.add(in, item);
+				in++;
+			}
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		setAngularUnit(angularUnit);
+		return items;
+	}
+	/**
+	 * Inicializa el JLabel Datum
+	 * @return
+	 */
+	public JLabel getLblDatum() {
+		if (lblDatum==null){
+			lblDatum=new JLabel();
+			lblDatum.setText(PluginServices.getText(this,"Dat_Datum"));
+		}
+		return lblDatum;
+	}
+	/**
+	 * Inicializa el JLabel Elipsoide
+	 * @return
+	 */
+	public JLabel getLblElipsoide() {
+		if (lblElipsoide==null){
+			lblElipsoide=new JLabel();
+			lblElipsoide.setText(PluginServices.getText(this,"Dat_Elips"));
+			//lblElipsoide.setText("Introduce el Elipsoide");
+		}
+		return lblElipsoide;
+	}
+
+	/**
+	 * Inicializa el JLabel Longitud
+	 * @return
+	 */
+	public JLabel getLblLong() {
+		if (lblLong==null){
+			lblLong=new JLabel();
+			lblLong.setText(PluginServices.getText(this,"Dat_Long"));
+			lblLong.setMinimumSize(dimLabels);
+			lblLong.setPreferredSize(dimLabels);
+		}
+		return lblLong;
+	}
+	/**
+	 * Inicializa el JLabel Meridiano
+	 * @return
+	 */
+	public JLabel getLblMeridian() {
+		if (lblMeridian==null){
+			lblMeridian=new JLabel();
+			lblMeridian.setText(PluginServices.getText(this,"Dat_Meridian"));
+			lblMeridian.setMinimumSize(dimLabels);
+			lblMeridian.setPreferredSize(dimLabels);
+		}
+		return lblMeridian;
+	}
+	/**
+	 * Inicializa el JLabel del Cdigo de Crs
+	 * @return
+	 */
+	public JLabel getLblCodigoCrs() {
+		if (lblCodigoCrs==null){
+			lblCodigoCrs=new JLabel(PluginServices.getText(this,"Dat_CodeCrs")+":");
+		}
+		return lblCodigoCrs;
+	}
+	/**
+	 * Inicializa el JLabel del Nombre del Crs
+	 * @return
+	 */
+	public JLabel getLblNombreCrs() {
+		if (lblNombreCrs==null){
+			lblNombreCrs=new JLabel(PluginServices.getText(this,"Dat_NombreCrs")+":");
+		}
+		return lblNombreCrs;
+	}
+	public JLabel getLblInverseFlat() {
+		if(lblInverseFlat==null){
+			lblInverseFlat=new JLabel();
+			lblInverseFlat.setText(PluginServices.getText(this,"Dat_InvF")+(" (inv_f)"));
+			lblInverseFlat.setMinimumSize(dimLabels);
+			lblInverseFlat.setPreferredSize(dimLabels);
+		}	
+		return lblInverseFlat;
+	}
+	public JLabel getLblSemiejeMayor() {
+		if(lblSemiejeMayor==null){
+			lblSemiejeMayor=new JLabel();
+			lblSemiejeMayor.setText(PluginServices.getText(this,"Dat_SemMay")+(" (a)"));
+			lblSemiejeMayor.setMinimumSize(dimLabels);
+			lblSemiejeMayor.setPreferredSize(dimLabels);
+			
+		}	
+		return lblSemiejeMayor;
+	}
+	public JLabel getLblSemiejeMenor() {
+		if(lblSemiejeMenor==null){
+			lblSemiejeMenor=new JLabel();
+			lblSemiejeMenor.setText(PluginServices.getText(this,"Dat_SemMen")+(" (b)"));
+			lblSemiejeMenor.setMinimumSize(dimLabels);
+			lblSemiejeMenor.setPreferredSize(dimLabels);
+		}	
+		return lblSemiejeMenor;
+	}
+	public JLabel getLblDefinir() {
+		if(lblDefinir==null){
+			lblDefinir=new JLabel();
+			lblDefinir.setText(PluginServices.getText(this,"Dat_DefinirPor"));
+			Dimension d=new Dimension(200,15);
+			lblDefinir.setMinimumSize(d);
+			lblDefinir.setPreferredSize(d);
+		}
+		return lblDefinir;
+	}
+	
+	
+	public JRadioButton getRbA_B() {
+		if(rbA_B==null){
+			rbA_B=new JRadioButton();
+			rbA_B.setText("a, b");
+			rbA_B.addActionListener(this);
+		}
+		return rbA_B;
+	}
+	public JRadioButton getRbA_Inv() {
+		if(rbA_Inv==null){
+			rbA_Inv=new JRadioButton();
+			rbA_Inv.setText("a, inv_f");
+			Dimension d=new Dimension(100,15);
+			rbA_Inv.setMinimumSize(d);
+			rbA_Inv.setPreferredSize(d);
+			rbA_Inv.addActionListener(this);
+		}
+		return rbA_Inv;
+	}
+	
+	/*
+	public JRadioButton getRbInvF() {
+		if(rbInvF==null){
+			rbInvF=new JRadioButton();
+			rbInvF.setToolTipText(PluginServices.getText(this,"Dat_InvFToolTipText"));
+			rbInvF.setText(PluginServices.getText(this,"Dat_InvF"));
+			rbInvF.addActionListener(this);
+		}
+		return rbInvF;
+	}
+	*/
+	/**
+	 * Inicializa el radio button Semieje Mayor del elipsoide
+	 * @return
+	 */
+	/*
+	public JRadioButton getRbSemMay() {
+		if(rbSemMay==null){
+			rbSemMay=new JRadioButton();
+			rbSemMay.setToolTipText(PluginServices.getText(this,"Dat_SemMayToolTipText"));
+			rbSemMay.setText(PluginServices.getText(this,"Dat_SemMay"));
+			rbSemMay.addActionListener(this);
+		}
+		return rbSemMay;
+	}*/
+
+	/**
+	 * Inicializa el radio Button del Semieje Menor del elipsoide
+	 * @return
+	 */
+	/*
+	public JRadioButton getRbSemMen() {
+		if(rbSemMen==null){
+			rbSemMen=new JRadioButton();
+			rbSemMen.setToolTipText(PluginServices.getText(this,"Dat_SemMenToolTipText"));			
+			rbSemMen.setText(PluginServices.getText(this,"Dat_SemMen"));
+			rbSemMen.addActionListener(this);
+		}
+		return rbSemMen;
+	}
+	*/
+
+	/**
+	 * Agrupa los Radio Button de los parmetros del elipsoide
+	 * 
+	 */
+
+	private void agruparRadioButtons() {
+		if(groupRadioButton==null){
+			groupRadioButton=new ButtonGroup();
+			//Agrupar los radio Buttons
+			groupRadioButton.add(getRbA_B());
+			groupRadioButton.add(getRbA_Inv());
+			getRbA_Inv().setSelected(true);
+			getTxtSemMen().setEditable(false);
+			getCbSemMen().setEnabled(false);
+			
+		}
+	}
+
+	/**
+	 * Inicializa el cuadro de texto que contiene el datum
+	 * @return
+	 */
+	public JTextField getTxtDatum() {
+		if (txtDatum==null){
+			txtDatum=new JTextField();
+			bigSize.height=txtDatum.getPreferredSize().height;
+			txtDatum.setPreferredSize(bigSize);
+			txtDatum.addActionListener(this);
+		}
+		return txtDatum;
+	}
+	/**
+	 * Inicializa el cuadro de texto que contiene el elipsoide
+	 * @return
+	 */
+	public JTextField getTxtElipsoide() {
+		if (txtElipsoide==null){
+			txtElipsoide=new JTextField();
+			bigSize.height=txtElipsoide.getPreferredSize().height;
+			txtElipsoide.setPreferredSize(bigSize);
+			txtElipsoide.addActionListener(this);
+		}
+		return txtElipsoide;
+	}
+	/**
+	 * Inicializa el cuadro de texto que contiene el Inverse Flat del Elipsoide
+	 * @return
+	 */
+	public JTextField getTxtInvF() {
+		if (txtInvF==null){
+			txtInvF=new JTextField();
+			smallSize.height=txtInvF.getPreferredSize().height;
+			txtInvF.setPreferredSize(smallSize);
+			txtInvF.setMinimumSize(smallSize);
+			txtInvF.addActionListener(this);
+			txtInvF.addKeyListener(this);
+			txtInvF.addFocusListener(this);
+		}
+		return txtInvF;
+	}
+	/**
+	 * Inicializa el cuadro de texto que contiene el dato de longitud del
+	 * meridiano
+	 * @return
+	 */
+	public JTextField getTxtLong() {
+		if (txtLong==null){
+			txtLong=new JTextField();
+			smallSize.height=txtLong.getPreferredSize().height;
+			txtLong.setPreferredSize(smallSize);
+			txtLong.addActionListener(this);
+			txtLong.addKeyListener(this);
+			txtLong.addFocusListener(this);
+		}
+		return txtLong;
+	}
+	/**
+	 * Inicializa el cuadro de texto que contiene el meridiano
+	 * @return
+	 */
+	public JTextField getTxtMeridian() {
+		if (txtMeridian==null){
+			txtMeridian=new JTextField();
+			bigSize.height=txtMeridian.getPreferredSize().height;
+			Dimension d=new Dimension(280,15);
+			d.height=txtMeridian.getPreferredSize().height;
+			txtMeridian.setPreferredSize(d);
+			txtMeridian.addActionListener(this);
+		}
+		return txtMeridian;
+	}
+	/**
+	 * Inicializa el cuadro de texto que contiene el Semieje Mayor
+	 * del elipsoide
+	 * @return
+	 */
+	public JTextField getTxtSemMay() {
+		if (txtSemMay==null){
+			txtSemMay=new JTextField();
+			smallSize.height=txtSemMay.getPreferredSize().height;
+			txtSemMay.setPreferredSize(smallSize);
+			txtSemMay.setMinimumSize(smallSize);
+			txtSemMay.addActionListener(this);
+			txtSemMay.addKeyListener(this);
+			txtSemMay.addFocusListener(this);
+		}
+		return txtSemMay;
+	}
+	/**
+	 * Inicializa el cuadro de texto que contiene el semieje
+	 * menor del elipsoide
+	 * @return
+	 */
+	public JTextField getTxtSemMen() {
+		if (txtSemMen==null){
+			txtSemMen=new JTextField();
+			smallSize.height=txtSemMen.getPreferredSize().height;
+			txtSemMen.setPreferredSize(smallSize);
+			txtSemMen.setMinimumSize(smallSize);
+			txtSemMen.addActionListener(this);
+			txtSemMen.addKeyListener(this);
+			txtSemMen.addFocusListener(this);
+		}
+		return txtSemMen;
+	}
+	/**
+	 * Inicializa el cuadro de texto que contiene el cdigo del Crs definido por el usuario
+	 * @return
+	 */
+	public JTextField getTxtCodigoCrs() {
+		if (txtCodigoCrs==null){
+			txtCodigoCrs=new JTextField();
+			smallSize.height=txtCodigoCrs.getPreferredSize().height;
+			txtCodigoCrs.setPreferredSize(smallSize);
+			txtCodigoCrs.addActionListener(this);
+			txtCodigoCrs.addFocusListener(this);
+		}
+		return txtCodigoCrs;
+	}
+	/**
+	 * Inicializa el cuadro de texto que contiene el nombre del Crs
+	 * @return
+	 */
+	public JTextField getTxtNombreCrs() {
+		if (txtNombreCrs==null){
+			txtNombreCrs=new JTextField();
+			smallSize.height=txtNombreCrs.getPreferredSize().height;
+			txtNombreCrs.setPreferredSize(smallSize);
+			txtNombreCrs.addActionListener(this);			
+		}
+		return txtNombreCrs;
+	}
+	/*
+	 * Manejador de eventos de los controles
+	 */
+	public void actionPerformed(ActionEvent e) {
+	
+		if(e.getSource().equals(getTxtDatum())){
+			System.out.println("txt Datum");
+		}else if(e.getSource().equals(getTxtElipsoide())){
+			System.out.println("txt Elipsoide");
+		}else if(e.getSource().equals(getTxtInvF())){
+			System.out.println("txt Inverse Flat");
+		}else if(e.getSource().equals(getTxtSemMay())){
+			System.out.println("txt Semieje Mayor");
+		}else if(e.getSource().equals(getTxtSemMen())){
+			System.out.println("txt Semieje Menor");
+		}else if(e.getSource().equals(getTxtLong())){
+			System.out.println("txt Longitud");
+		}else if(e.getSource().equals(getTxtMeridian())){
+			System.out.println("txt Meridiano");
+		}else if(e.getSource().equals(getCbInvF())){
+			System.out.println("combo box Inverse Flat");
+		}else if(e.getSource().equals(getCbLong())){
+			System.out.println("combo box Longitud");
+		}else if(e.getSource().equals(getCbSemMay())){
+			System.out.println("combo box Semieje Mayor");
+		}else if(e.getSource().equals(getCbSemMen())){
+			System.out.println("combo box Semieje Menor");
+		}else if(e.getSource().equals(getRbA_B())){
+			getTxtSemMay().setEditable(true);
+			getTxtSemMen().setEditable(true);
+			getTxtInvF().setEditable(false);
+			getCbSemMen().setEnabled(true);
+		}else if(e.getSource().equals(getRbA_Inv())){
+			getTxtSemMay().setEditable(true);
+			getTxtSemMen().setEditable(false);
+			getTxtInvF().setEditable(true);	
+			getCbSemMen().setEnabled(false);
+		}else if(e.getSource().equals(getBtnImportDatum())){
+			System.out.println("Importar Datum");
+			ImportNewCrsDialog newCrs = new ImportNewCrsDialog(PluginServices.getText(this, "datum"));
+       	 	PluginServices.getMDIManager().addWindow(newCrs);
+       	 	if (newCrs.getCode() != -1) {
+	       	 	setCrs(newCrs.getCode());
+	       	 	fillDatum(getCrs());
+       	 	}
+		}else if(e.getSource().equals(getBtnImportElipsoide())){
+			System.out.println("Importar Elipsoide");
+			ImportNewCrsDialog newCrs = new ImportNewCrsDialog(PluginServices.getText(this, "ellips"));
+       	 	PluginServices.getMDIManager().addWindow(newCrs);
+       	 	if (newCrs.getCode() != -1) {
+	       	 	setCrs(newCrs.getCode());
+	       	 	fillEllipsoid(getCrs());
+       	 	}
+		}else if(e.getSource().equals(getBtnImportMeridian())){
+			System.out.println("Importar Meridiano");
+			ImportNewCrsDialog newCrs = new ImportNewCrsDialog(PluginServices.getText(this, "primem"));
+       	 	PluginServices.getMDIManager().addWindow(newCrs);
+       	 	if (newCrs.getCode() != -1) {
+	       	 	setCrs(newCrs.getCode());
+	       	 	fillPrimeMeridian(getCrs());
+       	 	}else if(e.getSource().equals(getRbA_Inv())){
+			
+       	 	}else if(e.getSource().equals(getRbA_B())){
+			
+       	 	}
+		}
+	}
+	
+	public void fillData(ICrs crs){
+		getTxtNombreCrs().setText(crs.getCrsWkt().getGeogcs());
+		getTxtCodigoCrs().setText(getMaxCode());
+		fillDatum(crs);
+	}
+	
+	public void fillData(ICrs crs, boolean editing){
+		getTxtNombreCrs().setText(crs.getCrsWkt().getGeogcs());
+		getTxtCodigoCrs().setText(""+crs.getCode());
+		fillDatum(crs);
+	}
+	
+	public void fillDatum(ICrs crs) {
+		getTxtDatum().setText(crs.getCrsWkt().getDatumName());
+		fillEllipsoid(crs);
+		fillPrimeMeridian(crs);
+	}
+	
+	public void fillData(CoordinateReferenceSystem crsGT) {
+		AbstractSingleCRS crs = (AbstractSingleCRS)crsGT;
+		String authority = crs.getName().toString().split(":")[0];
+		//String code = crs.getName().toString().split(":")[1];
+		getTxtNombreCrs().setText(authority);
+		getTxtCodigoCrs().setText(getMaxCode());
+		DefaultGeodeticDatum d = (DefaultGeodeticDatum) crs.getDatum();
+		String[] val = d.getName().toString().split(":");
+		if (val.length<2)
+			getTxtDatum().setText(d.getName().toString().split(":")[0]);
+		else
+			getTxtDatum().setText(d.getName().toString().split(":")[1]);
+		DefaultEllipsoid ellips = (DefaultEllipsoid)d.getEllipsoid();
+		
+		Unit u = ellips.getAxisUnit();
+		double semi_major = convert(ellips.getSemiMajorAxis(), u.toString());
+		double inv_f = ellips.getInverseFlattening();
+		val = ellips.getName().toString().split(":");
+		if (val.length<2)
+			getTxtElipsoide().setText(val[0]);
+		else
+			getTxtElipsoide().setText(val[1]);
+		getTxtSemMay().setText(String.valueOf(semi_major));
+		getTxtInvF().setText(String.valueOf(inv_f));
+		getTxtSemMen().setText(String.valueOf(calcularSemMen()));
+		
+		DefaultPrimeMeridian primem = (DefaultPrimeMeridian)d.getPrimeMeridian();
+		
+		u = primem.getAngularUnit();
+		double longitude = convert(primem.getGreenwichLongitude(), u.toString());
+		val = primem.getName().toString().split(":");
+		if (val.length<2)
+			getTxtMeridian().setText(val[0]);
+		else
+			getTxtMeridian().setText(val[1]);
+		
+		getTxtLong().setText(""+longitude);		
+	}
+	
+	public void fillEllipsoid(ICrs crs) {
+		getTxtElipsoide().setText(crs.getCrsWkt().getSpheroid()[0]);
+		String semMay = crs.getCrsWkt().getSpheroid()[1];
+		String invF = crs.getCrsWkt().getSpheroid()[2];
+		getTxtSemMay().setText(semMay);
+		getTxtInvF().setText(invF);
+		double semMen = calcularSemMen();
+		getTxtSemMen().setText(String.valueOf(semMen));		
+	}
+	
+	public void fillPrimeMeridian(ICrs crs) {
+		getTxtMeridian().setText(crs.getCrsWkt().getPrimen()[0]);
+		getTxtLong().setText(crs.getCrsWkt().getPrimen()[1]);
+	}
+	
+	
+	private double calcularSemMen() {
+		String cadenaNumerica = getTxtSemMay().getText().replaceAll("[^0-9.E]", "");
+				
+		if (getTxtSemMay().getText().length() != cadenaNumerica.length() || notANumber(cadenaNumerica)) {
+			JOptionPane.showMessageDialog(DefinirDatum.this, 
+					PluginServices.getText(this,"numeric_format")+": "+PluginServices.getText(this,"semMay"), 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			return 0;
+		}
+		else {
+			if (getTxtInvF().getText().equals("Infinity")) {
+				getRbA_B().setSelected(true);
+				getTxtSemMay().setEditable(true);
+				getTxtSemMen().setEditable(true);
+				getTxtInvF().setEditable(false);
+				getCbSemMen().setEnabled(true);
+				return Double.parseDouble((String)getTxtSemMay().getText());
+			}
+			cadenaNumerica = getTxtInvF().getText().replaceAll("[^0-9.E-]", "");
+			
+			if (getTxtInvF().getText().length() != cadenaNumerica.length() || notANumber(cadenaNumerica)) {
+		
+			JOptionPane.showMessageDialog(DefinirDatum.this, 
+					PluginServices.getText(this,"numeric_format")+": "+PluginServices.getText(this,"inv_f"), 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			return 0;
+			}
+		}
+		
+		double semMay = Double.parseDouble((String)getTxtSemMay().getText());
+		double invF = Double.parseDouble((String)getTxtInvF().getText());
+		
+		if (invF != 0)
+			return semMay - (semMay / (invF));
+		return Double.NEGATIVE_INFINITY;
+	}
+	
+	private double calcularInvF() {
+		String cadenaNumerica = getTxtSemMay().getText().replaceAll("[^0-9.E]", "");
+		
+		if (getTxtSemMay().getText().length() != cadenaNumerica.length() || notANumber(cadenaNumerica)) {
+			JOptionPane.showMessageDialog(DefinirDatum.this, 
+					PluginServices.getText(this,"numeric_format")+": "+PluginServices.getText(this,"semMay"), 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			return 0;
+		}
+		else {
+			cadenaNumerica = getTxtSemMen().getText().replaceAll("[^0-9.E-]", "");
+			
+			if (getTxtSemMen().getText().length() != cadenaNumerica.length() || notANumber(cadenaNumerica)) {
+		
+			JOptionPane.showMessageDialog(DefinirDatum.this, 
+					PluginServices.getText(this,"numeric_format")+": "+PluginServices.getText(this,"semMen"), 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			return 0;
+			}
+		}
+		
+		double semMay = Double.parseDouble((String)getTxtSemMay().getText());
+		double semMen = Double.parseDouble((String)getTxtSemMen().getText());
+		
+		
+		if ((semMay - semMen) != 0)
+			return (semMay ) / (semMay - semMen);
+		return Double.POSITIVE_INFINITY;
+	}
+	
+	public void setCrs(int code) {
+		try {
+			crs = new CrsFactory().getCRS("EPSG:"+code);
+		} catch (CrsException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+	}
+	
+	public ICrs getCrs() {
+		return crs;
+	}
+	
+	public void cleanData() {
+		String max = getMaxCode();
+		getTxtCodigoCrs().setText(max);
+		getTxtNombreCrs().setText("");
+		getTxtDatum().setText("");
+		getTxtElipsoide().setText("GRS 1980");
+		getTxtInvF().setText("298.257222101");
+		getTxtLong().setText("0.0");
+		getTxtMeridian().setText("Greenwich");
+		getTxtSemMay().setText("6378137.0");
+		double semMen = calcularSemMen();
+		getTxtSemMen().setText(""+semMen);
+	}
+	
+	private String getMaxCode() {
+		String sentence = "SELECT usr_code " +
+							"FROM USR " +	                              
+							"ORDER BY usr_code ASC";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionUsr();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		int max = 0;
+		int lastValue = 0;
+		int goodValue = 1;
+		boolean firstAccess = true;
+		try {
+			while (result.next()) {
+				max = result.getInt("usr_code");
+				if (firstAccess && max != 1) {					
+					return ""+goodValue;
+				}
+				firstAccess = false;
+				if ((max - lastValue) == 1) {
+					lastValue = max;
+				} else {
+					goodValue = lastValue+1;
+					break;
+				}
+			}
+			if (goodValue == 1) {
+				goodValue = max+1;
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+		return ""+goodValue;
+	}
+	
+	public double convert2Meters(String unit, double value) {
+		double factor_b = 0;
+		double factor_c = 0;
+		String sentence = "SELECT factor_b, factor_c " +
+			"FROM epsg_unitofmeasure " +	                              
+			"WHERE unit_of_meas_name = '" +unit + "'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}		
+		return ((value*factor_b)/factor_c);
+	}
+	
+	/**
+	 * Convierte una valor en las unidades indicadas a grados sexagesimales según los factores 
+	 * de conversión obtenidos de la base de datos de la EPSG.
+	 * 
+	 * @param unit Unidad de entrada.
+	 * @param value Valor a convertir
+	 * @return Valor en grados sexagesimales.
+	 */
+	public double convert2Degree(String unit, double value) {
+		//*************************************
+		//Se realiza la conversión a radianes:
+		double factor_b = 0;
+		double factor_c = 0;
+		String sentence = "SELECT factor_b, factor_c " +
+			"FROM epsg_unitofmeasure " +	                              
+			"WHERE unit_of_meas_name = '" +unit + "'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}	
+		if(Math.abs(factor_b/factor_c-Math.PI/180.0)<1.0e-12)
+			return value;
+		value = ((value*factor_b)/factor_c);
+		//**********************************************
+		
+		//Conversió de radianes a grados sexagesimales:
+		//return ((value * 180.0) / 200.0);
+		return ((value * 180.0) / Math.PI);
+	}
+	
+	public double convert(double value, String measure) throws ConversionException {
+		if (measure.equals("D.MS")) {		
+			value *= this.divider;
+	        int deg,min;
+	        deg = (int) (value/10000); value -= 10000*deg;
+	        min = (int) (value/  100); value -=   100*min;
+	        if (min<=-60 || min>=60) {  // Accepts NaN
+	            if (Math.abs(Math.abs(min) - 100) <= EPS) {
+	                if (min >= 0) deg++; else deg--;
+	                min = 0;
+	            } else {
+	                throw new ConversionException("Invalid minutes: "+min);
+	            }
+	        }
+	        if (value<=-60 || value>=60) { // Accepts NaN
+	            if (Math.abs(Math.abs(value) - 100) <= EPS) {
+	                if (value >= 0) min++; else min--;
+	                value = 0;
+	            } else {
+	                throw new ConversionException("Invalid secondes: "+value);
+	            }
+	        }
+	        value = ((value/60) + min)/60 + deg;
+	        return value;
+		}
+		if (measure.equals("grad") || measure.equals("grade")) 
+			return ((value * 180.0) / 200.0);			
+		if (measure.equals(""+(char)176)) 
+			return value;		
+		if (measure.equals("DMS") ) 
+			return value;		
+		if (measure.equals("m")) 
+			return value;	
+		if (measure.equals("")) 
+			return value;
+		
+		throw new ConversionException("Conversion no contemplada: "+measure);
+    }
+	
+	public double convertFromDegree(String unitSource, String unitTarget, double value) {
+		double factor_b = 0;
+		double factor_c = 0;		
+		String sentence = "SELECT factor_b, factor_c " +
+			"FROM epsg_unitofmeasure " +	                              
+			"WHERE unit_of_meas_name = '" +unitSource + "'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}		
+		value = ((value*factor_b)/factor_c);
+		
+		sentence = "SELECT factor_b, factor_c " +
+		"FROM epsg_unitofmeasure " +	                              
+		"WHERE unit_of_meas_name = '" +unitTarget + "'";
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}		
+		return ((value*factor_c)/factor_b);
+	}
+	
+	public void itemStateChanged(ItemEvent e) {
+		if (e.getItemSelectable().equals(cbLong)) {
+			String unit = getAngularUnit(((JComboBox)e.getSource()).getSelectedIndex());
+			 double value = Double.valueOf(getTxtLong().getText()).doubleValue();
+			 value = convertFromDegree(sourceUnitLong, unit, value);
+			 sourceUnitLong = unit;
+			 String val = String.valueOf(value);
+			 getTxtLong().setText(val);
+		}
+		if (e.getItemSelectable().equals(cbSemMay) ) {
+			String unit = getLengthUnit(((JComboBox)e.getSource()).getSelectedIndex());			 
+			double value = Double.valueOf(getTxtSemMay().getText()).doubleValue();
+			 value = convertFromMeters(sourceUnitSemMay, unit, value);
+			 sourceUnitSemMay = unit;
+			 String val = String.valueOf(value);
+			 getTxtSemMay().setText(val);
+		}
+		if (e.getItemSelectable().equals(cbSemMen) ) {
+			String unit = getLengthUnit(((JComboBox)e.getSource()).getSelectedIndex());
+			 double value = Double.valueOf(getTxtSemMen().getText()).doubleValue();
+			 value = convertFromMeters(sourceUnitSemMen, unit, value);
+			 sourceUnitSemMen = unit;
+			 String val = String.valueOf(value);
+			 getTxtSemMen().setText(val);
+		}		
+	}
+	
+	private boolean notANumber(String cadenaNumerica) {
+		int puntos = 0;
+		int signos = 0;
+		int letras = 0;
+		for (int i = 0; i< cadenaNumerica.length(); i++) {
+			if (cadenaNumerica.charAt(i) == '.')
+				puntos++;
+			else if (cadenaNumerica.charAt(i) == '-') {
+				if (i==0) {
+					signos++;
+				}
+				else if (i!=0 && cadenaNumerica.charAt(i-1) != 'E') {
+					signos = 2;
+				}
+			}
+			else if (cadenaNumerica.charAt(i) == 'E') {
+				if (i== 0) {
+					letras = 2;
+				}
+				else letras ++;
+			}
+		}
+		
+		if ((letras > 1) || (signos > 1) || (puntos > 1))
+			return true;
+		return false;
+	}
+	
+	public double convertFromMeters(String unitSource, String unitTarget, double value) {
+		double factor_b = 0;
+		double factor_c = 0;
+		String sentence = "SELECT factor_b, factor_c " +
+			"FROM epsg_unitofmeasure " +	                              
+			"WHERE unit_of_meas_name = '" +unitSource.replace("'", "'+char(39)+'") + "'";
+		EpsgConnection connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}		
+		value = ((value*factor_b)/factor_c);
+		
+		sentence = "SELECT factor_b, factor_c " +
+		"FROM epsg_unitofmeasure " +	                              
+		"WHERE unit_of_meas_name = '" +unitTarget.replace("'", "'+char(39)+'")+ "'";
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		result = Query.select(sentence,connect.getConnection());
+		try {
+			result.next();
+			factor_b = result.getDouble("factor_b");
+			factor_c = result.getDouble("factor_c");			
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}		
+		return ((value*factor_c)/factor_b);
+	}
+	
+	public void keyPressed(KeyEvent e) {
+		primera = true;
+		if (e.getSource() == this.getTxtSemMay()) {			
+			if (e.getKeyCode() == 10) {
+				primera = false;
+				if (getRbA_Inv().isSelected()) {
+					getTxtSemMen().setText(String.valueOf(calcularSemMen()));
+				}
+				else if (getRbA_B().isSelected()) {
+					getTxtInvF().setText(String.valueOf(calcularInvF()));					
+				}
+			}			
+		}
+		if (e.getSource() == this.getTxtSemMen()) {
+			if (e.getKeyCode() == 10) {
+				primera = false;
+				getTxtInvF().setText(String.valueOf(calcularInvF()));				
+			}			
+		}
+		if (e.getSource() == this.getTxtInvF()) {
+			if (e.getKeyCode() == 10) {
+				primera = false;
+				getTxtSemMen().setText(String.valueOf(calcularSemMen()));				
+			}			
+		}
+		if (e.getSource() == this.getTxtLong()) {
+			if (e.getKeyCode() == 10) {
+				primera = false;
+				String cadenaNumerica = getTxtLong().getText().replaceAll("[^0-9.E]", "");
+				
+				if (getTxtLong().getText().length() != cadenaNumerica.length() || notANumber(cadenaNumerica)) {
+					JOptionPane.showMessageDialog(DefinirDatum.this, 
+							PluginServices.getText(this,"numeric_format")+": "+PluginServices.getText(this,"long"), 
+							"Warning...", JOptionPane.WARNING_MESSAGE);
+					primera = true;
+					return;
+				}
+			}
+		}
+		primera = true;
+	}
+	public void keyReleased(KeyEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+	public void keyTyped(KeyEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+	
+	public void setLengthUnit(ArrayList units) {
+		this.lengthUnits = units;
+	}
+	
+	public void setAngularUnit(ArrayList units) {
+		this.angularUnits = units;
+	}
+	
+	public String getLengthUnit(int indice) {
+		return (String)lengthUnits.get(indice);
+	}
+	
+	public String getAngularUnit(int indice) {
+		return (String)angularUnits.get(indice);
+	}
+	public void focusGained(FocusEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+	public void focusLost(FocusEvent e) {
+		if (primera) {
+			primera = false;
+			if (e.getSource() == this.getTxtSemMay()) {
+				if (getRbA_Inv().isSelected()) {
+					getTxtSemMen().setText(String.valueOf(calcularSemMen()));
+				}
+				else if (getRbA_B().isSelected()) {
+					getTxtInvF().setText(String.valueOf(calcularInvF()));					
+				}
+							
+			}
+			if (e.getSource() == this.getTxtSemMen()) {
+				getTxtInvF().setText(String.valueOf(calcularInvF()));						
+			}
+			if (e.getSource() == this.getTxtInvF()) {
+				getTxtSemMen().setText(String.valueOf(calcularSemMen()));			
+			}
+			if (e.getSource() == this.getTxtLong()) {
+				String cadenaNumerica = getTxtLong().getText().replaceAll("[^0-9.E]", "");
+				
+				if (getTxtLong().getText().length() != cadenaNumerica.length() || notANumber(cadenaNumerica)) {
+					JOptionPane.showMessageDialog(DefinirDatum.this, 
+							PluginServices.getText(this,"numeric_format")+": "+PluginServices.getText(this,"long"), 
+							"Warning...", JOptionPane.WARNING_MESSAGE);
+					return;
+				}
+			}
+		}
+	}
+	
+	class ComboBoxTootipRenderer extends BasicComboBoxRenderer {
+		
+		private String[] tooltips = null;
+		
+	    public ComboBoxTootipRenderer(String[] tooltips) {
+	    	super();
+	    	this.tooltips = tooltips;
+		}
+
+		public Component getListCellRendererComponent(JList list, Object value,
+	        int index, boolean isSelected, boolean cellHasFocus) {
+	      if (isSelected) {
+	        setBackground(list.getSelectionBackground());
+	        setForeground(list.getSelectionForeground());
+	        if (-1 < index) {
+	          list.setToolTipText(tooltips[index]);
+	        }
+	      } else {
+	        setBackground(list.getBackground());
+	        setForeground(list.getForeground());
+	      }
+	      setFont(list.getFont());
+	      setText((value == null) ? "" : value.toString());
+	      return this;
+	    }
+	  }
+		
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefinirDatum.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/ComboBoxEditor.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/ComboBoxEditor.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/ComboBoxEditor.java	(revision 25287)
@@ -0,0 +1,15 @@
+package org.gvsig.crs.gui.panels.wizard;
+
+import javax.swing.DefaultCellEditor;
+
+import com.iver.utiles.swing.JComboBox;
+
+public class ComboBoxEditor extends DefaultCellEditor {
+
+	private static final long serialVersionUID = 1L;
+
+	public ComboBoxEditor(String[] items)
+    {
+        super(new JComboBox(items));
+    }
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/ComboBoxEditor.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/ComboBoxRenderer.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/ComboBoxRenderer.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/ComboBoxRenderer.java	(revision 25287)
@@ -0,0 +1,39 @@
+package org.gvsig.crs.gui.panels.wizard;
+
+import java.awt.Component;
+import javax.swing.JTable;
+import javax.swing.table.TableCellRenderer;
+
+import com.iver.utiles.swing.JComboBox;
+
+public class ComboBoxRenderer extends JComboBox implements TableCellRenderer{
+
+
+	private static final long serialVersionUID = 1L;
+
+	public ComboBoxRenderer(String[] items)
+    {
+        super(items);
+    }
+ 
+    public Component getTableCellRendererComponent(JTable table,
+                                                   Object value,
+                                                   boolean isSelected,
+                                                   boolean hasFocus,
+                                                   int row, int column)
+    {
+        if (isSelected)
+        {
+            setForeground(table.getSelectionForeground());
+            super.setBackground(table.getSelectionBackground());
+        }
+        else
+        {
+            setForeground(table.getForeground());
+            setBackground(table.getBackground());
+        }
+        setSelectedItem(value);
+        return this;
+    }
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/ComboBoxRenderer.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefCrsUsr.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefCrsUsr.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefCrsUsr.java	(revision 25287)
@@ -0,0 +1,343 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels.wizard;
+
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.ButtonGroup;
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.dialog.ImportNewCrsDialog;
+
+import com.iver.andami.PluginServices;
+
+
+/**
+ * Panel de definicin del Crs por el usuario
+ * 
+ *  @author Luisa Marina Fernandez Ruiz (luisam.fernandez@uclm.es)
+ *  @author Jose Luis Gomez Martinez (joseluis.gomez@uclm.es)
+ *
+ */
+public class DefCrsUsr extends JPanel implements ActionListener{
+	private JPanel panel;
+	//jbuton definido por gvsig
+	private JButton btnCrsExistente;
+	private JLabel lblCrs;
+	private JRadioButton rbCrsExistente;
+	private JRadioButton rbNuevoCrs;
+	private JRadioButton rbCadenaWkt;
+	private ButtonGroup crsGroup;
+	private JTextArea txtAreaWkt;
+	private JButton btnImportarWkt;
+	private JScrollPane scrollWkt;
+	private ICrs currentCrs;
+	private int width=380;
+	//290
+	
+	private static final long serialVersionUID = 1L;
+	
+	ICrs crs = null;
+	boolean hasChanged = false;
+
+	public DefCrsUsr(ICrs crs) {
+		super();
+		currentCrs = crs;
+		initialize();
+		
+	}
+
+	/*
+	 * Inicializa el panel de Definicin del Crs por el usuario
+	 */
+	private void initialize() {
+		this.setLayout(new BorderLayout());
+		this.add(getPanel(),BorderLayout.CENTER);
+		habilitarWkt(false);
+			
+	}
+	
+	/*
+	 * Agrega todos los elementos
+	 */
+	public JPanel getPanel() {
+		if(panel==null){
+			panel=new JPanel();
+			panel.setLayout(new GridBagLayout());
+			GridBagConstraints c = new GridBagConstraints();
+			c.fill = GridBagConstraints.BOTH;
+			c.weighty=0.1;
+			//c.ipady=100;
+			//establece el espacio superior, inferior, izquierdo y derecho
+			//entre cada componente
+			c.insets=new Insets(8,8,8,8);
+			//c.ipady =60;      //make this component tall
+			c.weightx = 0.75;
+			c.gridx = 0;
+			c.gridy = 1;
+			panel.add(getRbCrsExistente(),c);
+			c.weightx = 0.25;
+			c.gridx = 1;
+			c.gridy = 1;
+			panel.add(getLblCrs(),c);
+			
+			c.fill = GridBagConstraints.EAST;
+			c.weightx=0.0;
+			c.gridx = 2;
+			c.gridy = 1;
+			panel.add(getBtnCrsExistente(),c);
+			
+			c.fill = GridBagConstraints.BOTH;
+			c.weightx = 0.75;
+			c.gridx = 0;
+			c.gridy = 0;
+			panel.add(getRbNuevoCrs(),c);
+	
+			c.gridx = 0;
+			c.gridy = 2;
+			panel.add(getRbCadenaWkt(),c);
+//			Agrupa los botones de opcion
+			agruparRadioButtons();
+			//Seleccin por defecto
+			getRbNuevoCrs().setSelected(true);
+			
+			c.gridx=2;
+		    c.gridy=2;
+		    c.weightx=0.0;
+		    c.weighty=0.0;
+		    c.fill = GridBagConstraints.NONE;
+		    //panel.add(getBtnImportarWkt(),c);
+		    		
+			//vertical
+			c.fill=GridBagConstraints.VERTICAL;
+			c.anchor=GridBagConstraints.EAST;
+			c.gridx = 0;
+			c.gridy = 4;
+			c.gridwidth=3;
+			c.weighty=0.75;
+			panel.add(getScrollWkt(),c);
+			
+			
+		}
+		return panel;
+	}
+	
+	/*
+	 * Agrupa los botones de opcin
+	 */
+	private void agruparRadioButtons() {
+		if (crsGroup==null){
+				crsGroup=new ButtonGroup();
+				//Agrupar los botones de opcion
+				crsGroup.add(getRbCrsExistente());
+				crsGroup.add(getRbNuevoCrs());
+				crsGroup.add(getRbCadenaWkt());
+			}
+			
+	}
+
+	public JRadioButton getRbCadenaWkt() {
+		if (rbCadenaWkt==null){
+			rbCadenaWkt=new JRadioButton(PluginServices.getText(this,"DefCrsUsr_wkt"));
+			rbCadenaWkt.addActionListener(this);
+			//rbCadenaWkt.setEnabled(false);
+		}
+		return rbCadenaWkt;
+	}
+
+	public JRadioButton getRbCrsExistente() {
+		if (rbCrsExistente==null){
+			rbCrsExistente=new JRadioButton(PluginServices.getText(this,"DefCrsUsr_existente"));
+			rbCrsExistente.addActionListener(this);
+		}
+		return rbCrsExistente;
+	}
+	
+	public JRadioButton getRbNuevoCrs() {
+		if (rbNuevoCrs==null){
+			rbNuevoCrs=new JRadioButton(PluginServices.getText(this,"DefCrsUsr_nuevo"));
+			rbNuevoCrs.addActionListener(this);
+		}
+		return rbNuevoCrs;
+	}
+
+
+	public JLabel getLblCrs() {
+		if (lblCrs==null){
+			lblCrs=new JLabel(currentCrs.getAbrev());
+		}
+		return lblCrs;
+	}
+
+    /**
+     * Activa o desactiva el botn y el cuadro de texto
+     * @param b Si es False--> deshabilita
+     */
+	public void habilitarExistente(boolean b) {
+			getBtnCrsExistente().setEnabled(b);
+			getLblCrs().setEnabled(b);
+	}
+	public void habilitarWkt(boolean b){
+			//getBtnImportarWkt().setEnabled(b);
+			getTxtAreaWkt().setEnabled(b);
+	}
+	/**
+	 * Inicilizar el boton importar la cadena WKT
+	 * @return
+	 */
+	public JButton getBtnImportarWkt() {
+		if(btnImportarWkt==null){
+			btnImportarWkt=new JButton();
+			btnImportarWkt.setText("...");
+			btnImportarWkt.addActionListener(this);
+			btnImportarWkt.setToolTipText(PluginServices.getText(this,"DefCrsUsr_importar_wkt"));
+			btnImportarWkt.setEnabled(false);
+		}
+		return btnImportarWkt;
+	}
+	public JButton getBtnCrsExistente() {
+		if (btnCrsExistente==null){
+			btnCrsExistente=new JButton("...");
+			Dimension d=new Dimension(btnCrsExistente.getPreferredSize());
+			d.width=100;
+			btnCrsExistente.setSize(d);
+			btnCrsExistente.addActionListener(this);
+			btnCrsExistente.setToolTipText(PluginServices.getText(this,"DefCrsUsr_Seleccionar_Crs"));
+		}
+		return btnCrsExistente;
+	}
+	/**
+	 * Inicializar el area de texto donde se introduce la cadena WKT
+	 * @return
+	 */
+	public JTextArea getTxtAreaWkt() {
+		if(txtAreaWkt==null){
+			txtAreaWkt=new JTextArea();
+			txtAreaWkt.setLineWrap(true);
+			txtAreaWkt.setWrapStyleWord(true);
+			Dimension d=new Dimension(txtAreaWkt.getPreferredSize());
+			d.width=width;
+			txtAreaWkt.setSize(d);
+		}
+		return txtAreaWkt;
+	}
+	/*
+	 *Crea un panel de desplazamineto en el que se 
+	 *agrega el area de texto para que ste tenga barras de desplazamiento 
+	 */
+	public JScrollPane getScrollWkt() {
+		if (scrollWkt==null){
+			scrollWkt=new JScrollPane();
+			scrollWkt.setViewportView(getTxtAreaWkt());
+			scrollWkt.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
+			Dimension d=new Dimension(txtAreaWkt.getPreferredSize());
+			d.width=width;
+			scrollWkt.setSize(d);
+		}
+		return scrollWkt;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		 if(e.getSource().equals(getRbCrsExistente())){
+			 setHasChange(true);
+	      	  habilitarExistente(true);
+	      	  habilitarWkt(false);
+         }else  if(e.getSource().equals(getRbNuevoCrs())){
+        	 setHasChange(true);
+      	   habilitarExistente(false);
+      	   habilitarWkt(false);      	   
+         }else  if(e.getSource().equals(getRbCadenaWkt())){
+        	 setHasChange(true);
+      	   habilitarExistente(false);
+      	   habilitarWkt(true);
+         }else if(e.getSource().equals(getBtnCrsExistente())){
+        	 ImportNewCrsDialog newCrs = new ImportNewCrsDialog("crs");
+        	 PluginServices.getMDIManager().addWindow(newCrs);
+        	 if (newCrs.getCode() != -1) {
+	        	 getLblCrs().setText("EPSG:"+newCrs.getCode());
+	        	 setCrs(newCrs.getCode());
+	        	 setHasChange(true);
+        	 }
+        	 
+         }else if(e.getSource().equals(getBtnImportarWkt())){
+        	 System.out.println("Boton Importar Wkt");
+        	 
+         }
+	}
+	
+	public void setCrs(int code) {
+		try {
+			crs = new CrsFactory().getCRS("EPSG:"+code);
+		} catch (CrsException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+	}
+	
+	public ICrs getCrs() {
+		return crs;
+	}
+	
+	public void setHasChange(boolean change) {
+		hasChanged = change;
+	}
+	
+	public boolean getHasChanged() {
+		return hasChanged;
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/wizard/DefCrsUsr.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/NewCRSPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/NewCRSPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/NewCRSPanel.java	(revision 25287)
@@ -0,0 +1,833 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import javax.swing.ButtonGroup;
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+import javax.swing.ListSelectionModel;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.panels.wizard.MainPanel;
+import org.gvsig.crs.ogr.Iau2wkt;
+import org.gvsig.crs.persistence.CrsData;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+
+import com.iver.andami.PluginServices;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+import es.idr.teledeteccion.connection.EpsgConnection;
+import es.idr.teledeteccion.connection.Query;
+
+/**
+ * Crea la interfaz de definicin de un nuevo crs por el usuario
+ * @author Luisa Marina Fernandez Ruiz (luisam.fernandez@uclm.es)
+ * @author Jose Luis Gomez Martinez (joseluis.gomez@uclm.es)
+ *
+ */
+public class NewCRSPanel extends JPanel implements ActionListener,KeyListener{
+	private static final long serialVersionUID = 1L;
+	
+	private JRadioButton codeRadioButton = null;
+	private JRadioButton nameRadioButton = null;	
+	private JLabel lblCriterio=null;
+	private JButton searchButton = null;
+	private JTextField searchTextField = null;
+	private JButton infoCrs;
+	private JButton btnNuevo;
+	private JButton btnEditar;
+	private JButton btnEliminar;
+	private JScrollPane jScrollPane=null;   
+	private JTable jTable;
+	public TableSorter sorter = null;
+	public DefaultTableModel dtm = null;
+	
+	public String key;
+	public EpsgConnection connect = null;
+	public int selectedRowTable = -1;	
+	String cadWkt = "";
+	private int codeCRS = -1;
+	private ICrs currentCrs;
+	
+	public NewCRSPanel(){}
+	
+	public NewCRSPanel(ICrs crs) {
+		super();
+		currentCrs = crs;
+		initialize();
+		//fijar los listener de todos los componentes
+		setListener();
+		habilitarJbuttons(false);
+	}
+	/**
+	 * Inicializa this
+	 *
+	 */
+	private void initialize(){
+		this.setLayout(new BorderLayout());
+		this.setBorder(new EmptyBorder(1,1,1,1));
+		//Este panel contiene los componentes de radio button
+		JPanel radio=new JPanel();
+		radio.setLayout(new GridLayout(1,4,10,0));
+		radio.add(getLblCriterio());
+		radio.add(getCodeRadioButton());
+		radio.add(getNameRadioButton());
+		//Agrupar los radioButtons
+		agruparRadioButtons();
+		//Este panel contiene los componentes relacionados con la bsqueda
+		JPanel busqueda=new JPanel();
+		busqueda.setLayout(new FlowLayout(FlowLayout.LEFT,10,1));
+		busqueda.add(getSearchButton());
+		busqueda.add(getSearchTextField());
+		//busqueda.setBackground(Color.red);
+		JPanel pNorth=new JPanel();
+		pNorth.setLayout(new GridLayout(2,1));
+		pNorth.add(radio);
+		pNorth.add(busqueda);
+		this.add(pNorth,BorderLayout.NORTH);
+		//agregar los botones de la tabla
+		JPanel pInSouth=new JPanel();
+		pInSouth.setLayout(new FlowLayout(FlowLayout.LEFT,10,0));
+		pInSouth.add(getInfoCrs());
+		pInSouth.add(getBtnNuevo());
+		pInSouth.add(getBtnEditar());
+		pInSouth.add(getBtnEliminar());
+		JPanel pCenter=new JPanel();
+		pCenter.setLayout(new BorderLayout());
+		pCenter.add(getJScrollPane(),BorderLayout.CENTER);
+		pCenter.add(pInSouth,BorderLayout.SOUTH);
+		this.add(pCenter,BorderLayout.CENTER);
+				
+	}
+	
+	public void connection(){
+		connect = new EpsgConnection();
+		connect.setConnectionUsr();
+		
+	}
+	
+	/**
+	 * Inicializa el botn que muestra la informacin de CRS seleccionado
+	 * @return
+	 */
+	public JButton getInfoCrs() {
+		if(infoCrs == null) {
+			infoCrs = new JButton();
+			infoCrs.setPreferredSize(new Dimension(85,23));
+			infoCrs.setText(PluginServices.getText(this,"infocrs"));			
+			infoCrs.setMnemonic('I');
+			infoCrs.setToolTipText(PluginServices.getText(this,"more_info"));
+			
+		}
+		return infoCrs;
+	}
+	/**
+	 * Inicializa el panel que contiene la tabla de resultados
+	 * @return
+	 */
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane(getJTable(),JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
+			jScrollPane.setPreferredSize(new Dimension(500,150));
+			jScrollPane.setBorder(new CompoundBorder(new EmptyBorder(3,10,3,10),jScrollPane.getBorder()));
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+	/**
+	 * Inicializa la tabla que se utiliza para mostrar 
+	 * los resultados de la bsqueda
+	 * @return
+	 */
+	public JTable getJTable() {
+		if (jTable == null) {
+			//TODO: Poner los titulos de las columnas correspondientes
+			String[] columnNames= {PluginServices.getText(this,"codigo"),
+					PluginServices.getText(this,"nombre"),
+					PluginServices.getText(this,"projected"),
+					PluginServices.getText(this,"datum")};
+			Object[][]data = {};			
+			dtm = new DefaultTableModel(data, columnNames)
+			 {
+				private static final long serialVersionUID = 1L;
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}
+				/*
+				 * metodo necesario para cuando utilizamos tablas ordenadas
+				 * ya que sino al ordenar por algun campo no se queda con el orden
+				 * actual al seleccionar una fila (non-Javadoc)
+				 * @see javax.swing.table.TableModel#getColumnClass(int)
+				 */
+				public Class getColumnClass(int column)
+				{
+					return getValueAt(0, column).getClass();
+				}
+				};
+			sorter = new TableSorter(dtm);			
+
+			jTable = new JTable(sorter);
+			sorter.setTableHeader(jTable.getTableHeader());
+			jTable.setCellSelectionEnabled(false);
+			jTable.setRowSelectionAllowed(true);
+			jTable.setColumnSelectionAllowed(false);
+			jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			TableColumn column = null;
+			for (int i = 0; i < columnNames.length; i++) {
+			    column = jTable.getColumnModel().getColumn(i);
+			    if (i == 0) {
+			        column.setPreferredWidth(80); //code column is shorter			     	
+			    }else if (i ==2) {
+			    	column.setPreferredWidth(50);
+			    } else {
+			    	column.setPreferredWidth(175);
+			    }
+			    
+			}
+			initializeTable();
+		}
+		
+		return jTable;
+		
+	}
+	
+	public void initializeTable() {
+		// Eliminar filas en cada nueva bsqueda
+		int numRow = dtm.getRowCount();
+		while (numRow != 0) {
+			numRow = numRow - 1;
+			dtm.removeRow(numRow);
+		}
+		
+		String sentence = "SELECT usr_code, usr_wkt, usr_proj, usr_geog, usr_datum " +							 
+		  "FROM USR ORDER BY usr_code ASC";
+		
+		connect = new EpsgConnection();
+		connect.setConnectionUsr();
+		ResultSet result = Query.select(sentence,connect.getConnection());	
+		try {
+			connect.shutdown();
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+		Object[] data = new Object[4];
+		try {
+			while (result.next()){
+				data[0]	= result.getString("usr_code");
+				data[1] = result.getString("usr_wkt");
+				String proj = result.getString("usr_proj");
+				if (!proj.equals("")){
+					data[1] = proj;
+					data[2] = PluginServices.getText(this,"si");
+				} 
+				else 
+				{
+					data[1] = result.getString("usr_geog");
+					data[2] = PluginServices.getText(this,"no");
+				}
+		
+				data[3] = result.getString("usr_datum");
+				dtm.addRow(data);
+			}
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}
+		
+		int numr = dtm.getRowCount();
+		if (numr > 0){
+			this.getJTable().setRowSelectionInterval(0,0);
+			//getBtnEditar().setEnabled(true);
+			//getBtnEliminar().setEnabled(true);
+		}
+						
+	}
+	/**
+	 * Inicializa el radioButton 'Codigo'
+	 * @return jRadioButton
+	 */
+	public JRadioButton getCodeRadioButton() {
+		if (codeRadioButton == null) {
+			codeRadioButton = new JRadioButton();
+			codeRadioButton.setText(PluginServices.getText(this,"por_codigo"));
+			codeRadioButton.setSelected(true);
+			codeRadioButton.addActionListener(this);
+		}
+		return codeRadioButton;
+	}
+	/**
+	 * Inicializa el radioButton 'Name'
+	 * @return jRadioButton
+	 */
+	public JRadioButton getNameRadioButton() {
+		if (nameRadioButton == null) {
+			nameRadioButton = new JRadioButton();
+			nameRadioButton.setText(PluginServices.getText(this,"por_nombre"));
+			nameRadioButton.addActionListener(this);
+		}
+		return nameRadioButton;
+	}
+	
+	/**
+	 * Agrupa los radioButtons
+	 */
+	private void agruparRadioButtons(){
+		ButtonGroup group= new ButtonGroup();
+		group.add(getCodeRadioButton());
+		group.add(getNameRadioButton());		
+	}
+	/**
+	 * Inicializa el label 'Criterio de Bsqueda'
+	 * @return jLabel
+	 */
+	public JLabel getLblCriterio() {
+		lblCriterio = new JLabel();
+		lblCriterio.setText(PluginServices.getText(this, "criterio_busqueda")+":");
+		return lblCriterio;
+	}
+	/**
+	 * Inicializa el botn 'Buscar'
+	 * @return jButton
+	 */
+	public JButton getSearchButton() {
+		if (searchButton == null) {
+			searchButton = new JButton();
+			searchButton.setPreferredSize(new Dimension(75,20));
+			searchButton.setText(PluginServices.getText(this,"buscar"));
+			searchButton.setMnemonic('S');
+			searchButton.setToolTipText(PluginServices.getText(this,"buscar_por_criterio_seleccion"));
+						
+		}
+		return searchButton;
+	}
+	/**
+	 * Inicializa el TextField 
+	 * en el que se incluye el texto a buscar
+	 * @return jTextField
+	 */
+	public JTextField getSearchTextField() {
+		if (searchTextField == null) {
+			searchTextField = new JTextField();
+			searchTextField.setPreferredSize(new Dimension(340,20));
+				
+		}
+		return searchTextField;
+	}
+	/**
+	 * Manejador de eventos
+	 */
+	public void actionPerformed(ActionEvent e) {
+		if (e.getSource().equals(getCodeRadioButton())){
+			getSearchTextField().setText("");
+		}else if (e.getSource().equals(getNameRadioButton())){
+			getSearchTextField().setText("");
+		}else if (e.getSource().equals(getBtnEditar())){
+			//editar la fila seleccionada de la tabla (si hay)
+			ICrs crs = null;
+			try {
+				crs = new CrsFactory().getCRS("USR:"+getCodeCRS());
+			} catch (CrsException e1) {
+				// TODO Auto-generated catch block
+				e1.printStackTrace();
+			}			
+			MainPanel wizard = new MainPanel(crs);
+			wizard.setEditing(true);
+			wizard.setEditingPanel();
+			PluginServices.getMDIManager().addWindow(wizard);
+			getNewCrs(wizard.getNewCrsCode());
+			
+			/**
+			 * Actualizamos recientes para que coja los cambios del crs
+			 */
+			/*
+    		 * Actualizar recientes...
+    		 */
+    		String authority = "USR";
+    		String name = "";
+    		if (wizard.getPSistCoord().getTxtNombreProy().getText().equals("")) {
+    			name = wizard.getPDatum().getTxtNombreCrs().getText();
+    		} else {
+    			name = wizard.getPSistCoord().getTxtNombreProy().getText();
+    		}
+    		int code = getCodeCRS();
+    		CrsData crsData = new CrsData(authority,code,name);
+    		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+    		persistence.addCrsData(crsData);
+    		
+		}else if (e.getSource().equals(getBtnEliminar())){
+			//eliminar la fila seleccionada de la tabla
+			int i = JOptionPane.showConfirmDialog(NewCRSPanel.this, PluginServices.getText(this, "deleteUsr"));
+			if (i==0) {
+				connect = new EpsgConnection();
+				connect.setConnectionUsr();
+				String sentence = "DELETE FROM USR WHERE usr_code =" + getCodeCRS();
+				ResultSet result = Query.select(sentence,connect.getConnection());	
+				try {
+					connect.shutdown();
+				} catch (SQLException arg0) {
+					// TODO Auto-generated catch block
+					arg0.printStackTrace();
+				}
+				dtm.removeRow(getJTable().getSelectedRow());
+			}
+			//searchButton();
+		}else if (e.getSource().equals(getBtnNuevo())){
+			//mostrar el asistente de nuevo crs
+		
+			MainPanel wizard = new MainPanel(currentCrs);
+			if ((wizard.getPCard().getSelectedIndex() == 0) && wizard.getPCrsUsr().getRbCrsExistente().isSelected() ){
+				ICrs crs = wizard.getPCrsUsr().getCrs();
+				if (crs != null){
+					wizard.fillData(crs);
+				}
+				else wizard.fillData(wizard.getCrs());
+			}
+			else if ((wizard.getPCard().getSelectedIndex() == 0)  && wizard.getPCrsUsr().getRbNuevoCrs().isSelected() ){
+				wizard.cleanData();
+			}
+			PluginServices.getMDIManager().addWindow(wizard);
+			getNewCrs(wizard.getNewCrsCode());
+			
+		}else if (e.getSource().equals(getSearchButton())){
+			searchButton();			
+		}		
+		/*Si el objeto que genera el evento es el JButton 'InfoCrs'
+		se muestra la informacin ralicionada con el Crs seleccionado en la tabla*/
+		else if (e.getSource().equals(getInfoCrs())) {
+			InfoCRSPanel info = new InfoCRSPanel("USR", getCodeCRS());
+			PluginServices.getMDIManager().addWindow(info);
+		}
+	}
+	public void keyPressed(KeyEvent e) {
+		//Si se pulsa intro-->Buscar
+		if (e.getSource() == this.getSearchTextField()) {
+			if (e.getKeyCode() == 10) {
+				searchTextField.setBackground(Color.white);
+				if (searchTextField.getText().equals("")) {
+					initializeTable();
+				}
+				else {
+					searchButton();
+				}
+			}			
+		}		
+	}
+	public void keyReleased(KeyEvent e) {
+		
+	}
+	public void keyTyped(KeyEvent e) {
+		
+	}
+	/**
+	 * Inicializa el botn 'Editar'  una fila de la tabla
+	 * @return jButton
+	 */
+	public JButton getBtnEditar() {
+		if (btnEditar==null){
+			btnEditar=new JButton();
+			btnEditar.setText(PluginServices.getText(this,"editar"));
+		}
+		return btnEditar;
+	}
+	/**
+	 * Inicializa el botn 'Eliminar' una fila de la tabla
+	 * @return
+	 */
+	public JButton getBtnEliminar() {
+		if (btnEliminar==null){
+			btnEliminar=new JButton();
+			btnEliminar.setText(PluginServices.getText(this,"eliminar"));
+		}
+		return btnEliminar;
+	}
+	/**
+	 * Inicializa el botn 'Nuevo' para la creacin de un nuevo Crs
+	 * @return
+	 */
+	public JButton getBtnNuevo() {
+		if (btnNuevo==null){
+			btnNuevo=new JButton();
+			btnNuevo.setText(PluginServices.getText(this,"nuevo"));
+		}
+		return btnNuevo;
+	}
+	/**
+	 * Establece los listener de todos los componentes
+	 */
+	private void setListener(){
+		getBtnEditar().addActionListener(this);
+		getBtnEliminar().addActionListener(this);
+		getBtnNuevo().addActionListener(this);
+		getInfoCrs().addActionListener(this);
+		getCodeRadioButton().addActionListener(this);
+		getNameRadioButton().addActionListener(this);
+		getSearchButton().addActionListener(this);
+		getSearchTextField().addKeyListener(this);
+		
+	}
+	private void habilitarJbuttons(boolean b){
+		getInfoCrs().setEnabled(b);
+		getBtnEditar().setEnabled(b);
+		getBtnEliminar().setEnabled(b);
+	}
+	
+	/**
+	 * Mtodo que controla la bsqueda de los CRS siguiendo los criterios
+	 * de bsqueda que le hemos definido. Tambin gestiona los casos en que
+	 * no encuentre CRS, o que los parmetros de bsqueda sean errneos. Si
+	 * encuentra algn CRS pero no es soportado por la aplicacin
+	 * aparecer el mensaje de informacin correspondiente.
+	 *
+	 */
+	private void searchButton() {
+		searchTextField.setBackground(Color.white);
+				
+		if (codeRadioButton.isSelected() && (searchTextField.getText().length()!=searchTextField.getText().replaceAll("[^0-9]", "").length())){
+			JOptionPane.showMessageDialog(NewCRSPanel.this, 
+					PluginServices.getText(this,"numeric_format"), 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			searchTextField.setText("");
+			return;
+		}
+		
+        //Eliminar filas en cada nueva bsqueda
+		int numRow = dtm.getRowCount();
+		while (numRow != 0) {
+			numRow = numRow - 1;
+			dtm.removeRow(numRow);
+		}
+//			Dependiendo de la opcion se realizada una busqueda
+		ResultSet result = null;
+		
+		if (searchTextField.getText().equals("")) {
+			String sentence = "SELECT usr_code, usr_wkt, usr_proj, usr_geog, usr_datum " +							 
+			  "FROM USR ORDER BY usr_code ASC";
+			connect = new EpsgConnection();
+			connect.setConnectionUsr();
+			result = Query.select(sentence,connect.getConnection());	
+			try {
+				connect.shutdown();
+			} catch (SQLException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+			Object[] data = new Object[4];
+			try {
+				while (result.next()){
+					data[0]	= result.getString("usr_code");
+					data[1] = result.getString("usr_wkt");
+					String proj = result.getString("usr_proj");
+					if (!proj.equals("")){
+						data[1] = proj;
+						data[2] = PluginServices.getText(this,"si");
+					} 
+					else 
+					{
+						data[1] = result.getString("usr_geog");
+						data[2] = PluginServices.getText(this,"no");
+					}
+					
+					data[3] = result.getString("usr_datum");
+					dtm.addRow(data);
+				}
+			} catch (SQLException e1) {
+				e1.printStackTrace();
+			}
+		}
+		
+		else if (codeRadioButton.isSelected()) {
+				
+			key = searchTextField.getText();
+			int code = Integer.parseInt(key);
+			String sentence = "SELECT usr_code, usr_wkt, usr_proj, usr_geog, usr_datum " +							 
+							  "FROM USR " +	                              
+                              "WHERE usr_code = " + code;
+			connect = new EpsgConnection();
+			connect.setConnectionUsr();
+			result = Query.select(sentence,connect.getConnection());	
+			try {
+				connect.shutdown();
+			} catch (SQLException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+			
+			Object[] data = new Object[4];
+			try {
+				while (result.next()){
+					data[0]	= result.getString("usr_code");
+					data[1] = result.getString("usr_wkt");
+					String proj = result.getString("usr_proj");
+					if (!proj.equals("")){
+						data[1] = proj;
+						data[2] = PluginServices.getText(this,"si");
+					} 
+					else 
+					{
+						data[1] = result.getString("usr_geog");
+						data[2] = PluginServices.getText(this,"no");
+					}
+					
+					data[3] = result.getString("usr_datum");
+					dtm.addRow(data);
+				}
+			} catch (SQLException e1) {
+				e1.printStackTrace();
+			}
+		}
+		else if (nameRadioButton.isSelected()) {
+			key = searchTextField.getText();
+			String key2 = key.substring(0,1);
+			String key3 = key.substring(1,key.length());
+			key2 = key2.toUpperCase();
+			
+			String sentence = "SELECT usr_code, usr_wkt, usr_proj, usr_geog, usr_datum " +							 
+				"FROM USR " +	                              
+				"WHERE (usr_proj LIKE '%" + key + "%') OR (usr_proj LIKE '%"+ 
+				key.toUpperCase() +"%') " +
+				"OR (usr_proj LIKE '%" + key2+key3 +"%') OR " +
+						"(usr_geog LIKE '%" + key + "%') OR (usr_geog LIKE '%"+ 
+				key.toUpperCase() +"%') " +
+				"OR (usr_geog LIKE '%" + key2+key3 +"%')";
+			
+			connect = new EpsgConnection();
+			connect.setConnectionUsr();
+			result = Query.select(sentence,connect.getConnection());
+			try {
+				connect.shutdown();
+			} catch (SQLException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+							
+			Object[] data = new Object[4];
+			try {
+				while (result.next()){
+					data[0]	= result.getString("usr_code");
+					data[1] = result.getString("usr_wkt");
+					String proj = result.getString("usr_proj");
+					if (!proj.equals("")){
+						data[1] = proj;
+						data[2] = PluginServices.getText(this,"si");
+					} 
+					else 
+					{
+						data[1] = result.getString("usr_geog");
+						data[2] = PluginServices.getText(this,"no");
+					}
+					
+					data[3] = result.getString("usr_datum");
+					dtm.addRow(data);
+				}
+			} catch (SQLException e1) {
+				e1.printStackTrace();
+			}
+		}
+					
+		int numr = dtm.getRowCount();
+		if (numr == 0){
+			JOptionPane.showMessageDialog(this, PluginServices.getText(this,"no_results"), "Warning...",
+					JOptionPane.WARNING_MESSAGE);
+		}
+		else {
+			this.getJTable().setRowSelectionInterval(0,0);				
+		}					
+	}
+	
+	public void setCodeCRS(int code) {
+		codeCRS = code;
+	}
+	
+	public int getCodeCRS() {
+		return codeCRS;
+	}	
+	
+	/**
+	 * Consigue la cadena wkt del CRS seleccionado, y genera la cadena que ms
+	 * tarde volver a ser tratada para la consecucin de una cadena wkt
+	 * legible por la proj4.
+	 *
+	 */
+	public void setWKT(){
+		int code = getCodeCRS();
+		String sentence = "SELECT usr_wkt " +							 
+						  "FROM USR " +	                              
+                          "WHERE usr_code = " + code;
+		
+		
+		connect = new EpsgConnection();
+		connect.setConnectionUsr();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			connect.shutdown();
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		try {
+			result.next();			
+			cadWkt = result.getString("usr_wkt");			
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}		
+		cadWkt = cadWkt.substring(0, cadWkt.length()-1) + ", AUTHORITY[\"USR\","+ getCodeCRS()+"]]";
+		
+	}
+	
+	public String getWKT(){
+		return cadWkt;
+	}
+	
+	public ICrs getProjection() {
+		try {
+			ICrs crs = new CrsFactory().getCRS("USR:"+getCodeCRS());
+			return crs ;
+		} catch (CrsException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	private void getNewCrs(int code) {
+		if (code != -1) {
+			//		Eliminar filas en cada nueva bsqueda
+			int numRow = dtm.getRowCount();
+			while (numRow != 0) {
+				numRow = numRow - 1;
+				dtm.removeRow(numRow);
+			}
+			String sentence = "SELECT usr_code, usr_wkt, usr_proj, usr_geog, usr_datum " +							 
+								"FROM USR " +	                              
+								"WHERE usr_code = " + code;
+			connect = new EpsgConnection();
+			connect.setConnectionUsr();
+			ResultSet result = Query.select(sentence,connect.getConnection());	
+			try {
+				connect.shutdown();
+			} catch (SQLException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+			
+			Object[] data = new Object[4];
+			try {
+				while (result.next()){
+					data[0]	= result.getString("usr_code");
+					data[1] = result.getString("usr_wkt");
+					String proj = result.getString("usr_proj");
+					if (!proj.equals("")){
+						data[1] = proj;
+						data[2] = PluginServices.getText(this,"si");
+					} 
+					else 
+					{
+						data[1] = result.getString("usr_geog");
+						data[2] = PluginServices.getText(this,"no");
+					}
+					
+					data[3] = result.getString("usr_datum");
+					dtm.addRow(data);
+				}
+			} catch (SQLException e1) {
+				e1.printStackTrace();
+			}
+			int numr = dtm.getRowCount();
+			if (numr == 0){
+				searchButton();
+			}
+			else {
+				this.getJTable().setRowSelectionInterval(0,0);				
+			}			
+		}	
+	}
+	
+	public boolean isInBD (int code) {
+		String sentence = "SELECT usr_code " +							 
+						"FROM USR " +	                              
+						"WHERE usr_code ="+code;		
+	
+		connect = new EpsgConnection();
+		connect.setConnectionUsr();
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			connect.shutdown();
+			} catch (SQLException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+		try {
+			if (result.next()) {
+				return true;
+			}
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		return false;
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/NewCRSPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/ESRIpanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/ESRIpanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/ESRIpanel.java	(revision 25287)
@@ -0,0 +1,516 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+import javax.swing.ListSelectionModel;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.ogr.Esri2wkt;
+
+import com.iver.andami.PluginServices;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+import es.idr.teledeteccion.connection.EpsgConnection;
+import es.idr.teledeteccion.connection.Query;
+
+
+/**
+ * Clase que genera el panel para el repositorio ESRI
+ * 
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ *
+ */
+public class ESRIpanel extends JPanel implements ActionListener, KeyListener {
+	
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;	
+	
+
+	private JRadioButton codeRadioButton = null;
+	private JRadioButton nameRadioButton = null;	
+	private JPanel groupRadioButton = null;
+	public TableSorter sorter = null;
+	public JTable jTable = null;
+	private JScrollPane jScrollPane = null;
+	private JButton searchButton = null;
+	private JButton infoCrs=null;
+	private JTextField searchTextField = null;
+	public DefaultTableModel dtm = null;
+	private int codeCRS = -1;
+	public String key;
+	String cadWKT;
+	public int selectedRowTable = -1;	
+	
+	public EpsgConnection connect = null;
+	
+	public ESRIpanel() {
+		initialize();		
+	}
+	
+	private void initialize(){
+		this.setLayout(new BorderLayout());
+		JPanel pNorth=new JPanel();
+		pNorth.setLayout(new GridLayout(2,1));
+		pNorth.setBorder(BorderFactory.createEmptyBorder(3,3,3,3));
+		pNorth.add(getGroupRadioButton());
+		JPanel pInNorth = new JPanel();
+		pInNorth.setLayout(new FlowLayout(FlowLayout.LEFT,10,1));
+		pInNorth.add(getSearchButton());
+		pInNorth.add(getSearchTextField());
+		pNorth.add(pInNorth);
+		this.add(pNorth,BorderLayout.NORTH);
+		this.add(getJScrollPane(), BorderLayout.CENTER);	
+		JPanel pSouth=new JPanel(new FlowLayout(FlowLayout.RIGHT,10,3));
+		pSouth.add(getInfoCrs());
+		this.add(pSouth,BorderLayout.SOUTH);
+
+		//probar asi y ver el resultado
+		/*this.setLayout(new GridLayout(2,3));
+		this.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
+		this.add(getGroupRadioButton(), null);
+		this.add(getSearchButton(), null);
+		this.add(getSearchTextField(), null);		
+		this.add(getJScrollPane(), null);	*/
+	}
+	
+	public void connection(){
+		connect = new EpsgConnection();
+		connect.setConnectionEsri();				
+	}
+	
+	private JRadioButton getCodeRadioButton() {
+		if (codeRadioButton == null) {
+			codeRadioButton = new JRadioButton();
+			codeRadioButton.setText(PluginServices.getText(this,"por_codigo"));//setText("By Code EPSG");
+			codeRadioButton.setSelected(true);
+			codeRadioButton.addActionListener(this);
+		}
+		return codeRadioButton;
+	}
+		  
+	private JRadioButton getNameRadioButton() {
+		if (nameRadioButton == null) {
+			nameRadioButton = new JRadioButton();
+			nameRadioButton.setText(PluginServices.getText(this,"por_nombre"));
+			nameRadioButton.addActionListener(this);
+		}
+		return nameRadioButton;
+	}
+		 
+	private JPanel getGroupRadioButton() {
+		if (groupRadioButton == null) {
+			groupRadioButton = new JPanel();
+			groupRadioButton.setLayout(new GridLayout(1,0));
+			groupRadioButton.setPreferredSize(new Dimension(500,30));
+			groupRadioButton.add(getLabel());
+			groupRadioButton.add(getCodeRadioButton());
+			groupRadioButton.add(getNameRadioButton());			
+		}
+		return groupRadioButton;
+	}
+	
+	private JLabel getLabel(){
+		JLabel criterio = new JLabel();
+		criterio.setPreferredSize(new Dimension(100, 20));
+		criterio.setText(PluginServices.getText(this, "criterio_busqueda"));
+		return criterio;
+	}
+	
+	public JButton getInfoCrs() {
+		if(infoCrs == null) {
+			infoCrs = new JButton();
+			infoCrs.setPreferredSize(new Dimension(85,20));
+			infoCrs.setText(PluginServices.getText(this,"infocrs"));
+			infoCrs.setMnemonic('I');
+			infoCrs.setEnabled(false);
+			infoCrs.setToolTipText(PluginServices.getText(this,"more_info"));
+			infoCrs.addActionListener(this);
+		}
+		return infoCrs;
+	}
+	private JButton getSearchButton() {
+		if (searchButton == null) {
+			searchButton = new JButton();
+			searchButton.setPreferredSize(new Dimension(75,20));
+			searchButton.setText(PluginServices.getText(this,"buscar"));
+			searchButton.setMnemonic('S');			
+			searchButton.addActionListener(this);			
+		}
+		return searchButton;
+	}	
+	
+	private JTextField getSearchTextField() {
+		if (searchTextField == null) {
+			searchTextField = new JTextField();
+			searchTextField.setPreferredSize(new Dimension(300,20));
+			searchTextField.addKeyListener(this);
+		}		
+		return searchTextField;
+	}
+	
+	public JTable getJTable() {
+		if (jTable == null) {
+			String[] columnNames= {PluginServices.getText(this,"codigo"),
+					PluginServices.getText(this,"nombre"),
+					PluginServices.getText(this,"projected"),
+					PluginServices.getText(this,"datum")};
+			
+			Object[][]data = {};			
+			dtm = new DefaultTableModel(data, columnNames)
+			 {
+				private static final long serialVersionUID = 1L;
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}
+				/*
+				 * metodo necesario para cuando utilizamos tablas ordenadas
+				 * ya que sino al ordenar por algun campo no se queda con el orden
+				 * actual al seleccionar una fila (non-Javadoc)
+				 * @see javax.swing.table.TableModel#getColumnClass(int)
+				 */
+				public Class getColumnClass(int column)
+				{
+					return getValueAt(0, column).getClass();
+				}
+				};
+			sorter = new TableSorter(dtm);			
+
+			jTable = new JTable(sorter);
+			sorter.setTableHeader(jTable.getTableHeader());			
+			jTable.setCellSelectionEnabled(false);
+			jTable.setRowSelectionAllowed(true);
+			jTable.setColumnSelectionAllowed(false);
+			jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			TableColumn column = null;
+			for (int i = 0; i < 4; i++) {
+			    column = jTable.getColumnModel().getColumn(i);
+			    if (i == 0) {
+			        column.setPreferredWidth(80); //code column is shorter			     	
+			    }else if (i ==2) {
+			    	column.setPreferredWidth(50);
+			    } else {
+			    	column.setPreferredWidth(175);
+			    }
+			    
+			}			
+	}
+		return jTable;
+		
+	}
+	
+	public void setCodeCRS(int code) {
+		codeCRS = code;
+	}
+	
+	public int getCodeCRS() {
+		return codeCRS;
+	}	
+	
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane();
+			jScrollPane.setPreferredSize(new Dimension(500,150));
+			jScrollPane.setBorder(
+				    BorderFactory.createCompoundBorder(
+					BorderFactory.createCompoundBorder(
+							BorderFactory.createTitledBorder(PluginServices.getText(this,"ESRI")),
+							BorderFactory.createEmptyBorder(5,5,5,5)),
+							jScrollPane.getBorder()));
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+	
+	public void keyPressed(KeyEvent e) {
+		if (e.getSource() == this.getSearchTextField()){
+			if (e.getKeyCode() == 10) {
+				searchButton();
+			}			
+		}		
+	}
+	
+	/**
+	 * Mtodo que controla la bsqueda de CRS del repositorio de ESRI.
+	 * Tambin maneja los errores en caso de que los parmetros de bsqueda
+	 * sean errneos, o que no se encuentren resultados.
+	 *
+	 */
+	private void searchButton() {		
+		searchTextField.setBackground(Color.white);
+		boolean not_numeric = false;
+		
+		if (searchTextField.getText().equals("")) {
+			searchTextField.setBackground(new Color(255,204,204));
+			JOptionPane.showMessageDialog(this, PluginServices.getText(this,"fill_name"), "Warning...", JOptionPane.WARNING_MESSAGE);
+		}
+		
+		else {
+            //Eliminar filas en cada nueva bsqueda
+			int numRow = dtm.getRowCount();
+			while (numRow != 0) {
+				numRow = numRow - 1;
+				dtm.removeRow(numRow);
+			}
+			
+			if (codeRadioButton.isSelected() && (searchTextField.getText().length()!=searchTextField.getText().replaceAll("[^0-9]", "").length())){
+				not_numeric = true;
+			}
+			
+			//Dependiendo de la opcion se realizada una busqueda
+			ResultSet result = null;
+								  			
+			if (codeRadioButton.isSelected() && !not_numeric) {
+					
+				key = searchTextField.getText();
+				int code = Integer.parseInt(key);
+				String sentence = "SELECT esri_code, esri_wkt, esri_proj, esri_geog, esri_datum " +							 
+								  "FROM ESRI " +	                              
+	                              "WHERE esri_code = " + code;
+								
+				result = Query.select(sentence,connect.getConnection());	
+				
+				
+				Object[] data = new Object[4];
+				try {
+					while (result.next()){
+						data[0]	= result.getString("esri_code");
+						data[1] = result.getString("esri_wkt");
+						String proj = result.getString("esri_proj");
+						if (!proj.equals("")){
+							data[1] = proj;
+							data[2] = PluginServices.getText(this,"si");
+						} 
+						else 
+						{
+							data[1] = result.getString("esri_geog");
+							data[2] = PluginServices.getText(this,"no");
+						}
+						
+						data[3] = result.getString("esri_datum");
+						dtm.addRow(data);
+					}
+				} catch (SQLException e1) {
+					e1.printStackTrace();
+				}
+			}
+			else if (nameRadioButton.isSelected()) {
+				key = searchTextField.getText();
+				key = key.toLowerCase();				
+				String key2 = key.substring(0,1);
+				String key3 = key.substring(1,key.length());
+				key2 = key2.toUpperCase();
+				
+				String sentence = "SELECT esri_code, esri_wkt, esri_proj, esri_geog, esri_datum " +							 
+					"FROM ESRI " +	                              
+					"WHERE (esri_proj LIKE '%" + key + "%') OR (esri_proj LIKE '%"+ 
+					key.toUpperCase() +"%') " +
+					"OR (esri_proj LIKE '%" + key2+key3 +"%') OR " +
+							"(esri_geog LIKE '%" + key + "%') OR (esri_geog LIKE '%"+ 
+					key.toUpperCase() +"%') " +
+					"OR (esri_geog LIKE '%" + key2+key3 +"%')";
+								
+				result = Query.select(sentence,connect.getConnection());	
+								
+				Object[] data = new Object[4];
+				try {
+					while (result.next()){
+						data[0]	= result.getString("esri_code");
+						data[1] = result.getString("esri_wkt");
+						String proj = result.getString("esri_proj");
+						if (!proj.equals("")){
+							data[1] = proj;
+							data[2] = PluginServices.getText(this,"si");
+						} 
+						else 
+						{
+							data[1] = result.getString("esri_geog");
+							data[2] = PluginServices.getText(this,"no");
+						}
+						
+						data[3] = result.getString("esri_datum");
+						dtm.addRow(data);
+					}
+				} catch (SQLException e1) {
+					e1.printStackTrace();
+				}
+			}
+						
+			int numr = dtm.getRowCount();
+			if (not_numeric) {
+				JOptionPane.showMessageDialog(ESRIpanel.this, 
+						PluginServices.getText(this,"numeric_format"), 
+						"Warning...", JOptionPane.WARNING_MESSAGE);
+				searchTextField.setText("");
+			}
+			else if (numr == 0){
+			JOptionPane.showMessageDialog(this, PluginServices.getText(this,"no_results"), "Warning...",
+					JOptionPane.WARNING_MESSAGE);
+			}
+			else{
+				this.getJTable().setRowSelectionInterval(0,0);				
+			}
+		}		
+	}	
+
+	public void keyReleased(KeyEvent arg0) {
+		
+	}
+
+	public void keyTyped(KeyEvent arg0) {
+	
+	}
+
+	/**
+	 * Maneja los eventos de los botones y los radioButtons del panel
+	 * del repositorio ESRI.
+	 */
+	public void actionPerformed(ActionEvent e) {
+		if (e.getSource() == this.getSearchButton()){
+			searchTextField.setBackground(Color.white);
+			if (searchTextField.getText().equals("")) {
+				searchTextField.setBackground(new Color(255,204,204));
+				JOptionPane.showMessageDialog(ESRIpanel.this, 
+						PluginServices.getText(this,"fill_name"), 
+						"Warning...", JOptionPane.WARNING_MESSAGE);
+			}
+			else {
+				searchButton();
+			}
+		}
+		if (e.getSource() == this.getCodeRadioButton()) {
+			searchTextField.setText("");
+			codeRadioButton.setSelected(true);
+			nameRadioButton.setSelected(false);
+		}
+		
+		if (e.getSource() == this.getNameRadioButton()) {
+			searchTextField.setText("");
+			nameRadioButton.setSelected(true);
+			codeRadioButton.setSelected(false);
+		}
+		
+		/*Si el objeto que genera el evento es el JButton 'InfoCrs'
+		se muestra la informacin ralicionada con el Crs seleccionado en la tabla*/
+		if (e.getSource() == this.getInfoCrs()) {
+			InfoCRSPanel info = new InfoCRSPanel("ESRI", getCodeCRS());
+			PluginServices.getMDIManager().addWindow(info);
+		}
+	}	
+	
+	public ICrs getProjection() {
+		try {
+			String txt = getWKT();			
+			//ICrs crs = new CrsFactory().getCRS("ESRI:"+getCodeCRS(), txt); 
+			ICrs crs = new CrsFactory().getCRS("ESRI:"+getCodeCRS());
+			return crs ;
+		} catch (CrsException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	/**
+	 * Consigue la cadena wkt del CRS seleccionado, y genera la cadena que ms
+	 * tarde volver a ser tratada para la consecucin de una cadena wkt
+	 * legible por la proj4.
+	 *
+	 */
+	public void setWKT(){
+		int code = getCodeCRS();
+		String sentence = "SELECT esri_wkt " +							 
+						  "FROM ESRI " +	                              
+                          "WHERE esri_code = " + code;
+		
+		
+		ResultSet result = Query.select(sentence,connect.getConnection());	
+	
+		try {
+			result.next();			
+			cadWKT = result.getString("esri_wkt");			
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}		
+		cadWKT = cadWKT.substring(0, cadWKT.length()-1) + ", AUTHORITY[\"ESRI\","+ getCodeCRS()+"]]";
+		if (cadWKT.charAt(0) == 'P'){
+			Esri2wkt wk = new Esri2wkt(cadWKT);
+			cadWKT = wk.getWkt();
+		}
+	}
+	
+	public String getWKT(){
+		return cadWKT;
+	}
+	
+	public void setProjection(IProjection crs) {
+		//setCrs((ICrs) crs);
+	}
+	
+	
+	
+	
+}
\ No newline at end of file

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/ESRIpanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/InfoCRSPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/InfoCRSPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/InfoCRSPanel.java	(revision 25287)
@@ -0,0 +1,607 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.Font;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.swing.JButton;
+import javax.swing.JEditorPane;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.ListSelectionModel;
+import javax.swing.border.EmptyBorder;
+import javax.swing.event.HyperlinkEvent;
+import javax.swing.table.DefaultTableModel;
+
+import org.cresques.ui.DefaultDialogPanel;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.persistence.RecentTrsPersistence;
+import org.gvsig.crs.persistence.TrData;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.persistence.generate.PluginsStatusDescriptor;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+
+/**
+ * Clase que genera el panel de informacin del CRS seleccionado
+ * en el caso del repositorio de la EPSG
+ * @author Jose Luis Gomez Martinez (joseluis.gomez@uclm.es)
+ * @author Luisa Marina Fernndez (luisam.fernandez@uclm.es)
+ *
+ */
+public class InfoCRSPanel extends DefaultDialogPanel implements IWindow, ActionListener{
+	
+	private static final long serialVersionUID = 1L;
+
+	private JPanel panelLabels;
+	
+	private JTable jTable;
+	public DefaultTableModel dtm = null;
+	private JScrollPane jScrollPane1 = null;
+	private JPanel jPanelbuttons;
+	private JButton jButtonOk;
+	
+	private ICrs proj;
+	
+	private JLabel jLabelProjcs;
+	private JLabel jLabelGeogcs;
+	private JLabel jLabelDatum;
+	private JLabel jLabelSpheroid;
+	private JLabel jLabelPrimem;
+	private JLabel jLabelProjection;
+	private JLabel jLabelUnits;
+	private JLabel jLabelUnits_p;
+	private JLabel jLabelProjcsdinamic;
+	private JLabel jLabelGeogcsdinamic;
+	private JLabel jLabelDatumdinamic;
+	private JLabel jLabelSpheroiddinamic;
+	private JLabel jLabelPrimemdinamic;
+	private JLabel jLabelProjectiondinamic;
+	private JLabel jLabelUnitsdinamic;
+	private JLabel jLabelUnits_pdinamic;
+	
+	private JEditorPane jEditorPane = null;
+	private JScrollPane jScrollPane = null;
+	private String page = "";
+	private boolean isTransformation = false;
+	private String details = null;
+	private String transformationAuthority = null;
+	private int transformationCode = -1;
+	private String sourceCrs = null;
+	private String targetCrs = null;
+	private String transformationName = null;
+	//private String
+	
+	
+	public InfoCRSPanel(String fuente, int codigo) {
+		super(false);		
+		try {
+			proj = new CrsFactory().getCRS(fuente+":"+codigo);
+		} catch (CrsException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}	
+		inicializate();
+	}
+	
+	public InfoCRSPanel(String fuente, int codigo, String trans) {
+		super(false);		
+		try {
+			proj = new CrsFactory().getCRS(fuente+":"+codigo);
+		} catch (CrsException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}	
+		if (!trans.equals(PluginServices.getText(this, "sin_transformacion"))) {
+			isTransformation = true;
+			details = trans;
+			RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+			TrData crsTrDataArray[] = trPersistence.getArrayOfTrData();
+			
+			for (int iRow = crsTrDataArray.length-1; iRow >= 0; iRow--) {
+				if (details.equals(crsTrDataArray[iRow].getAuthority()+":"+crsTrDataArray[iRow].getCode()+" <--> "+crsTrDataArray[iRow].getDetails())) {
+					//Ya tenemos todos los datos de la transformacion...
+					transformationAuthority = crsTrDataArray[iRow].getAuthority();
+					transformationCode = crsTrDataArray[iRow].getCode();
+					sourceCrs = crsTrDataArray[iRow].getCrsSource();
+					targetCrs = crsTrDataArray[iRow].getCrsTarget();
+					transformationName = crsTrDataArray[iRow].getName();
+					details = crsTrDataArray[iRow].getDetails();					
+				}
+			}
+			
+		} 
+		inicializate();
+	}
+	
+	private void inicializate() {
+		this.setLayout(new BorderLayout());
+		JPanel p=new JPanel(new BorderLayout());
+		p.setBorder(new EmptyBorder(0,10,0,10));
+		//p.add(getPanel(),BorderLayout.NORTH);
+		//p.add(getJScrollPane1(),BorderLayout.CENTER);
+		createPage();
+		
+		p.add(getJScrollPane());
+		
+		this.add(p, BorderLayout.CENTER);
+		this.add(getJPanelButtons(),BorderLayout.SOUTH);
+	}
+
+	private JPanel getPanel() {
+		if(panelLabels == null) {
+			panelLabels = new JPanel();
+			panelLabels.setLayout(new GridLayout(4,2));
+			JPanel p00=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
+			p00.add(getJLabelProjcs());
+			p00.add(getJLabelProjcsDinamic());
+			JPanel p01=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
+			p01.add(getJLabelGeogcs());
+			p01.add(getJLabelGeogcsDinamic());
+			JPanel p10=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
+			p10.add(getJLabelDatum());
+			p10.add(getJLabelDatumDinamic());
+			JPanel p11=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
+			p11.add(getJLabelSpheroid());
+			p11.add(getJLabelSpheroidDinamic());
+			JPanel p20=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
+			p20.add(getJLabelPrimen());
+			p20.add(getJLabelPrimenDinamic());
+			JPanel p21=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
+			p21.add(getJLabelUnits());
+			p21.add(getJLabelUnitsDinamic());
+			JPanel p30=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
+			p30.add(getJLabelProjection());
+			p30.add(getJLabelProjectionDinamic());
+			JPanel p31=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
+			p31.add(getJLabelUnits_p());
+			p31.add(getJLabelUnits_pDinamic());
+			
+			panelLabels.add(p00);
+			panelLabels.add(p01);
+			panelLabels.add(p10);
+			panelLabels.add(p11);
+			panelLabels.add(p20);
+			panelLabels.add(p21);
+			panelLabels.add(p30);
+			panelLabels.add(p31);
+			
+		}
+		return panelLabels;
+	}
+	
+	private JPanel getJPanelButtons() {
+		if(jPanelbuttons == null) {
+			jPanelbuttons = new JPanel();
+			jPanelbuttons.setLayout(new FlowLayout(FlowLayout.RIGHT,10,10));
+			jPanelbuttons.add(getJButtonOk(),null);
+		}
+		return jPanelbuttons;
+	}
+	
+	private JButton getJButtonOk() {
+		if(jButtonOk == null) {
+			jButtonOk = new JButton();
+			jButtonOk.setText(PluginServices.getText(this,"ok"));
+			jButtonOk.setPreferredSize(new Dimension(100,25));
+			jButtonOk.setMnemonic('O');
+			jButtonOk.setToolTipText("Accept");
+			jButtonOk.addActionListener(this);
+		}
+		return jButtonOk;
+	}
+	
+	private JLabel getJLabelProjcs() {
+		if(jLabelProjcs == null) {
+			jLabelProjcs = new JLabel();
+			jLabelProjcs.setFont(new Font("Projcs:",Font.BOLD,10));
+			jLabelProjcs.setText(PluginServices.getText(this,"projcs")+":");
+		}
+		return jLabelProjcs;
+	}
+	
+	private JLabel getJLabelProjcsDinamic() {
+		if(jLabelProjcsdinamic == null) {
+			jLabelProjcsdinamic = new JLabel();
+			jLabelProjcsdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelProjcsdinamic.setText(proj.getCrsWkt().getProjcs());
+		}
+		return jLabelProjcsdinamic;
+	}
+	
+	private JLabel getJLabelGeogcs() {
+		if(jLabelGeogcs == null) {
+			jLabelGeogcs = new JLabel();
+			jLabelGeogcs.setFont(new Font("Geogcs:",Font.BOLD,10));
+			jLabelGeogcs.setText(PluginServices.getText(this,"geogcs")+ ":");
+		}
+		return jLabelGeogcs;
+	}
+	
+	private JLabel getJLabelGeogcsDinamic() {
+		if(jLabelGeogcsdinamic == null) {
+			jLabelGeogcsdinamic = new JLabel();
+			jLabelGeogcsdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelGeogcsdinamic.setText(proj.getCrsWkt().getGeogcs());
+		}
+		return jLabelGeogcsdinamic;
+	}
+	
+	private JLabel getJLabelDatum() {
+		if(jLabelDatum == null) {
+			jLabelDatum = new JLabel();
+			jLabelDatum.setFont(new Font("Datum:",Font.BOLD,10));
+			jLabelDatum.setText(PluginServices.getText(this,"datum")+":");
+		}
+		return jLabelDatum;
+	}
+	
+	private JLabel getJLabelDatumDinamic() {
+		if(jLabelDatumdinamic == null) {
+			jLabelDatumdinamic = new JLabel();
+			jLabelDatumdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelDatumdinamic.setText(proj.getCrsWkt().getDatumName());
+		}
+		return jLabelDatumdinamic;
+	}
+	
+	private JLabel getJLabelSpheroid() {
+		if(jLabelSpheroid == null) {
+			jLabelSpheroid = new JLabel();
+			jLabelSpheroid.setFont(new Font("Spheroid",Font.BOLD,10));
+			jLabelSpheroid.setText(PluginServices.getText(this,"spheriod")+":");
+		}
+		return jLabelSpheroid;
+	}
+	
+	private JLabel getJLabelSpheroidDinamic() {
+		if(jLabelSpheroiddinamic == null) {
+			String[] sphe = proj.getCrsWkt().getSpheroid();
+			jLabelSpheroiddinamic = new JLabel();
+			jLabelSpheroiddinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelSpheroiddinamic.setText(sphe[0]+" , "+sphe[1]+" , "+sphe[2]);
+		}
+		return jLabelSpheroiddinamic;
+	}
+	
+	private JLabel getJLabelPrimen() {
+		if(jLabelPrimem == null) {
+			jLabelPrimem = new JLabel();
+			jLabelPrimem.setFont(new Font("Primen:",Font.BOLD,10));
+			jLabelPrimem.setText(PluginServices.getText(this,"primem")+":");
+		}
+		return jLabelPrimem;
+	}
+	
+	private JLabel getJLabelPrimenDinamic() {
+		if(jLabelPrimemdinamic == null) {
+			String pri[] = proj.getCrsWkt().getPrimen();
+			jLabelPrimemdinamic = new JLabel();
+			jLabelPrimemdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelPrimemdinamic.setText(pri[0]+" , "+pri[1]);
+		}
+		return jLabelPrimemdinamic;
+	}
+	
+	private JLabel getJLabelProjection() {
+		if(jLabelProjection == null) {
+			jLabelProjection = new JLabel();
+			jLabelProjection.setFont(new Font("Projection",Font.BOLD,10));
+			jLabelProjection.setText(PluginServices.getText(this,"projection")+":");
+		}
+		return jLabelProjection;
+	}
+	
+	private JLabel getJLabelProjectionDinamic() {
+		if(jLabelProjectiondinamic == null) {
+			jLabelProjectiondinamic = new JLabel();
+			jLabelProjectiondinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelProjectiondinamic.setText(proj.getCrsWkt().getProjection());
+		}
+		return jLabelProjectiondinamic;
+	}
+	
+	private JLabel getJLabelUnits() {
+		if(jLabelUnits == null) {
+			jLabelUnits = new JLabel();
+			jLabelUnits.setFont(new Font("Units",Font.BOLD,10));
+			jLabelUnits.setText(PluginServices.getText(this,"units")+":");
+		}
+		return jLabelUnits;
+	}
+	
+	private JLabel getJLabelUnitsDinamic() {
+		if(jLabelUnitsdinamic == null) {
+			String[] units = proj.getCrsWkt().getUnit();
+			jLabelUnitsdinamic = new JLabel();
+			jLabelUnitsdinamic.setPreferredSize(new Dimension(200,20));
+			jLabelUnitsdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelUnitsdinamic.setText(units[0]+" , "+units[1]);
+			System.out.println("Unidades:  "+ units[0]+" , "+units[1]);
+
+		}
+		return jLabelUnitsdinamic;
+	}
+	
+	private JLabel getJLabelUnits_p() {
+		if(jLabelUnits_p == null) {
+			jLabelUnits_p = new JLabel();
+			jLabelUnits_p.setFont(new Font("",Font.BOLD,10));
+			jLabelUnits_p.setText(PluginServices.getText(this,"units_p")+":");
+		}
+		return jLabelUnits_p;
+	}
+	
+	private JLabel getJLabelUnits_pDinamic() {
+		if(jLabelUnits_pdinamic == null) {
+			String[] uni_p = proj.getCrsWkt().getUnit_p();
+			jLabelUnits_pdinamic = new JLabel();
+			jLabelUnits_pdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelUnits_pdinamic.setText(uni_p[0]+" , "+uni_p[1]);
+			
+		}
+		return jLabelUnits_pdinamic;
+	}
+	
+	private JScrollPane getJScrollPane1() {
+		if(jScrollPane1 == null) {
+			jScrollPane1 = new JScrollPane();
+			jScrollPane1.setPreferredSize(new Dimension(400,150));
+			jScrollPane1.setViewportView(getJTable());
+		}
+		return jScrollPane1;
+	}
+	
+	private JTable getJTable() {
+		if(jTable == null) {
+			String[] columnNames = {PluginServices.getText(this,"nombre")
+					,PluginServices.getText(this,"valor")};
+			String[] param_n = proj.getCrsWkt().getParam_name();
+			String[] param_v = proj.getCrsWkt().getParam_value();
+			Object[][]data;
+			if(param_v != null) {
+				data = new Object[param_v.length][2];
+				for(int i = 0 ; i < 2 ; i++ )
+					for(int j = 0 ; j < param_n.length ; j++) {
+						if(i == 0)
+							data[j][i] = param_n[j];
+						else
+							data[j][i] = param_v[j];
+					}
+			} else 
+				data = new Object[1][1];
+			dtm = new DefaultTableModel(data, columnNames);
+			jTable = new JTable(dtm);
+			jTable.setCellSelectionEnabled(false);
+			jTable.setRowSelectionAllowed(true);
+			jTable.setColumnSelectionAllowed(false);
+			jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			
+		}
+		return jTable;
+	}
+
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle(PluginServices.getText(this,proj.getCrsWkt().getName()));
+   		m_viewinfo.setWidth(600);
+   		m_viewinfo.setHeight(500);
+		return m_viewinfo;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		if (e.getSource() == getJButtonOk()){
+			PluginServices.getMDIManager().closeWindow(this);
+		}
+	}
+	
+	/**
+	 * This method initializes jScrollPane	
+	 * 	
+	 * @return javax.swing.JScrollPane	
+	 */    
+	private JScrollPane getJScrollPane() {
+		
+		// if (jScrollPane == null) {
+			jScrollPane = new JScrollPane();
+			jScrollPane.setPreferredSize(new java.awt.Dimension(300,450));
+			jScrollPane.setViewportView(getJEditorPane());
+		// }
+		return jScrollPane;
+	}
+	/**
+	 * This method initializes jEditorPane1	
+	 * 	
+	 * @return javax.swing.JEditorPane	
+	 */    
+	private JEditorPane getJEditorPane() {
+		// if (jEditorPane == null) {
+			jEditorPane = new JEditorPane();
+			
+			jEditorPane.setEditable(false);
+			jEditorPane.setContentType("text/html");
+			jEditorPane.setPreferredSize(new java.awt.Dimension(300,450));
+			
+			
+			jEditorPane.setText(page);//Page(aboutURL);
+			  
+			
+		// }
+		return jEditorPane;
+	}
+	
+	private void createPage() {
+		String title = PluginServices.getText(this, "infoCRS");
+		
+		page += "<html>  <head>  <title>"+title+"</title> <meta content=\"\"> <style></style> </head> <body>";
+		page += "<p align=\"center\"><font size=5><b>"+title.toUpperCase()+"</font></b></p>";
+		//Primera fila, codigo y repositorio
+		page += "<br><table width=\"100%\" border=\"0\">  " +
+				"<tr> " +
+					"<td width=\"50%\">"+PluginServices.getText(this, "codeSelectedCrs")+": "+proj.getCode()+"</td> " +
+					"<td width=\"50%\"><div align=\"center\">"+PluginServices.getText(this, "repository")+": "+proj.getCrsWkt().getAuthority()[0]+"</div></td> " +
+				"</tr>";
+		
+		String projected;
+		if (proj.getCrsWkt().getProjcs().equals(""))
+			projected = PluginServices.getText(this, "no");
+		else
+			projected = PluginServices.getText(this, "si");		
+		
+		//Segunda fila, nombre y proyeccion		
+		page += "<tr> " +
+			"<td width=\"50%\">"+PluginServices.getText(this, "nameSelectedCrs")+": "+proj.getCrsWkt().getName()+"</td> " +
+			"<td width=\"50%\"><div align=\"center\">"+PluginServices.getText(this, "projected")+": "+projected+"</div></td> " +
+		"</tr>";
+		
+		//Nombre del datum
+		page += "<tr> " +
+			"<td width=\"60%\">"+PluginServices.getText(this, "nameDatum")+": "+proj.getCrsWkt().getDatumName()+"</td> " +
+			"<td width=\"40%\"><div align=\"center\">"+"</div></td> " +
+		"</tr>";
+		
+		page +="</table>";
+		
+		//Datos del elipsoide
+		page += "<br><table width=\"100%\" border=\"2\">  " +
+				"<tr> " +
+					"<td align=\"center\"><b>"+PluginServices.getText(this, "ellipsoid")+": "+proj.getCrsWkt().getSpheroid()[0]+"</b></td> " +
+				"</tr>";
+		
+		page += "<tr> " +
+					"<td>"+PluginServices.getText(this, "semiMajorAxis")+"</td> " +
+					"<td><div align=\"center\">"+proj.getCrsWkt().getSpheroid()[1]+"</div></td> " +
+				"</tr>";
+		page += "<tr> " +
+					"<td>"+PluginServices.getText(this, "invFlattening")+"</td> " +
+					"<td><div align=\"center\">"+proj.getCrsWkt().getSpheroid()[2]+"</div></td> " +
+				"</tr>";
+		page += "</table>";
+		
+		//Datos del prime meridian
+		page += "<br><table width=\"100%\" border=\"2\">  " +
+		"<tr> " +
+			"<td align=\"center\"><b>"+PluginServices.getText(this, "primeMeridian")+": "+proj.getCrsWkt().getPrimen()[0]+"</b></td> " +
+		"</tr>";
+
+		page += "<tr> " +
+			"<td>"+PluginServices.getText(this, "greenwichLongitude")+"</td> " +
+			"<td><div align=\"center\">"+proj.getCrsWkt().getPrimen()[1]+"</div></td> " +
+		"</tr>";
+		
+		page += "</table>";
+		
+		//Si es proyectado procedemos a concatenar la proyección y sus parámetros
+		if (projected.equals(PluginServices.getText(this, "si"))) {
+						
+			//proyeccion
+			page += "<p><font size=4>"+PluginServices.getText(this, "projection")+": <b>"+proj.getCrsWkt().getProjection()+"</b></font></p>";
+			
+			//Parametros
+			page += "<p align=\"center\">"+PluginServices.getText(this, "parameters")+"<table width=\"100%\" border=\"2\">  ";
+			for (int i = 0; i < proj.getCrsWkt().getParam_name().length; i++) {
+				
+				page += "<tr> " +
+					"<td align=\"center\">"+PluginServices.getText(this, proj.getCrsWkt().getParam_name()[i])+"</td> " +
+					"<td align=\"center\">"+proj.getCrsWkt().getParam_value()[i]+"</td> " +
+				"</tr>";
+			}
+			page += "</table>";
+		}
+		
+		try {
+			page += "<p>"+PluginServices.getText(this, "proj4Chain")+": "+ proj.getProj4String() +"</p>";
+		} catch (CrsException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+		if (isTransformation) {
+			
+			//Titulo de la transformacion
+			page += "<p align=\"center\"><font size=5><b>"+PluginServices.getText(this, "transformation")+"</b></font></p>";
+			
+			//Tipo de transformacion y codigo si es EPSG
+			page += "<p>"+PluginServices.getText(this, "type_transformation")+": ";
+			
+			if (transformationAuthority.equals(PluginServices.getText(this, "USR"))) {
+				page += PluginServices.getText(this, "user")+"</p>";
+			}
+			else if (transformationAuthority.equals(PluginServices.getText(this, "EPSG"))) {
+				page += PluginServices.getText(this, "EPSG")+":"+transformationCode+"</p>";
+				//nombre de la transformacion
+				page += "<p>"+PluginServices.getText(this, "name")+": "+transformationName+"</p>";
+			}
+			else if (transformationAuthority.equals(PluginServices.getText(this, "NADGR"))) {
+				page += PluginServices.getText(this, "nadgrids")+"</p>";
+			}
+			else if (transformationAuthority.equals(PluginServices.getText(this, "COMP"))) {
+				page += PluginServices.getText(this, "compound")+"</p>";
+			}
+			
+			//Fuente y destino de la transformacion
+			page += "<br><table width=\"100%\" border=\"0\">  " +
+			"<tr> " +
+				"<td align=\"center\">"+PluginServices.getText(this, "source_crs")+": "+sourceCrs+"</td> " +
+				"<td align=\"center\">"+PluginServices.getText(this, "target_crs")+": "+targetCrs+"</td> " +
+			"</tr></table>";
+			
+			page += "<p>"+PluginServices.getText(this, "detailsTransformation")+": "+details+"</p>";	
+			
+		}
+		
+		page += "</body> </html>";
+	}
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/InfoCRSPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationManualPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationManualPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationManualPanel.java	(revision 25287)
@@ -0,0 +1,643 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.GridLayout;
+import java.util.ArrayList;
+
+import javax.swing.BorderFactory;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+import javax.swing.border.EmptyBorder;
+
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.CrsWkt;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.persistence.RecentTrsPersistence;
+import org.gvsig.crs.persistence.TrData;
+
+import com.iver.andami.PluginServices;
+
+/**
+ * Clase que define el panel de tranformaciones manuales, as como su
+ * funcionamiento.
+ * 
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ * @author Luisa Marina Fernndez (luisam.fernandez@uclm.es)
+ *
+ */
+public class TransformationManualPanel extends JPanel {
+	
+	private static final long serialVersionUID = 1L;
+	
+	private static boolean pressed = true;
+	
+	private JLabel x_Translation;
+	private JLabel y_Translation;
+	private JLabel z_Translation;
+	private JLabel x_Rotation;
+	private JLabel y_Rotation;
+	private JLabel z_Rotation;
+	private JLabel scale;
+	
+	private JTextField tx_Translation;
+	private JTextField ty_Translation;
+	private JTextField tz_Translation;
+	private JTextField tx_Rotation;
+	private JTextField ty_Rotation;
+	private JTextField tz_Rotation;
+	private JTextField tScale;
+	
+	private JLabel domainTranslation;
+	private JLabel domainRotation;
+	private JLabel domainScale;
+	
+	//private JLabel wkt;
+	private JTextArea info;	
+	int codeEpsg;
+	String targetAbrev = "";
+	String sourceAbrev = "";
+	String[] targetAuthority;
+	
+	private String cadWKT = "";	
+	
+	public TransformationManualPanel() {		
+		initialize();	
+	}
+	
+	private void initialize(){
+		JPanel p=new JPanel();
+		p.setLayout(new GridLayout(7,3,10,10));
+		
+		p.add(getX_Translation());
+		p.add(getTx_Translation());
+		p.add(getDomainTranslation());
+			
+		p.add(getY_Translation());
+		p.add(getTy_Translation());
+		p.add(getDomainTranslation());
+			
+		p.add(getZ_Translation());
+		p.add(getTz_Translation());
+		p.add(getDomainTranslation());
+			
+		p.add(getX_Rotation());
+		p.add(getTx_Rotation());
+		p.add(getDomainRotation());
+			
+		p.add(getY_Rotation());
+		p.add(getTy_Rotation());
+		p.add(getDomainRotation());
+			
+		p.add(getZ_Rotation());
+		p.add(getTz_Rotation());
+		p.add(getDomainRotation());
+			
+		p.add(getScale());
+		p.add(getTscale());
+		p.add(getDomainScale());
+		p.setBorder(new EmptyBorder(50,20,50,10));
+		this.setLayout(new BorderLayout(1,30));
+		this.setBorder(
+			    BorderFactory.createCompoundBorder(
+						BorderFactory.createCompoundBorder(
+								BorderFactory.createTitledBorder(PluginServices.getText(this,"transformacion_manual")),
+								BorderFactory.createEmptyBorder(2,2,2,2)),
+								getBorder()));
+		this.add(p,BorderLayout.CENTER);
+	}
+	
+	private JLabel getDomainTranslation(){
+		domainTranslation = new JLabel();
+		domainTranslation.setText("[-1000.0, 1000.0]");
+		return domainTranslation;
+	}
+	
+	private JLabel getDomainRotation(){
+		domainRotation = new JLabel();
+		domainRotation.setText("[-60.0, 60.0]");
+		return domainRotation;
+	}
+	
+	private JLabel getDomainScale(){
+		domainScale = new JLabel();
+		domainScale.setText("[-20.0, 20.0]");
+		return domainScale;
+	}
+
+	private JLabel getX_Translation() {
+		if(x_Translation == null ) {
+			x_Translation = new JLabel();
+			//x_Translation.setFont(new Font("x_Translation:",Font.BOLD,15));
+			x_Translation.setText(PluginServices.getText(this,"x_Translation")+":");	
+		}
+		return x_Translation;
+	}
+	
+	private JLabel getY_Translation() {
+		if(y_Translation == null ) {
+			y_Translation = new JLabel();
+			//y_Translation.setFont(new Font("y_Translation:",Font.BOLD,15));
+			y_Translation.setText(PluginServices.getText(this,"y_Translation")+":");
+		}
+		return y_Translation;
+	}
+	
+	private JLabel getZ_Translation() {
+		if(z_Translation == null ) {
+			z_Translation = new JLabel();
+			//z_Translation.setFont(new Font("z_Translation:",Font.BOLD,15));
+			z_Translation.setText(PluginServices.getText(this,"z_Translation")+":");
+			
+		}
+		return z_Translation;
+	}
+	
+	private JLabel getX_Rotation() {
+		if(x_Rotation == null ) {
+			x_Rotation = new JLabel();
+			//x_Rotation.setFont(new Font("x_Rotation:",Font.BOLD,15));
+			x_Rotation.setText(PluginServices.getText(this,"x_Rotation")+":");
+			
+		}
+		return x_Rotation;
+	}
+	
+	private JLabel getY_Rotation() {
+		if(y_Rotation == null ) {
+			y_Rotation = new JLabel();
+			//y_Rotation.setFont(new Font("x_Rotation:",Font.BOLD,15));
+			y_Rotation.setText(PluginServices.getText(this,"y_Rotation")+":");
+			
+		}
+		return y_Rotation;
+	}
+	
+	private JLabel getZ_Rotation() {
+		if(z_Rotation == null ) {
+			z_Rotation = new JLabel();
+			//z_Rotation.setFont(new Font("x_Translation:",Font.BOLD,15));
+			z_Rotation.setText(PluginServices.getText(this,"z_Rotation")+":");
+			
+		}
+		return z_Rotation;
+	}
+	
+	private JLabel getScale() {
+		if(scale == null ) {
+			scale = new JLabel();
+			//scale.setFont(new Font("scale:",Font.BOLD,15));
+			scale.setText(PluginServices.getText(this,"scale")+":");
+			
+		}
+		return scale;
+	}
+	
+	public JTextField getTx_Translation() {
+		if(tx_Translation == null ) {
+			tx_Translation = new JTextField();
+			//tx_Translation.setFont(new Font("",Font.ITALIC,10));
+			tx_Translation.setText("0");
+			tx_Translation.setEditable(true);
+			//tx_Translation.addKeyListener(this);
+		}
+		return tx_Translation;
+	}
+	
+	public JTextField getTy_Translation() {
+		if(ty_Translation == null ) {
+			ty_Translation = new JTextField();
+			//ty_Translation.setFont(new Font("",Font.ITALIC,10));
+			ty_Translation.setText("0");
+			ty_Translation.setEditable(true);
+			//ty_Translation.addKeyListener(this);
+		}
+		return ty_Translation;
+	}
+	
+	public JTextField getTz_Translation() {
+		if(tz_Translation == null ) {
+			tz_Translation = new JTextField();
+			//tz_Translation.setFont(new Font("",Font.ITALIC,10));
+			tz_Translation.setText("0");
+			tz_Translation.setEditable(true);
+			//tz_Translation.addKeyListener(this);
+		}
+		return tz_Translation;
+	}
+	
+	public JTextField getTx_Rotation() {
+		if(tx_Rotation == null ) {
+			tx_Rotation = new JTextField();
+			//tx_Rotation.setFont(new Font("",Font.ITALIC,10));
+			tx_Rotation.setText("0");
+			tx_Rotation.setEditable(true);
+			//tx_Rotation.addKeyListener(this);
+		}
+		return tx_Rotation;
+	}
+	
+	public JTextField getTy_Rotation() {
+		if(ty_Rotation == null ) {
+			ty_Rotation = new JTextField();
+			//ty_Rotation.setFont(new Font("",Font.ITALIC,10));
+			ty_Rotation.setText("0");
+			ty_Rotation.setEditable(true);
+			//ty_Rotation.addKeyListener(this);
+		}
+		return ty_Rotation;
+	}
+	
+	public JTextField getTz_Rotation() {
+		if(tz_Rotation == null ) {
+			tz_Rotation = new JTextField();
+			//tz_Rotation.setFont(new Font("",Font.ITALIC,10));
+			tz_Rotation.setText("0");
+			tz_Rotation.setEditable(true);
+			//tz_Rotation.addKeyListener(this);
+		}
+		return tz_Rotation;
+	}
+	
+	public JTextField getTscale() {
+		if(tScale == null ) {
+			tScale = new JTextField();
+			//tScale.setFont(new Font("",Font.ITALIC,10));
+			tScale.setText("0");
+			tScale.setEditable(true);
+			//tScale.addKeyListener(this);
+		}
+		return tScale;
+	}
+			
+	/**
+	 * 
+	 * @return
+	 */
+	public ICrs getProjection() {
+		if(tx_Translation.getText().equals("")){
+			tx_Translation.setText("0");
+		}
+		else if (ty_Translation.getText().equals("")){
+			ty_Translation.setText("0");
+		}
+		else if (tz_Translation.getText().equals("")){
+			tz_Translation.setText("0");
+		}
+		else if (tx_Rotation.getText().equals("")){
+			tx_Rotation.setText("0");
+		}
+		else if (ty_Rotation.getText().equals("")){
+			ty_Rotation.setText("0");
+		}
+		else if (tz_Rotation.getText().equals("")){
+			tz_Rotation.setText("0");
+		}
+		else if (tScale.getText().equals("")){
+			tScale.setText("0");
+		}		
+		String param = "+towgs84="+ tx_Translation.getText()+","+
+					   ty_Translation.getText()+","+
+					   tz_Translation.getText()+","+
+					   tx_Rotation.getText()+","+
+					   ty_Rotation.getText()+","+
+					   tz_Rotation.getText()+","+
+					   tScale.getText() + " ";
+		
+		try {
+			String[] sourceAuthority = getSourceAbrev().split(":");
+			//ICrs crs = new CrsFactory().getCRS(getCode(), getWKT(),param);
+			ICrs crs = new CrsFactory().getCRS(sourceAuthority[0]+":"+getCode());
+			crs.setTransformationParams(param,null);
+			return crs;
+		} catch (org.gvsig.crs.CrsException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	/**
+	 * 
+	 * @param cod
+	 */
+	public void setCode(int cod){
+		codeEpsg = cod;
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public int getCode(){
+		return codeEpsg;
+	}
+	
+	/**
+	 * 
+	 * @param cad
+	 */
+	public void setWKT(String cad){
+		cadWKT = cad;
+		CrsWkt parser = new CrsWkt(cad);
+		setSourceAbrev(parser.getAuthority()[0], parser.getAuthority()[1]);		
+	}	
+	
+	/**
+	 * 
+	 * @param cad
+	 */
+	public void setWKT(ICrs crs){
+		cadWKT = crs.getWKT();		
+		setSourceAbrev(crs.getCrsWkt().getAuthority()[0], crs.getCrsWkt().getAuthority()[1]);		
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public String getWKT(){
+		return cadWKT;
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public static boolean isPressed() { return pressed; }
+	
+	
+	/**
+	 * metodo para comprobar si los JTextfile estan escritos 
+	 * correctamente los campos de la transformacion manual
+	 */
+	public boolean correctJTextField(){
+		boolean correct = true;
+		
+		if ((tx_Translation.getText().length()==0) || (tx_Translation.getText().length()!=verify(tx_Translation.getText()).length())){
+			tx_Translation.setText("0");
+			tx_Translation.setBackground(new Color(255,204,204));
+			correct = false;
+		}
+		else tx_Translation.setBackground(new Color(255,255,255));
+		if ((ty_Translation.getText().length()==0) || (ty_Translation.getText().length()!=verify(ty_Translation.getText()).length())){
+			ty_Translation.setText("0");
+			ty_Translation.setBackground(new Color(255,204,204));
+			correct = false;
+		}
+		else ty_Translation.setBackground(new Color(255,255,255));
+		if ((tz_Translation.getText().length()==0) || (tz_Translation.getText().length()!=verify(tz_Translation.getText()).length())){
+			tz_Translation.setText("0");
+			tz_Translation.setBackground(new Color(255,204,204));
+			correct = false;
+		}
+		else tz_Translation.setBackground(new Color(255,255,255));
+		if ((tx_Rotation.getText().length() == 0) || (tx_Rotation.getText().length()!=verify(tx_Rotation.getText()).length())){
+			tx_Rotation.setText("0");
+			tx_Rotation.setBackground(new Color(255,204,204));
+			correct = false;
+		}
+		else tx_Rotation.setBackground(new Color(255,255,255));
+		if ((ty_Rotation.getText().length() == 0) || (ty_Rotation.getText().length()!=verify(ty_Rotation.getText()).length())){
+			ty_Rotation.setText("0");
+			ty_Rotation.setBackground(new Color(255,204,204));
+			correct = false;
+		}
+		else ty_Rotation.setBackground(new Color(255,255,255));
+		if ((tz_Rotation.getText().length() == 0) || (tz_Rotation.getText().length()!=verify(tz_Rotation.getText()).length())){
+			tz_Rotation.setText("0");
+			tz_Rotation.setBackground(new Color(255,204,204));
+			correct = false;
+		}
+		else tz_Rotation.setBackground(new Color(255,255,255));
+		if ((tScale.getText().length() == 0) || (tScale.getText().length()!=verify(tScale.getText()).length())){
+			tScale.setText("0");
+			tScale.setBackground(new Color(255,204,204));
+			correct = false;
+		}
+		else tScale.setBackground(new Color(255,255,255));
+		return correct;
+	}
+	
+	/**
+	 * Verifica que el valor insertado en el campo JTextField correspondiente
+	 * se corresponde con un valor nmerico y de tipo double
+	 * 
+	 * @param cad
+	 * @return
+	 */
+	private String verify(String cad) {
+		String num_cad = "";
+		int pto = 0;
+		char[] nums = {'0','1','2','3','4','5','6','7','8','9'};
+		if (cad.startsWith("-")) num_cad += "-";
+		for (int i=0; i< cad.length(); i++){						
+			if (cad.charAt(i) == '.'){				
+				if (cad.startsWith(".") || cad.endsWith(".") || pto>0);
+				else {
+					pto++;
+					num_cad += cad.charAt(i);
+				}
+			}			
+			else
+				for (int j=0; j< nums.length; j++)
+					if (cad.charAt(i) == nums[j])
+						num_cad += cad.charAt(i);				
+		}		
+		return num_cad;
+	}
+	
+	/**
+	 * Mira si los JTextField tienen dominios correctos
+	 * @return
+	 */
+	public boolean correctDomain(){
+		boolean correctDomain = true;
+		double tx = Double.parseDouble(tx_Translation.getText());
+		double ty = Double.parseDouble(ty_Translation.getText());
+		double tz = Double.parseDouble(tz_Translation.getText());
+		double rx = Double.parseDouble(tx_Rotation.getText());
+		double ry = Double.parseDouble(ty_Rotation.getText());
+		double rz = Double.parseDouble(tz_Rotation.getText());
+		double sc = Double.parseDouble(tScale.getText());
+		
+		if (tx < -1000.0 || tx > 1000.0) {
+			tx_Translation.setText("0");
+			tx_Translation.setBackground(new Color(255,204,204));
+			correctDomain = false;
+		}
+		else tx_Translation.setBackground(new Color(255,255,255));
+		if (ty < -1000.0 || ty > 1000.0) {
+			ty_Translation.setText("0");
+			ty_Translation.setBackground(new Color(255,204,204));
+			correctDomain = false;
+		}
+		else ty_Translation.setBackground(new Color(255,255,255));
+		if (tz < -1000.0 || tz > 1000.0) {
+			tz_Translation.setText("0");
+			tz_Translation.setBackground(new Color(255,204,204));
+			correctDomain = false;
+		}
+		else tz_Translation.setBackground(new Color(255,255,255));
+		if (rx < -60.0 || rx > 60.0) {
+			tx_Rotation.setText("0");
+			tx_Rotation.setBackground(new Color(255,204,204));
+			correctDomain = false;
+		}
+		else tx_Rotation.setBackground(new Color(255,255,255));
+		if (ry < -60.0 || ry > 60.0) {
+			ty_Rotation.setText("0");
+			ty_Rotation.setBackground(new Color(255,204,204));
+			correctDomain = false;
+		}
+		else ty_Rotation.setBackground(new Color(255,255,255));
+		if (rz < -60.0 || rz > 60.0) {
+			tz_Rotation.setText("0");
+			tz_Rotation.setBackground(new Color(255,204,204));
+			correctDomain = false;
+		}
+		else tz_Rotation.setBackground(new Color(255,255,255));
+		if (sc < -20.0 || sc > 20.0) {
+			tScale.setText("0");
+			tScale.setBackground(new Color(255,204,204));
+			correctDomain = false;
+		}
+		else tScale.setBackground(new Color(255,255,255));
+		return correctDomain;
+	}
+	
+	/**
+	 * Consigue el estado actual de los parmetros insertados. En caso
+	 * de que todos los parmetros sean 0, o haya parmetros sin valor
+	 * deshabilitar el botn de aceptar
+	 * @return
+	 */
+	public boolean getStatus() {
+		if ((tx_Translation.getText().equals("0") || tx_Translation.getText().equals("")) &&
+				(ty_Translation.getText().equals("0")  || ty_Translation.getText().equals(""))&&
+				(tz_Translation.getText().equals("0")  || tz_Translation.getText().equals(""))&&
+				(tx_Rotation.getText().equals("0")  || tx_Rotation.getText().equals(""))&&
+				(ty_Rotation.getText().equals("0")  || ty_Rotation.getText().equals(""))&&
+				(tz_Rotation.getText().equals("0")  || tz_Rotation.getText().equals(""))&&
+				(tScale.getText().equals("0")  || tScale.getText().equals("")))
+			return false;
+		else if (tx_Translation.getText().equals("") ||
+				(ty_Translation.getText().equals(""))||
+				(tz_Translation.getText().equals(""))||
+				(tx_Rotation.getText().equals(""))||
+				(ty_Rotation.getText().equals(""))||
+				(tz_Rotation.getText().equals(""))||
+				(tScale.getText().equals("")))
+			return false;
+		return true;
+	}
+	
+	public void setTargetAuthority(String[] authority){
+		targetAuthority = authority;
+		setTargetAbrev(targetAuthority[0], targetAuthority[1]);		
+	}
+	
+	public void setTargetAbrev(String fuente, String codigo){
+		targetAbrev = fuente + ":" + codigo;
+	}
+	
+	public String getTargetAbrev() {
+		return targetAbrev;
+	}
+	
+	public void setSourceAbrev(String fuente, String codigo){
+		sourceAbrev = fuente + ":" + codigo;
+	}
+	
+	public String getSourceAbrev(){
+		return sourceAbrev;
+	}
+	
+	public String getValues(){
+		return "["+tx_Translation.getText()+","+ty_Translation.getText()+
+		","+tz_Translation.getText()+","+tx_Rotation.getText()+","+ty_Rotation.getText()+","
+		+tz_Rotation.getText()+","+tScale.getText()+"]";
+	}
+	
+	/**
+	 * cuando utilizamos crs+transformacion, cargamos los paneles para que
+	 * el usuario pueda consultar la transformacion utilizada...
+	 * @param details
+	 */
+	public void fillData(String details) {
+		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+		TrData crsTrDataArray[] = trPersistence.getArrayOfTrData();
+		
+		for (int iRow = crsTrDataArray.length-1; iRow >= 0; iRow--) {
+			if (details.equals(crsTrDataArray[iRow].getAuthority()+":"+crsTrDataArray[iRow].getCode()+" <--> "+crsTrDataArray[iRow].getDetails()) && crsTrDataArray[iRow].getAuthority().equals(PluginServices.getText(this, "USR"))) {
+				String data = crsTrDataArray[iRow].getDetails();
+				data = data.trim().substring(1, data.length()-1);
+				String values[] = data.split(",");
+				tx_Translation.setText(values[0]);
+				ty_Translation.setText(values[1]);
+				tz_Translation.setText(values[2]);
+				tx_Rotation.setText(values[3]);
+				ty_Rotation.setText(values[4]);
+				tz_Rotation.setText(values[5]);
+				tScale.setText(values[6]);				
+				break;
+			}
+		}
+	}
+	
+	/**
+	 * metodo para eliminar la informacion previamente cargada
+	 *
+	 */
+	public void resetData() {
+		tx_Translation.setText("0");
+		ty_Translation.setText("0");
+		tz_Translation.setText("0");
+		tx_Rotation.setText("0");
+		ty_Rotation.setText("0");
+		tz_Rotation.setText("0");
+		tScale.setText("0");
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationManualPanel.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/CrsRecentsPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/CrsRecentsPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/CrsRecentsPanel.java	(revision 25287)
@@ -0,0 +1,298 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+
+import javax.swing.Action;
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.ListSelectionModel;
+
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.persistence.CrsData;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+
+import com.iver.andami.PluginServices;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+/**
+ * Clase que genera el panel de recientes
+ * 
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ * @author Luisa Marina Fernndez (luisam.fernandez@uclm.es)
+ *
+ */
+public class CrsRecentsPanel extends JPanel implements ActionListener {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	
+	public JTable jTable = null;
+	private JScrollPane jScrollPane = null;
+	private JButton infoCrs=null;
+	public DefaultTableModel dtm = null;
+	public TableSorter sorter = null;
+	private CrsData crsDataArray[] = null;
+	
+	public int selectedRowTable = -1;
+	private String authority = null;
+	private int codeCRS = -1;
+	private ICrs crs = null;
+	
+	public CrsRecentsPanel() {
+		super();
+		initialize();
+	}
+	
+	private void initialize(){
+		this.setLayout(new BorderLayout());
+		JPanel p=new JPanel(new FlowLayout(FlowLayout.LEFT,15,15));
+		p.add(getJLabel());
+		this.add(p, BorderLayout.NORTH);
+		this.add(getJScrollPane(), BorderLayout.CENTER);
+		JPanel pSouth=new JPanel(new FlowLayout(FlowLayout.RIGHT,5,5));
+		pSouth.add(getInfoCrs());
+		this.add(pSouth,BorderLayout.SOUTH);
+	}
+	
+	private JLabel getJLabel(){
+		JLabel label = new JLabel();
+		label.setText(PluginServices.getText(this, "ultimos_crs_utilizados")+":");
+		return label;
+	}
+	/**
+	 * Inicializa el panel que contiene la tabla con los crs
+	 * @return
+	 */
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane();
+			jScrollPane.setBorder(
+				    BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(3,3,3,3),jScrollPane.getBorder()));
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+	/**
+	 * Inicializa la tabla que contiene los crs
+	 * @return
+	 */
+	public JTable getJTable() {
+		if (jTable == null) {
+			String[] columnNames= {PluginServices.getText(this,"repository"),
+					PluginServices.getText(this,"codigo"),
+					PluginServices.getText(this,"nombre")};
+			Object[][]data = {};			
+			dtm = new DefaultTableModel(data, columnNames)
+			 {
+				private static final long serialVersionUID = 1L;
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}
+				/*
+				 * metodo necesario para cuando utilizamos tablas ordenadas
+				 * ya que sino al ordenar por algun campo no se queda con el orden
+				 * actual al seleccionar una fila (non-Javadoc)
+				 * @see javax.swing.table.TableModel#getColumnClass(int)
+				 */
+				public Class getColumnClass(int column)
+				{
+					return getValueAt(0, column).getClass();
+				}
+				};
+			sorter = new TableSorter(dtm);			
+
+			jTable = new JTable(sorter);
+			sorter.setTableHeader(jTable.getTableHeader());
+			jTable.setCellSelectionEnabled(false);
+			jTable.setRowSelectionAllowed(true);
+			jTable.setColumnSelectionAllowed(false);
+			jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			TableColumn column = null;
+			for (int i = 0; i < 3; i++) {
+			    column = jTable.getColumnModel().getColumn(i);
+			    if (i == 0) {
+			        column.setPreferredWidth(80); //code column is shorter			     	
+			    }else if (i == 2) {
+			    	column.setPreferredWidth(275);
+			    }
+			    else {			    
+			        column.setPreferredWidth(140);
+			    }
+			}	
+		}
+		return jTable;		
+	}
+	
+	/**
+	 * Inicializa el botn que obtiene la informacin del CRS
+	 * @return
+	 */
+	public JButton getInfoCrs() {
+		if(infoCrs == null) {
+			infoCrs = new JButton();
+			infoCrs.setPreferredSize(new Dimension(85,20));
+			infoCrs.setText(PluginServices.getText(this,"infocrs"));
+			infoCrs.setMnemonic('I');
+			infoCrs.setEnabled(false);
+			infoCrs.setToolTipText(PluginServices.getText(this,"more_info"));
+			infoCrs.addActionListener(this);
+		}
+		return infoCrs;
+	}
+	public ICrs getProjection() {		
+		return crs;
+	}
+	
+	public void setCodeCRS(int code) {
+		codeCRS = code;
+	}
+	
+	public int getCodeCRS() {
+		return codeCRS;
+	}
+	
+	public void setProjection(IProjection crs) {
+		//setCrs((ICrs) crs);
+	}
+	
+	/**
+	 * Carga en la tabla los CRSs leidos del sistema de persistencia.
+	 */
+	public void loadRecents(){
+		
+//		 Eliminar filas en cada nueva bsqueda
+		int numRow = dtm.getRowCount();
+		while (numRow != 0) {
+			numRow = numRow - 1;
+			dtm.removeRow(numRow);
+		}
+		
+		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+		crsDataArray = persistence.getArrayOfCrsData();
+		boolean available = true;
+		for (int iRow = crsDataArray.length-1;iRow>=0;iRow--){
+			Object row[] ={crsDataArray[iRow].getAuthority(),Integer.toString(crsDataArray[iRow].getCode()),crsDataArray[iRow].getName()};
+			if (crsDataArray[iRow].getAuthority().equals(PluginServices.getText(this, "USR"))) {
+				available = isUSR(crsDataArray[iRow].getCode());
+			}			
+			if (available) {
+				dtm.addRow(row);
+			} else {
+				available = true;
+			}
+		}
+		
+		/*
+		/*Seleccionar el primer registro.
+		 */
+		int numr = dtm.getRowCount();
+		if (numr != 0 )
+			this.getJTable().setRowSelectionInterval(0,0);
+	}
+	
+	/**
+	 * metodo que nos indica si un crs de usuario esta o no en la base de datos de usuario
+	 * @param code
+	 * @return
+	 */
+	public boolean isUSR(int code) {
+		NewCRSPanel usr = new NewCRSPanel();		
+		return usr.isInBD(code);
+	}
+
+	public ICrs getCrs() {
+		return crs;
+	}
+	
+	public void initCrs(){
+		
+		selectedRowTable = getJTable().getSelectedRow();		        			        	
+    	Integer.parseInt((String)sorter.getValueAt(selectedRowTable,1));
+		setAuthority((String)sorter.getValueAt(selectedRowTable,0)+":"+(String)sorter.getValueAt(selectedRowTable,1));
+    	
+		codeCRS = Integer.parseInt((String)sorter.getValueAt(selectedRowTable,1));
+		try {
+			crs = new CrsFactory().getCRS(getAuthority());
+		} catch (CrsException e) {
+			e.printStackTrace();
+		}
+	}
+	
+	public String getAuthority() {
+		return authority;
+	}
+	
+	public void setAuthority(String aut) {
+		this.authority = aut;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		/*Si el objeto que genera el evento es el JButton 'InfoCrs'
+		se muestra la informacin ralicionada con el Crs seleccionado en la tabla*/
+		if (e.getSource() == this.getInfoCrs()) {
+			String[] aut = getAuthority().split(":");			
+			InfoCRSPanel info = new InfoCRSPanel(aut[0], getCodeCRS());
+			PluginServices.getMDIManager().addWindow(info);
+		}
+		
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/CrsRecentsPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationVistaPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationVistaPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationVistaPanel.java	(revision 25287)
@@ -0,0 +1,468 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.CardLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.ListSelectionModel;
+
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.CRSMainTrPanel;
+import org.gvsig.crs.gui.listeners.TransformationCompuestaPanelListener;
+import org.gvsig.crs.persistence.CompTrData;
+import org.gvsig.crs.persistence.RecentTrsPersistence;
+import org.gvsig.crs.persistence.TrData;
+
+import com.iver.andami.PluginServices;
+
+/**
+ *  Clase que define la transformacion de la vista en una transformacion compuesta
+ *
+ * @author Jose Luis Gomez Martinez (JoseLuis.Gomez@uclm.es)
+ * @author Luisa Marina Fernandez (luisam.fernandez@uclm.es)
+ *
+ */
+public class TransformationVistaPanel extends JPanel implements ActionListener {
+	private static final long serialVersionUID = 1L;
+	private JLabel lblTransVista=null;
+	private JComboBox jComboOptions=null;
+	private JPanel pNorth=null;
+	private JPanel pCenter=null;
+	private TransformationManualPanel manualTrPanel = null;
+	private TransformationEpsgPanel epsgTrPanel = null;
+	private TransformationNadgridsPanel nadsTrPanel = null;
+	private TransformationRecentsPanel recentsTrPanel = null;
+	private JLabel lblCrsView = null;
+	private JLabel lblCrsViewCode = null;
+	
+	String crs_target = null;
+	String crs_source = null;
+	String sourceAbrev = "";
+	String sourceTransformation = null;
+	String targetTransformation = null;
+	CRSMainTrPanel crsMainTrPanel = null;
+	
+	boolean recentCompTransformation = false;
+	
+	/**
+	 * Inicializa this
+	 *
+	 */
+	public TransformationVistaPanel(String target, CRSMainTrPanel p) {
+		super();
+		crsMainTrPanel = p;
+		setCrs_target(target);
+		manualTrPanel = new TransformationManualPanel();
+		epsgTrPanel = new TransformationEpsgPanel(getCrs_target());
+		nadsTrPanel = new TransformationNadgridsPanel(false);
+		recentsTrPanel = new TransformationRecentsPanel();
+						
+		this.setLayout(new BorderLayout());
+		//Aadir al norte el panel que contiene las diferentes opciones de transformacin
+		this.add(getPNorth(),BorderLayout.NORTH);
+		this.add(getPCenter(),BorderLayout.CENTER);
+		
+		setListeners();
+		
+	}
+	
+	public JPanel getPCenter() {
+		if (pCenter == null) {
+			pCenter = new JPanel();
+			pCenter.setLayout(new CardLayout());		
+			
+			pCenter.add("recents", recentsTrPanel);
+			pCenter.add("manual", manualTrPanel);
+			pCenter.add("epsg", epsgTrPanel);
+			pCenter.add("nad", nadsTrPanel);
+		}
+		
+		return pCenter;
+	}
+
+	public JLabel getLblTransVista() {
+		if(lblTransVista==null){
+		lblTransVista=new JLabel(PluginServices.getText(this,"transformacion_vista")+":");
+		}
+		return lblTransVista;
+	}
+	
+	public JLabel getLblCrsVista() {
+		if(lblCrsView==null){
+			lblCrsView=new JLabel(PluginServices.getText(this,"crs_view")+":");
+		}
+		return lblCrsView;
+	}
+	
+	public JLabel getLblCrsVistaCode() {
+		if(lblCrsViewCode==null){
+			lblCrsViewCode=new JLabel();
+		}
+		return lblCrsViewCode;
+	}
+	/**
+	 * Definicion del panel que contiene el Label y el Combo de 
+	 * las transformaciones de la vista
+	 * @return
+	 */
+	public JPanel getPNorth() {
+		if (pNorth==null){
+			pNorth=new JPanel();
+			pNorth.setLayout(new GridLayout(2,1));
+			JPanel p1=new JPanel(new FlowLayout(FlowLayout.LEFT,10,3));
+			p1.add(getLblCrsVista());
+			p1.add(getLblCrsVistaCode());
+			JPanel p2=new JPanel(new FlowLayout(FlowLayout.LEFT,10,3));
+			p2.add(getLblTransVista());
+			p2.add(getJComboOptions());
+			
+			pNorth.add(p1);
+			pNorth.add(p2);
+		}
+		return pNorth;
+	}
+	/**
+	 * Definicin del ComboBox que contiene las diferentes transformaciones 
+	 * aplicables a la vista
+	 * @return
+	 */
+
+	public JComboBox getJComboOptions() {
+		if (jComboOptions == null){
+		String[] selection = {PluginServices.getText(this, "recents_transformation"),
+				PluginServices.getText(this, "transformacion_epsg"),
+					PluginServices.getText(this, "transformacion_manual"), 
+					PluginServices.getText(this, "nadgrids")}; 
+			jComboOptions = new JComboBox(selection);
+			//jComboOptions=new JComboBox();
+			jComboOptions.setPreferredSize(new Dimension(180,25));	
+			jComboOptions.setSelectedIndex(0);
+			jComboOptions.addActionListener(this);
+		}
+		
+		return jComboOptions;
+	}
+	
+	/**
+	 * Mtodo para aplicarle los eventos necesarios en el panel actual. La
+	 * definicin de estos listeners estarn en la clase CRSMainTrPanelListener
+	 *
+	 */
+	private void setListeners(){
+
+		TransformationCompuestaPanelListener listener = new TransformationCompuestaPanelListener(this, crsMainTrPanel);
+		
+		getJComboOptions().addActionListener(listener);
+		getRecentsTrPanel().getJButtonInfo().addActionListener(listener);
+				 
+        ListSelectionModel rowSMEpsgTr = getEpsgTrPanel().getJTable().getSelectionModel();
+		rowSMEpsgTr.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMRecentsTr = getRecentsTrPanel().getJTable().getSelectionModel();
+		rowSMRecentsTr.addListSelectionListener(listener);
+		
+		getNadsTrPanel().getJComboNadFile().addItemListener(listener);
+		
+		getManualTrPanel().getTx_Translation().addKeyListener(listener);
+		getManualTrPanel().getTy_Translation().addKeyListener(listener);
+		getManualTrPanel().getTz_Translation().addKeyListener(listener);
+		getManualTrPanel().getTx_Rotation().addKeyListener(listener);
+		getManualTrPanel().getTy_Rotation().addKeyListener(listener);
+		getManualTrPanel().getTz_Rotation().addKeyListener(listener);
+		getManualTrPanel().getTscale().addKeyListener(listener);
+	}
+
+		
+	public void actionPerformed(ActionEvent e) {
+		//Al cambiar el item seleccionado del combo
+		if(e.getSource().equals(getJComboOptions())){
+			CardLayout cl = (CardLayout)(pCenter.getLayout());
+			if(getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"recents_transformation"))){
+				//Mostrar el panel de transformacin reciente
+				 cl.show(pCenter, "recents");
+			}
+			else if(getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_epsg"))){
+		
+				//mostrar el panel de transformacin epsg
+				 cl.show(pCenter, "epsg");
+			}
+			else if(getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"transformacion_manual"))){
+		
+				
+				//mostrar el panel de transformacin manual
+				 cl.show(pCenter, "manual");
+			}
+			else if(getJComboOptions().getSelectedItem().equals(PluginServices.getText(this,"nadgrids"))){
+			//mostrar el panel de nadgrids
+				 cl.show(pCenter, "nad");
+			}
+		}
+		
+	}
+	
+	public TransformationEpsgPanel getEpsgTrPanel() {
+		return epsgTrPanel;
+	}
+
+	public TransformationManualPanel getManualTrPanel() {
+		return manualTrPanel;
+	}
+
+	public TransformationNadgridsPanel getNadsTrPanel() {
+		return nadsTrPanel;
+	}
+	
+	public TransformationRecentsPanel getRecentsTrPanel() {
+		return recentsTrPanel;
+	}
+	
+	public void setCrs_target(String authTarget) {
+		crs_target = authTarget;
+		getLblCrsVistaCode().setText(authTarget);
+	}
+	
+	public String getCrs_target() {
+		return crs_target;
+	}
+	
+	public void setCrs_source(String authority) {
+		crs_source = authority;
+		setSourceAbrev(authority);
+	}
+	
+	public String getCrs_source() {
+		return crs_source;
+	}
+	
+	public void fillData() {
+		String[] source = getCrs_source().split(":");
+		String[] target = getCrs_target().split(":");
+		recentsTrPanel.loadRecentsCompuesta(getCrs_target());
+		epsgTrPanel.setSourceCompuesta(getCrs_target());		
+		nadsTrPanel.setCode(Integer.parseInt(source[1]));
+		nadsTrPanel.setSourceAbrev(source[0], source[1]);
+		nadsTrPanel.setTargetAbrev(target[0], target[1]);
+		nadsTrPanel.getJComboNadFile().setSelectedIndex(0);
+		manualTrPanel.setCode(Integer.parseInt(source[1]));
+		manualTrPanel.setSourceAbrev(source[0], source[1]);
+		manualTrPanel.setTargetAbrev(target[0], target[1]);
+		getJComboOptions().setSelectedIndex(0);
+		/*
+		 * Se dice que no es una transformacion cogida de las recientes compuestas
+		 * para un correcto funcionamiento de los botones.
+		 */
+		setRecentCompTransformation(false);
+	}
+	
+	public void setSourceAbrev(String fuente){
+		sourceAbrev = fuente;		
+	}
+	
+	public String getSourceAbrev(){
+		return sourceAbrev;
+	}
+	
+	public ICrs getProjection() {
+		ICrs crs;		
+		try {
+			crs = new CrsFactory().getCRS(getSourceAbrev());
+			crs.setTransformationParams(getSourceTransformation(),getTargetTransformation());//nadFile);
+			return crs;
+		} catch (org.gvsig.crs.CrsException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	public void setSourceTransformation(String trans) {
+		sourceTransformation = trans;
+	}
+	
+	public String getSourceTransformation() {
+		return sourceTransformation;
+	}
+	
+	public void setTargetTransformation(String trans) {
+		targetTransformation = trans;
+	}
+	
+	public String getTargetTransformation() {
+		return targetTransformation;
+	}
+	
+	public String getParamsEpsg(String [] values) {
+		String params = "+towgs84=";
+		params += values[0];
+		for(int i = 1; i < values.length; i++)
+			params +=","+values[i];
+		return params;
+	}
+		
+	public String getManualParams() {
+		if(getManualTrPanel().getTx_Translation().getText().equals("")){
+			getManualTrPanel().getTx_Translation().setText("0");
+		}
+		else if (getManualTrPanel().getTy_Translation().getText().equals("")){
+			getManualTrPanel().getTy_Translation().setText("0");
+		}
+		else if (getManualTrPanel().getTz_Translation().getText().equals("")){
+			getManualTrPanel().getTz_Translation().setText("0");
+		}
+		else if (getManualTrPanel().getTx_Rotation().getText().equals("")){
+			getManualTrPanel().getTx_Rotation().setText("0");
+		}
+		else if (getManualTrPanel().getTy_Rotation().getText().equals("")){
+			getManualTrPanel().getTy_Rotation().setText("0");
+		}
+		else if (getManualTrPanel().getTz_Rotation().getText().equals("")){
+			getManualTrPanel().getTz_Rotation().setText("0");
+		}
+		else if (getManualTrPanel().getTscale().getText().equals("")){
+			getManualTrPanel().getTscale().setText("0");
+		}		
+		String param = "+towgs84="+ getManualTrPanel().getTx_Translation().getText()+","+
+						getManualTrPanel().getTy_Translation().getText()+","+
+						getManualTrPanel().getTz_Translation().getText()+","+
+						getManualTrPanel().getTx_Rotation().getText()+","+
+						getManualTrPanel().getTy_Rotation().getText()+","+
+						getManualTrPanel().getTz_Rotation().getText()+","+
+						getManualTrPanel().getTscale().getText() + " ";
+		return param;		
+	}
+	
+	public String getNadsParams(String info) {
+		String[] partes = info.split("\\(");
+		String nadFile = partes[0];		
+		return "+nadgrids="+nadFile;
+	}
+	
+	/**
+	 * cuando utilizamos crs+transformacion, cargamos los paneles para que
+	 * el usuario pueda consultar la transformacion utilizada...
+	 * @param details
+	 */
+	public void fillData(String details) {
+		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+		TrData crsTrDataArray[] = trPersistence.getArrayOfTrData();
+		CompTrData comp = null;
+		
+		for (int iRow = crsTrDataArray.length-1; iRow >= 0; iRow--) {
+			if (details.equals(crsTrDataArray[iRow].getAuthority()+":"+crsTrDataArray[iRow].getCode()+" <--> "+crsTrDataArray[iRow].getDetails()) && crsTrDataArray[iRow].getAuthority().equals(PluginServices.getText(this, "COMP"))) {
+				comp = (CompTrData) crsTrDataArray[iRow];				
+				break;
+			}
+		}
+		if (comp.getSecondTr().getAuthority().equals(PluginServices.getText(this, "EPSG"))) {
+			getJComboOptions().setSelectedIndex(1);
+			int cod =Integer.parseInt(comp.getFirstTr().getCrsSource().split(":")[1]);
+			String code = String.valueOf(comp.getSecondTr().getCode());
+			//getEpsgTrPanel().setSource(PluginServices.getText(this, "EPSG"), cod);
+			for (int i=0; i< getEpsgTrPanel().getJTable().getRowCount(); i++) {
+				if (code.equals((String)getEpsgTrPanel().getJTable().getValueAt(i, 0))) {
+					//seleccionarlo						
+					getEpsgTrPanel().getJTable().setRowSelectionInterval(i,i);
+					break;						
+				}
+			}
+		} else if (comp.getSecondTr().getAuthority().equals(PluginServices.getText(this, "USR"))) {
+			getJComboOptions().setSelectedIndex(2);
+			String data = comp.getSecondTr().getDetails();
+			data = data.trim().substring(1, data.length()-1);
+			String values[] = data.split(",");
+			getManualTrPanel().getTx_Translation().setText(values[0]);
+			getManualTrPanel().getTy_Translation().setText(values[1]);
+			getManualTrPanel().getTz_Translation().setText(values[2]);
+			getManualTrPanel().getTx_Rotation().setText(values[3]);
+			getManualTrPanel().getTy_Rotation().setText(values[4]);
+			getManualTrPanel().getTz_Rotation().setText(values[5]);
+			getManualTrPanel().getTscale().setText(values[6]);
+			
+		} else if (comp.getSecondTr().getAuthority().equals(PluginServices.getText(this, "NADGR"))) {
+			getJComboOptions().setSelectedIndex(3);
+			String data[] = comp.getSecondTr().getDetails().split(" ");
+			String fichero = data[0];
+			String[] authority = data[1].substring(1,data[1].length()-1).split(":");
+			//Mirar como indicarle el CRS al que se le aplica...			
+			getNadsTrPanel().setSourceAbrev(authority[0], authority[1]);
+			
+			for (int i = 0; i< getNadsTrPanel().getJComboNadFile().getItemCount(); i++) {
+				if (fichero.equals((String)getNadsTrPanel().getJComboNadFile().getItemAt(i))) {
+					getNadsTrPanel().getJComboNadFile().setSelectedIndex(i);
+					break;
+				}
+			}			
+		}
+		/*
+		 * Por aquí solo pasa cuando se ha seleccionado una transformación compuesta de recientes.
+		 * Pondremos el valor de que es un crs compuesto reciente a true para que el botón de siguiente
+		 * salga habilitado.
+		 */
+		setRecentCompTransformation(true);
+	}
+	
+	public void setRecentCompTransformation(boolean state) {
+		recentCompTransformation = state;
+	}
+	
+	public boolean getRecentCompTransformation() {
+		return recentCompTransformation;
+	}
+	
+	public void resetData() {
+		fillData();
+	}
+	
+	public boolean isSthSelected() {
+		if (getRecentsTrPanel().selectedRowTable == -1)
+			return false;
+		return true;
+	}
+	
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationVistaPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/IAU2000panel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/IAU2000panel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/IAU2000panel.java	(revision 25287)
@@ -0,0 +1,596 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import javax.swing.BorderFactory;
+import javax.swing.ButtonGroup;
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+import javax.swing.ListSelectionModel;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.ogr.Iau2wkt;
+
+import com.iver.andami.PluginServices;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+import es.idr.teledeteccion.connection.EpsgConnection;
+import es.idr.teledeteccion.connection.Query;
+
+/**
+ * Clase que genera el panel para la bsqueda de CRS del repositorio
+ * de la IAU2000
+ * 
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ * @author Luisa Marina Fernndez (luisam.fernandez@uclm.es)
+ *
+ */
+public class IAU2000panel extends JPanel implements KeyListener, ActionListener {
+
+	private static final long serialVersionUID = 1L;
+	public JPanel IAU2000panel = null;
+	
+	private JRadioButton codeRadioButton = null;
+	private JRadioButton nameRadioButton = null;	
+	private JPanel groupRadioButton = null;
+	private JButton infoCrs=null;
+	
+	JLabel jLabel = null;
+	private JLabel lblCriterio=null;
+	JTextField crsTextFld = null;	
+	
+	String cadWKT = "";
+	
+	int transf = 0;	
+	boolean source_yn = false;
+	int source_cod = 0;
+	int method_code = 0;
+	int datum_code = 0;
+	int projection_conv_code = 0;
+	public String crs_kind = null;
+
+	public TableSorter sorter = null;
+	
+	public EpsgConnection connect = null;
+	
+
+	private JButton searchButton = null;
+	private JTextField searchTextField = null;
+	public JTable jTable = null;
+	private JScrollPane jScrollPane = null;
+	public DefaultTableModel dtm = null;
+	
+	public String key;
+	public int selectedRowTable = -1;	
+	private int codeCRS = -1;	
+	
+	public IAU2000panel() {		
+		initialize();
+	}
+	/*
+	 * Establece las propiedades y los componentes del panel de la IAU2000
+	 */
+	private void initialize(){
+		this.setLayout(new BorderLayout());
+		JPanel pNorth=new JPanel();
+		JPanel pInNorth=new JPanel();
+		JPanel pSouth=new JPanel();
+		//Agregar las opciones de bsqueda
+		pInNorth.setLayout(new FlowLayout(FlowLayout.CENTER,10,1));
+		pInNorth.add(getSearchButton());
+		pInNorth.add(getSearchTextField());
+		
+		pNorth.setLayout(new GridLayout(0,1));
+		pNorth.add(getGroupRadioButton());
+		pNorth.add(pInNorth);
+		
+		pSouth.setLayout(new FlowLayout(FlowLayout.RIGHT,5,5));
+		pSouth.add(getInfoCrs());
+		//Agregar estos elementos al panel principal
+		this.add(pNorth,BorderLayout.NORTH);
+		this.add(getJScrollPane(),BorderLayout.CENTER);
+		this.add(pSouth,BorderLayout.SOUTH);
+	}
+	
+	public void connection(){
+		connect = new EpsgConnection();
+		connect.setConnectionIAU2000();
+		
+	}
+	/**
+	 * Inicializa el Radio Button 'Cdigo' 
+	 * @return
+	 */
+	private JRadioButton getCodeRadioButton() {
+		if (codeRadioButton == null) {
+			codeRadioButton = new JRadioButton();
+			codeRadioButton.setText(PluginServices.getText(this,"por_codigo"));//setText("By Code EPSG");
+			codeRadioButton.setSelected(true);
+			codeRadioButton.addActionListener(this);
+		}
+		return codeRadioButton;
+	}
+	/**
+	 * Inicializa el Radio Button  'Nombre'
+	 * @return
+	 */
+	private JRadioButton getNameRadioButton() {
+		if (nameRadioButton == null) {
+			nameRadioButton = new JRadioButton();
+			nameRadioButton.setText(PluginServices.getText(this,"por_nombre"));
+			nameRadioButton.addActionListener(this);
+		}
+		return nameRadioButton;
+	}
+	/**
+	 * Agrega todos los Radio Buttons a un panel
+	 * @return
+	 */
+	private JPanel getGroupRadioButton() {
+		if (groupRadioButton == null) {
+			groupRadioButton = new JPanel();
+			groupRadioButton.setLayout(new GridLayout(1,0));
+			groupRadioButton.setPreferredSize(new Dimension(500,30));
+			groupRadioButton.add(getLblCriterio());
+			groupRadioButton.add(getCodeRadioButton());
+			groupRadioButton.add(getNameRadioButton());	
+			//Agrupar los Radio Buttons
+			ButtonGroup group=new ButtonGroup();
+			group.add(getCodeRadioButton());
+			group.add(getNameRadioButton());
+		}
+		return groupRadioButton;
+	}
+	/**
+	 * Inicializa el Label que nombra el Criterio de Bsqueda
+	 * @return
+	 */
+	private JLabel getLblCriterio(){
+		if(lblCriterio==null){
+			lblCriterio = new JLabel();
+			lblCriterio.setPreferredSize(new Dimension(100, 20));
+			lblCriterio.setText(PluginServices.getText(this, "criterio_busqueda"));
+		}
+		return lblCriterio;
+	}
+	
+	/**
+	 * Mtodo que controla la bsqueda de CRS del repositorio de IAU2000.
+	 * Tambien maneja los errores en caso de que los parmetros de bsqueda
+	 * sean errneos, o que no se encuentren resultados.
+	 *
+	 */
+	private void searchButton() {		
+		searchTextField.setBackground(Color.white);
+		boolean not_numeric = false;
+		
+		if (searchTextField.getText().equals("")) {
+			searchTextField.setBackground(new Color(255,204,204));
+			JOptionPane.showMessageDialog(this, PluginServices.getText(this,"fill_name"), "Warning...", JOptionPane.WARNING_MESSAGE);
+		}
+		
+		else {
+            //Eliminar filas en cada nueva bsqueda
+			int numRow = dtm.getRowCount();
+			while (numRow != 0) {
+				numRow = numRow - 1;
+				dtm.removeRow(numRow);
+			}
+			
+			if (codeRadioButton.isSelected() && (searchTextField.getText().length()!=searchTextField.getText().replaceAll("[^0-9]", "").length())){
+				not_numeric = true;
+			}
+			
+			//Dependiendo de la opcion se realizada una busqueda
+			ResultSet result = null;
+								  			
+			if (codeRadioButton.isSelected() && !not_numeric) {
+					
+				key = searchTextField.getText();
+				int code = Integer.parseInt(key);
+				String sentence = "SELECT iau_code, iau_wkt, iau_proj, iau_geog, iau_datum " +							 
+								  "FROM IAU2000 " +	                              
+	                              "WHERE iau_code = " + code;
+								
+				result = Query.select(sentence,connect.getConnection());	
+				
+				
+				Object[] data = new Object[4];
+				try {
+					while (result.next()){
+						data[0]	= result.getString("iau_code");
+						data[1] = result.getString("iau_wkt");
+						String proj = result.getString("iau_proj");
+						if (!proj.equals("")){
+							data[1] = proj;
+							data[2] = PluginServices.getText(this,"si");
+						} 
+						else 
+						{
+							data[1] = result.getString("iau_geog");
+							data[2] = PluginServices.getText(this,"no");
+						}
+						
+						data[3] = result.getString("iau_datum");
+						dtm.addRow(data);
+					}
+				} catch (SQLException e1) {
+					e1.printStackTrace();
+				}
+			}
+			else if (nameRadioButton.isSelected()) {
+				key = searchTextField.getText();
+				key = key.toLowerCase();
+				String key2 = key.substring(0,1);
+				String key3 = key.substring(1,key.length());
+				key2 = key2.toUpperCase();
+				
+				String sentence = "SELECT iau_code, iau_wkt, iau_proj, iau_geog, iau_datum " +							 
+					"FROM IAU2000 " +	                              
+					"WHERE (iau_proj LIKE '%" + key + "%') OR (iau_proj LIKE '%"+ 
+					key.toUpperCase() +"%') " +
+					"OR (iau_proj LIKE '%" + key2+key3 +"%') OR " +
+							"(iau_geog LIKE '%" + key + "%') OR (iau_geog LIKE '%"+ 
+					key.toUpperCase() +"%') " +
+					"OR (iau_geog LIKE '%" + key2+key3 +"%')";
+								
+				result = Query.select(sentence,connect.getConnection());	
+								
+				Object[] data = new Object[4];
+				try {
+					while (result.next()){
+						data[0]	= result.getString("iau_code");
+						data[1] = result.getString("iau_wkt");
+						String proj = result.getString("iau_proj");
+						if (!proj.equals("")){
+							data[1] = proj;
+							data[2] = PluginServices.getText(this,"si");
+						} 
+						else 
+						{
+							data[1] = result.getString("iau_geog");
+							data[2] = PluginServices.getText(this,"no");
+						}
+						
+						data[3] = result.getString("iau_datum");
+						dtm.addRow(data);
+					}
+				} catch (SQLException e1) {
+					e1.printStackTrace();
+				}
+			}
+						
+			int numr = dtm.getRowCount();
+			if (not_numeric) {
+				JOptionPane.showMessageDialog(IAU2000panel.this, 
+						PluginServices.getText(this,"numeric_format"), 
+						"Warning...", JOptionPane.WARNING_MESSAGE);
+				searchTextField.setText("");
+			}
+			else if (numr == 0){
+			JOptionPane.showMessageDialog(this, PluginServices.getText(this,"no_results"), "Warning...",
+					JOptionPane.WARNING_MESSAGE);
+			}
+			else{
+				this.getJTable().setRowSelectionInterval(0,0);				
+			}
+		}		
+	}	
+		
+	private JButton getSearchButton() {
+		if (searchButton == null) {
+			searchButton = new JButton();
+			searchButton.setPreferredSize(new Dimension(75,20));
+			searchButton.setText(PluginServices.getText(this,"buscar"));
+			searchButton.setMnemonic('S');
+			searchButton.setToolTipText(PluginServices.getText(this,"buscar_por_criterio_seleccion"));
+			searchButton.addActionListener(this);			
+		}
+		return searchButton;
+	}	
+	
+	/**
+	 * Inicializa el botn que obtiene la informacin del CRS
+	 * @return
+	 */
+	public JButton getInfoCrs() {
+		if(infoCrs == null) {
+			infoCrs = new JButton();
+			infoCrs.setPreferredSize(new Dimension(85,20));
+			infoCrs.setText(PluginServices.getText(this,"infocrs"));
+			infoCrs.setMnemonic('I');
+			infoCrs.setEnabled(false);
+			infoCrs.setToolTipText(PluginServices.getText(this,"more_info"));
+			infoCrs.addActionListener(this);
+		}
+		return infoCrs;
+	}
+	private JTextField getSearchTextField() {
+		if (searchTextField == null) {
+			searchTextField = new JTextField();
+			searchTextField.setPreferredSize(new Dimension(300,20));
+			searchTextField.addKeyListener(this);
+		}		
+		return searchTextField;
+	}
+	
+	public JTable getJTable() {
+		if (jTable == null) {
+			String[] columnNames= {PluginServices.getText(this,"codigo"),
+					PluginServices.getText(this,"nombre"),
+					PluginServices.getText(this,"projected"),
+					PluginServices.getText(this,"datum")};
+			Object[][]data = {};			
+			dtm = new DefaultTableModel(data, columnNames)
+			 {
+				private static final long serialVersionUID = 1L;
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}
+				/*
+				 * metodo necesario para cuando utilizamos tablas ordenadas
+				 * ya que sino al ordenar por algun campo no se queda con el orden
+				 * actual al seleccionar una fila (non-Javadoc)
+				 * @see javax.swing.table.TableModel#getColumnClass(int)
+				 */
+				public Class getColumnClass(int column)
+				{
+					return getValueAt(0, column).getClass();
+				}
+				};
+			sorter = new TableSorter(dtm);			
+
+			jTable = new JTable(sorter);
+			sorter.setTableHeader(jTable.getTableHeader());			
+			jTable.setCellSelectionEnabled(false);
+			jTable.setRowSelectionAllowed(true);
+			jTable.setColumnSelectionAllowed(false);
+			jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			TableColumn column = null;
+			for (int i = 0; i < columnNames.length; i++) {
+			    column = jTable.getColumnModel().getColumn(i);
+			    if (i == 0) {
+			        column.setPreferredWidth(80); //code column is shorter			     	
+			    }else if (i ==2) {
+			    	column.setPreferredWidth(50);
+			    } else {
+			    	column.setPreferredWidth(175);
+			    }
+			    
+			}			
+	}
+		return jTable;
+		
+	}
+	
+	public void setCodeCRS(int code) {
+		codeCRS = code;
+	}
+	
+	public int getCodeCRS() {
+		return codeCRS;
+	}	
+	
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane();
+			jScrollPane.setPreferredSize(new Dimension(500,150));
+			/*jScrollPane.setBorder(
+				    BorderFactory.createCompoundBorder(
+					BorderFactory.createCompoundBorder(
+							BorderFactory.createTitledBorder(PluginServices.getText(this,"IAU2000")),
+							BorderFactory.createEmptyBorder(5,5,5,5)),
+							jScrollPane.getBorder()));*/
+			jScrollPane.setBorder(
+				    BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(3,3,3,3),jScrollPane.getBorder()));
+			
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+	
+	public ICrs getProjection() {
+		try {
+			String txt = getWKT();			
+			//ICrs crs = new CrsFactory().getCRS("IAU2000:"+getCodeCRS(), txt); 
+			ICrs crs = new CrsFactory().getCRS("IAU2000:"+getCodeCRS());
+			return crs ;
+		} catch (CrsException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	/**
+	 * Consigue la cadena wkt del CRS seleccionado, y genera la cadena que ms
+	 * tarde volver a ser tratada para la consecucin de una cadena wkt
+	 * legible por la proj4.
+	 *
+	 */
+	public void setWKT(){
+		int code = getCodeCRS();
+		String sentence = "SELECT iau_wkt " +							 
+						  "FROM IAU2000 " +	                              
+                          "WHERE iau_code = " + code;
+		
+		
+		ResultSet result = Query.select(sentence,connect.getConnection());	
+	
+		try {
+			result.next();			
+			cadWKT = result.getString("iau_wkt");			
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}		
+		cadWKT = cadWKT.substring(0, cadWKT.length()-1) + ", AUTHORITY[\"IAU2000\","+ getCodeCRS()+"]]";
+		if (cadWKT.charAt(0) == 'P'){
+			Iau2wkt wk = new Iau2wkt(cadWKT);
+			cadWKT = wk.getWkt();
+		}
+	}
+	
+	public String getWKT(){
+		return cadWKT;
+	}
+	
+	public void setProjection(IProjection crs) {
+		//setCrs((ICrs) crs);
+	}
+	
+	/**
+	 * Metodo para cargar en el CRS de la capa el CRS de la vista.
+	 * Se utilizar a la hora de arrancar la definicin del CRS de la nueva capa
+	 */
+	public void loadViewCRS(int code){
+		connection();		
+		String sentence = "SELECT iau_code, iau_wkt, iau_proj, iau_geog, iau_datum " +							 
+						  "FROM IAU2000 " +	                              
+                          "WHERE iau_code = " + code;
+				
+		ResultSet result = Query.select(sentence,connect.getConnection());	
+				
+		Object[] data = new Object[4];
+		try {
+			while (result.next()){
+				data[0]	= result.getString("iau_code");
+				data[1] = result.getString("iau_wkt");
+				String proj = result.getString("iau_proj");
+				if (!proj.equals("")){
+					data[1] = proj;
+					data[2] = PluginServices.getText(this,"si");
+				} 
+				else 
+				{
+					data[1] = result.getString("iau_geog");
+					data[2] = PluginServices.getText(this,"no");
+				}
+				
+				data[3] = result.getString("iau_datum");
+				dtm.addRow(data);
+			}
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}
+	}
+
+	public void keyPressed(KeyEvent e) {
+		if (e.getSource() == this.getSearchTextField()){
+			if (e.getKeyCode() == 10) {
+				searchTextField.setBackground(Color.white);
+				if (searchTextField.getText().equals("")) {
+					searchTextField.setBackground(new Color(255,204,204));
+					JOptionPane.showMessageDialog(IAU2000panel.this, 
+							PluginServices.getText(this,"fill_name"), 
+							"Warning...", JOptionPane.WARNING_MESSAGE);
+				}
+				else {
+					searchButton();
+				}
+			}			
+		}		
+	}
+
+	public void keyReleased(KeyEvent arg0) {
+	
+	}
+
+	public void keyTyped(KeyEvent arg0) {
+	
+	}
+
+	/**
+	 * Maneja los eventos de los botones y los radioButtons del panel
+	 * del repositorio IAU2000.
+	 */
+	public void actionPerformed(ActionEvent e) {
+		if (e.getSource() == this.getSearchButton()){
+			searchTextField.setBackground(Color.white);
+			if (searchTextField.getText().equals("")) {
+				searchTextField.setBackground(new Color(255,204,204));
+				JOptionPane.showMessageDialog(IAU2000panel.this, 
+						PluginServices.getText(this,"fill_name"), 
+						"Warning...", JOptionPane.WARNING_MESSAGE);
+			}
+			else {
+				searchButton();
+			}
+		}
+		if (e.getSource() == this.getCodeRadioButton()) {
+			searchTextField.setText("");
+		}
+		
+		if (e.getSource() == this.getNameRadioButton()) {
+			searchTextField.setText("");
+		
+		}	
+		
+		/*Si el objeto que genera el evento es el JButton 'InfoCrs'
+		se muestra la informacin ralicionada con el Crs seleccionado en la tabla*/
+		if (e.getSource() == this.getInfoCrs()) {
+			InfoCRSPanel info = new InfoCRSPanel("IAU2000", getCodeCRS());
+			PluginServices.getMDIManager().addWindow(info);
+		}
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/IAU2000panel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/USGSpanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/USGSpanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/USGSpanel.java	(revision 25287)
@@ -0,0 +1,10 @@
+package org.gvsig.crs.gui.panels;
+
+public class USGSpanel {
+
+	public USGSpanel() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/USGSpanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationNadgridsPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationNadgridsPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationNadgridsPanel.java	(revision 25287)
@@ -0,0 +1,625 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.RandomAccessFile;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JFileChooser;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JTextArea;
+import javax.swing.border.EmptyBorder;
+import javax.swing.filechooser.FileFilter;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.CrsWkt;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+import org.gvsig.crs.persistence.RecentTrsPersistence;
+import org.gvsig.crs.persistence.TrData;
+
+import au.com.objectix.jgridshift.GridShiftFile;
+import au.com.objectix.jgridshift.SubGrid;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+import com.iver.utiles.XMLEntity;
+
+/**
+ * Clase para generar el panel de la tranformacin nadgrids y su
+ * manejo
+ * 
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ * @author Luisa Marina Fernndez (luisam.fernandez@uclm.es)
+ *
+ */
+public class TransformationNadgridsPanel extends JPanel implements IWindow, ActionListener {
+	
+	private static final long serialVersionUID = 1L;
+	
+	private JPanel groupRadioButton = null;
+	private JLabel jLabelChooser = null;
+	private JRadioButton jRadioButtonSource = null;
+	private JRadioButton jRadioButtonTarget = null;
+	
+	private IProjection firstProj;
+	private String nadFile = null;
+	String[] targetAuthority;
+	String targetAbrev = "";
+	String sourceAbrev = "";
+	
+	private String cadWKT = "";
+	private String dataPath = "./gvSIG/extensiones/org.gvsig.crs/data/";
+	private int codeEpsg;
+	
+	private JPanel jPanelOpen;
+	private JPanel jPanelSelectNad;
+	private JLabel jLabelOpenGsb;
+	private JFileChooser openFileChooser;
+	private JButton jButtonOpen;
+	private TreePanel treePanel = null;
+	private JComboBox jComboNadFile = null;
+	private JLabel jLabelSelectNad = null;
+	
+	
+	private JTextArea jTextAreaInfo;
+	
+	private PluginServices ps = null;
+	private XMLEntity xml = null;
+	
+	boolean targetNad = false;
+	boolean setRadioButtons = false;
+
+	public TransformationNadgridsPanel(boolean optional) {
+		ps = PluginServices.getPluginServices("org.gvsig.crs"); 
+		xml = ps.getPersistentXML();
+		setRadioButtons = optional;
+		initialize();
+	}
+		
+	private void initialize(){
+		
+		this.setLayout(new BorderLayout());
+		this.setBorder(BorderFactory.createCompoundBorder(
+				BorderFactory.createTitledBorder("+ "+PluginServices.getText(this,"nadgrids")),
+				BorderFactory.createEmptyBorder(5,5,5,5)));
+		JPanel pNorth=new JPanel();
+		pNorth.setBorder(new EmptyBorder(1,10,1,10));
+		pNorth.setLayout(new GridLayout(4,1));
+		
+		pNorth.add(getJPanelOpen());
+		//label+combo
+		pNorth.add(getJPanelSelectNad());
+		JPanel lbl=new JPanel(new FlowLayout(FlowLayout.LEFT,0,10));
+		lbl.add(getJLabelChooser());
+		if (setRadioButtons) {
+			pNorth.add(lbl);
+			//dos radio buttons
+			pNorth.add(getGroupRadioButton());
+		}
+		this.add(pNorth,BorderLayout.NORTH);
+		this.add(getTreePanel(),BorderLayout.CENTER);
+		
+	}
+	
+	private JPanel getGroupRadioButton() {
+		if (groupRadioButton == null) {
+			groupRadioButton = new JPanel();
+			groupRadioButton.setLayout(new GridLayout(1,0));	
+			groupRadioButton.add(getJRadioButtonSource());
+			groupRadioButton.add(getJRadioButtonTarget());			
+		}
+		return groupRadioButton;
+	}
+	
+	private JRadioButton getJRadioButtonSource() {
+		if (jRadioButtonSource == null) {
+			jRadioButtonSource = new JRadioButton();			
+			jRadioButtonSource.setSelected(true);
+			jRadioButtonSource.addActionListener(this);
+		}
+		jRadioButtonSource.setText(PluginServices.getText(this,"aplicar_capa") + " " + "("+getSourceAbrev()+")" );
+		return jRadioButtonSource;
+	}
+	
+	
+	private JRadioButton getJRadioButtonTarget() {		
+		if (jRadioButtonTarget == null) {
+			jRadioButtonTarget = new JRadioButton();			
+			jRadioButtonTarget.setSelected(false);
+			jRadioButtonTarget.addActionListener(this);
+		}
+		jRadioButtonTarget.setText(PluginServices.getText(this,"aplicar_vista") + " " + "("+ getTargetAbrev()+")");
+		return jRadioButtonTarget;
+	}	
+	
+	private JLabel getJLabelChooser(){
+		jLabelChooser = new JLabel();
+		jLabelChooser.setText(PluginServices.getText(this, "seleccion_nadgrids")+":");
+		return jLabelChooser;
+	}
+		
+		
+	private JPanel getJPanelOpen() {
+		if(jPanelOpen == null) {
+			jPanelOpen = new JPanel();
+			jPanelOpen.setLayout(new FlowLayout(FlowLayout.LEFT,5,5));
+			jPanelOpen.add(getJLabelOpenGsb(), null);
+			jPanelOpen.add(getJButtonOpen(), null);			
+		}
+		return jPanelOpen;
+	}
+	
+	private JLabel getJLabelOpenGsb() {
+		if(jLabelOpenGsb == null) {
+			jLabelOpenGsb = new JLabel();
+			jLabelOpenGsb.setPreferredSize(new Dimension(130,20));
+			jLabelOpenGsb.setText(PluginServices.getText(this,"importarRejilla"));
+		}
+		return jLabelOpenGsb;
+	}
+	
+	private JFileChooser getOpenFileChooser(){
+		if(openFileChooser == null){
+			openFileChooser = new JFileChooser();			
+			openFileChooser.setEnabled(false);
+			openFileChooser.addChoosableFileFilter(new FiltroNadgrids());
+		}
+		return openFileChooser;
+	}
+
+	private JButton getJButtonOpen() {
+		if(jButtonOpen == null) {
+			jButtonOpen = new JButton();
+			jButtonOpen.setText("");
+			jButtonOpen.setPreferredSize(new Dimension(20,20));
+			jButtonOpen.setText("...");
+			jButtonOpen.addActionListener(this);
+		}
+		return jButtonOpen;
+	}
+	
+	public ICrs getProjection() {
+		ICrs crs;
+		if (jRadioButtonSource.isSelected()){
+			try {
+				setNad(false);
+				//crs = new CrsFactory().getCRS(getSourceAbrev(),	getWKT());
+				crs = new CrsFactory().getCRS(getSourceAbrev());
+				crs.setTransformationParams("+nadgrids="+getNadFile(),null);//nadFile);
+				return crs;
+			} catch (org.gvsig.crs.CrsException e) {
+				e.printStackTrace();
+			}
+			return null;
+		}
+		else {	
+			setNad(true);
+			try {
+				//crs = new CrsFactory().getCRS(getSourceAbrev(), getWKT());
+				crs = new CrsFactory().getCRS(getSourceAbrev());
+				crs.setTransformationParams(null,"+nadgrids="+getNadFile());//nadFile);
+				//crs.setParamsInTarget(true);
+				
+				return crs;
+			} catch (CrsException e) {				
+				e.printStackTrace();
+			}
+			return null;
+		}		
+	}
+	
+	public void setProjection(IProjection proj) {
+		firstProj = proj;
+	}
+	
+	public void setNad(boolean nadg){
+		targetNad = nadg;		
+	}
+	
+	public boolean getNad(){
+		return targetNad;		
+	}
+	
+	public void setCode(int cod){
+		codeEpsg = cod;
+	}
+	
+	public int getCode(){
+		return codeEpsg;
+	}
+	
+	public void setWKT(String cad){
+		cadWKT = cad;
+		CrsWkt parser = new CrsWkt(cad);
+		//setSourceAbrev(parser.getAuthority()[0], parser.getAuthority()[1]);
+		//getJTextAreaInfo();
+		//getJRadioButtonSource();
+	}
+	
+	public String getWKT(){
+		return cadWKT;
+	}
+	
+	public void setTargetAuthority(String[] authority){
+		targetAuthority = authority;
+		setTargetAbrev(targetAuthority[0], targetAuthority[1]);
+		getJRadioButtonTarget();		
+	}
+	
+	public String[] getTargetAuthority(){
+		return targetAuthority;
+	}
+	
+	public void setTargetAbrev(String fuente, String codigo){
+		targetAbrev = fuente + ":" + codigo;
+	}
+	
+	public String getTargetAbrev() {
+		return targetAbrev;
+	}
+	
+	public void setSourceAbrev(String fuente, String codigo){
+		sourceAbrev = fuente + ":" + codigo;
+		getJRadioButtonSource();
+	}
+	
+	public String getSourceAbrev(){
+		return sourceAbrev;
+	}
+
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle(PluginServices.getText(this,"nadgrids"));
+		return m_viewinfo;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		if (e.getSource() == this.getJRadioButtonSource()){
+			jRadioButtonSource.setSelected(true);
+			jRadioButtonTarget.setSelected(false);
+		}
+		
+		if (e.getSource() == this.getJRadioButtonTarget()){
+			jRadioButtonTarget.setSelected(true);
+			jRadioButtonSource.setSelected(false);
+		}
+		
+		if (e.getSource() == this.getJButtonOpen()){
+			jPanelOpen.add(getOpenFileChooser(), null);
+			//openChooser.setCurrentDirectory(f);
+			int returnVal = openFileChooser.showOpenDialog(TransformationNadgridsPanel.this);
+	        if (returnVal == JFileChooser.APPROVE_OPTION) {
+	            File inFile = openFileChooser.getSelectedFile();
+	            //jTextOpen.setText(file.getAbsolutePath());
+
+	            String fileName = inFile.getName();
+	            
+	            //Comprobar que el fichero existe y tiene formato valido
+	    		RandomAccessFile raFile = null;
+	    		try {
+	    			raFile = new RandomAccessFile(inFile.getAbsolutePath(),"r");
+	    		} catch (FileNotFoundException ex) {
+	    			ex.printStackTrace();
+	    			getJComboNadFile().setSelectedIndex(0);
+	    			getTreePanel().setRoot(PluginServices.getText(this,"nadfile_not_found"));
+	    			setNadFile(null);//nadFile = null;
+	    			return;
+	    		}
+	    		GridShiftFile gsf = new GridShiftFile();
+	    		try {
+	    			gsf.loadGridShiftFile(raFile);
+	    		} catch (IOException ex) {
+	    			ex.printStackTrace();
+	    			getJComboNadFile().setSelectedIndex(0);
+	    			getTreePanel().setRoot(PluginServices.getText(this,"nadfile_bad_format"));
+	    			setNadFile(null);//nadFile = null;
+	    			return;
+	    		}catch (java.lang.Exception ex) {
+	    			ex.printStackTrace();
+	    			getJComboNadFile().setSelectedIndex(0);
+	    			getTreePanel().setRoot(PluginServices.getText(this,"nadfile_bad_format"));
+	    			setNadFile(null);//nadFile = null;
+	    			return;
+	    		}
+	            
+	            //Copiar el fichero seleccionado al directorio data de la extensin:
+	            
+	    		File outFile = new File(dataPath+fileName);
+	    		InputStream in = null;
+	    		OutputStream out = null;
+	    		try {
+	    			in = new FileInputStream(inFile);
+	    			out = new FileOutputStream(outFile);
+	    		} catch (FileNotFoundException ex) {
+	    			ex.printStackTrace();
+	    		}
+	    		byte[] buf = new byte[1024];
+	    		int len;
+	    		try {
+	    			while ((len = in.read(buf)) > 0) {
+	    				out.write(buf, 0, len);
+	    			}
+	    			in.close();
+	    			out.close();
+	    		} catch (IOException ex) {
+	    			ex.printStackTrace();
+	    		}
+	    		
+	    		//Incluir el fichero importado en el combo y seleccionarlo
+	    		boolean exists = false;
+	    		for (int item=0; item<getJComboNadFile().getItemCount() && !exists;item++)
+	    			if (getJComboNadFile().getItemAt(item).equals(fileName))
+	    				exists = true;
+	    		if(!exists)
+		    		getJComboNadFile().addItem(fileName);
+	    		getJComboNadFile().setSelectedItem(fileName);
+	    		setNadFile(fileName);//nadFile = fileName;
+	        }
+		}
+	}
+
+	public TreePanel getTreePanel() {
+		if (treePanel == null){
+			treePanel = new TreePanel(PluginServices.getText(this,"grids_en")+": "+nadFile);
+			treePanel.getTree().expandRow(0);
+			treePanel.setPanelSize(530,150);
+		}
+		return treePanel;
+	}
+	
+	public void initializeTree(){
+		// leer el fichero nadgrids
+		RandomAccessFile raFile = null;
+		try {
+			raFile = new RandomAccessFile("./gvSIG/extensiones/org.gvsig.crs/data/"+nadFile,"r");
+		} catch (FileNotFoundException e) {
+			e.printStackTrace();
+			getTreePanel().setRoot(PluginServices.getText(this,"nadfile_not_found"));
+			setNadFile(null);//nadFile = null;
+			return;
+		}
+		GridShiftFile gsf = new GridShiftFile();
+		try {
+			gsf.loadGridShiftFile(raFile);
+		} catch (IOException e) {
+			e.printStackTrace();
+			getTreePanel().setRoot(PluginServices.getText(this,"nadfile_bad_format"));
+			setNadFile(null);//nadFile = null;
+			return;
+		}catch (java.lang.Exception e) {
+			e.printStackTrace();
+			getTreePanel().setRoot(PluginServices.getText(this,"nadfile_bad_format"));
+			setNadFile(null);//nadFile = null;
+			return;
+		}
+		
+		SubGrid subGrid[] = gsf.getSubGridTree(); 
+		
+		for (int i=0;i<subGrid.length;i++){
+			getTreePanel().addClass(subGrid[i].getSubGridName(),i);
+			getTreePanel().addEntry(PluginServices.getText(this,"long_min")+": "+String.valueOf(subGrid[i].getMaxLon()/-3600)+"",subGrid[i].getSubGridName(), "");
+			getTreePanel().addEntry(PluginServices.getText(this,"lat_min")+": "+String.valueOf(subGrid[i].getMinLat()/3600)+"?",subGrid[i].getSubGridName(), "");
+			getTreePanel().addEntry(PluginServices.getText(this,"long_max")+": "+String.valueOf(subGrid[i].getMinLon()/-3600+"?"),subGrid[i].getSubGridName(), "");
+			getTreePanel().addEntry(PluginServices.getText(this,"lat_max")+": "+String.valueOf(subGrid[i].getMaxLat()/3600+""),subGrid[i].getSubGridName(), "");
+			getTreePanel().addEntry(PluginServices.getText(this,"node_count")+": "+String.valueOf(subGrid[i].getNodeCount()),subGrid[i].getSubGridName(), "");
+			getTreePanel().addEntry(PluginServices.getText(this,"detalles")+": "+String.valueOf(subGrid[i].getDetails()),subGrid[i].getSubGridName(), "");
+		}
+		getTreePanel().getTree().expandRow(0);
+		getTreePanel().getList().setText(PluginServices.getText(this,"advertencia_nad"));
+	}
+
+	public JComboBox getJComboNadFile() {
+		if (jComboNadFile == null){
+			jComboNadFile = new JComboBox();
+			jComboNadFile.setPreferredSize(new Dimension(200,25));
+			jComboNadFile.setEditable(false);
+			jComboNadFile.addItem(PluginServices.getText(this,"seleccionar")+"...");
+			//Aadir los al combo los nombres de los .gsb que hay en el directorio data
+			File dataDir = new File(dataPath);
+			for (int i = 0; i<dataDir.list().length;i++)
+				if (dataDir.list()[i].substring(dataDir.list()[i].lastIndexOf('.')+1).equals("gsb")){
+					jComboNadFile.addItem(dataDir.list()[i]);
+				}
+			if (getNadFile() != null)//nadFile != null)
+				jComboNadFile.setSelectedItem(getNadFile());//nadFile);
+						
+		}
+		return jComboNadFile;
+	}
+
+	public JLabel getJLabelSelectNad() {
+		if (jLabelSelectNad == null){
+			jLabelSelectNad = new JLabel(PluginServices.getText(this,"seleccionarRejilla")+":  ");
+			jLabelSelectNad.setPreferredSize(new Dimension(130,25));
+		}
+		return jLabelSelectNad;
+	}
+
+	public JPanel getJPanelSelectNad() {
+		if (jPanelSelectNad == null){
+			jPanelSelectNad = new JPanel();
+			jPanelSelectNad.setLayout(new FlowLayout(FlowLayout.LEFT,5,5));		
+			jPanelSelectNad.add(getJLabelSelectNad());
+			jPanelSelectNad.add(getJComboNadFile());
+		}
+		return jPanelSelectNad;
+	}
+	
+	public void setNadFile(String nad){
+		nadFile = nad;
+	}
+	
+	public String getNadFile(){
+		return nadFile;
+	}	
+	
+	/**
+	 * Guarda el nombre del fichero nadgrids mediante el modelo de persistencia
+	 * de Andami
+	 * @param name Nombre del fichero nadgrids
+	 */
+	public void saveNadFileName(String name){
+		ps = PluginServices.getPluginServices("org.gvsig.crs"); 
+		xml = ps.getPersistentXML();
+		
+		for (int child = 0; child<xml.getChildrenCount();child++)
+			if (xml.getChild(child).getPropertyName(0).equals("nadFile"))
+				xml.removeChild(child);
+		
+		
+		XMLEntity xmlEnt = new XMLEntity();
+		xmlEnt.putProperty("nadFile",name);
+		xml.addChild(xmlEnt);
+		ps.setPersistentXML(xml);
+	}
+	
+	/**
+	 * Obtiene el nombre del fichero nadgrids guardado mediante el
+	 * modelo de persistencia de Andami.
+	 * 
+	 * @return nombre del fichero nadgrids o null si no ha sido guardado.
+	 */
+	private String restoreNadFileName(){
+		String fileName;
+		for (int child = 0; child<xml.getChildrenCount();child++)
+			if (xml.getChild(child).getPropertyName(0).equals("nadFile")){
+				fileName = xml.getChild(child).getPropertyValue(0);
+				File dataDir = new File(dataPath);
+				for (int i = 0; i<dataDir.list().length;i++)
+					if (dataDir.list()[i].equals(fileName)){
+						return fileName;
+					}
+			}
+		
+		return null;
+	}
+	
+	/**
+	 * cuando utilizamos crs+transformacion, cargamos los paneles para que
+	 * el usuario pueda consultar la transformacion utilizada...
+	 * @param details
+	 */
+	public void fillData(String details) {
+		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+		TrData crsTrDataArray[] = trPersistence.getArrayOfTrData();
+		
+		for (int iRow = crsTrDataArray.length-1; iRow >= 0; iRow--) {
+			if (details.equals(crsTrDataArray[iRow].getAuthority()+":"+crsTrDataArray[iRow].getCode()+" <--> "+crsTrDataArray[iRow].getDetails()) && crsTrDataArray[iRow].getAuthority().equals(PluginServices.getText(this, "NADGR"))) {
+				String data[] = crsTrDataArray[iRow].getDetails().split(" ");
+				String fichero = data[0];
+				String authority = data[1].substring(1,data[1].length()-1);
+				for (int i = 0; i< getJComboNadFile().getItemCount(); i++) {
+					if (fichero.equals((String)getJComboNadFile().getItemAt(i))) {
+						getJComboNadFile().setSelectedIndex(i);
+						break;
+					}
+				}
+				if (authority.equals(getSourceAbrev())) {
+					getJRadioButtonSource().setSelected(true);
+					getJRadioButtonTarget().setSelected(false);
+				}
+				else {
+					getJRadioButtonSource().setSelected(false);
+					getJRadioButtonTarget().setSelected(true);
+				}
+				
+				break;
+			}
+		}
+	}
+	
+	public void resetData () {
+		getJRadioButtonSource().setSelected(true);
+		getJRadioButtonTarget().setSelected(false);
+		getJComboNadFile().setSelectedIndex(0);		
+	}
+	
+}
+
+class FiltroNadgrids extends FileFilter {
+
+	final static String gsb = "gsb";
+	public boolean accept(File f) {
+		if (f.isDirectory()) {
+           return true;
+       }
+       String s = f.getName();
+       int i = s.lastIndexOf('.');
+
+       if (i > 0 &&  i < s.length() - 1) {
+           String extension = s.substring(i+1).toLowerCase();
+           if (gsb.equals(extension)){
+                   return true;
+           } else {
+               return false;
+           }
+       }
+       return false;
+	}
+
+	public String getDescription() {
+		 return "Archivos .gsb";
+	}
+	
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationNadgridsPanel.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/CrsAndTransformationRecentsPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/CrsAndTransformationRecentsPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/CrsAndTransformationRecentsPanel.java	(revision 25287)
@@ -0,0 +1,391 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
+import java.util.Date;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.ListSelectionModel;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.CrsWkt;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.persistence.CrsData;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+import org.gvsig.crs.persistence.RecentTrsPersistence;
+import org.gvsig.crs.persistence.TrData;
+
+import com.iver.andami.PluginServices;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+public class CrsAndTransformationRecentsPanel extends JPanel implements ActionListener {
+
+	/**
+	 * Panel para la selección del CRS de la vista y la transformacion si hubiera
+	 * alguna entre el crs elegido para la capa con algun crs de destino que
+	 * haya sido utilizada recientemente
+	 * 
+	 * @author Jos� Luis G�mez Mart�nez (JoseLuis.Gomez@uclm.es)
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	
+	public JTable jTable = null;
+	private JScrollPane jScrollPane = null;
+	private JButton infoCrs=null;
+	public DefaultTableModel dtm = null;
+	public TableSorter sorter = null;
+	private CrsData crsDataArray[] = null;
+	private TrData crsTrDataArray[] = null;
+	
+	public int selectedRowTable = -1;
+	private String authority = null;
+	private int codeCRS = -1;
+	private ICrs crs = null;
+	private ArrayList recents = null;
+		
+	public CrsAndTransformationRecentsPanel() {
+		super();
+		initialize();
+	}
+	
+	private void initialize(){
+		this.setLayout(new BorderLayout());
+		JPanel p=new JPanel(new FlowLayout(FlowLayout.LEFT,15,15));
+		p.add(getJLabel());
+		this.add(p, BorderLayout.NORTH);
+		this.add(getJScrollPane(), BorderLayout.CENTER);
+		JPanel pSouth=new JPanel(new FlowLayout(FlowLayout.RIGHT,5,5));
+		pSouth.add(getInfoCrs());
+		this.add(pSouth,BorderLayout.SOUTH);
+	}
+	
+	private JLabel getJLabel(){
+		JLabel label = new JLabel();
+		label.setText(PluginServices.getText(this, "ultimos_crs_utilizados")+":");
+		return label;
+	}
+	/**
+	 * Inicializa el panel que contiene la tabla con los crs
+	 * @return
+	 */
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane();
+			jScrollPane.setBorder(
+				    BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(3,3,3,3),jScrollPane.getBorder()));
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+	/**
+	 * Inicializa la tabla que contiene los crs
+	 * @return
+	 */
+	public JTable getJTable() {
+		if (jTable == null) {
+			String[] columnNames= {PluginServices.getText(this,"fuente"),
+					PluginServices.getText(this,"codigo"),
+					PluginServices.getText(this,"nombre"),
+					PluginServices.getText(this,"transformation")};
+			Object[][]data = {};			
+			dtm = new DefaultTableModel(data, columnNames)
+			 {
+				private static final long serialVersionUID = 1L;
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}
+				/*
+				 * metodo necesario para cuando utilizamos tablas ordenadas
+				 * ya que sino al ordenar por algun campo no se queda con el orden
+				 * actual al seleccionar una fila (non-Javadoc)
+				 * @see javax.swing.table.TableModel#getColumnClass(int)
+				 */
+				public Class getColumnClass(int column)
+				{
+					return getValueAt(0, column).getClass();
+				}
+				};
+			sorter = new TableSorter(dtm);			
+
+			jTable = new JTable(sorter);
+			sorter.setTableHeader(jTable.getTableHeader());
+			jTable.setCellSelectionEnabled(false);
+			jTable.setRowSelectionAllowed(true);
+			jTable.setColumnSelectionAllowed(false);
+			jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			TableColumn column = null;
+			for (int i = 0; i < columnNames.length; i++) {
+			    column = jTable.getColumnModel().getColumn(i);
+			    if (i == 0) {
+			        column.setPreferredWidth(60); //code column is shorter			     	
+			    }else if (i == 1) {
+			    	column.setPreferredWidth(60);
+			    }
+			    else {			    
+			        column.setPreferredWidth(240);
+			    }
+			}	
+		}
+		return jTable;		
+	}
+	
+	/**
+	 * Inicializa el botn que obtiene la informacin del CRS
+	 * @return
+	 */
+	public JButton getInfoCrs() {
+		if(infoCrs == null) {
+			infoCrs = new JButton();
+			infoCrs.setPreferredSize(new Dimension(85,20));
+			infoCrs.setText(PluginServices.getText(this,"infocrs"));
+			infoCrs.setMnemonic('I');
+			infoCrs.setEnabled(false);
+			infoCrs.setToolTipText(PluginServices.getText(this,"more_info"));
+			infoCrs.addActionListener(this);
+		}
+		return infoCrs;
+	}
+	public ICrs getProjection() {		
+		return crs;
+	}
+	
+	public void setCodeCRS(int code) {
+		codeCRS = code;
+	}
+	
+	public int getCodeCRS() {
+		return codeCRS;
+	}
+	
+	public void setProjection(IProjection crs) {
+		//setCrs((ICrs) crs);
+	}
+	
+	/**
+	 * Carga en la tabla los CRSs leidos del sistema de persistencia.
+	 */
+	public void loadRecents(CrsWkt crsWkttarget, ICrs curCrs){
+		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+		crsTrDataArray = trPersistence.getArrayOfTrData();
+		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+		CrsData crsData = new CrsData(curCrs.getCrsWkt().getAuthority()[0], curCrs.getCode(),curCrs.getCrsWkt().getName());
+		if (curCrs.getSourceTransformationParams() == null && curCrs.getTargetTransformationParams() == null)
+			persistence.addCrsData(crsData);
+		crsDataArray = persistence.getArrayOfCrsData();	
+		boolean available = true;
+		
+		// Eliminar filas en cada nueva bsqueda
+		int numRow = dtm.getRowCount();
+		while (numRow != 0) {
+			numRow = numRow - 1;
+			dtm.removeRow(numRow);
+		}
+		
+		/**
+		 * Tendremos que hacer la distincion de si lleva o no transformacion
+		 * para la persistencia de la misma.
+		 */
+		int initialCrsTr = crsTrDataArray.length-1;
+		int initialCrs = crsDataArray.length-1;
+		
+		if (curCrs.getSourceTransformationParams() != null || curCrs.getTargetTransformationParams() != null) {
+			initialCrsTr = crsTrDataArray.length-1;
+			Object first[] ={crsTrDataArray[initialCrsTr].getCrsSource().split(":")[0],crsTrDataArray[initialCrsTr].getCrsSource().split(":")[1],crsTrDataArray[initialCrsTr].getName(),crsTrDataArray[initialCrsTr].getAuthority()+":"+crsTrDataArray[initialCrsTr].getCode()+" <--> "+crsTrDataArray[initialCrsTr].getDetails()};
+			if (crsTrDataArray[initialCrsTr].getAuthority().equals(PluginServices.getText(this, "USR"))) {
+				available = isUSR(crsTrDataArray[initialCrsTr].getCode());
+			}
+			if (available) {
+				dtm.addRow(first);
+				initialCrsTr = crsTrDataArray.length-2;
+			} else {
+				available = true;
+			}
+		}		
+		else {
+			initialCrs = crsDataArray.length-1;
+			Object first[] ={crsDataArray[initialCrs].getAuthority(),Integer.toString(crsDataArray[initialCrs].getCode()),crsDataArray[initialCrs].getName(),PluginServices.getText(this, "sin_transformacion")};
+			if (crsDataArray[initialCrs].getAuthority().equals(PluginServices.getText(this, "USR"))) {
+				available = isUSR(crsDataArray[initialCrs].getCode());
+			}
+			if (available) {
+				dtm.addRow(first);			
+				initialCrs =crsDataArray.length-2;
+			} else {
+				available = true;
+			}
+		}			
+		
+		int iRowCrs = initialCrs;
+		int iRowTr = initialCrsTr;
+		
+		while (iRowCrs>=0 && iRowTr>=0) {
+			if (crsDataArray[iRowCrs].getDate().after(crsTrDataArray[iRowTr].getDate())){
+				if (crsDataArray[iRowCrs].getAuthority().equals(PluginServices.getText(this, "USR"))) {
+					available = isUSR(crsDataArray[iRowCrs].getCode());
+				}
+				if (available) {
+					Object row[] ={crsDataArray[iRowCrs].getAuthority(),Integer.toString(crsDataArray[iRowCrs].getCode()),crsDataArray[iRowCrs].getName(),PluginServices.getText(this, "sin_transformacion")};
+					dtm.addRow(row);
+				} else {
+					available = true;
+				}
+				iRowCrs--;
+			} else {
+				String target = crsWkttarget.getAuthority()[0]+":"+crsWkttarget.getAuthority()[1];
+				String crsSource = ((String)crsTrDataArray[iRowTr].getCrsSource());			
+				String crsTarget = ((String)crsTrDataArray[iRowTr].getCrsTarget());			
+				if(target.equals(crsTarget)){
+					if (crsTrDataArray[iRowTr].getAuthority().equals(PluginServices.getText(this, "USR"))) {
+						available = isUSR(crsTrDataArray[iRowTr].getCode());
+					}
+					if (available) {
+						Object row[] = {crsSource.split(":")[0],crsSource.split(":")[1],crsTrDataArray[iRowTr].getName(),crsTrDataArray[iRowTr].getAuthority()+":"+crsTrDataArray[iRowTr].getCode()+" <--> "+crsTrDataArray[iRowTr].getDetails()};
+						dtm.addRow(row);
+					} else {
+						available = true;
+					}
+				}
+				iRowTr--;
+			}
+		}
+		if (iRowTr>=0) {
+			for (;iRowTr>=0;iRowTr--){
+				String target = crsWkttarget.getAuthority()[0]+":"+crsWkttarget.getAuthority()[1];
+				String crsSource = ((String)crsTrDataArray[iRowTr].getCrsSource());			
+				String crsTarget = ((String)crsTrDataArray[iRowTr].getCrsTarget());			
+				if(target.equals(crsTarget)){					
+					if (crsTrDataArray[iRowTr].getAuthority().equals(PluginServices.getText(this, "USR"))) {
+						available = isUSR(crsTrDataArray[iRowTr].getCode());
+					}
+					if (available) {
+						Object row[] = {crsSource.split(":")[0],crsSource.split(":")[1],crsTrDataArray[iRowTr].getName(),crsTrDataArray[iRowTr].getAuthority()+":"+crsTrDataArray[iRowTr].getCode()+" <--> "+crsTrDataArray[iRowTr].getDetails()};
+						dtm.addRow(row);
+					} else {
+						available = true;
+					}
+				}
+			}
+		}
+		else {
+			for (;iRowCrs>=0;iRowCrs--){
+				if (crsDataArray[iRowCrs].getAuthority().equals(PluginServices.getText(this, "USR"))) {
+					available = isUSR(crsDataArray[iRowCrs].getCode());
+				}
+				if (available) {
+					Object row[] ={crsDataArray[iRowCrs].getAuthority(),Integer.toString(crsDataArray[iRowCrs].getCode()),crsDataArray[iRowCrs].getName(),PluginServices.getText(this, "sin_transformacion")};
+					dtm.addRow(row);
+				} else {
+					available = true;
+				}
+			}
+		}
+						
+		/*
+		/*Seleccionar el primer registro.
+		 */
+		int numr = dtm.getRowCount();
+		if (numr != 0 )
+			this.getJTable().setRowSelectionInterval(0,0);
+	}
+	
+	/**
+	 * metodo que nos indica si un crs de usuario esta o no en la base de datos de usuario
+	 * @param code
+	 * @return
+	 */
+	public boolean isUSR(int code) {
+		NewCRSPanel usr = new NewCRSPanel();		
+		return usr.isInBD(code);
+	}
+
+	public ICrs getCrs() {
+		return crs;
+	}
+	
+	public void initCrs(){
+		
+		selectedRowTable = getJTable().getSelectedRow();		        			        	
+    	Integer.parseInt((String)sorter.getValueAt(selectedRowTable,1));
+		setAuthority((String)sorter.getValueAt(selectedRowTable,0)+":"+(String)sorter.getValueAt(selectedRowTable,1));
+    	
+		codeCRS = Integer.parseInt((String)sorter.getValueAt(selectedRowTable,1));
+		try {
+			crs = new CrsFactory().getCRS(getAuthority());
+		} catch (CrsException e) {
+			e.printStackTrace();
+		}
+	}
+	
+	public String getAuthority() {
+		return authority;
+	}
+	
+	public void setAuthority(String aut) {
+		this.authority = aut;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		/*Si el objeto que genera el evento es el JButton 'InfoCrs'
+		se muestra la informacin ralicionada con el Crs seleccionado en la tabla*/
+		if (e.getSource() == this.getInfoCrs()) {
+			String[] aut = getAuthority().split(":");			
+			InfoCRSPanel info = new InfoCRSPanel(aut[0], getCodeCRS(), (String)getJTable().getValueAt(getJTable().getSelectedRow(), 3));
+			PluginServices.getMDIManager().addWindow(info);
+		}
+		
+	}	
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/CrsAndTransformationRecentsPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationEpsgPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationEpsgPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationEpsgPanel.java	(revision 25287)
@@ -0,0 +1,729 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+
+import javax.swing.BorderFactory;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextArea;
+import javax.swing.ListSelectionModel;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.persistence.RecentTrsPersistence;
+import org.gvsig.crs.persistence.TrData;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+import es.idr.teledeteccion.connection.EpsgConnection;
+import es.idr.teledeteccion.connection.Query;
+
+/**
+ * Clase para la creacin y el manejo del panel de transformacin
+ * para el caso de la EPSG
+ * 
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ * @author Luisa Marina Fernndez (luisam.fernandez@uclm.es)
+ *
+ */
+public class TransformationEpsgPanel extends JPanel  {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	private IProjection firstProj;
+	
+	String[] transformations = {"9603", "9606", "9607", "9613", "9615", "9633"};
+	
+	private int transformation_code = -1;
+	private String[] values;
+	private String params = "+towgs84=";
+	
+	private JTable transformationTable;	
+	private JScrollPane jScrollPane = null;
+	public boolean inverseTranformation = false;
+	
+	public EpsgConnection connect = null;	
+	public int crs_target = -1;
+	
+	public DefaultTableModel dtm = null;
+	
+	private int crs_source_code;
+	private String cadWKT = "";
+	private ListSelectionModel lsm2 = null;
+	public int selectedRowTable = -1;
+	boolean tra = false;
+	int real_target;
+	String authority_target = "";
+	
+	private JTextArea info;	
+	public TableSorter sorter = null;
+	
+	public TransformationEpsgPanel(String aut_target) {
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		String[] authority_target = aut_target.split(":");
+		setAuthorityTarget(authority_target[0]);
+		int target = Integer.parseInt(authority_target[1]);			
+		real_target = target;
+		String sentence = "SELECT source_geogcrs_code, coord_ref_sys_kind " +
+			"FROM epsg_coordinatereferencesystem " +
+			"WHERE coord_ref_sys_code = "+ target ;
+		ResultSet result = Query.select(sentence,connect.getConnection());		
+		try {
+			result.next();
+			String kind = result.getString("coord_ref_sys_kind");
+			if (kind.equals("projected"))
+				target = result.getInt("source_geogcrs_code");
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}        
+		crs_target = target;
+		initialize();
+	}
+	
+	private void initialize(){
+			setLayout(new BorderLayout(1,50));
+			setBorder(
+				    BorderFactory.createCompoundBorder(
+							BorderFactory.createCompoundBorder(
+									BorderFactory.createTitledBorder("Transformacion EPSG"),
+									BorderFactory.createEmptyBorder(12,2,80,2)),
+									getBorder()));
+			add(getJScrollPane(),BorderLayout.CENTER);
+	}
+	
+	private Component getInfo() {
+		if (info == null){
+			info = new JTextArea();
+			info.setLineWrap(true);
+			info.setWrapStyleWord(true);
+			info.setPreferredSize(new Dimension(400, 240));
+			info.setEditable(false);
+			info.append(getWKT());
+		}
+		info.setText(getWKT());
+		return info;
+	}
+	
+	public JTable getJTable() {
+		if (transformationTable == null) {
+			String[] columnNames= {PluginServices.getText(this,"code_transformation"),
+					PluginServices.getText(this,"name_transformation"),
+					PluginServices.getText(this,"type_transformation"),
+					PluginServices.getText(this,"source_crs"),
+					PluginServices.getText(this,"target_crs"),
+					PluginServices.getText(this,"description_area")};
+			Object[][]data = {};
+			dtm = new DefaultTableModel(data, columnNames)
+			{
+				private static final long serialVersionUID = 1L;
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}
+				/*
+				 * metodo necesario para cuando utilizamos tablas ordenadas
+				 * ya que sino al ordenar por algun campo no se queda con el orden
+				 * actual al seleccionar una fila (non-Javadoc)
+				 * @see javax.swing.table.TableModel#getColumnClass(int)
+				 */
+				public Class getColumnClass(int column)
+				{
+					return getValueAt(0, column).getClass();
+				}
+			};
+			sorter = new TableSorter(dtm);			
+
+			transformationTable = new JTable(sorter);
+			sorter.setTableHeader(transformationTable.getTableHeader());	
+			transformationTable.setCellSelectionEnabled(false);
+			transformationTable.setRowSelectionAllowed(true);
+			transformationTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
+			transformationTable.setColumnSelectionAllowed(false);
+			transformationTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			TableColumn column = null;
+			for (int i = 0; i < columnNames.length; i++) {
+			    column = transformationTable.getColumnModel().getColumn(i);
+			    if (i == 0 || i == 3 || i == 4) {
+			        column.setPreferredWidth(40);			     	
+			    }else if (i == 2) {
+			    	column.setPreferredWidth(80);
+			    }
+			    else {			    
+			        column.setPreferredWidth(160);
+			    }
+			}			
+		}
+		return transformationTable;
+	}
+	
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane();
+			jScrollPane.setPreferredSize(new Dimension(525,200));
+			jScrollPane.setBorder(
+				    BorderFactory.createCompoundBorder(
+					BorderFactory.createCompoundBorder(
+							BorderFactory.createTitledBorder(PluginServices.getText(this,"transformations")),
+							BorderFactory.createEmptyBorder(5,5,5,5)),
+							jScrollPane.getBorder()));
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+		
+	/**
+	 * Busca las tranformaciones directas entre el CRS de la capa y el CRS de la
+	 * vista.
+	 * @param crsCode
+	 */
+	private void callTransformation(int crsCode){		
+        
+        
+        String sentence = "SELECT source_geogcrs_code " +
+						"FROM epsg_coordinatereferencesystem " +
+						"WHERE coord_ref_sys_code = "+ crsCode ;
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		int source = 0;
+		try {
+			result.next();
+			source = result.getInt("source_geogcrs_code");
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}
+		
+        ResultSet result2 = null;
+        ResultSet result3 = null;
+        if (source != 0){
+        		crsCode = source;		            	
+        }
+        
+        ArrayList codecs = new ArrayList();
+        codecs.add(String.valueOf(crsCode));		
+		
+		for (int j=0; j< codecs.size(); j++){
+			sentence = "SELECT coord_op_code, coord_op_name, coord_op_type, source_crs_code, target_crs_code, area_of_use_code, coord_op_method_code " +
+					"FROM epsg_coordoperation " +                        
+					"WHERE source_crs_code = " + codecs.get(j) + "AND target_crs_code = " + crs_target;
+
+            result = Query.select(sentence,connect.getConnection());	
+            
+            try {
+            	while(result.next()) {
+            		Object[]data = new Object[6];				            		
+            		data[0] = String.valueOf(result.getInt("coord_op_code"));
+            		data[1] = result.getString("coord_op_name");
+            		data[2] = result.getString("coord_op_type");
+            		data[3] = String.valueOf(result.getInt("source_crs_code"));
+            		data[4] = String.valueOf(result.getInt("target_crs_code"));
+            		/*codecs.add(data[4]);
+            		codecs = deleteItems(codecs);*/
+            		
+            		int aouc = Integer.parseInt(result.getString("area_of_use_code"));
+					
+					sentence = "SELECT area_of_use FROM epsg_area " +
+									"WHERE area_code = "+ aouc ;
+					
+					result2 = Query.select(sentence,connect.getConnection());
+            		while (result2.next())
+            			data[5] = result2.getString("area_of_use");
+            		
+            		String coord_op_method = result.getString("coord_op_method_code");				            		
+	            		
+            		sentence = "SELECT reverse_op FROM epsg_coordoperationmethod "+
+            					"WHERE coord_op_method_code LIKE " + coord_op_method;
+            		result3 = Query.select(sentence,connect.getConnection());
+            		
+            		while(result3.next()){
+            			if (Integer.parseInt(result3.getString("reverse_op")) == 1){
+            				for (int i=0; i< transformations.length; i++){
+            					if (coord_op_method.equals(transformations[i])){
+            						dtm.addRow(data);
+            					}
+            				}            				
+            			}
+            		}
+            	}
+            } 	
+            catch (SQLException e1) {
+            	e1.printStackTrace();
+            }
+		}
+	}
+	
+	/**
+	 * Mtodo auxiliar para eliminar valores repetidos dentro del ArrayList
+	 * de codecs.
+	 * @param codecs
+	 * @return
+	 */
+	private ArrayList deleteItems(ArrayList codecs) {
+		ArrayList cod = new ArrayList();
+		boolean equal = false;
+		for (int i = 0; i< codecs.size(); i++){
+			String c = (String) codecs.get(i);
+			for (int j = 0; j<cod.size(); j++){
+				if (cod.get(j).equals(c)){
+					equal = true;
+				}
+			}
+			if (!equal){
+				cod.add(c);				
+			}
+			equal = false;
+		}
+		return cod;
+	}
+	
+	/**
+	 * Busca las tranformaciones inversas entre el CRS de la capa y el CRS de la
+	 * vista. Aquellas cuyo valor de reverse_op sean iguales a uno.
+	 * @param crsCode
+	 */
+	private void callInverseTransformation(int crsCode){
+		//inverseTranformation = true;
+        
+        String sentence = "SELECT source_geogcrs_code " +
+						"FROM epsg_coordinatereferencesystem " +
+						"WHERE coord_ref_sys_code = "+ crsCode ;
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		int source = 0;
+		try {
+			result.next();
+			source = result.getInt("source_geogcrs_code");
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}
+		
+        ResultSet result2 = null;
+        ResultSet result3 = null;
+        if (source != 0){
+        		crsCode = source;		            	
+        }
+        
+        ArrayList codecs = new ArrayList();
+        codecs.add(String.valueOf(crsCode));
+       
+		codecs = deleteItems(codecs);
+		
+		for (int j=0; j< codecs.size(); j++){
+			sentence = "SELECT coord_op_code, coord_op_name, coord_op_type, source_crs_code, target_crs_code, area_of_use_code, coord_op_method_code " +
+					"FROM epsg_coordoperation " +                        
+					"WHERE source_crs_code = " + codecs.get(j) + "AND target_crs_code = " + crs_target;
+
+            result = Query.select(sentence,connect.getConnection());	
+            
+            try {
+            	while(result.next()) {
+            		Object[]data = new Object[6];				            		
+            		data[0] = String.valueOf(result.getInt("coord_op_code"));
+            		data[1] = result.getString("coord_op_name");
+            		data[2] = result.getString("coord_op_type");
+            		data[4] = String.valueOf(result.getInt("source_crs_code"));
+            		data[3] = String.valueOf(result.getInt("target_crs_code"));
+            		/*codecs.add(data[4]);
+            		codecs = deleteItems(codecs);*/
+            		
+            		int aouc = Integer.parseInt(result.getString("area_of_use_code"));
+					
+					sentence = "SELECT area_of_use FROM epsg_area " +
+									"WHERE area_code = "+ aouc ;
+					
+					result2 = Query.select(sentence,connect.getConnection());
+            		while (result2.next())
+            			data[5] = result2.getString("area_of_use");
+            		
+            		String coord_op_method = result.getString("coord_op_method_code");				            		
+	            		
+            		sentence = "SELECT reverse_op FROM epsg_coordoperationmethod "+
+            					"WHERE coord_op_method_code LIKE " + coord_op_method;
+            		result3 = Query.select(sentence,connect.getConnection());
+            		
+            		while(result3.next()){
+            			if (Integer.parseInt(result3.getString("reverse_op")) == 1){
+            				for (int i=0; i< transformations.length; i++){
+            					if (coord_op_method.equals(transformations[i])){
+            						dtm.addRow(data);
+            					}
+            				}
+            			}
+            		}
+            	}
+            } 	
+            catch (SQLException e1) {
+            	e1.printStackTrace();
+            }
+		}
+	}
+	
+	/**
+	 * 
+	 * @param val
+	 */
+	public void setValues(String[] val) {
+		values = val;
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public String[] getValues() {
+		return values;
+	}
+	
+	/**
+	 * 
+	 * @param t_cod
+	 */
+	public void setTrasformation_code(int t_cod) {
+		transformation_code = t_cod;
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public int getTransformation_code() {
+		return transformation_code;
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public ICrs getProjection() {
+		params += values[0];
+		for(int i = 1; i < values.length; i++)
+			params +=","+values[i];
+		try {
+			//ICrs crs = new CrsFactory().getCRS(crs_source_code,cadWKT,params);
+			ICrs crs = new CrsFactory().getCRS("EPSG:"+crs_source_code);
+			crs.setTransformationParams(params,null);
+			return crs;
+		} catch (org.gvsig.crs.CrsException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	/**
+	 * 
+	 * @param proj
+	 */
+	public void setProjection(IProjection proj) {
+		firstProj = proj;
+	}
+	
+	/**
+	 * 
+	 * @param cad
+	 */
+	public void setWKT(String cad){
+		cadWKT = cad;
+		getInfo();
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public String getWKT(){
+		return cadWKT;
+	}
+	
+	/**
+	 * Indica el CRS que se utilizar en la capa y busca las transformaciones
+	 * directas e inversas que pueda tener
+	 * @param code
+	 */
+	public void setSource(String fuente, int code){
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		inverseTranformation = false;
+		crs_source_code = code;
+		int numRow = dtm.getRowCount();
+		
+        while (numRow != 0) {
+			numRow = numRow - 1;
+			dtm.removeRow(numRow);
+		}
+		if (PluginServices.getText(this, fuente).equals(PluginServices.getText(this, "EPSG")) && PluginServices.getText(this, getAuthorityTarget()).equals(PluginServices.getText(this, "EPSG"))) {
+			callTransformation(crs_source_code);
+			
+			int new_target = crs_target;
+			int base_target = code;
+			String sentence = "SELECT source_geogcrs_code, coord_ref_sys_kind " +
+						"FROM epsg_coordinatereferencesystem " +
+						"WHERE coord_ref_sys_code = "+ code;
+			ResultSet result = Query.select(sentence,connect.getConnection());		
+			try {
+				result.next();
+				String kind = result.getString("coord_ref_sys_kind");
+				if (kind.equals("projected"))
+					base_target = result.getInt("source_geogcrs_code");
+			} catch (SQLException e1) {
+				e1.printStackTrace();
+			}        
+			crs_target = base_target;
+			
+			crs_source_code = new_target;
+			callInverseTransformation(crs_source_code);
+			crs_target = new_target;
+			crs_source_code = code;
+		    
+			int numr = dtm.getRowCount();
+			if (numr > 0 ){
+				this.getJTable().setRowSelectionInterval(0,0);
+			}
+		}
+	}
+	
+	/**
+	 * Indica el CRS que se utilizar en la capa y busca las transformaciones
+	 * directas e inversas que pueda tener para las transformaciones compuestas
+	 * @param code
+	 */
+	public void setSourceCompuesta(String aut){
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		inverseTranformation = false;
+		String[] authority = aut.split(":");
+		int code = Integer.parseInt(authority[1]);
+		crs_source_code = code;
+		int numRow = dtm.getRowCount();
+		
+        while (numRow != 0) {
+			numRow = numRow - 1;
+			dtm.removeRow(numRow);
+		}
+		if (PluginServices.getText(this,authority[0]).equals(PluginServices.getText(this, "EPSG"))) {
+			callTransformationCompuesta(crs_source_code);
+			
+			int new_target = crs_target;
+			int base_target = code;
+			String sentence = "SELECT source_geogcrs_code, coord_ref_sys_kind " +
+						"FROM epsg_coordinatereferencesystem " +
+						"WHERE coord_ref_sys_code = "+ code;
+			ResultSet result = Query.select(sentence,connect.getConnection());		
+			try {
+				result.next();
+				String kind = result.getString("coord_ref_sys_kind");
+				if (kind.equals("projected"))
+					base_target = result.getInt("source_geogcrs_code");
+			} catch (SQLException e1) {
+				e1.printStackTrace();
+			}        
+			crs_target = base_target;
+			
+			crs_source_code = new_target;
+			callInverseTransformation(crs_source_code);
+			crs_target = new_target;
+			crs_source_code = code;
+		    
+			int numr = dtm.getRowCount();
+			if (numr > 0 ){
+				this.getJTable().setRowSelectionInterval(0,0);
+			}
+		}
+	}
+	
+	/**
+	 * Busca las tranformaciones directas entre el CRS de la capa y el CRS de la
+	 * vista.
+	 * @param crsCode
+	 */
+	private void callTransformationCompuesta(int crsCode){		
+        int numRow = dtm.getRowCount();
+		
+        while (numRow != 0) {
+			numRow = numRow - 1;
+			dtm.removeRow(numRow);
+		}
+        
+        String sentence = "SELECT source_geogcrs_code " +
+						"FROM epsg_coordinatereferencesystem " +
+						"WHERE coord_ref_sys_code = "+ crsCode ;
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		int source = 0;
+		try {
+			result.next();
+			source = result.getInt("source_geogcrs_code");
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}
+		
+        ResultSet result2 = null;
+        ResultSet result3 = null;
+        if (source != 0){
+        		crsCode = source;		            	
+        }
+        
+        ArrayList codecs = new ArrayList();
+        codecs.add(String.valueOf(crsCode));		
+		
+		for (int j=0; j< codecs.size(); j++){
+			sentence = "SELECT coord_op_code, coord_op_name, coord_op_type, source_crs_code, target_crs_code, area_of_use_code, coord_op_method_code " +
+					"FROM epsg_coordoperation " +                        
+					"WHERE source_crs_code = " + codecs.get(j) + " OR target_crs_code = "+ codecs.get(j);
+
+            result = Query.select(sentence,connect.getConnection());	
+            
+            try {
+            	while(result.next()) {
+            		Object[]data = new Object[6];				            		
+            		data[0] = String.valueOf(result.getInt("coord_op_code"));
+            		data[1] = result.getString("coord_op_name");
+            		data[2] = result.getString("coord_op_type");
+            		data[3] = String.valueOf(result.getInt("source_crs_code"));
+            		data[4] = String.valueOf(result.getInt("target_crs_code"));
+            		/*codecs.add(data[4]);
+            		codecs = deleteItems(codecs);*/
+            		
+            		int aouc = Integer.parseInt(result.getString("area_of_use_code"));
+					
+					sentence = "SELECT area_of_use FROM epsg_area " +
+									"WHERE area_code = "+ aouc ;
+					
+					result2 = Query.select(sentence,connect.getConnection());
+            		while (result2.next())
+            			data[5] = result2.getString("area_of_use");
+            		
+            		String coord_op_method = result.getString("coord_op_method_code");				            		
+	            		
+            		sentence = "SELECT reverse_op FROM epsg_coordoperationmethod "+
+            					"WHERE coord_op_method_code LIKE " + coord_op_method;
+            		result3 = Query.select(sentence,connect.getConnection());
+            		
+            		while(result3.next()){
+            			if (Integer.parseInt(result3.getString("reverse_op")) == 1){
+            				for (int i=0; i< transformations.length; i++){
+            					if (coord_op_method.equals(transformations[i])){
+            						dtm.addRow(data);
+            					}
+            				}            				
+            			}
+            		}
+            	}
+            } 	
+            catch (SQLException e1) {
+            	e1.printStackTrace();
+            }
+		}
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public int getSource(){
+		return crs_source_code;
+	}
+	
+	public int getTarget(){
+		return real_target;
+	}
+	
+	public void setAuthorityTarget(String aut_target) {
+		authority_target = aut_target;
+	}
+	
+	public String getAuthorityTarget() {
+		return authority_target;
+	}
+	
+	/**
+	 * cuando utilizamos crs+transformacion, cargamos los paneles para que
+	 * el usuario pueda consultar la transformacion utilizada...
+	 * @param details
+	 */
+	public void fillData(String details) {
+		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+		TrData crsTrDataArray[] = trPersistence.getArrayOfTrData();
+		
+		for (int iRow = crsTrDataArray.length-1; iRow >= 0; iRow--) {
+			if (details.equals(crsTrDataArray[iRow].getAuthority()+":"+crsTrDataArray[iRow].getCode()+" <--> "+crsTrDataArray[iRow].getDetails()) && crsTrDataArray[iRow].getAuthority().equals(PluginServices.getText(this, "EPSG"))) {
+				String code = String.valueOf(crsTrDataArray[iRow].getCode());
+				
+				for (int i=0; i< getJTable().getRowCount(); i++) {
+					if (code.equals((String)getJTable().getValueAt(i, 0))) {
+						//seleccionarlo						
+						this.getJTable().setRowSelectionInterval(i,i);
+						break;						
+					}
+				}
+				break;
+			}
+		}
+	}
+	
+	/**
+	 * metodo que resetea el formulario
+	 * @return
+	 */
+	public void resetData() {
+		if (dtm.getRowCount()>0) {
+			this.getJTable().setRowSelectionInterval(0,0);
+		}
+		
+        
+	}
+	
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle("Transformation EPSG");
+		return m_viewinfo;
+	}	
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationEpsgPanel.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/InfoTransformationsRecentsPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/InfoTransformationsRecentsPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/InfoTransformationsRecentsPanel.java	(revision 25287)
@@ -0,0 +1,246 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.ListSelectionModel;
+import javax.swing.table.DefaultTableModel;
+
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+import es.idr.teledeteccion.connection.EpsgConnection;
+import es.idr.teledeteccion.connection.Query;
+
+/**
+ * Panel con la informacin de la transformacin seleccionada
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ * @author Luisa Marina Fernndez (luisam.fernandez@uclm.es)
+ *
+ */
+public class InfoTransformationsRecentsPanel extends JPanel implements IWindow, ActionListener{
+
+	private static final long serialVersionUID = 1L;
+
+	private JTable jTable;
+	public DefaultTableModel dtm = null;
+	private JScrollPane jScrollPane1 = null;
+	private JPanel jPanelbuttons;
+	private JButton jButtonOk;
+	public TableSorter sorter = null;
+	String[] data = null;
+	
+	//Ancho y alto del panel
+	private int v_height=200;
+	private int v_width=420;
+	
+	public InfoTransformationsRecentsPanel(String[] data) {
+		super();
+		this.data = data;
+		inicializate();
+	}
+	
+	private void inicializate() {
+		setLayout(new BorderLayout());
+		add(getJScrollPane1(), BorderLayout.CENTER);
+		add(getJPanelButtons(), BorderLayout.SOUTH);
+		
+	}
+
+	private JPanel getJPanelButtons() {
+		if(jPanelbuttons == null) {
+			jPanelbuttons = new JPanel();
+			jPanelbuttons.setLayout(new FlowLayout(FlowLayout.RIGHT,10,10));
+			jPanelbuttons.add(getJButtonOk(),null);
+		}
+		return jPanelbuttons;
+	}
+	
+	private JButton getJButtonOk() {
+		if(jButtonOk == null) {
+			jButtonOk = new JButton();
+			jButtonOk.setText(PluginServices.getText(this,"ok"));
+			jButtonOk.setPreferredSize(new Dimension(100,25));
+			jButtonOk.setMnemonic('O');
+			jButtonOk.setToolTipText(PluginServices.getText(this,"ok"));
+			jButtonOk.addActionListener(this);
+		}
+		return jButtonOk;
+	}
+		
+	private JScrollPane getJScrollPane1() {
+		if(jScrollPane1 == null) {
+			jScrollPane1 = new JScrollPane();
+			jScrollPane1.setPreferredSize(new Dimension(400,150));	
+			jScrollPane1.setBorder(
+				    BorderFactory.createCompoundBorder(
+					BorderFactory.createCompoundBorder(
+							BorderFactory.createTitledBorder(PluginServices.getText(this,"info_transformations")),
+							BorderFactory.createEmptyBorder(5,5,5,5)),
+							jScrollPane1.getBorder()));
+			jScrollPane1.setViewportView(getJTable());
+		}
+		return jScrollPane1;
+	}
+	
+	private JTable getJTable() {
+		if(jTable == null) {
+			String[] columnNames = {PluginServices.getText(this,"nombre")
+					,PluginServices.getText(this,"valor")};
+			Object[][] datos = obtainData();
+			dtm = new DefaultTableModel(datos, columnNames)
+			 {
+				private static final long serialVersionUID = 1L;
+
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}		
+			};
+			sorter = new TableSorter(dtm);			
+
+			jTable = new JTable(sorter);
+
+			jTable.setCellSelectionEnabled(false);
+			jTable.setRowSelectionAllowed(true);
+			jTable.setColumnSelectionAllowed(false);
+			jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			
+		}
+		return jTable;
+	}
+	
+	/**
+	 * Mtodo que recuperar la informacin a mostrar en el panel
+	 * de las transformaciones recientes
+	 * @return
+	 */
+	private String[][] obtainData(){	
+		String[][] valid = null;
+		String[] transformation = data[0].split(":");
+		if (transformation[0].equals("EPSG")){
+			valid = new String[6][2];
+			valid[0][0] = PluginServices.getText(this,"source_crs");
+			valid[0][1] = data[2];
+			valid[1][0] = PluginServices.getText(this,"target_crs");
+			valid[1][1] = data[3];
+			EpsgConnection conn = new EpsgConnection();
+			conn.setConnectionEPSG();
+			String sentence = "SELECT area_of_use_code " +
+							"FROM epsg_coordoperation " +                        
+							"WHERE coord_op_code = " + transformation[1] ;
+		    ResultSet result = Query.select(sentence,conn.getConnection());		   
+			try {
+				result.next();				
+				valid[2][0] =  PluginServices.getText(this,"transformation_code");
+				valid[2][1] = transformation[1];				
+				sentence = "SELECT area_of_use FROM epsg_area " +
+								"WHERE area_code = "+ Integer.parseInt(result.getString("area_of_use_code"));
+				
+			} catch (SQLException e) {
+				e.printStackTrace();
+			}
+			valid[3][0] = PluginServices.getText(this,"transformation_name");
+			valid[3][1] = data[1];
+			valid[4][0] = PluginServices.getText(this,"details");
+			result = Query.select(sentence, conn.getConnection());
+			try {
+				result.next();
+				valid[4][1] = result.getString("area_of_use");
+			} catch (SQLException e) {
+				e.printStackTrace();
+			}
+		}
+		else if (transformation[0].equals("USR")){
+			valid = new String[3][2];
+			valid[0][0] = PluginServices.getText(this,"source_crs");
+			valid[0][1] = data[2];
+			valid[1][0] = PluginServices.getText(this,"target_crs");
+			valid[1][1] = data[3];
+			valid[2][0] = PluginServices.getText(this,"details");
+			valid[2][1] = data[4];			
+		} else {
+			valid = new String[4][2];
+			String[] partes = data[4].split("\\(");
+			String nadFile = partes[0];		
+			String codigoNad = partes[1].substring(0,partes[1].length()-1);
+			valid[0][0] = PluginServices.getText(this,"source_crs");
+			valid[0][1] = data[2];
+			valid[1][0] =PluginServices.getText(this,"target_crs");
+			valid[1][1] = data[3];
+			valid[2][0] = PluginServices.getText(this,"nadgrids_file");
+			valid[2][1] = nadFile;	
+			valid[3][0] = PluginServices.getText(this,"calculated_in");
+			valid[3][1] = codigoNad;
+		}
+		return valid;
+	}
+
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle("Info");//PluginServices.getText(this,proj.getCrsWkt().getName()));
+   		//Define el ancho y el alto del panel
+   		m_viewinfo.setHeight(v_height);
+   		m_viewinfo.setWidth(v_width);
+		return m_viewinfo;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		if (e.getSource() == getJButtonOk()){
+			PluginServices.getMDIManager().closeWindow(this);
+		}
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/InfoTransformationsRecentsPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationRecentsPanel.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationRecentsPanel.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationRecentsPanel.java	(revision 25287)
@@ -0,0 +1,516 @@
+/* gvSIG. Sistema de Informacin Geogrfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.BorderLayout;
+import java.awt.FlowLayout;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.ListSelectionModel;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.ogr.TransEPSG;
+import org.gvsig.crs.persistence.CompTrData;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+import org.gvsig.crs.persistence.RecentTrsPersistence;
+import org.gvsig.crs.persistence.TrData;
+
+import com.iver.andami.PluginServices;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+import es.idr.teledeteccion.connection.EpsgConnection;
+
+/**
+ * Panel para la gestin de las transformaciones recientes
+ * @author Jos Luis Gmez Martnez (jolugomar@gmail.com)
+ * @author Luisa Marina Fernndez (luisam.fernandez@uclm.es)
+ *
+ */
+public class TransformationRecentsPanel extends JPanel {
+
+	private static final long serialVersionUID = 1L;
+	int code = 0;
+	private JTable transformationTable;	
+	private JScrollPane jScrollPane = null;
+	public DefaultTableModel dtm = null;
+	public TableSorter sorter = null;
+	JButton JButtonInfo = null;
+	public int selectedRowTable = -1;
+	private TrData[] trDataArray;
+	
+	private String cadWKT = "";
+	private String params ="";
+	public EpsgConnection connect = null;
+	boolean inverseTransformation = false;
+	int trCode;
+	boolean targetNad = false;
+	String sourceAbrev = null;
+
+	public TransformationRecentsPanel() {
+		initialize();
+	}
+	
+	/**
+	 * Genera el panel contenedor de las transformaciones recientes
+	 * @return
+	 */
+	private void initialize(){
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+			//**setLayout(new GridLayout(2,1));
+			//**setLayout(new FlowLayout(FlowLayout.LEADING,5,10));
+			//**setPreferredSize(new Dimension(525, 100));
+		setLayout(new BorderLayout());
+		setBorder(
+				    BorderFactory.createCompoundBorder(
+							BorderFactory.createCompoundBorder(
+									BorderFactory.createTitledBorder(PluginServices.getText(this,"recents_transformation")),
+									BorderFactory.createEmptyBorder(2,2,2,2)),
+									getBorder()));
+		JPanel p=new JPanel();
+		p.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
+		p.add(getJButtonInfo());
+		add(p,BorderLayout.NORTH);
+		add(getJScrollPane(),BorderLayout.CENTER);	
+			//loadRecents();
+	}
+	
+	public JTable getJTable() {
+		if (transformationTable == null) {
+			String[] columnNames= {PluginServices.getText(this,"transformation"),
+					PluginServices.getText(this,"name"),
+					PluginServices.getText(this,"source_crs"),
+					PluginServices.getText(this,"target_crs"),
+					PluginServices.getText(this,"detalles"),};					
+			Object[][]data = {};
+			dtm = new DefaultTableModel(data, columnNames)
+			{
+				private static final long serialVersionUID = 1L;
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}
+				/*
+				 * metodo necesario para cuando utilizamos tablas ordenadas
+				 * ya que sino al ordenar por algun campo no se queda con el orden
+				 * actual al seleccionar una fila
+				 * @see javax.swing.table.TableModel#getColumnClass(int)
+				 */
+				public Class getColumnClass(int column)
+				{
+					return getValueAt(0, column).getClass();
+				}
+			};
+			sorter = new TableSorter(dtm);			
+
+			transformationTable = new JTable(sorter);
+			sorter.setTableHeader(transformationTable.getTableHeader());	
+			transformationTable.setCellSelectionEnabled(false);
+			transformationTable.setRowSelectionAllowed(true);
+			transformationTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
+			transformationTable.setColumnSelectionAllowed(false);
+			transformationTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			TableColumn column = null;
+			for (int i = 0; i < columnNames.length; i++) {
+			    column = transformationTable.getColumnModel().getColumn(i);
+			    if (i == 0) {
+			    	column.setPreferredWidth(80);
+			    }
+			    else if(i == 4) {
+			    	column.setPreferredWidth(200);
+			    }
+			    else {			    
+			        column.setPreferredWidth(100);
+			    }
+			}			
+		}
+		return transformationTable;
+	}
+	
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane();
+			//jScrollPane.setPreferredSize(new Dimension(525,200));
+			jScrollPane.setBorder(
+				    BorderFactory.createCompoundBorder(
+					BorderFactory.createCompoundBorder(
+							BorderFactory.createTitledBorder(PluginServices.getText(this,"transformations")),
+							BorderFactory.createEmptyBorder(12,5,70,5)),
+							jScrollPane.getBorder()));
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+	
+	public JButton getJButtonInfo() {
+		if(JButtonInfo == null) {
+			JButtonInfo = new JButton();
+			//Poner: JButtonInfo.setPreferredSize(new Dimension(100,20));			
+			JButtonInfo.setText(PluginServices.getText(this,"info_transformations"));			
+			JButtonInfo.setMnemonic('I');
+			JButtonInfo.setEnabled(false);			
+		}
+		return JButtonInfo;
+	}
+	
+	/**
+	 * Consigue el crs elegido de las transformaciones
+	 * recientes cuando el se utiliza transformacin EPSG o manual
+	 * @return
+	 */
+	public ICrs getProjection() {
+		ICrs crs = null;
+		try {
+			String[] sourceAuthority = getSourceAbrev().split(":");
+			//crs = new CrsFactory().getCRS(getCode(), getWKT(),getParams());
+			crs = new CrsFactory().getCRS(sourceAuthority[0]+":"+getCode());
+			crs.setTransformationParams(getParams(),null);
+		} catch (CrsException e) {
+			e.printStackTrace();
+		}
+		return crs;
+	}
+	
+	/**
+	 * Consigue el crs elegido de las transformaciones recientes compuestas
+	 * cuando se utiliza una transformacion compuesta
+	 * @param info
+	 * @return
+	 */
+	public ICrs getProjectionComplex(String details) {
+		ICrs crs = null;
+		RecentTrsPersistence trPersistence = new RecentTrsPersistence();
+		TrData crsTrDataArray[] = trPersistence.getArrayOfTrData();
+		CompTrData comp = null;
+		String sourceTransformation = null;
+		String targetTransformation = null;
+		for (int iRow = crsTrDataArray.length-1; iRow >= 0; iRow--) {
+			if (details.equals(crsTrDataArray[iRow].getDetails())) {
+				if (crsTrDataArray[iRow] instanceof CompTrData) {
+					comp = (CompTrData) crsTrDataArray[iRow];
+					break;
+				}
+			}
+		}
+		
+		if (comp.getFirstTr().getAuthority().equals(PluginServices.getText(this, "EPSG"))) {
+			TransEPSG epsgParams = new TransEPSG(comp.getFirstTr().getCode(),connect, getInverseTransformation());
+			setParamsEPGS(epsgParams.getParamValue());
+			sourceTransformation = getParams();
+		} else if (comp.getFirstTr().getAuthority().equals(PluginServices.getText(this, "USR"))) {
+			//mirar si funciona y lleva los [  ]
+			setParamsManual(comp.getFirstTr().getDetails());
+			sourceTransformation = getParams();
+		} else if (comp.getFirstTr().getAuthority().equals(PluginServices.getText(this, "NADGR"))) {
+			String info = comp.getFirstTr().getDetails();
+			String[] partes = info.split("\\(");
+			String nadFile = partes[0];		
+			sourceTransformation = "+nadgrids="+nadFile;			
+		}
+		
+		if (comp.getSecondTr().getAuthority().equals(PluginServices.getText(this, "EPSG"))) {
+			TransEPSG epsgParams = new TransEPSG(comp.getSecondTr().getCode(),connect, getInverseTransformation());
+			setParamsEPGS(epsgParams.getParamValue());
+			targetTransformation = getParams();
+		} else if (comp.getSecondTr().getAuthority().equals(PluginServices.getText(this, "USR"))) {
+			//mirar si funciona y lleva los [  ]
+			setParamsManual(comp.getSecondTr().getDetails());
+			targetTransformation = getParams();
+		} else if (comp.getSecondTr().getAuthority().equals(PluginServices.getText(this, "NADGR"))) {
+			String info = comp.getSecondTr().getDetails();
+			String[] partes = info.split("\\(");
+			String nadFile = partes[0];		
+			targetTransformation = "+nadgrids="+nadFile;			
+		}
+		
+		try {
+			crs = new CrsFactory().getCRS(getSourceAbrev());
+			crs.setTransformationParams(sourceTransformation,targetTransformation);//nadFile);
+			return crs;
+		} catch (org.gvsig.crs.CrsException e) {
+			e.printStackTrace();
+		}
+				
+		return crs;
+	}
+	
+	/**
+	 * Consigue el crs elegido de las transformaciones
+	 * recientes cuando se utiliza transformacin de rejillas
+	 * @param info
+	 * @return
+	 */
+	public ICrs getProjectionNad(String info) {
+		String[] partes = info.split("\\(");
+		String nadFile = partes[0];		
+		int codigoNad = Integer.parseInt((partes[1].substring(0,partes[1].length()-1)).split(":")[1]);
+		ICrs crs;
+		String[] sourceAuthority = getSourceAbrev().split(":");
+		
+		if (getCode() == codigoNad){
+			try {
+				setNad(false);
+				//Siempre EPSG porque solo permitimos transformaciones
+				//en el caso en que source y target sean de la EPSG
+				crs = new CrsFactory().getCRS(sourceAuthority[0]+":"+getCode());
+				crs.setTransformationParams("+nadgrids="+nadFile,null);//nadFile);
+				return crs;
+			} catch (org.gvsig.crs.CrsException e) {
+				e.printStackTrace();
+			}
+			return null;
+		}
+		else {	
+			setNad(true);
+			try {
+				crs = new CrsFactory().getCRS(sourceAuthority[0]+":"+getCode());
+				crs.setTransformationParams(null,"+nadgrids="+nadFile);//nadFile);
+				
+				return crs;
+			} catch (CrsException e) {				
+				e.printStackTrace();
+			}
+			return null;
+		}	
+	}
+	
+	/**
+	 * 
+	 * @param nadg Define si el fichero rejillas se calcula en el crs fuente o destino
+	 */
+	public void setNad(boolean nadg){
+		targetNad = nadg;		
+	}
+	
+	/**
+	 * 
+	 * @return Devuelve si el fichero de rejillas se calcula en el crs fuente o destino
+	 */
+	public boolean getNad(){
+		return targetNad;		
+	}
+	
+	/**
+	 * 
+	 * @param cod Cdigo del CRS elegido
+	 */
+	public void setCode(int cod){
+		code = cod;
+	}
+	
+	/**
+	 * 
+	 * @return Devuelve el cdigo del CRS elegido
+	 */
+	public int getCode(){
+		return code;
+	}
+	
+	/**
+	 * 
+	 * @param cad Cadena wkt del crs fuente
+	 */
+	public void setWKT(String cad){
+		cadWKT = cad;		
+	}	
+	
+	/**
+	 * 
+	 * @return Devuelve la cadena wkt del crs fuente
+	 */
+	public String getWKT(){
+		return cadWKT;
+	}
+	
+	/**
+	 * 
+	 * @param param Hacemos la cadena con los parmetros de la transformacin manual
+	 */
+	public void setParamsManual(String param){
+		params = "+towgs84="+param.substring(1,param.length()-1)+" ";
+	}
+	
+	/**
+	 * 
+	 * @param values Hacemos la cadena con los parmetros de la transformacin EPSG
+	 */
+	public void setParamsEPGS(String[] values){
+		params = "+towgs84="+values[0];
+		for(int i = 1; i < values.length; i++)
+			params +=","+values[i];
+		params += " ";
+	}
+	
+	/**
+	 * 
+	 * @param nadfile
+	 */
+	public void setParamsNads(String nadfile){
+		
+	}
+	
+	/**
+	 * 
+	 * @return Deuelve una cadena con los parmetros de la transformacin
+	 */
+	public String getParams(){
+		return params;
+	}
+	
+	/**
+	 * 
+	 * @param inverse Parmetro que define si la transformacin es directa o inversa
+	 */
+	public void setInverseTransformation(boolean inverse){
+		inverseTransformation = inverse;
+	}
+	
+	/**
+	 * 
+	 * @return Devuelve si es una transformacin directa o inversa
+	 */
+	public boolean getInverseTransformation(){
+		return inverseTransformation;
+	}
+	
+	/**
+	 * 
+	 * @param code Cdigo de la transformacin EPGS elegida
+	 */
+	public void setTrCode(int code){
+		trCode = code;
+	}
+	
+	/**
+	 * 
+	 * @return Devuelve el cdigo de la transformacin
+	 */
+	public int getTrCode(){
+		return trCode;
+	}
+	
+	/**
+	 * Carga en la tabla los CRSs leidos del sistema de persistencia.
+	 */
+	public void loadRecents(String source, String target){
+		setSourceAbrev(source);
+		//		Eliminar filas en cada nueva bsqueda
+		int numRow = dtm.getRowCount();
+		while (numRow != 0) {
+			numRow = numRow - 1;
+			dtm.removeRow(numRow);
+		}
+		RecentTrsPersistence persistence = new RecentTrsPersistence();
+		trDataArray = persistence.getArrayOfTrData();
+		
+
+		for (int iRow = trDataArray.length-1;iRow>=0;iRow--){
+			String crsSource = ((String)trDataArray[iRow].getCrsSource());
+			String crsTarget = ((String)trDataArray[iRow].getCrsTarget());
+			if(source.equals(crsSource) && target.equals(crsTarget)){
+				Object row[] ={trDataArray[iRow].getAuthority()+":"+trDataArray[iRow].getCode(),trDataArray[iRow].getName(),trDataArray[iRow].getCrsSource(),
+					trDataArray[iRow].getCrsTarget(),trDataArray[iRow].getDetails()};
+				dtm.addRow(row);
+			}
+		}
+		
+		/*
+		/*Seleccionar el primer registro.
+		 */
+		int numr = dtm.getRowCount();
+		if (numr != 0 )
+			this.getJTable().setRowSelectionInterval(0,0);
+	}
+	
+	/**
+	 * Carga en la tabla los CRSs leidos del sistema de persistencia, para
+	 * las transformaciones compuestas
+	 */
+	public void loadRecentsCompuesta(String source){
+		
+		//		Eliminar filas en cada nueva bsqueda
+		int numRow = dtm.getRowCount();
+		while (numRow != 0) {
+			numRow = numRow - 1;
+			dtm.removeRow(numRow);
+		}
+		RecentTrsPersistence persistence = new RecentTrsPersistence();
+		trDataArray = persistence.getArrayOfTrData();
+		
+
+		for (int iRow = trDataArray.length-1;iRow>=0;iRow--){
+			if (trDataArray[iRow] instanceof CompTrData) {
+				continue;
+			} else {
+				String crsSource = ((String)trDataArray[iRow].getCrsSource());
+				String crsTarget = ((String)trDataArray[iRow].getCrsTarget());
+				if(source.equals(crsSource) || source.equals(crsTarget)){
+					Object row[] ={trDataArray[iRow].getAuthority()+":"+trDataArray[iRow].getCode(),trDataArray[iRow].getName(),trDataArray[iRow].getCrsSource(),
+						trDataArray[iRow].getCrsTarget(),trDataArray[iRow].getDetails()};
+					dtm.addRow(row);
+				}
+			}
+		}
+		
+		/*
+		/*Seleccionar el primer registro.
+		 */
+		int numr = dtm.getRowCount();
+		if (numr != 0 )
+			this.getJTable().setRowSelectionInterval(0,0);
+	}
+	
+	public void setSourceAbrev(String source) {
+		sourceAbrev = source;
+	}
+	
+	public String getSourceAbrev() {
+		return sourceAbrev;
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/panels/TransformationRecentsPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/CRSSelectionTrDialog.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/CRSSelectionTrDialog.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/CRSSelectionTrDialog.java	(revision 25287)
@@ -0,0 +1,101 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui;
+
+import javax.swing.JPanel;
+
+import org.gvsig.crs.CrsWkt;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.persistence.CrsData;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.cit.gvsig.project.documents.view.gui.BaseView;
+
+/**
+ * Di�logo contenedor del panel de la selecci�n de CRS y transformaci�n
+ * de la capa a a�adir
+ * 
+ * @author Jos� Luis G�mez Mart�nez (JoseLuis.Gomez@uclm.es)
+ *
+ */
+
+public class CRSSelectionTrDialog extends JPanel {
+	
+	private static final long serialVersionUID = 1L;
+	
+	JPanel contentPane = null;
+	ICrs curProj = null;
+
+	public CRSSelectionTrDialog(ICrs proj) {
+		super(false);
+		curProj = proj;
+		if (curProj.getSourceTransformationParams() == null && curProj.getTargetTransformationParams() == null) {
+			CrsData crsData = new CrsData(proj.getCrsWkt().getAuthority()[0], proj.getCode(),proj.getCrsWkt().getName());
+			RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+			persistence.addCrsData(crsData);
+		}
+		inicializate();
+	}
+	public void inicializate(){
+		this.add(getContentPanel(), null);        
+	}
+			
+    public CRSMainTrPanel getProjPanel() {
+        return (CRSMainTrPanel) getContentPanel();
+    }
+
+	public JPanel getContentPanel() {
+	    if (contentPane == null) {	    	
+	    	IWindow activeWindow = PluginServices.getMDIManager().getActiveWindow();
+	    	BaseView activeView = (com.iver.cit.gvsig.project.documents.view.gui.BaseView) activeWindow;
+	    	int target = ((ICrs) activeView.getMapControl().getProjection()).getCode();
+	    	CrsWkt crsWktTarget = ((ICrs) activeView.getMapControl().getProjection()).getCrsWkt();
+	    	if (crsWktTarget.getDatumName().equals("")){	    		
+	    	}
+        	contentPane = new CRSMainTrPanel(target, crsWktTarget, curProj);        	
+	    	      	
+       }
+	   return contentPane;
+    }
+	
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/gui/CRSSelectionTrDialog.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/CompTrData.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/CompTrData.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/CompTrData.java	(revision 25287)
@@ -0,0 +1,43 @@
+package org.gvsig.crs.persistence;
+
+/**
+ * Clase que contiene los datos de una Transformaci�n compuestas que son 
+ * utilizados por el mecanismo de persistencia para almacenar las 
+ * Transformaciones recientemente usadas. 
+ * 
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ *
+ */
+public class CompTrData extends TrData {
+	
+	TrData 			firstTr 		= null;
+	TrData 			secondTr 		= null;
+	public CompTrData(String authority, int code, String name, String crsSource, String crsTarget, String details, TrData firstTr, TrData secondTr) {
+		super(authority, code, name, crsSource, crsTarget, details);
+		this.firstTr = firstTr;
+		this.secondTr = secondTr;
+	}
+	
+	public CompTrData(TrData firstTr, TrData secondTr) {
+		super("COMP", 0, "----", firstTr.getCrsSource(), secondTr.getCrsTarget(),
+				firstTr.getDetails()+" @ "+secondTr.getDetails());
+		this.firstTr = firstTr;
+		this.secondTr = secondTr;
+	}
+
+	public TrData getFirstTr() {
+		return firstTr;
+	}
+
+	public void setFirstTr(TrData firstTr) {
+		this.firstTr = firstTr;
+	}
+
+	public TrData getSecondTr() {
+		return secondTr;
+	}
+
+	public void setSecondTr(TrData secondTr) {
+		this.secondTr = secondTr;
+	}
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/CompTrData.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/RecentTrsPersistence.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/RecentTrsPersistence.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/RecentTrsPersistence.java	(revision 25287)
@@ -0,0 +1,327 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+*
+* Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ib��ez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha
+*   Campus Universitario s/n
+*   02071 Alabacete
+*   Spain
+*
+*   +34 967 599 200
+*/
+
+package org.gvsig.crs.persistence;
+
+import java.util.Arrays;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Set;
+
+import com.iver.andami.PluginServices;
+import com.iver.utiles.DateTime;
+import com.iver.utiles.XMLEntity;
+
+/**
+ * This class is used to save a list of Transfomations (using the
+ * Andami persistence model) to the plugins-persistence.xml file.
+ * It has methods to create a set of TrData objects  from an
+ * xml file. It can also save a set of TrData objects in an
+ * xml file.
+ *
+ * @author Diego Guerrero Sevilla diego.guerrero@uclm.es
+ */
+public class RecentTrsPersistence {
+	private XMLEntity xml = null;
+	private XMLEntity recentsXml = null;
+	private PluginServices ps = null;
+	private static final String TR_RECENTS = "recentTransformations";
+	private static final String TR_AUTHORITY = "authority";
+	private static final String TR_NAME = "name";
+	private static final String TR_CODE = "code";
+	private static final String TR_CRS_SOURCE = "crsSource";
+	private static final String TR_CRS_TARGET = "crsTarget";
+	private static final String TR_DETAILS = "details";
+	private static final String TR_DATE = "date";
+	
+	
+	/**
+	 * Constructor
+	 */
+	public RecentTrsPersistence(){
+		ps = PluginServices.getPluginServices("org.gvsig.crs");
+		xml = ps.getPersistentXML();
+		for (int child = 0; child<xml.getChildrenCount();child++)
+			if (xml.getChild(child).getPropertyValue(0).equals(TR_RECENTS))
+				recentsXml = xml.getChild(child); 
+		if (recentsXml == null){
+			XMLEntity xmlEntity = new XMLEntity();
+			xmlEntity.putProperty("groupName", TR_RECENTS);
+			xml.addChild(xmlEntity); 
+			recentsXml = xmlEntity;
+		}
+	}
+
+	/**
+	 * This methos is used to save the information in an XML file
+	 */
+	public void setPersistent(){
+		ps.setPersistentXML(xml);
+	}
+
+	/**
+	 * This method saves an array of TrData using the Anadami
+	 * persistence model
+	 * @param tr
+	 * Array of trData to save.
+	 */
+	public void setArrayOfTrData(TrData[] trs){
+		recentsXml.getXmlTag().removeAllXmlTag();
+
+		for (int i=0 ; i<trs.length ; i++){
+			recentsXml.addChild(trDataToXml(trs[i]));
+		}
+
+	}
+
+	/**
+	 * This method adds a TrData using the Anadami
+	 * persistence model. If the Transformation exists just actualizes
+	 * the type name and the wkt string.
+	 * @param tr
+	 * TrData
+	 */
+	public void addTrData(TrData tr){
+		TrData[] trs = getArrayOfTrData();
+
+		boolean found = false;
+
+		for (int i = 0; i < trs.length; i++) {
+			if (trs[i].getAuthority().equals(tr.getAuthority())&& trs[i].getCode()==tr.getCode() 
+					&& trs[i].getCrsSource().equals(tr.getCrsSource()) && trs[i].getCrsTarget().equals(tr.getCrsTarget()) && trs[i].getDetails().equals(tr.getDetails())) {
+				found = true;
+				trs[i].setName(tr.getName());
+				trs[i].setProperies(tr.getProperies());
+				trs[i].updateLastAccess();
+				setArrayOfTrData(trs);
+			}
+		}
+		
+		if (!found) {
+			if (trs.length<10){ //L�mitie de almacenamiento: 10 Transf.
+				TrData[] newTrs = new TrData[trs.length + 1];
+				System.arraycopy(trs, 0, newTrs, 0, trs.length);
+				newTrs[trs.length] = tr;
+				setArrayOfTrData(newTrs);
+			}
+			else {
+				Arrays.sort(trs);
+				trs[0]=tr;
+				setArrayOfTrData(trs);
+			}
+		}
+	}
+
+
+
+	/**
+	 * This method returns an array of TrData objects that
+	 * have been saved using the Andami persistence model.
+	 * @return
+	 * TrData[]
+	 */
+	public TrData[] getArrayOfTrData(){
+		TrData[] trs = new TrData[recentsXml.getChildrenCount()];
+		for (int i=0 ; i<recentsXml.getChildrenCount() ; i++){
+			trs[i] = xmlToTrData(recentsXml.getChild(i));
+		}
+		
+		/*
+		 * Ordenar el array por fechas
+		 */
+		Arrays.sort(trs);
+		
+		return trs;
+	}
+
+
+	/**
+	 * This method creates and returns a new XMLEntity.
+	 * @param tr
+	 * TrData with all the Transformation information
+	 * @return
+	 * XMLEntity
+	 */
+	public XMLEntity trDataToXml(TrData tr){
+		String dFormat="Y-m-d H:i:s.Z";
+	
+		XMLEntity xmlEnt = new XMLEntity();
+		xmlEnt.putProperty(TR_AUTHORITY,tr.getAuthority());
+		xmlEnt.putProperty(TR_CODE,Integer.toString(tr.getCode()));
+		xmlEnt.putProperty(TR_NAME,(tr.getName()));
+		xmlEnt.putProperty(TR_CRS_SOURCE,(tr.getCrsSource()));
+		xmlEnt.putProperty(TR_CRS_TARGET,(tr.getCrsTarget()));
+		xmlEnt.putProperty(TR_DETAILS,(tr.getDetails()));
+		xmlEnt.putProperty(TR_DATE,DateTime.dateToString(tr.getDate(),dFormat));
+		Set keys = tr.getProperies().keySet();
+		Iterator it = keys.iterator();
+	    while (it.hasNext()) {
+	    	String next = (String)it.next();
+	    	xmlEnt.putProperty(next,
+	    			tr.getProperies().get(next));
+	    }	
+	    
+	    if (tr instanceof CompTrData) {
+	    	CompTrData compTr = (CompTrData) tr;
+	    	xmlEnt.addChild(trDataToXml(compTr.getFirstTr()));
+	    	xmlEnt.addChild(trDataToXml(compTr.getSecondTr()));
+		}
+	    
+		return xmlEnt;
+	}
+
+	/**
+	 * This method creates a new TrData from a XMLEntity
+	 * @param xmlEnt
+	 * XMLRntity that contains the Tr information
+	 * @return
+	 * TrData
+	 */
+	public TrData xmlToTrData(XMLEntity xmlEnt){
+		
+		TrData trData = null;
+		
+		Properties props = null;
+		
+		String authority = "";
+		int code = 0;
+		String name = "";
+		String crsSource = "";
+		String crsTarget = "";
+		String details = "";
+		Date date = null;
+
+		authority = xmlEnt.getStringProperty(TR_AUTHORITY);
+		code = Integer.valueOf(xmlEnt.getStringProperty(TR_CODE)).intValue();
+		name = xmlEnt.getStringProperty(TR_NAME);
+		crsSource = xmlEnt.getStringProperty(TR_CRS_SOURCE);
+		crsTarget = xmlEnt.getStringProperty(TR_CRS_TARGET);
+		details = xmlEnt.getStringProperty(TR_DETAILS);
+		date = DateTime.stringToDate(xmlEnt.getStringProperty(TR_DATE));
+		
+		if (xmlEnt.getChildrenCount()==2){
+			authority = xmlEnt.getChild(0).getStringProperty(TR_AUTHORITY);
+			code = Integer.valueOf(xmlEnt.getChild(0).getStringProperty(TR_CODE)).intValue();
+			name = xmlEnt.getChild(0).getStringProperty(TR_NAME);
+			crsSource = xmlEnt.getChild(0).getStringProperty(TR_CRS_SOURCE);
+			crsTarget = xmlEnt.getChild(0).getStringProperty(TR_CRS_TARGET);
+			details = xmlEnt.getChild(0).getStringProperty(TR_DETAILS);
+			date = DateTime.stringToDate(xmlEnt.getChild(0).getStringProperty(TR_DATE));
+			TrData firstTr = new TrData(authority,code,name,crsSource,crsTarget,details,date);
+			
+			props = new Properties();
+			for (int i=0 ; i<xmlEnt.getPropertyCount() ; i++){
+				String property = xmlEnt.getChild(0).getPropertyName(i);
+				if (!((property.equals(TR_AUTHORITY)) ||
+					(property.equals(TR_CODE)) ||
+					(property.equals(TR_NAME)) ||
+					(property.equals(TR_CRS_SOURCE)) ||
+					(property.equals(TR_CRS_TARGET)) ||
+					(property.equals(TR_DETAILS)) ||
+					(property.equals(TR_DATE)))){
+						props.put(property,xmlEnt.getChild(0).getStringProperty(property));
+					}					
+			}
+			firstTr.setProperies(props);
+			
+			authority = xmlEnt.getChild(1).getStringProperty(TR_AUTHORITY);
+			code = Integer.valueOf(xmlEnt.getChild(1).getStringProperty(TR_CODE)).intValue();
+			name = xmlEnt.getChild(1).getStringProperty(TR_NAME);
+			crsSource = xmlEnt.getChild(1).getStringProperty(TR_CRS_SOURCE);
+			crsTarget = xmlEnt.getChild(1).getStringProperty(TR_CRS_TARGET);
+			details = xmlEnt.getChild(1).getStringProperty(TR_DETAILS);
+			date = DateTime.stringToDate(xmlEnt.getChild(1).getStringProperty(TR_DATE));
+			TrData secondTr = new TrData(authority,code,name,crsSource,crsTarget,details,date);
+			
+			props = new Properties();
+			for (int i=0 ; i<xmlEnt.getPropertyCount() ; i++){
+				String property = xmlEnt.getChild(0).getPropertyName(i);
+				if (!((property.equals(TR_AUTHORITY)) ||
+					(property.equals(TR_CODE)) ||
+					(property.equals(TR_NAME)) ||
+					(property.equals(TR_CRS_SOURCE)) ||
+					(property.equals(TR_CRS_TARGET)) ||
+					(property.equals(TR_DETAILS)) ||
+					(property.equals(TR_DATE)))){
+						props.put(property,xmlEnt.getChild(0).getStringProperty(property));
+					}					
+			}
+			secondTr.setProperies(props);
+			
+			trData = new CompTrData(firstTr,secondTr);
+		}
+		else{
+			authority = xmlEnt.getStringProperty(TR_AUTHORITY);
+			code = Integer.valueOf(xmlEnt.getStringProperty(TR_CODE)).intValue();
+			name = xmlEnt.getStringProperty(TR_NAME);
+			crsSource = xmlEnt.getStringProperty(TR_CRS_SOURCE);
+			crsTarget = xmlEnt.getStringProperty(TR_CRS_TARGET);
+			details = xmlEnt.getStringProperty(TR_DETAILS);
+			date = DateTime.stringToDate(xmlEnt.getStringProperty(TR_DATE));	
+			
+			trData = new TrData(authority,code,name,crsSource,crsTarget,details,date);
+		}
+		
+		props = new Properties();
+		for (int i=0 ; i<xmlEnt.getPropertyCount() ; i++){
+			String property = xmlEnt.getPropertyName(i);
+			if (!((property.equals(TR_AUTHORITY)) ||
+				(property.equals(TR_CODE)) ||
+				(property.equals(TR_NAME)) ||
+				(property.equals(TR_CRS_SOURCE)) ||
+				(property.equals(TR_CRS_TARGET)) ||
+				(property.equals(TR_DETAILS)) ||
+				(property.equals(TR_DATE)))){
+					props.put(property,xmlEnt.getStringProperty(property));
+				}					
+		}
+		trData.setProperies(props);
+		return trData;
+	}
+
+	public XMLEntity getXml() {
+		return xml;
+	}
+
+	public void setXml(XMLEntity xml) {
+		this.xml = xml;
+	}
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/RecentTrsPersistence.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/package.html
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/package.html	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/package.html	(revision 25287)
@@ -0,0 +1,4 @@
+<html>
+	<body>Clases relacionadas con la persistencia de la extensi�n CRS.
+</body>
+</html>

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/package.html
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/TrData.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/TrData.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/TrData.java	(revision 25287)
@@ -0,0 +1,167 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.persistence;
+
+import java.util.Date;
+import java.util.Properties;
+
+import com.iver.utiles.DateTime;
+
+/**
+ * Esta clase contiene los datos de una Transformaci�n que son utilizados 
+ * por el mecanismo de persistencia para almacenar las Transformaciones
+ * recientemente usadas. 
+ * 
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ */
+public class TrData implements Comparable{
+	
+	private String authority = null;
+	private int code = 0;
+	private String name = null;
+	private String crsSource = null;
+	private String crsTarget = null;
+	private String details = null;
+	private Date date = null;
+	private Properties properies = new Properties();
+	
+	
+	
+	public TrData(String authority, int code, String name, String crsSource, String crsTarget, String details) {
+		super();
+		this.authority = authority;
+		this.code = code;
+		this.name = name;
+		this.crsSource= crsSource;
+		this.crsTarget = crsTarget;
+		this.details = details;
+		this.date = DateTime.getCurrentDate();
+	}
+	
+	public TrData(String authority, int code, String name,String crsSource, String crsTarget, String detalis, Date date) {
+		super();
+		this.authority = authority;
+		this.code = code;
+		this.name = name;
+		this.crsSource= crsSource;
+		this.crsTarget = crsTarget;
+		this.details = detalis;
+		this.date = date;
+	}
+
+	public TrData() {
+	}
+	
+	public String getAuthority() {
+		return authority;
+	}
+	
+	public int getCode() {
+		return code;
+	}
+	
+	public String getName() {
+		return name;
+	}
+	
+	/**
+	 * @return Returns the properies.
+	 */
+	public Properties getProperies() {
+		return properies;
+	}
+
+	/**
+	 * @param properies The properies to set.
+	 */
+	public void setProperies(Properties properies) {
+		this.properies = properies;
+	}
+
+	public void setAuthority(String authority) {
+		this.authority = authority;
+	}
+
+	public void setCode(int code) {
+		this.code = code;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public Date getDate() {
+		return date;
+	} 
+	
+	public void updateLastAccess() {        
+		date = DateTime.getCurrentDate();
+	}
+
+	public int compareTo(Object o) {
+		TrData trData = (TrData)o;
+		return this.date.compareTo(trData.getDate());
+	}
+
+	public String getCrsSource() {
+		return crsSource;
+	}
+
+	public void setCrsSource(String crsSource) {
+		this.crsSource = crsSource;
+	}
+
+	public String getCrsTarget() {
+		return crsTarget;
+	}
+
+	public void setCrsTarget(String crsTarget) {
+		this.crsTarget = crsTarget;
+	}
+
+	public String getDetails() {
+		return details;
+	}
+
+	public void setDetails(String details) {
+		this.details = details;
+	} 
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/TrData.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/RecentCRSsPersistence.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/RecentCRSsPersistence.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/RecentCRSsPersistence.java	(revision 25287)
@@ -0,0 +1,238 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+*
+* Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ib��ez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha
+*   Campus Universitario s/n
+*   02071 Alabacete
+*   Spain
+*
+*   +34 967 599 200
+*/
+
+package org.gvsig.crs.persistence;
+
+import java.util.Arrays;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Set;
+
+import com.iver.andami.PluginServices;
+import com.iver.utiles.DateTime;
+import com.iver.utiles.XMLEntity;
+
+/**
+ * This class is used to save a list of CRSs (using the
+ * Andami persistence model) to the plugins-persistence.xml file.
+ * It has methods to create a set of CrsData objects  from an
+ * xml file. It can also save a set of CRSs objects in an
+ * xml file.
+ *
+ * @author Diego Guerrero Sevilla diego.guerrero@uclm.es
+ */
+public class RecentCRSsPersistence {
+	private XMLEntity xml = null;
+	private XMLEntity recentsXml = null;
+	private PluginServices ps = null;
+	private static final String CRS_RECENTS = "recentCrss";
+	private static final String CRS_AUTHORITY = "authority";
+	private static final String CRS_NAME = "name";
+	private static final String CRS_CODE = "code";
+	private static final String CRS_DATE = "date";
+	
+	
+	/**
+	 * Constructor
+	 */
+	public RecentCRSsPersistence(){
+		ps = PluginServices.getPluginServices("org.gvsig.crs");
+		xml = ps.getPersistentXML();
+		for (int child = 0; child<xml.getChildrenCount();child++)
+			if (xml.getChild(child).getPropertyValue(0).equals(CRS_RECENTS))
+				recentsXml = xml.getChild(child); 
+		if (recentsXml == null){
+			XMLEntity xmlEntity = new XMLEntity();
+			xmlEntity.putProperty("groupName", CRS_RECENTS);
+			xml.addChild(xmlEntity); 
+			recentsXml = xmlEntity;
+		}
+	}
+
+	/**
+	 * This methos is used to save the information in an XML file
+	 */
+	public void setPersistent(){
+		ps.setPersistentXML(xml);
+	}
+
+	/**
+	 * This method saves an array of CrsData using the Anadami
+	 * persistence model
+	 * @param crsss
+	 * Array of crss
+	 */
+	public void setArrayOfCrsData(CrsData[] crss){
+		recentsXml.getXmlTag().removeAllXmlTag();
+
+		for (int i=0 ; i<crss.length ; i++){
+			recentsXml.addChild(crsDataToXml(crss[i]));
+		}
+
+	}
+
+	/**
+	 * This method adds a CrsData using the Anadami
+	 * persistence model. If the Crs exists just actualizes
+	 * the type name and the wkt string.
+	 * @param crs
+	 * CrsData
+	 */
+	public void addCrsData(CrsData crs){
+		CrsData[] crss = getArrayOfCrsData();
+
+		boolean found = false;
+
+		for (int i = 0; i < crss.length; i++) {
+			if (crss[i].getAuthority().equals(crs.getAuthority())&& crss[i].getCode()==crs.getCode()) {
+				found = true;
+				crss[i].setName(crs.getName());
+				crss[i].setProperies(crs.getProperies());
+				crss[i].updateLastAccess();
+				setArrayOfCrsData(crss);
+			}
+		}
+		
+		if (!found) {
+			if (crss.length<10){ //L�mite de almacenamiento: 10 CRSs
+				CrsData[] newCrss = new CrsData[crss.length + 1];
+				System.arraycopy(crss, 0, newCrss, 0, crss.length);
+				newCrss[crss.length] = crs;
+				setArrayOfCrsData(newCrss);
+			}
+			else {
+				Arrays.sort(crss);
+				crss[0]=crs;
+				setArrayOfCrsData(crss);
+			}
+		}
+	}
+
+
+
+	/**
+	 * This method returns an array of CrsData objects that
+	 * have been saved using the Andami persistence model.
+	 * @return
+	 * CrsData[]
+	 */
+	public CrsData[] getArrayOfCrsData(){
+		CrsData[] crss = new CrsData[recentsXml.getChildrenCount()];
+		for (int i=0 ; i<recentsXml.getChildrenCount() ; i++){
+			crss[i] = xmlToCrsData(recentsXml.getChild(i));
+		}
+		
+		/*
+		 * Ordenar el array por fechas
+		 */
+		Arrays.sort(crss);
+		
+		return crss;
+	}
+
+
+	/**
+	 * This method creates and returns a new XMLEntity.
+	 * @param crs
+	 * CrsData with all the Crs information
+	 * @return
+	 * XMLEntity
+	 */
+	public XMLEntity crsDataToXml(CrsData crs){
+		String dFormat="Y-m-d H:i:s.Z";
+	
+		XMLEntity xmlEnt = new XMLEntity();
+		xmlEnt.putProperty(CRS_AUTHORITY,crs.getAuthority());
+		xmlEnt.putProperty(CRS_CODE,Integer.toString(crs.getCode()));
+		xmlEnt.putProperty(CRS_NAME,(crs.getName()));
+		xmlEnt.putProperty(CRS_DATE,DateTime.dateToString(crs.getDate(),dFormat));
+		Set keys = crs.getProperies().keySet();
+		Iterator it = keys.iterator();
+	    while (it.hasNext()) {
+	    	String next = (String)it.next();
+	    	xmlEnt.putProperty(next,
+	    			crs.getProperies().get(next));
+	    }		   
+		return xmlEnt;
+	}
+
+	/**
+	 * This method creates a new CrsData from a XMLEntity
+	 * @param xmlEnt
+	 * XMLRntity that contains the Crs information
+	 * @return
+	 * CrsData
+	 */
+	public CrsData xmlToCrsData(XMLEntity xmlEnt){
+		String authority = "";
+		int code = 0;
+		String name = "";
+		Date date = null;
+
+		authority = xmlEnt.getStringProperty(CRS_AUTHORITY);
+		code = Integer.valueOf(xmlEnt.getStringProperty(CRS_CODE)).intValue();
+		name = xmlEnt.getStringProperty(CRS_NAME);
+		date = DateTime.stringToDate(xmlEnt.getStringProperty(CRS_DATE));
+		
+		CrsData crsData = new CrsData(authority,code,name,date);
+		
+		Properties props = new Properties();
+		for (int i=0 ; i<xmlEnt.getPropertyCount() ; i++){
+			String property = xmlEnt.getPropertyName(i);
+			if (!((property.equals(CRS_AUTHORITY)) ||
+				(property.equals(CRS_CODE)) ||
+				(property.equals(CRS_NAME)) ||
+				(property.equals(CRS_DATE)))){
+					props.put(property,xmlEnt.getStringProperty(property));
+				}					
+		}
+		crsData.setProperies(props);
+		return crsData;
+	}
+
+	public XMLEntity getXml() {
+		return xml;
+	}
+
+	public void setXml(XMLEntity xml) {
+		this.xml = xml;
+	}
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/RecentCRSsPersistence.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/CrsData.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/CrsData.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/CrsData.java	(revision 25287)
@@ -0,0 +1,137 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.persistence;
+
+import java.util.Date;
+import java.util.Properties;
+
+import com.iver.utiles.DateTime;
+
+/**
+ * Esta clase contiene los datos de un CRS que son utilizados 
+ * por el mecanismo de persistencia para almacenar los CRSs
+ * recientemente utilizados. 
+ * 
+ * @author Diego Guerrero Sevilla diego.guerrero@uclm.es
+ */
+public class CrsData implements Comparable{
+	
+	private String authority = null;
+	private int code = 0;
+	private String name = null;
+	private Date date = null;
+	private Properties properies = new Properties();
+	
+	
+	
+	public CrsData(String authority, int code, String name) {
+		super();
+		// TODO Auto-generated constructor stub
+		this.authority = authority;
+		this.code = code;
+		this.name = name;
+		this.date = DateTime.getCurrentDate();
+	}
+	
+	public CrsData(String authority, int code, String name, Date date) {
+		super();
+		// TODO Auto-generated constructor stub
+		this.authority = authority;
+		this.code = code;
+		this.name = name;
+		this.date = date;
+	}
+
+	public CrsData() {
+		// TODO Auto-generated constructor stub
+	}
+	
+	public String getAuthority() {
+		return authority;
+	}
+	
+	public int getCode() {
+		return code;
+	}
+	
+	public String getName() {
+		return name;
+	}
+	
+	/**
+	 * @return Returns the properies.
+	 */
+	public Properties getProperies() {
+		return properies;
+	}
+
+	/**
+	 * @param properies The properies to set.
+	 */
+	public void setProperies(Properties properies) {
+		this.properies = properies;
+	}
+
+	public void setAuthority(String authority) {
+		this.authority = authority;
+	}
+
+	public void setCode(int code) {
+		this.code = code;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public Date getDate() {
+		return date;
+	} 
+	
+	public void updateLastAccess() {        
+		date = DateTime.getCurrentDate();
+	}
+
+	public int compareTo(Object o) {
+		CrsData crsData = (CrsData)o;
+		return this.date.compareTo(crsData.getDate());
+	} 
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/persistence/CrsData.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/InitialWarningExtension.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/InitialWarningExtension.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/extJCRS/src/org/gvsig/crs/InitialWarningExtension.java	(revision 25287)
@@ -0,0 +1,207 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+
+/* CVS MESSAGES:
+*
+* $Id: InitialWarningExtension.java 8765 2006-11-15 00:08:29Z jjdelcerro $
+* $Log$
+* Revision 1.3.4.1  2006-11-15 00:08:08  jjdelcerro
+* *** empty log message ***
+*
+* Revision 1.4  2006/10/02 13:52:34  jaume
+* organize impots
+*
+* Revision 1.3  2006/08/29 07:56:27  cesar
+* Rename the *View* family of classes to *Window* (ie: SingletonView to SingletonWindow, ViewInfo to WindowInfo, etc)
+*
+* Revision 1.2  2006/08/29 07:13:53  cesar
+* Rename class com.iver.andami.ui.mdiManager.View to com.iver.andami.ui.mdiManager.IWindow
+*
+* Revision 1.1  2006/05/25 16:27:21  jaume
+* *** empty log message ***
+*
+*
+*/
+package org.gvsig.crs;
+
+import java.awt.Color;
+import java.awt.Window;
+
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JWindow;
+import javax.swing.border.TitledBorder;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.plugins.Extension;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+
+public class InitialWarningExtension extends Extension {
+//	public static Preferences fPrefs = Preferences.userRoot().node( "gvsig.initial_warkning" );
+//	private boolean show = fPrefs.getBoolean( "show_panel", true);
+	private DlgWaring dlgWarning;
+    /**
+	 * @see com.iver.andami.plugins.IExtension#isEnabled()
+	 */
+	public boolean isEnabled() {
+		return true;
+	}
+
+	/**
+	 * @see com.iver.mdiApp.plugins.IExtension#isVisible()
+	 */
+	public boolean isVisible() {
+		return true;
+	}
+
+	/**
+	 * @see com.iver.andami.plugins.IExtension#initialize()
+	 */
+	public void initialize() {
+		dlgWarning = new DlgWaring();
+		dlgWarning.setText(PluginServices.getText(this, "initial_jcrs_warning"));
+		dlgWarning.setVisible(true);
+	}
+
+	/**
+	 * @see com.iver.andami.plugins.IExtension#execute(java.lang.String)
+	 */
+	public void execute(String actionCommand) {
+	}
+    
+	private class DlgWaring extends JWindow{
+
+		private JButton btnOk = null;
+		private JCheckBox chkBoxShowAgain = null;
+		private JLabel lblText = null;
+		private JPanel panel=null;
+		private JPanel panel2;
+		/**
+		 * This is the default constructor
+		 */
+		public DlgWaring() {
+			super((Window)PluginServices.getMainFrame());
+			Window window=(Window)PluginServices.getMainFrame();
+			setLocation(window.getWidth()/2+window.getX()-150,window.getHeight()/2+window.getY()-150);
+			initialize();
+			this.setAlwaysOnTop(true);
+		}
+
+		public void setText(String string) {
+			lblText.setText(string);
+		}
+
+		/**
+		 * This method initializes this
+		 *
+		 * @return void
+		 */
+		private void initialize() {
+			panel=new JPanel();
+			panel.setBackground(Color.black);
+			panel.setLayout(null);
+			panel.setBounds(0,0,300,300);
+			panel2=new JPanel();
+			panel2.setLayout(null);
+			panel2.setBounds(2,2,298,298);
+			lblText = new JLabel();
+			lblText.setBounds(15, 15, 271, 200);
+			lblText.setText("JLabel");
+			lblText.setBorder(new TitledBorder(PluginServices.getText(this, "warning")));
+			panel2.add(lblText);
+			panel2.setSize((int)(panel.getSize().getWidth()-4),(int)(panel.getSize().getHeight()-4));
+			panel.add(panel2);
+			this.setLayout(null);
+			this.setSize(300, 300);
+			this.add(getBtnOk(), null);
+//			this.add(getChkBoxShowAgain(), null);
+			this.add(panel, null);
+		}
+
+		/**
+		 * This method initializes btnOk
+		 *
+		 * @return javax.swing.JButton
+		 */
+		private JButton getBtnOk() {
+			if (btnOk == null) {
+				btnOk = new JButton();
+				btnOk.setBounds(100, 250, 100, 20);
+				btnOk.setText(PluginServices.getText(this, "aceptar"));
+				btnOk.addActionListener(new java.awt.event.ActionListener() {
+					public void actionPerformed(java.awt.event.ActionEvent e) {
+						dlgWarning.setVisible(false);
+						dlgWarning.dispose();
+						//						PluginServices.getMDIManager().closeWindow(dlgWarning);
+					}
+				});
+			}
+			return btnOk;
+		}
+
+		/**
+		 * This method initializes chkBoxShowAgain
+		 *
+		 * @return javax.swing.JCheckBox
+		 */
+//		private JCheckBox getChkBoxShowAgain() {
+//			if (chkBoxShowAgain == null) {
+//				chkBoxShowAgain = new JCheckBox();
+//				chkBoxShowAgain.setBounds(44, 116, 241, 21);
+//				chkBoxShowAgain.setSelected(true);
+//				chkBoxShowAgain.setText(PluginServices.getText(this, "show_this_dialog_next_startup"));
+//			}
+//			return chkBoxShowAgain;
+//		}
+
+		public WindowInfo getWindowInfo() {
+			WindowInfo vi = new WindowInfo(WindowInfo.MODALDIALOG);
+			vi.setWidth(300+8);
+			vi.setHeight(250);
+			vi.setTitle(PluginServices.getText(this, "warning"));
+			return vi;
+		}
+
+	}  //  @jve:decl-index=0:visual-constraint="10,10"
+
+}
Index: tags/JCRS_V02_BN11/extJCRS/extJCRS/data/sped2et.gsb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/extJCRS/data/sped2et.gsb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/.project
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/.project	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/.project	(revision 25287)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>extJCRS</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Property changes on: tags/JCRS_V02_BN11/extJCRS/.project
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/jgridshift/JGridShiftTest.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/jgridshift/JGridShiftTest.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/jgridshift/JGridShiftTest.java	(revision 25287)
@@ -0,0 +1,40 @@
+package org.gvsig.crs.jgridshift;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+
+import au.com.objectix.jgridshift.GridShift;
+import au.com.objectix.jgridshift.GridShiftFile;
+import au.com.objectix.jgridshift.SubGrid;
+
+public class JGridShiftTest {
+	
+	public static void main(String[] args){
+		//InputStream fis = null;
+		RandomAccessFile raf = null;
+		try {
+			raf = new RandomAccessFile("/home/dguerrero/Desarrollo-gvSIG/crs/workspace/extJCRS/data/sped2et.gsb","r");
+			//fis = new FileInputStream("/home/dguerrero/Desarrollo-gvSIG/crs/workspace/extJCRS/data/sped2et.gsb");
+		} catch (FileNotFoundException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		GridShiftFile gsf = new GridShiftFile();
+		try {
+			gsf.loadGridShiftFile(raf);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+		SubGrid subGrid[] = gsf.getSubGridTree(); 
+		System.out.println(subGrid.length);
+		System.out.println(subGrid[0].getMaxLat());
+		System.out.println(subGrid[0].getMinLat());
+		System.out.println(subGrid[0].getMaxLon());
+		System.out.println(subGrid[0].getMinLon());
+		GridShift gridShift = new GridShift();
+	}
+
+}
Index: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/test/UpmRepositoryTest.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/test/UpmRepositoryTest.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/test/UpmRepositoryTest.java	(revision 25287)
@@ -0,0 +1,14 @@
+package org.gvsig.crs.test;
+
+public class UpmRepositoryTest {
+
+	/**
+	 * @param args
+	 */
+	public static void main(String[] args) {
+		CSCatClient client = new CSCatClient(1);
+		String result[] = client.csCatAccess("4258", null);
+		System.out.println(result[0]);
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/test/UpmRepositoryTest.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/test/CSCatClient.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/test/CSCatClient.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/test/CSCatClient.java	(revision 25287)
@@ -0,0 +1,139 @@
+package org.gvsig.crs.test;
+
+
+import java.util.Enumeration;
+import java.util.Hashtable;
+
+import javax.xml.rpc.ParameterMode;
+
+import org.apache.axis.client.Call;
+import org.apache.axis.client.Service;
+import org.apache.axis.encoding.XMLType;
+
+
+/*clase cliente para el servicio web CSCat*/
+
+public class CSCatClient {
+	private String endpoint = null;
+                        
+private int nivel;
+/* dependiendo del nivel del sistema de referencia se accedera
+                                     al catÃ¡logo con parametros diferentes*/             
+                        
+            public CSCatClient(int nivel){
+                                    
+             this.nivel=nivel;
+                                    
+
+            this.endpoint = "http://mapas.topografia.upm.es:9090/swccat/ccat.jws";
+
+             /*Se podria definir un fichero properties para guardar la url con la ruta del servicio
+             y utilizar el endpoint(url) para el mÃ©todo setTargetEndpointAddress de la clase Call
+             en este caso se ha omitido la utilizaciÃ³n del fichero y directamente se utilizarÃ¡ la URL pero serÃ­a:
+                                    
+                        Properties prop=new Properties();
+                        try{                                                                                                       
+                             FileInputStream in=new FileInputStream("C:\\GimmConfig\\rutaCSCat.properties");
+                                                prop.load(in);
+                                                // guardamos en atributo de la clase la url guardada en el fichero properties
+                                                this.endpoint=prop.getProperty("url");
+                                     } catch (Exception e){
+                                                 System.out.println("Error al acceder al fichero "+e.getMessage());
+                                     }*/
+                        }
+                        
+                        
+                        //public String[] csCatAccess(String  proj, Hashtable<String, String> tPROJ4){
+            			public String[] csCatAccess(String  proj, Hashtable tPROJ4){
+                        /*mÃ©todo para acceder al catÃ¡logo*/       
+                                    
+                                    try{
+                                                 Service service = new Service();
+                                                Call call = (Call) service.createCall();
+                                                 call.setTargetEndpointAddress( new java.net.URL("http://mapas.topografia.upm.es:9090/swccat/ccat.jws"));
+                                        
+                                         /*el nombre del metodo a invocar y sus correspondientes parametros se obtienen del archivo WSDL (ver respuesta del servicio WSDL)*/
+
+                                         call.setOperationName("GetCRS");
+                                        
+                                         // Se establecem tanto los parÃ¡metros que necesita el mÃ©todo y sus correspondientes tipos  como el tipo que devuelve segun el WSDL//
+                                      
+                        call.addParameter( "InputFormatId", XMLType.XSD_STRING, ParameterMode.IN );
+                       call.addParameter( "OutputFormatId", XMLType.XSD_STRING, ParameterMode.IN );
+                        call.addParameter( "SourceCRS", XMLType.XSD_STRING, ParameterMode.IN );
+                        call.addParameter( "SourceProjection", XMLType.XSD_STRING, ParameterMode.IN );
+                        call.addParameter( "SourceDatum", XMLType.XSD_STRING, ParameterMode.IN );
+                        call.addParameter( "SourceEllipsoid", XMLType.XSD_STRING, ParameterMode.IN );
+                        call.addParameter( "SourceUnit", XMLType.XSD_STRING, ParameterMode.IN );
+                                                  
+                        call.setReturnType( XMLType.XSD_ANYTYPE);
+                                          
+                                           Object ret;
+
+                        // En el ejemplo se estÃ¡ pidiendo transformar del espacio de nombres PROJ4 a EPSG lo que tenga el parÃ¡metro proj. Es importante destacar que la respuesta es siempre una matriz de String, aunque se espere una sola respuesta.
+
+                                           if (nivel == 1){
+                                        	   	  //ret = (Object) call.invoke ( new Object [] {"IAU2000","PROJ4",proj,"","","",""});
+                                        	   	  //ret = (Object) call.invoke ( new Object [] {"EPSG","ESRI",proj,"","","",""});
+                                                  ret = (Object) call.invoke ( new Object [] {"EPSG","PROJ4",proj,"","","",""});
+                                                  //ret = (Object) call.invoke ( new Object [] {"PROJ4","EPSG",proj,"","","",""});
+                                                  String[] resul=(String[])ret;
+                                                              //System.out.println(resul[0]);  aunque se devuelva un unico valor se almacena en un array
+                                                              return resul;
+                                                             
+                                           } else{  // nivel 2
+                                                  String[] parameters = new String[4];
+                                                  getParameters(tPROJ4, parameters); // metodo para obtener los valores de los parametros para la llamada a invoke segun la estructura de la aplicaciÃ³n
+                                                 
+                                                  /*for (int i = 0; i < parameters.length; i++) {
+                                                              System.out.println(parameters[i]) ;
+                                                              }*/
+                                             
+                                                              // en este caso (nivel 2)  la llamada al metodo se debe realizar dando como argumentos la proyeccion, el datum y ellipsoide
+                                                  ret = (Object) call.invoke ( new Object [] {"PROJ4","EPSG","",parameters[0],parameters[1],parameters[2],parameters[3]});
+                                                  String[] resul=(String[])ret;
+                                                 
+                                                  /*for (int i = 0; i < resul.length; i++) {
+                                                              System.out.println(resul[i]);
+                                                              } */
+                                                 
+                                                  return resul;
+                                           }
+                                        
+                                                }catch (Exception e){
+                                                            System.out.println("Fallo al consultar el catÃ¡logo CsCat");
+                                                            System.out.println(e.getMessage());
+                                                            return null;
+                                                
+                                                }
+                        }
+
+
+                        //private void getParameters(Hashtable<String, String> tproj4, String[] parameters) {
+            			private void getParameters(Hashtable tproj4, String[] parameters) {
+                        // tproj4: tabla Hash que almacena los valores del PROJ4 obtenido para el datum, la proyecciÃ³n, elipsoide y unidades          
+                        
+                                    for (int i = 0; i < parameters.length; i++) {
+                                                parameters[i]="";
+                                    }
+                                    
+                                    Enumeration keysProj = tproj4.keys();
+                                    
+                                    while (keysProj.hasMoreElements()) {
+                                                String key = (String) keysProj.nextElement();
+                                                if (key.indexOf("proj")>0)
+                                                            parameters[0] = (String) tproj4.get(key);
+                                                if (key.indexOf("datum")>0)
+                                                            parameters[1] = (String) tproj4.get(key);
+                                                if (key.indexOf("ellps")>0)
+                                                            parameters[2] = (String) tproj4.get(key);
+                                                if (key.indexOf("units")>0)
+                                                            parameters[3] = (String) tproj4.get(key);
+                                                
+                                    }           
+                                    
+                        }
+
+                        
+
+}
\ No newline at end of file

Property changes on: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/test/CSCatClient.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/ESRIPanelTest.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/ESRIPanelTest.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/ESRIPanelTest.java	(revision 25287)
@@ -0,0 +1,31 @@
+package org.gvsig.crs.gui.panels;
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import javax.swing.JFrame;
+
+
+/**
+ * Test para el interfaz de ESRIPanel
+ * @author Luisa Marina Fern�ndez Ruiz (luisam.fernandez@uclm.es)
+ *
+ */
+public class ESRIPanelTest {
+
+
+	public static void main(String[] args){
+		
+			JFrame frame = new JFrame("ESRI Panel Test");
+	         //cerrar el formulario
+	         frame.addWindowListener(new WindowAdapter() {
+	             public void windowClosing(WindowEvent e) {System.exit(0);}
+	         });
+	         frame.getContentPane().add(new ESRIpanel());
+	         frame.setLocation(300,0);
+	         frame.pack();
+	         frame.setVisible(true);
+	    
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/ESRIPanelTest.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/CrsRecentsPanelTest.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/CrsRecentsPanelTest.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/CrsRecentsPanelTest.java	(revision 25287)
@@ -0,0 +1,30 @@
+package org.gvsig.crs.gui.panels;
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import javax.swing.JFrame;
+
+
+/**
+ * Test para el interfaz de CRSs Recientes
+ * @author Luisa Marina Fern�ndez Ruiz (luisam.fernandez@uclm.es)
+ *
+ */
+public class CrsRecentsPanelTest {
+
+	public static void main(String[] args) {
+        JFrame frame = new JFrame("CrsRecents Test");
+        //cerrar el formulario
+        frame.addWindowListener(new WindowAdapter() {
+            public void windowClosing(WindowEvent e) {System.exit(0);}
+        });
+        frame.getContentPane().add(new CrsRecentsPanel());
+        frame.setLocation(300,0);
+        frame.pack();
+        frame.setVisible(true);
+   
+}
+}
+
+

Property changes on: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/CrsRecentsPanelTest.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/TransformationCapaPanelTest.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/TransformationCapaPanelTest.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/TransformationCapaPanelTest.java	(revision 25287)
@@ -0,0 +1,33 @@
+package org.gvsig.crs.gui.panels;
+
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import javax.swing.JFrame;
+/**
+ * Test para el interfaz de Transformaci�n de la capa dentro de la transformacion compuesta
+ * @author Luisa Marina Fern�ndez Ruiz (luisam.fernandez@uclm.es)
+ *
+ */
+
+public class TransformationCapaPanelTest {
+
+	
+	public static void main(String[] args) {
+		
+		 JFrame frame = new JFrame("Transformaci�n de la Capa");
+	         //cerrar el formulario
+	         frame.addWindowListener(new WindowAdapter() {
+	             public void windowClosing(WindowEvent e) {System.exit(0);}
+	         });
+	 
+	         frame.getContentPane().add(new TransformationCapaPanel("",null));
+	         frame.setSize(300,500);
+	         //colocar en la pantalla
+	         frame.setLocation(300,0);
+	         frame.pack();
+	         frame.setVisible(true);
+	    
+	}
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/TransformationCapaPanelTest.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/TransformationVistaPanelTest.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/TransformationVistaPanelTest.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/TransformationVistaPanelTest.java	(revision 25287)
@@ -0,0 +1,31 @@
+package org.gvsig.crs.gui.panels;
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import javax.swing.JFrame;
+
+/**
+ *  Test para el interfaz de transformaci�n de la vista dentro de la transformacion compuesta
+ * @author Luisa Marina Fern�ndez Ruiz (luisam.fernandez@uclm.es)
+ *
+ */
+public class TransformationVistaPanelTest {
+	
+	public static void main(String[] args) {
+		 JFrame frame = new JFrame("Transformaci�n de la Capa");
+		
+//	         //cerrar el formulario
+	         frame.addWindowListener(new WindowAdapter() {
+	             public void windowClosing(WindowEvent e) {System.exit(0);}
+	         });
+	 
+	         frame.getContentPane().add(new TransformationVistaPanel("",null));
+	         frame.setSize(300,500);
+	         //colocar en la pantalla
+	         frame.setLocation(300,0);
+	         frame.pack();
+	         frame.setVisible(true);
+	    
+	}
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/TransformationVistaPanelTest.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/EPSGPanelTest.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/EPSGPanelTest.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/EPSGPanelTest.java	(revision 25287)
@@ -0,0 +1,27 @@
+package org.gvsig.crs.gui.panels;
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import javax.swing.JFrame;
+
+/**
+ * Test para el interfaz de EPSGPanel
+ * @author Luisa Marina Fern�ndez Ruiz (luisam.fernandez@uclm.es)
+ *
+ */
+public class EPSGPanelTest {
+
+	public static void main(String[] args){
+        JFrame frame = new JFrame("UAU200 Panel Test");
+        frame.addWindowListener(new WindowAdapter() {
+            public void windowClosing(WindowEvent e) {System.exit(0);}
+        });
+        frame.getContentPane().add(new EPSGpanel());
+        frame.setLocation(300,0);
+        frame.pack();
+        frame.setVisible(true);
+   
+}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/EPSGPanelTest.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/IAU2000PanelTest.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/IAU2000PanelTest.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/IAU2000PanelTest.java	(revision 25287)
@@ -0,0 +1,28 @@
+package org.gvsig.crs.gui.panels;
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import javax.swing.JFrame;
+/**
+ * Test para el interfaz de IAU200Panel
+ * @author Luisa Marina Fern�ndez Ruiz (luisam.fernandez@uclm.es)
+ *
+ */
+public class IAU2000PanelTest {
+
+	public static void main(String[] args) {
+
+        JFrame frame = new JFrame("UAU200 Panel Test");
+        //cerrar el formulario
+        frame.addWindowListener(new WindowAdapter() {
+            public void windowClosing(WindowEvent e) {System.exit(0);}
+        });
+        frame.getContentPane().add(new IAU2000panel());
+        frame.setLocation(300,0);
+        frame.pack();
+        frame.setVisible(true);
+   
+}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/panels/IAU2000PanelTest.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameMain.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameMain.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameMain.java	(revision 25287)
@@ -0,0 +1,48 @@
+package org.gvsig.crs.gui.wizard;
+
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import javax.swing.ImageIcon;
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+
+import org.gvsig.crs.gui.panels.wizard.DefCrsUsr;
+import org.gvsig.crs.gui.panels.wizard.MainPanel;
+
+public class FrameMain {
+
+
+	/**
+	 * @param args
+	 * @throws UnsupportedLookAndFeelException 
+	 * @throws IllegalAccessException 
+	 * @throws InstantiationException 
+	 * @throws ClassNotFoundException 
+	 */
+	public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException {
+		
+			/*
+			 com.sun.java.swing.plaf.motif.MotifLookAndFeel
+			 com.sun.java.swing.plaf.windows.WindowsLookAndFeel
+			 javax.swing.plaf.metal.MetalLookAndFeel
+			 */
+			UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
+	         JFrame frame = new JFrame("Asistente de Definicin de Crs");
+	         //cerrar el formulario
+	         frame.addWindowListener(new WindowAdapter() {
+	             public void windowClosing(WindowEvent e) {System.exit(0);}
+	         });
+	         frame.getContentPane().add(new MainPanel(null));
+	         frame.setSize(300,500);
+	         //colocar en la pantalla
+	         frame.setLocation(300,0);
+	         frame.pack();
+	         frame.setVisible(true);
+	    
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameMain.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/wizard/FramDefinirDatum.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/wizard/FramDefinirDatum.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/wizard/FramDefinirDatum.java	(revision 25287)
@@ -0,0 +1,56 @@
+package org.gvsig.crs.gui.wizard;
+
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import javax.swing.JFrame;
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+
+import org.gvsig.crs.gui.panels.wizard.DefinirDatum;
+
+public class FramDefinirDatum {
+
+
+	/**
+	 * @param args
+	 */
+	public static void main(String[] args) {
+		
+		 JFrame frame = new JFrame("Definicin del Datum");
+				/*
+			 com.sun.java.swing.plaf.motif.MotifLookAndFeel
+			 com.sun.java.swing.plaf.windows.WindowsLookAndFeel
+			 javax.swing.plaf.metal.MetalLookAndFeel
+			 */
+			try {
+				UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
+			} catch (ClassNotFoundException e1) {
+				// TODO Auto-generated catch block
+				e1.printStackTrace();
+			} catch (InstantiationException e1) {
+				// TODO Auto-generated catch block
+				e1.printStackTrace();
+			} catch (IllegalAccessException e1) {
+				// TODO Auto-generated catch block
+				e1.printStackTrace();
+			} catch (UnsupportedLookAndFeelException e1) {
+				// TODO Auto-generated catch block
+				e1.printStackTrace();
+			}
+	         //cerrar el formulario
+	         frame.addWindowListener(new WindowAdapter() {
+	             public void windowClosing(WindowEvent e) {System.exit(0);}
+	         });
+	 
+	         frame.getContentPane().add(new DefinirDatum());
+	         frame.setSize(300,500);
+	         //colocar en la pantalla
+	         frame.setLocation(300,0);
+	         frame.pack();
+	         frame.setVisible(true);
+	    
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/wizard/FramDefinirDatum.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameSistemaCoordenadas.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameSistemaCoordenadas.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameSistemaCoordenadas.java	(revision 25287)
@@ -0,0 +1,35 @@
+package org.gvsig.crs.gui.wizard;
+
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import javax.swing.JFrame;
+import org.gvsig.crs.gui.panels.wizard.DefSistCoordenadas;
+
+/**
+ * Test para el interfaz del wizard de elecci�n del sistema de coordenadas
+ * @author Luisa Marina Fern�ndez Ruiz (luisam.fernandez@uclm.es)
+ *
+ */
+public class FrameSistemaCoordenadas {
+
+	public static void main(String[] args) {
+		
+	         JFrame frame = new JFrame("Definicion del Sistema de Coordenadas");
+	 	
+	         //cerrar el formulario
+	         frame.addWindowListener(new WindowAdapter() {
+	             public void windowClosing(WindowEvent e) {System.exit(0);}
+	         });
+	 
+	         frame.getContentPane().add(new DefSistCoordenadas());
+	         frame.setSize(300,500);
+	         //colocar en la pantalla
+	         frame.setLocation(300,300);
+	         frame.pack();
+	         frame.setVisible(true);
+	    
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameSistemaCoordenadas.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameDefinicionCRS.java
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameDefinicionCRS.java	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameDefinicionCRS.java	(revision 25287)
@@ -0,0 +1,47 @@
+package org.gvsig.crs.gui.wizard;
+
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+
+import org.gvsig.crs.gui.panels.wizard.DefCrsUsr;
+
+public class FrameDefinicionCRS {
+
+
+	/**
+	 * @param args
+	 * @throws UnsupportedLookAndFeelException 
+	 * @throws IllegalAccessException 
+	 * @throws InstantiationException 
+	 * @throws ClassNotFoundException 
+	 */
+	public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException {
+		
+			/*
+			 com.sun.java.swing.plaf.motif.MotifLookAndFeel
+			 com.sun.java.swing.plaf.windows.WindowsLookAndFeel
+			 javax.swing.plaf.metal.MetalLookAndFeel
+			 */
+			UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
+	         JFrame frame = new JFrame("Definicin de CRS por el usuario");
+	         //cerrar el formulario
+	         frame.addWindowListener(new WindowAdapter() {
+	             public void windowClosing(WindowEvent e) {System.exit(0);}
+	         });
+	         
+	         frame.getContentPane().add(new DefCrsUsr(null));
+	         frame.setSize(300,500);
+	         //colocar en la pantalla
+	         frame.setLocation(300,300);
+	         frame.pack();
+	         frame.setVisible(true);
+	    
+	}
+
+}

Property changes on: tags/JCRS_V02_BN11/extJCRS/src-test/org/gvsig/crs/gui/wizard/FrameDefinicionCRS.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/config/db_esri.script
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/db_esri.script
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/config/text_it.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/config/text_it.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/config/text_it.properties	(revision 25287)
@@ -0,0 +1,165 @@
+#Translations for language [it]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=
+abstract=Riassunto
+add=Aggiungi
+address=Adre\u00e7a
+advanced=
+advanced_settings=
+ancho_alto=Larghezza X altezza
+anterior=Anteriore
+apply=Applica
+bands=Bande
+brillo=Brightness
+brillo_y_contraste=
+browse=
+cancel=Cancella
+cannotReproject=No es pot reprojectar aquest sistema de refer\u00e8ncia
+cant_reproject_from_any_of=
+capas=Layers
+city=
+clear=Pulisci
+conectar=Connettere
+connect_error=Error de conbexi\u00f3
+contact_info=
+contact_organization=Organitzaci\u00f3
+contact_person=Nome
+contact_position=C\u00e0rrec
+contraste=Contrast
+coor_geograficas=Coordinate geografiche
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=
+covered_extension=Estensione
+created_with=
+defined_by_view_extent=
+description=Descrizione
+description_URL=
+dimension=Dimensione
+dimensiones=Dimensioni
+disagregate_layers=
+e-mail=E-mail
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Elimina gli estremi
+error=Error
+error_writting_file=
+estilos=Stili
+export=Exportar
+export_to_map_context=
+extents_no_coincidentes=L'estensione della immagine selezionata non coincide con la immagine di origine.
+fax=Fax
+Fichero=Archivio
+fichero_existe=Il file selezionato esiste gi\u00e1 come banda del layer
+file_name=
+file_version=
+fit_WMS_layer=Aggiusta layer WMS
+format=Formato
+formato=Formato
+formatos=Formati
+georeferenciado=
+height=
+html_in_a_new_view=<HTML>Crea una vista nova al projecte. La nova vista contindr\u00e0 totes les capes definides pel fitxer.</HTML>
+html_in_other_view=
+html_in_the_current_view=<HTML>Afegeix les capes definides pel fitxer a la actual vista activa.</HTML>
+id=ID
+import=
+import_map_context=
+in=in
+info=Informazione
+Informacion=Informazione
+interval=Intervallo
+invalid_dimension_values=
+is_required=\u00e9s obligatori
+keywords=Paraules clau
+layer=Livello
+layer_abstract=Riassunto
+layer_name=Nome del layer
+layer_title=Titolo del layer
+layers_in_other_view=
+layers_in_the_current_view=
+lineal_directo=Lineare diretto
+logo_URL=URL logotip
+m/pixel=metros/pixel
+map_context_file_error=
+map_extent=Estensione
+map_size_in_pixels=Tamany del mapa (p\u00edxels)
+metadatos=Metadatos
+move_layer_down=Moure avall
+move_layer_up=Moure amunt
+must_specify_a_file=
+name=Nome
+none_selected=Nessuna selezione
+not_available=No disponible
+num_bandas=Numero delle bande
+ogc_mapcontext_file=OGC Web Map Context
+ok=Accetta
+Ok=Accetta
+opacidad=Opacit\u00e1
+open_layers_as=
+options=
+origen_de_datos=Origine dei dati
+postcode=
+previsualizacion=
+problems_encountered_while_importing=
+properties=Proprieta'
+propiedades_raster=Propriet\u00e1 del raster
+Proyecciones=
+realce=Rilievo
+recorte_colas=Ritaglio degli estremi
+refresh_capabilities=Refrescar mem\u00f2ria cau
+refresh_capabilities_tooltip=Marque esta casella per a sobreescriure les dades anteriores.
+remove=Rimuovi
+seleccionar_srs=Selezionare SRS
+select_formats=Seleziona formati
+select_layers=Seleziona Layers
+selected_dimensions=Dimensioni selezionate
+selected_layers=Layers selezionati
+server=Server
+server_abstract=Sommario
+server_cant_render_layers=Aquest servidor WMS no pot renderitzar aquestes dues capes conjuntament.\nSepareles en dues cosultes diferents.
+server_timeout=Tempo massimo di attesa di risposta WMS terminato
+server_title=Titolo
+server_type=Tipo di Server
+service_info=Informazione di servizio
+set=Stabilisci
+settings=
+settings_editor=
+show_layer_names=
+si=
+siguiente=Seguente
+single_value=Valore unico
+state_or_province=
+style=Stile
+tamano=Dimensione\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e8fon
+tipo_dato=Tipo di Dato
+title=Titolo
+to=Fino a
+transparencia=Transparenza
+unknown_response_format=
+unsupported_crs=
+unsupported_map_context_version=
+unsupported_version=Versi\u00f3 no suportada
+use_custom_size=
+use_full_extent=
+use_view_size=
+value=Valore
+version=Versi\u00f3
+version_conflict=Conflicte de versi\u00f3
+view=Vista
+Vista=Vista
+web_map_context=
+web_map_context_settings=
+width=Ampl\u00e0ria
+wms_cant_connect=Non \u00e9 stato possibile realizzare la connessione con il WMS
+wms_not_queryable=Aquest servidor no accepta peticions d\u0092aquest tipus
+wms_properties=Propriet\u00e1 WMS
+wms_server_error=Error del servidor WMS
+wms_transparency=Transparenza
+WMSLayer=WMS layer
+xmax=X massima
+xmin=X minima
+ymax=Y massima
+ymin=Y minima

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/text_it.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/config/iau2000.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/config/iau2000.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/config/iau2000.properties	(revision 25287)
@@ -0,0 +1,20 @@
+#HSQL database
+#Wed Oct 18 12:53:57 CEST 2006
+hsqldb.cache_file_scale=1
+runtime.gc_interval=0
+hsqldb.first_identity=0
+version=1.7.3
+modified=no
+hsqldb.script_format=0
+sql.enforce_size=false
+hsqldb.cache_size_scale=10
+hsqldb.cache_scale=14
+hsqldb.version=1.7.3
+hsqldb.log_size=200
+sql.enforce_strict_size=false
+readonly=true
+hsqldb.compatible_version=1.7.2
+hsqldb.original_version=1.7.3
+sql.compare_in_locale=false
+hsqldb.nio_data_file=true
+hsqldb.cache_version=1.7.0

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/iau2000.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/config/usr.script
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/usr.script
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/config/text.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/config/text.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/config/text.properties	(revision 25287)
@@ -0,0 +1,382 @@
+#Translations for language [es]
+#Fri Oct 10 09:47:23 CEST 2008
+
+abrir=Abrir
+advertencia_nad=IMPORTANTE: La transformaci\u00f3n se aplicar\u00e1 dentro de los l\u00edmites de las rejillas.
+angle=\u00c1ngulo
+anterior=Anterior
+aplicar_capa=CRS de la capa
+aplicar_vista=CRS de la vista
+apply=Aplicar
+area=\u00e1rea
+browse=Examinar
+buscar=Buscar
+calculated_in=Calculado en
+cancel=Cancelar
+codeSelectedCrs=C\u00f3digo del CRS seleccionado
+code_transformation=C\u00f3digo de la Transformaci\u00f3n
+codigo=C\u00f3digo
+COMP=COMP
+compound=Compuesta
+coordinate_reference_systems= Coordinate Reference Systems
+criterio_busqueda= Criterio de b\u00fasqueda
+crs_layer=CRS de la capa
+crs_no_selected=No se ha seleccionado CRS
+crs_not_projected=CRS no proyectado
+crs_not_soported=CRS no soportado
+crs_view=CRS de la vista
+crsAndTransformation=CRS y Transformaci\u00f3n
+crsRepeat=CRS repetido
+crsview=CrsView
+datum=Datum
+degree=grados
+deleteUsr=\u00bf"Borrar crs de usuario"?
+descripcion=Descripci\u00f3n
+description_area=Descripci\u00f3n del \u00e1rea
+detalles=Detalles
+details=Detalles
+detailsTransformation=Detalles de la transformaci\u00f3n
+ellipsoid=Elipsoide
+EPSG=EPSG
+error_adding_default_value_to_projection_parameter=Error al intentar insertar el valor por defecto al par\u00e1metro de proyecci\u00f3n
+error_adding_max_value_to_projection_parameter=Error al intentar insertar el valor m\u00e1ximo al par\u00e1metro de proyecci\u00f3n
+error_adding_min_value_to_projection_parameter=Error al intentar insertar el valor m\u00ednimo al par\u00e1metro de proyecci\u00f3n
+error_adding_parameter_projection_name=Error al intentar insertar el nombre del par\u00e1metro de proyecci\u00f3n
+error_adding_projection_acronym=Error al intentar insertar el acr\u00f3nimo de la proyecci\u00f3n
+error_adding_projection_name=Error al intentar insertar el nombre de proyecci\u00f3n
+error_adding_projection_parameter=Error al intentar insertar el par\u00e1metro de proyecci\u00f3n
+error_adding_unit_name=Error al intentar insertar el nombre de la unidad
+error_obtaining_default_value_to_projection_parameter=Error al obtener el valor por defecto de par\u00e1metro de proyecci\u00f3n
+error_obtaining_max_value_to_projection_parameter=Error al obtener el valor m\u00e1ximo de par\u00e1metro de proyecci\u00f3n
+error_obtaining_min_value_to_projection_parameter=Error al obtener el valor m\u00ednimo de par\u00e1metro de proyecci\u00f3n
+error_obtaining_projection_acronym=Error al obtener el acr\u00f3nimo de proyecci\u00f3n
+error_obtaining_projection_name=Error al obtener el nombre de la proyecci\u00f3n
+error_obtaining_projection_parameter_name=Error al obtener el nombre del par\u00e1metro de la proyecci\u00f3n
+error_obtaining_unit_list_of_projection_parameter=Error al obtener la lista de unidades de par\u00e1metros de proyecci\u00f3n
+error_obtaining_unit_name=Error al obtener el nombre de unidad
+error_prime_meridiam_parameters=Falla alg\u00fan parametro del prime meridian
+ESRI=ESRI
+fill_name=Rellenar el nombre
+finalizar=Finalizar
+fuente=Fuente
+geogcs=Geogcs
+greenwichLongitude=Longitud del meridiano
+grids_en=Grids en
+IAU2000=IAU2000
+in=en
+in_proj4_projection=En proj4 la proyecci\u00f3n
+incorrect_domain=Dominio Incorrecto
+infocrs=Info CRS
+infoCRS=Informacion del CRS
+Informacion=Informaci\u00f3n
+info_transformations= Informaci\u00f3n de la transformaci\u00f3n
+initial_jcrs_warning=<html><b>\u00a1ATENCI\u00d3N\!</b><br>Est\u00e1 utilizando una Versi\u00f3n en pruebas de la extensi�n JCRS. Puede contener errores importantes.</html>
+invFlattening=Inverso del aplanamiento
+inv_f=Inversa del aplanamiento
+importar=Importar
+importarRejilla=Importar rejilla
+lat_max=Latitud m\u00e1xima
+lat_min=Latitud m\u00ednima
+latitude_of_standar_parallel=latitud del paralelo est\u00e1ndar
+long=Longitud
+long_max=Longitud m\u00e1xima 
+long_min=Longitud m\u00ednima
+Mercator=Mercator
+name=Nombre
+nadfile_not_found=No se encuentra el fichero de rejillas.
+nadfile_bad_format=No se reconoce el formato del fichero de rejillas.
+nadgrids=Rejilla formato NTv2
+nadgrids_file=Fichero de rejillas
+nameDatum=Nombre del datum
+nameSelectedCrs=Nombre del CRS
+name_transformation=Nombre de la Transformaci\u00f3n
+newCRS=CRS de usuario
+no=No
+no_results=No se han encontrado resultados
+node_count=N\u00famero de nodos
+nombre=Nombre
+not_admit_azimut_close_to=no admite azimut pr\u00f3ximo a
+not_admit_different_azimut_and_spin_axis=no admite azimut y giro de ejes diferentes
+not_admit_scale_factor_and_latitude_of_origin=no admite scale_factor!=1.0 y latitude_of_origin!=0.0
+not_admit_latitude_origin_close_to_the_poles=no admite latitud origen pr\u00f3xima a los polos
+not_admit_parameter=no admite el par\u00e1metro
+not_equal_lat_1_and_lat_2=no pueden ser iguales lat_1 y lat_2
+not_geographic_nor_projected=El CRS no es ni geogr\u00e1fico ni proyectado
+not_in_parameter_list=no esta en la lista de parametros
+not_in_proj4=no figura en Proj4
+not_zero_lat_1=lat_1 no puede ser 0
+not_values_90_or_minus_90_lat_2=lat_2 no puede ser 90 o -90
+nuevo_crs=Nuevo CRS
+numeric_format=Este campo solo acepta caracteres num�ricos
+Oblique_Mercator=Obl\u00edcua de Mercator
+Oblique_Stereographic=Stereogr\u00e1fica Obl\u00edcua
+ok=Aceptar
+Ok=Aceptar
+out_of_domain=est\u00e1 fuera de dominio
+parameters=Par\u00e1metros
+por_area=Por \u00e1rea
+por_codigo=Por c\u00f3digo
+por_nombre=Por nombre
+position_out_of_valid_limits=posici\u00f3n fuera de los l\u00edmites v\u00e1lidos
+primem=Primem
+primeMeridian=Meridiano origen
+problem_with_wkt_try_manually=Problemas con wkt, pruebe a crear el CRS manualmente
+proj4Chain=Cadena proj4
+projcs=Projcs
+projected=Proyectado
+projection=Proyecci\u00f3n
+proyeccion_actual=Proyecci\u00f3n actual
+recents_transformation=Transformaciones Recientes
+repository=Repositorio
+scale=Escala (ppm)
+scale_factor=Factor de Escala
+seleccionar=Seleccionar
+seleccion_nadgrids=Fichero rejilla calculado en
+selecciona_sistema_de_referencia=Selecciona Sistema de Referencia
+seleccionar_crs=Selecionar CRS
+seleccione_crs_capa=Seleccione CRS de la capa
+seleccione_crs_vista=Seleccione CRS de la vista
+seleccione_transformacion=Seleccione Transformaci\u00f3n
+seleccionarRejilla=Seleccionar rejilla
+semiMajorAxis=Semieje mayor
+semMay=Semieje Mayor
+semMen=Semieje Menor
+si=S\u00ed
+siguiente=Siguiente
+sin_transformacion=Sin Transformaci\u00f3n
+source_crs=CRS fuente
+spheroid=Esferoide
+recientes=Recientes
+target_crs=CRS destino
+the_parameter=El par\u00e1metro
+the_projection=La proyecci\u00f3n
+tipo=Tipo
+transformation=Transformaci\u00f3n
+transformation_code=C\u00f3digo de la Transformaci\u00f3n
+transformacion_epsg=Transformaci\u00f3n EPSG
+transformacion_manual=Transformaci\u00f3n Manual
+transformacion_compuesta= Transformaci\u00f3n Compuesta
+transformation_name=Nombre de la Transformaci\u00f3n
+transformacion_vista=Transformaci\u00f3n de la Vista
+transformacion_capa=Transformaci\u00f3n de la Capa
+transformations=Transformaciones
+type_transformation=Tipo de la Transofmaci\u00f3n
+ultimos_crs_utilizados=\u00faltimos CRSs utilizados
+units=Unidades
+units_p=Unidades_p
+user=Usuario
+USR=USR
+valor=Valor
+white_Textbox=Campo en blanco
+wkt=WKT
+x_Rotation=Rotaci\u00f3n en x (seg.sexa)
+x_Translation=Translaci\u00f3n en x (metros)
+y_Rotation=Rotaci\u00f3n en y (seg.sexa)
+y_Translation=Translaci\u00f3n en y (metros)
+z_Rotation=Rotaci\u00f3n en z (seg.sexa)
+z_Translation=Translaci\u00f3n en z (metros)
+Dat_NombreCrs=Nombre
+Dat_CodeCrs=C\u00f3digo
+Dat_DefinirPor=Definir por
+Dat_nDatum=Datum
+Dat_nElipsoide=Elipsoide
+Dat_nMeridian=Meridiano
+Dat_Datum=Nombre del Datum
+Dat_Importar=Importar
+Dat_Elips=Nombre del Elipsoide
+Dat_SemMay=Semieje Mayor
+Dat_SemMen=Semieje Menor
+Dat_InvF=Inverso del Aplanamiento
+Dat_Meridian=Nombre del Meridiano
+Dat_Long=Longitud
+Dat_InvFToolTipText=Fijar el par\u00e1metro Inverse Flat
+Dat_SemMayToolTipText=Fijar el par\u00e1metro Semieje Mayor
+Dat_SemMenToolTipText=Fijar el par\u00e1metro Semieje Menor
+SistCoor_titmarco=Sistema de Coordenadas
+SistCoor_Geografico2D=Geogr\u00e1fico 2D
+SistCoor_Proyactado=Proyectado
+SistCoor_Proyeccion=Proyecci\u00f3n
+SistCoor_Parametro=Par\u00e1metro
+SistCoor_Valor=Valor
+SistCoor_Unidades=Unidades
+SistCoor_cbToolTip=Selecciona una opci\u00f3n
+DefCrsUsr_existente=A partir de un CRS Existente
+DefCrsUsr_Seleccionar_Crs=Seleccionar Crs Existente
+DefCrsUsr_nuevo=A partir de definiciones de usuario
+DefCrsUsr_wkt=A partir de una cadena wkt
+DefCrsUsr_importar_wkt=Importar cadena Wkt
+crs_usuario=CRS Usuario
+nombre_proyeccion= Nombre de la Proyecci\u00f3n
+wz_anterior=Anterior
+wz_cancel=Cancelar
+wz_fin=Finalizar
+wz_siguiente=Siguiente
+wz_titulo=Definici\u00f3n de un nuevo CRS por el usuario
+editar=Editar
+nuevo=Nuevo
+eliminar=Eliminar
+more_info=M\u00e1s informaci\u00f3n del Crs seleccionado
+buscar_por_criterio_seleccion=B\u00fasqueda de un Crs seg\u00fan el criterio seleccionado
+
+#UNIDADES ANGULARES:
+
+radian=radianes (RAD)
+degree=grados sexagesimales (DEG)
+arc-minute=minutos de arco
+arc-second=segundos de arco
+grad=grados centesimales (GRAD)
+gon=grados centesimales (GRAD)
+degree_minute_second=grados minutos segundos (sexagesimales)
+degree_minute_second_hemisphere= grados minutos segundos hemnisferio (sexagesimales)
+microradian=microradianes
+sexagesimal_DMS=sexagesimal seudo gg.mmssfs
+sexagesimal_DM=sexagesimal seudo gg.mmfm
+centesimal_minute=minutos centesimales
+centesimal_second=segundos centesimales
+mil_6400=mil�sima artillera
+degree_minute=minutos sexagesimales
+degree_hemisphere=minutos sexagesimales y hemisferio
+hemisphere_degree= grados sexagesimales y hemisferio
+degree_minute_hemisphere=grados sexagesimales (DM) y hemisferio
+hemisphere_degree_minute=sexagesimal (DM) y hemisferio 
+hemisphere_degree_minute_second=sexagesimal (DMS) y hemisferio
+sexagesimal_DMS.s=sexagesimal seudo gg.mmssfs
+degree_(supplier_to_define_representation)=grados sexagesimales (DEG)
+
+#UNIDADES LONGITUD:
+metre=metros
+foot=pies
+US_survey_foot=pies topogr\u00e1ficos estadounidenses
+Clarke's_foot=pies de Clarke
+fathom=brazas
+nautical_mile=millas na\u00faticas
+German_legal_metre=metros legales alemanes
+US_survey_chain=cadenas topogr\u00e1ficas estadounidenses
+US_survey_link=eslabones topogr\u00e1ficos estadounidenses
+US_survey_mile=millas topogr\u00e1ficas estadounidenses
+kilometre=kil\u00f3metros
+Clarke's_yard=yardas de Clarke
+Clarke's_chain=cadenas de Clarke
+Clarke's_link=eslabones de Clarke
+British_yard_(Sears_1922)=yardas brit\u00e1nicas (Sears 1922)
+British_foot_(Sears_1922)=pies brit\u00e1nicos (Sears 1922)
+British_chain_(Sears_1922)=cadenas brit\u00e1nicas (Sears 1922)
+British_link_(Sears_1922)=eslabones brit\u00e1nicos (Sears 1922)
+British_yard_(Benoit_1895_A)=yardas brit\u00e1nicas (Benoit 1895 A)
+British_foot_(Benoit_1895_A)=pies brit\u00e1nicos (Benoit 1895 A)
+British_chain_(Benoit_1895_A)=cadenas brit\u00e1nicas (Benoit 1895 A)
+British_link_(Benoit_1895_A)=eslabones brit\u00e1nicos (Benoit 1895 A)
+British_yard_(Benoit_1895_B)=yardas brit\u00e1nicas (Benoit 1895 B)
+British_foot_(Benoit_1895_B)=pies brit\u00e1nicos (Benoit 1895 B)
+British_chain_(Benoit_1895_B)=cadenas brit\u00e1nicos (Benoit 1895 B)
+British_link_(Benoit_1895_B)=eslabones brit\u00e1nicos (Benoit 1895 B)
+British_foot_(1865)=pies brit\u00e1nicos (1865)
+Indian_foot=pies indios
+Indian_foot_(1937)=pies indios (1937)
+Indian_foot_(1962)=pies indios (1962)
+Indian_foot_(1975)=pies indios (1975)
+Indian_yard=yardas indias
+Indian_yard_(1937)=yardas indias (1937)
+Indian_yard_(1962)=yardas indias (1962)
+Indian_yard_(1975)=yardas indias (1975)
+Statute_mile=millas (Statute)
+Gold_Coast_foot=pies (Gold Coast)
+British_foot_(1936)=pies brit\u00e1nicos (1936)
+yard=yardas
+chain=cadenas
+link=eslabones
+Link=eslabones
+British_yard_(Sears_1922_truncated)=yardas brit\u00e1nicas (Sears 1922 truncadas)
+Bin_width_330_US_survey_feet=pies (Bin width 330 US survey)
+Bin_width_165_US_survey_feet=pies (Bin_width 165 US survey)
+Bin_width_82.5_US_survey_feet=pies (Bin width 82.5 US survey)
+Bin_width_37.5_metres=metros (Bin width 37.5)
+Bin_width_25_metres=metros (Bin width 25)
+Bin_width_12.5_metres=metros (Bin width 12.5)
+Bin_width_6.25_metres=metros (Bin width 6.25)
+Bin_width_3.125_metres=metros (Bin width 3.125)
+British_foot_(Sears_1922_truncated)=pies brit\u00e1nicos (Sears 1922 truncados)
+British_chain_(Sears_1922_truncated)=cadenas brit\u00e1nicas (Sears 1922 truncados)
+British_link_(Sears_1922_truncated)=eslabones brit\u00e1nicos (Sears 1922 truncados)
+
+#PARAMETROS DE LOS SISTEMAS DE COORDENADAS:
+
+altitude=Altitud
+azimuth=Azimut
+central_meridian=Meridiano central
+Central_meridian=Meridiano central
+false_easting=Falso este
+false_northing=Falso norte
+Height=Altitud
+latitude_of_center=Latitud del centro
+Latitude_Of_1st_Point=Latitud del 1er punto
+Latitude_Of_2nd_Point=Latitud del 2d punto
+latitude_of_origin=Latitud del origen
+latitude_of_standard_parallel=Latitud del paralelo estandar
+longitude_of_center=Longitud del centro
+Longitude_Of_1st_Point=Longitud del 1er punto
+Longitude_Of_2nd_Point=Longitud del 2d punto
+pseudo_standard_parallel_1=Pseudo paralelo estandar
+rectified_grid_angle=\u00C1ngulo de grid rectificado
+satellite_height=Altitud de sat�lite
+scale_factor=Factor de escala
+semi_major=Semieje mayor
+semi_minor=Semieje menor
+standard_parallel_1=Paralelo estandar 1
+standard_parallel_2=Paralelo estandar 1
+ 
+#PROJECTION NAMES:
+
+Aitoff=Aitoff
+Albers_Conic_Equal_Area=C\u00F3nica Iso \u00C1rea de Albers
+Azimuthal_Equidistant=Equidistante Azimutal
+Bonne=Bonne
+Cassini_Soldner=Cassini Soldner
+Craster_Parabolic=Parab\u00F3lica de Craster
+Cylindrical_Equal_Area=Cil\u00EDndrica Iso \u00C1rea
+Eckert_I=Eckert I
+Eckert_II=Eckert II
+Eckert_III=Eckert III
+Eckert_IV=Eckert IV
+Eckert_V=Eckert V
+Eckert_VI=Eckert VI
+Equidistant_Conic=C\u00F3nica Equidistante
+Equirectangular=Equirectangular
+GEOS=GEOS
+Gall_Stereographic=Stereographica de Gall
+Gnomonic=Gnomonic
+Goode=Goode
+Hammer_Aitoff=Hammer Aitoff
+Krovak=Krovak
+Laborde_Madagascar=Laborde Madagascar
+Lambert_Azimuthal_Equal_Area=Azimutal Iso \u00C1rea de Lambert
+Lambert_Conformal_Conic=C\u00F3nica Conforme de Lambert
+Lambert_Conformal_Conic_1SP=C\u00F3nica Conforme de Lambert 1SP
+Lambert_Conformal_Conic_2SP=C\u00F3nica Conforme de Lambert 2SP
+Lambert_Conformal_Conic_2SP_Belgium=C\u00F3nica Conforme de Lambert 2SP B\u00E9lgica
+Lambert_Conic_Near_Conformal=C\u00F3nica Near-Conformal de Lambert
+Loximuthal=Loximutal
+McBryde_Thomas_Flat_Polar_Quartic=Cu\u00E1rtica Polar Plana de McBryde Thomas
+Mercator_1SP=Mercator 2SP
+Mercator_2SP=Mercator 2SP
+Miller_Cylindrical=Cil\u00EDndrica de Miller
+Mollweide=Mollweide
+Near_Sided_Perspective=Perspectiva cercana
+New_Zealand_Map_Grid=Nueva Zelanada Map Grid
+Orthographic=Ortogr\u00E1fica
+Polar_Stereographic=Polar Stereogr\u00E1fica
+Polyconic=Polic\u00F3nica 
+Quartic_Authalic=Aut\u00E1lica Cu\u00E1rtica
+Robinson=Robinson
+Sinusoidal=Sinusoidal
+Stereographic=Stereogr\u00E1fica
+Stereographic_North_Pole=Stereogr\u00E1fica Polo Norte
+Stereographic_South_Pole=Stereogr\u00E1fica Polo Sur
+Swiss_Oblique_Cylindrical=Cil\u00EDndrica Obl\u00EDcua Suiza
+Transverse_Mercator=Transversa Mercator
+VanDerGrinten=VanDerGrinten
+Winkel_I=Winkel I
+Winkel_II=Winkel II
+Winkel_Tripel=Winkel Tripel
+
+

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/text.properties
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/config/db_iau2000.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/config/db_iau2000.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/config/db_iau2000.properties	(revision 25287)
@@ -0,0 +1,20 @@
+#HSQL database
+#Wed Oct 18 12:53:57 CEST 2006
+hsqldb.cache_file_scale=1
+runtime.gc_interval=0
+hsqldb.first_identity=0
+version=1.7.3
+modified=no
+hsqldb.script_format=0
+sql.enforce_size=false
+hsqldb.cache_size_scale=10
+hsqldb.cache_scale=14
+hsqldb.version=1.7.3
+hsqldb.log_size=200
+sql.enforce_strict_size=false
+readonly=true
+hsqldb.compatible_version=1.7.2
+hsqldb.original_version=1.7.3
+sql.compare_in_locale=false
+hsqldb.nio_data_file=true
+hsqldb.cache_version=1.7.0

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/db_iau2000.properties
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/config/text_pt.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/config/text_pt.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/config/text_pt.properties	(revision 25287)
@@ -0,0 +1,165 @@
+#Translations for language [pt]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=
+abstract=Resumo
+add=Adicionar
+address=Adre\u00e7a
+advanced=
+advanced_settings=
+ancho_alto=Largura X altura
+anterior=Anterior
+apply=Aplicar
+bands=Bandas
+brillo=Brightness
+brillo_y_contraste=
+browse=
+cancel=Cancelar
+cannotReproject=N\u00e3o se pode reprojectar este sistema de coordenadas
+cant_reproject_from_any_of=
+capas=Capas
+city=
+clear=Limpar
+conectar=Conectar
+connect_error=Erro ao conectar
+contact_info=
+contact_organization=Organitzaci\u00f3
+contact_person=Nome
+contact_position=C\u00e0rrec
+contraste=Contrast
+coor_geograficas=Coordenadas geogr\u00e1ficas
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=
+covered_extension=Extens\u00e3o
+created_with=
+defined_by_view_extent=
+description=Descri\u00e7\u00e3o
+description_URL=
+dimension=Dimens\u00e3o
+dimensiones=Dimens\u00f5es
+disagregate_layers=
+e-mail=E-mail
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Remover extremos
+error=Error
+error_writting_file=
+estilos=Estilos
+export=Exportar
+export_to_map_context=
+extents_no_coincidentes=A extens\u00e3o da imagem seleccionada n\u00e3o coincide com a imagem de origem.
+fax=Fax
+Fichero=Ficheiro
+fichero_existe=O ficheiro seleccionado j\u00e1 existe como banda da capa
+file_name=
+file_version=
+fit_WMS_layer=
+format=Formato
+formato=Formato
+formatos=Formatos
+georeferenciado=
+height=
+html_in_a_new_view=<HTML>Crea una vista nova al projecte. La nova vista contindr\u00e0 totes les capes definides pel fitxer.</HTML>
+html_in_other_view=
+html_in_the_current_view=<HTML>Afegeix les capes definides pel fitxer a la actual vista activa.</HTML>
+id=ID
+import=
+import_map_context=
+in=em
+info=Informa\u00e7\u00e3o
+Informacion=Informa\u00e7\u00e3o
+interval=Intervalo
+invalid_dimension_values=
+is_required=\u00e9s obligatori
+keywords=Paraules clau
+layer=Capa
+layer_abstract=Resumo
+layer_name=Nome da capa
+layer_title=Titulo da capa
+layers_in_other_view=
+layers_in_the_current_view=
+lineal_directo=Lineal direito
+logo_URL=URL logotip
+m/pixel=metros/pixel
+map_context_file_error=
+map_extent=Extens\u00e3o
+map_size_in_pixels=Tamany del mapa (p\u00edxels)
+metadatos=Metadatos
+move_layer_down=Mover para baixo
+move_layer_up=Mover para cima
+must_specify_a_file=
+name=Nome
+none_selected=Nenhum seleccionado
+not_available=N\u00e3o dispon\u00edvel
+num_bandas=N\u00famero de bandas
+ogc_mapcontext_file=OGC Web Map Context
+ok=Aceitar
+Ok=Aceitar
+opacidad=Opacidade
+open_layers_as=
+options=
+origen_de_datos=Origem de dados
+postcode=
+previsualizacion=
+problems_encountered_while_importing=
+properties=Propriedades
+propiedades_raster=Propiedades da cobertura
+Proyecciones=
+realce=Realce
+recorte_colas=Recorte de filas
+refresh_capabilities=Actualizar cache
+refresh_capabilities_tooltip=Marque esta op\u00e7\u00e3o para reescrever os dados anteriores.
+remove=Remover
+seleccionar_srs=Seleccionar SRS
+select_formats=Seleccionar formatos
+select_layers=Seleccionar capas
+selected_dimensions=Dimens\u00f5es seleccionadas
+selected_layers=Capas seleccionadas
+server=Servidor
+server_abstract=Sumario
+server_cant_render_layers=Este servidor n\u00e3o pode "renderizar" estas capas juntas. Tenta fazer peti\u00e7\u00f5es separadas para cada capa.
+server_timeout=Alcan\u00e7ado m\u00e1ximo tempo de espera de resposta do WMS
+server_title=Titulo
+server_type=Tipo de servidor
+service_info=Informa\u00e7\u00e3o do servi\u00e7o
+set=Establecer
+settings=
+settings_editor=Editor de ajustes
+show_layer_names=Mostrar nomes
+si=
+siguiente=Seguinte
+single_value=Valor simples
+state_or_province=
+style=Estilo
+tamano=Tamanho\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e8fon
+tipo_dato=Tipo de dado
+title=T\u00edtulo
+to=At\u00e9
+transparencia=Transpar\u00eancia
+unknown_response_format=
+unsupported_crs=
+unsupported_map_context_version=
+unsupported_version=Versi\u00f3 no suportada
+use_custom_size=
+use_full_extent=
+use_view_size=
+value=Valor
+version=Versi\u00f3
+version_conflict=Conflito de vers\u00f5es
+view=Vis\u00e3o
+Vista=Vista
+web_map_context=
+web_map_context_settings=
+width=Ampl\u00e0ria
+wms_cant_connect=N\u00e3o foi poss\u00edvel realizar a conex\u00e3o com WMS
+wms_not_queryable=Este servidor n\u00e3o aceita peti\u00e7\u00f5es deste tipo
+wms_properties=Propriedades WMS
+wms_server_error=Erro do servidor WMS
+wms_transparency=Transpar\u00eancia
+WMSLayer=Capa WMS
+xmax=X m\u00e1xima
+xmin=X m\u00ednima
+ymax=Y m\u00e1xima
+ymin=Y m\u00ednima

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/text_pt.properties
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/config/text_ca.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/config/text_ca.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/config/text_ca.properties	(revision 25287)
@@ -0,0 +1,165 @@
+#Translations for language [ca]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=Vista nova
+abstract=Resum
+add=Afegir
+address=Adre\u00e7a
+advanced=Avan\u00e7ada
+advanced_settings=Opcions avan\u00e7ades
+ancho_alto=Amplada al\u00e7ada
+anterior=Anterior
+apply=Aplicar
+bands=Bandes
+brillo=Brillantor
+brillo_y_contraste=Brillantor i contrast
+browse=Examinar
+cancel=Cancel\u00b7lar
+cannotReproject=No es pot reprojectar este sistema de coordenades
+cant_reproject_from_any_of=
+capas=Capes
+city=Ciutat
+clear=Netejar
+conectar=Connectar
+connect_error=Error de connexi\u00f3
+contact_info=Informaci\u00f3 de contacte
+contact_organization=Organitzaci\u00f3
+contact_person=Nom
+contact_position=C\u00e0rrec
+contraste=Contrast
+coor_geograficas=Coordenades geogr\u00e0fiques
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=Pa\u00eds
+covered_extension=Cobertura de l'extensi\u00f3
+created_with=Creat amb
+defined_by_view_extent=Extensi\u00f3 de la vista
+description=Descripci\u00f3
+description_URL=URL descripci\u00f3
+dimension=Dimensi\u00f3
+dimensiones=Dimensions
+disagregate_layers=Conservar estructura de capes
+e-mail=Correu electr\u00f2nic
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Eliminar extrems
+error=Error
+error_writting_file=Error en escriure el fitxer
+estilos=Estils
+export=Exportar
+export_to_map_context=
+extents_no_coincidentes=Extensions no coincidents
+fax=Fax
+Fichero=Fitxer
+fichero_existe=Hi ha fitxer
+file_name=Fitxer
+file_version=Versi\u00f3 del fitxer
+fit_WMS_layer=Ajustar capa WMS
+format=Format
+formato=Format
+formatos=Formats
+georeferenciado=
+height=Al\u00e7ada
+html_in_a_new_view=<HTML>Crea una vista nova en el projecte. La nova vista contindr\u00e0 totes les capes definides pel fitxer.</HTML>
+html_in_other_view=<HTML>Afig les capes en la vista que especifique de la llista seg\u00fcent\:</HTML>
+html_in_the_current_view=<HTML>Afig les capes definides en el fitxer a la vista activa.</HTML>
+id=ID
+import=Importar
+import_map_context=Importar mapes des d'un fitxer Web Map Context d'OGC
+in=en
+info=Informaci\u00f3
+Informacion=Informaci\u00f3
+interval=Interval
+invalid_dimension_values=
+is_required=\u00e9s obligatori
+keywords=Paraules clau
+layer=Capa
+layer_abstract=Resum de la capa
+layer_name=Nom de la capa
+layer_title=T\u00edtol de la capa
+layers_in_other_view=Capes en la llista que jo elegisca
+layers_in_the_current_view=Capes en la vista actual
+lineal_directo=Lineal directe
+logo_URL=URL logotip
+m/pixel=metros/pixel
+map_context_file_error=Error en el fitxer Web Map Context
+map_extent=Extensi\u00f3
+map_size_in_pixels=Dimensi\u00f3 del mapa (p\u00edxels)
+metadatos=Metadatos
+move_layer_down=Moure amunt
+move_layer_up=Moure avall
+must_specify_a_file=Ha d'especificar un fitxer de dest\u00ed
+name=Nom
+none_selected=Cap seleccionat
+not_available=No disponible
+num_bandas=Nombre de bandes
+ogc_mapcontext_file=OGC Web Map Context
+ok=D'acord
+Ok=D'acord
+opacidad=Opacitat
+open_layers_as=Obrir les capes com a
+options=Opcions
+origen_de_datos=Origen de dades
+postcode=Codi postal
+previsualizacion=Previsualitzaci\u00f3
+problems_encountered_while_importing=
+properties=Propietats
+propiedades_raster=Propietats del raster
+Proyecciones=
+realce=Relleu
+recorte_colas=Retall de cues
+refresh_capabilities=Refrescar la mem\u00f2ria cau
+refresh_capabilities_tooltip=Marque esta casella per a sobreescriure les dades anteriors.
+remove=Llevar
+seleccionar_srs=Seleccioneu SRS
+select_formats=Seleccionar formats
+select_layers=Seleccionar capes
+selected_dimensions=Dimensions seleccionades
+selected_layers=Capes seleccionades
+server=Servidor
+server_abstract=Resum del servidor
+server_cant_render_layers=Este servidor no pot representar estes capes juntes. Prove a fer peticions separades per a cada capa.
+server_timeout=Temps de connexi\u00f3 excedit
+server_title=T\u00edtol del servidor
+server_type=Tipus de servidor
+service_info=Informaci\u00f3 del servici
+set=Establir
+settings=Ajustaments
+settings_editor=Editor d'ajustaments
+show_layer_names=Mostrar noms de capes
+si=
+siguiente=Seg\u00fcent
+single_value=Valor simple
+state_or_province=Estat/Prov\u00edncia
+style=Estil
+tamano=Dimensi\u00f3\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e8fon
+tipo_dato=Tipus de dada
+title=T\u00edtol
+to=Fins a
+transparencia=Transpar\u00e8ncia
+unknown_response_format=Format de resposta desconeguda
+unsupported_crs=
+unsupported_map_context_version=Versi\u00f3 de Web Map Context no suportada
+unsupported_version=Versi\u00f3 no suportada
+use_custom_size=Dimensi\u00f3 personalitzada
+use_full_extent=Extensi\u00f3 total
+use_view_size=Dimensi\u00f3 de la vista
+value=Valor
+version=Versi\u00f3
+version_conflict=Conflicte de versi\u00f3
+view=Vista
+Vista=Vista
+web_map_context=Web Map Context
+web_map_context_settings=Propietats Web Map Context
+width=Amplada
+wms_cant_connect=No es pot realitzar la connexi\u00f3 amb WMS
+wms_not_queryable=Este servidor no accepta peticions d'este tipus
+wms_properties=Propietats WMS
+wms_server_error=Error del servidor WMS
+wms_transparency=Transpar\u00e8ncia
+WMSLayer=Capa WMS
+xmax=X m\u00e0xima
+xmin=X m\u00ednima
+ymax=Y m\u00e0xima
+ymin=Y m\u00ednima

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/text_ca.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/config/iau2000.script
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/iau2000.script
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/config/text_de.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/config/text_de.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/config/text_de.properties	(revision 25287)
@@ -0,0 +1,165 @@
+#Translations for language [de]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=
+abstract=Zusammenfassung
+add=Hinzuf\u00fcgen
+address=
+advanced=
+advanced_settings=
+ancho_alto=Breite x h\u00f6he
+anterior=Zur\u00fcck
+apply=Anwenden
+bands=Farbstreifen
+brillo=
+brillo_y_contraste=
+browse=
+cancel=Abbrechen
+cannotReproject=Dieses koordinatensystem kann nicht reprojektiert werden.
+cant_reproject_from_any_of=
+capas=Layer
+city=Ciutat
+clear=s\u00e4ubern
+conectar=Verbinden
+connect_error=Verbindungsfehler
+contact_info=
+contact_organization=Organitzaci\u00f3
+contact_person=Name
+contact_position=C\u00e0rrec
+contraste=Contrast
+coor_geograficas=Geografische koordinaten
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=
+covered_extension=Verl\u00e4ngerung
+created_with=
+defined_by_view_extent=
+description=Beschreibung
+description_URL=
+dimension=Dimension
+dimensiones=Dimensionen
+disagregate_layers=
+e-mail=E-mail
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Extreme l\u00f6schen
+error=Error
+error_writting_file=
+estilos=Stile
+export=Exportieren
+export_to_map_context=
+extents_no_coincidentes=Die ausgew\u00e4hlte Bildgr\u00f6\u00dfe stimmt nicht mit dem Originalbild \u00fcberein.
+fax=Fax
+Fichero=Datei
+fichero_existe=Ausgew\u00e4hlte datei existiert schon als layergruppe.
+file_name=
+file_version=
+fit_WMS_layer=WMS-Karte anpassen
+format=Format
+formato=Format
+formatos=Formate
+georeferenciado=
+height=
+html_in_a_new_view=
+html_in_other_view=
+html_in_the_current_view=
+id=ID
+import=Importieren
+import_map_context=
+in=in
+info=Information
+Informacion=Information
+interval=Intervall
+invalid_dimension_values=
+is_required=
+keywords=
+layer=
+layer_abstract=Zusammenfassung
+layer_name=Name des Layers
+layer_title=Layertitel
+layers_in_other_view=
+layers_in_the_current_view=
+lineal_directo=Direktlineal
+logo_URL=URL logotip
+m/pixel=metros/pixel
+map_context_file_error=
+map_extent=Verl\u00e4ngerung
+map_size_in_pixels=
+metadatos=
+move_layer_down=Nach unten verschieben
+move_layer_up=Nach oben verschieben
+must_specify_a_file=
+name=Name
+none_selected=keiner ausgew\u00e4hlt
+not_available=Nicht verf\u00fcgbar
+num_bandas=Anzahl farbstreifen
+ogc_mapcontext_file=OGC Web Map Context
+ok=OK
+Ok=Ok
+opacidad=Lichtundurchl\u00e4ssigkeit
+open_layers_as=
+options=
+origen_de_datos=Herkunft der daten
+postcode=
+previsualizacion=
+problems_encountered_while_importing=
+properties=Eigenschaften
+propiedades_raster=Eigenschaften der rasterung
+Proyecciones=
+realce=Heraushebung
+recorte_colas=Zuschnitt der Randbereiche
+refresh_capabilities=Cache aktualisieren
+refresh_capabilities_tooltip=Markieren Sie dieses Feld, um die lokalen Daten zu \u00fcberschreiben.
+remove=Entfernen
+seleccionar_srs=SRS ausw\u00e4hlen
+select_formats=Formate ausw\u00e4hlen
+select_layers=Layer ausw\u00e4hlen
+selected_dimensions=Dimensionen ausw\u00e4hlen
+selected_layers=Ausgew\u00e4hlte layer
+server=Server
+server_abstract=Zusammenfasssung
+server_cant_render_layers=Dieser WMS-Server kann diese Layer nicht zusammen rendern. Versuchen Sie, die einzelnen Layer abzufragen.
+server_timeout=Der WMS-Server antwortet nicht\: Time out
+server_title=Titel
+server_type=Servertyp
+service_info=Service-Information
+set=Festlegen
+settings=Einstellungen
+settings_editor=Einstellungseditor
+show_layer_names=Namen anzeigen
+si=
+siguiente=Weiter
+single_value=einfacher Wert
+state_or_province=
+style=Stil
+tamano=Gr\u00f6\u00dfe\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e8fon
+tipo_dato=Datentyp
+title=Titel
+to=Bis
+transparencia=Transparenz
+unknown_response_format=Unbekanntes format der antwort
+unsupported_crs=
+unsupported_map_context_version=
+unsupported_version=
+use_custom_size=
+use_full_extent=
+use_view_size=
+value=Wert
+version=Versi\u00f3
+version_conflict=Versionenkonflikt
+view=Ansicht
+Vista=Ansicht
+web_map_context=
+web_map_context_settings=
+width=Ampl\u00e0ria
+wms_cant_connect=Es konnte keine Verbindung zum WMS hergestellt werden.
+wms_not_queryable=Dieser Server aktzeptiert keine Abfragen dieser Art.
+wms_properties=WMS-Eigenschaften
+wms_server_error=WMS-Serverfehler
+wms_transparency=Transparenz
+WMSLayer=WMS-Layer
+xmax=Maximalwert x
+xmin=Minimalwert x
+ymax=Maximalwert y
+ymin=Minimalwert y

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/text_de.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/config/db_iau2000.script
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/db_iau2000.script
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/config/esri.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/config/esri.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/config/esri.properties	(revision 25287)
@@ -0,0 +1,20 @@
+#HSQL database
+#Wed Nov 29 14:18:46 CET 2006
+hsqldb.cache_file_scale=1
+runtime.gc_interval=0
+hsqldb.first_identity=0
+version=1.7.3
+modified=no
+hsqldb.script_format=0
+sql.enforce_size=false
+hsqldb.cache_size_scale=10
+hsqldb.cache_scale=14
+hsqldb.version=1.7.3
+hsqldb.log_size=200
+sql.enforce_strict_size=false
+readonly=true
+hsqldb.compatible_version=1.7.2
+hsqldb.original_version=1.7.3
+sql.compare_in_locale=false
+hsqldb.nio_data_file=true
+hsqldb.cache_version=1.7.0

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/esri.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/config/db_epsg.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/config/db_epsg.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/config/db_epsg.properties	(revision 25287)
@@ -0,0 +1,20 @@
+#HSQL database
+#Mon Oct 02 11:23:07 CEST 2006
+hsqldb.cache_file_scale=1
+runtime.gc_interval=0
+hsqldb.first_identity=0
+version=1.7.3
+modified=yes
+hsqldb.script_format=0
+sql.enforce_size=false
+hsqldb.cache_size_scale=10
+hsqldb.cache_scale=14
+hsqldb.version=1.7.3
+hsqldb.log_size=200
+sql.enforce_strict_size=false
+readonly=true
+hsqldb.compatible_version=1.7.2
+hsqldb.original_version=1.7.3
+sql.compare_in_locale=false
+hsqldb.nio_data_file=true
+hsqldb.cache_version=1.7.0

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/db_epsg.properties
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/config/text_gl.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/config/text_gl.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/config/text_gl.properties	(revision 25287)
@@ -0,0 +1,165 @@
+#Translations for language [gl]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=Nova vista
+abstract=Resumo
+add=Engadir
+address=Enderezo
+advanced=Avanzada
+advanced_settings=Opci\u00f3ns avanzadas
+ancho_alto=Ancho alto
+anterior=Anterior
+apply=Aplicar
+bands=Bandas
+brillo=Brillo
+brillo_y_contraste=Brillo e Contraste
+browse=Examinar
+cancel=Cancelar
+cannotReproject=Non se pode reproxectar este sistema de coordenadas
+cant_reproject_from_any_of=
+capas=Capas
+city=Cidade
+clear=Limpar
+conectar=Conectar
+connect_error=Erro de conexi\u00f3n
+contact_info=Informaci\u00f3n de contacto
+contact_organization=Organizaci\u00f3n
+contact_person=Nome
+contact_position=Cargo
+contraste=Contraste
+coor_geograficas=Coordenadas xeogr\u00e1ficas
+could_not_find_web_map_context_file=
+countries_of_the_world=Acerbaix\u00e1n;Afganist\u00e1n;Albania;Alema\u00f1a;Alxeria;Andorra;Angola;Antiga e Barbuda;Arabia Saud\u00ed;Armenia;Arxentina;Australia;Austria;Bahamas;Bahrein;Bangladesh;Barbados;Belice;B\u00e9lxica;Ben\u00edn;Bermudas;Bielorrusia;Bolivia;Bosnia Hercegovina;Botsuana;Brasil;Brunei;Bulgaria;Burquina Faso;Burundi;But\u00e1n;Cabo Verde;Camboia;Camer\u00fan;Canad\u00e1;Casaquist\u00e1n;Chad;Chequia;Chile;China;Chipre;Cidade do Vaticano;Cimbabue;Colombia;Comores;Congo;Congo, Rep\u00fablica Democr\u00e1tica do;Corea do Norte;Corea do Sur;Costa do Marfil;Costa Rica;Croacia;Cuba;Curdist\u00e1n;Dinamarca;Dominica;Ecuador;Emiratos \u00c1rabes Unidos;Eritrea;Eslovaquia;Eslovenia;Espa\u00f1a;Estados Unidos de Am\u00e9rica;Estonia;Etiop\u00eda;Exipto;Fidxi;Filipinas;Finlandia;Francia;Gab\u00f3n;Gambia;Ghana;Granada;Grecia;Guadalupe;G\u00fciana;Guinea;Guinea Ecuatorial;Guinea-Bissau;Hait\u00ed;Honduras;Hungr\u00eda;Iemen;Illas Marshall;Illas Salom\u00f3n;India;Indonesia;Ir\u00e1n;Iraq;Irlanda;Islandia;Israel;Italia;Laos;Lesoto;Letonia;L\u00edbano;Liberia;Libia;Liechtenstein;Lituania;Luxemburgo;Macedonia, Antiga Rep\u00fablica Iusgolava de;Madagascar;Malaisia;Malaui;Maldivas;Mal\u00ed;Malta;Marrocos;Mauricio;Mauritania;M\u00e9xico;Micronesia, Estados Federados de;Moldavia;M\u00f3naco;Mongolia;Mozambique;Myanmar;Namibia;Nauru;Nepal;Nicaragua;Niue;N\u00edxer;Nixeria;Noruega;Nova Celandia;O Salvador;Om\u00e1n;Pa\u00edses Baixos;Palestina;Panam\u00e1;Pap\u00faa Nova Guinea;Paquist\u00e1n;Paraguai;Per\u00fa;Polonia;Porto Rico;Portugal;Qatar;Quenia;Quirguicist\u00e1n;Quiribati;Quvait;Reino Unido;Rep\u00fablica Centroafricana;Rep\u00fablica Dominicana;Ruanda;Ruman\u00eda;Rusia;Saint Kitts e Nevis;Samoa Occidental;San Mari\u00f1o;San Vicente e Granadinas;Santa Luc\u00eda;Santo Tom\u00e9 e Pr\u00edncipe;Senegal;Serbia e Montenegro;Serra Leona;Seychelles;Singapur;Siria;Somalia;Sri Lanka;Suacilandia;Sud\u00e1frica;Sud\u00e1n;Suecia;Su\u00edza;Surinam;Tailandia;Taiw\u00e1n;Tanzania;Taxiquist\u00e1n;Timor Leste;Togo;Tonga;Toquelau;Trinidade e Tobago;T\u00fanez;Turcomenist\u00e1n;Turqu\u00eda;Tuvalu;Ucra\u00edna;Uganda;Uruguai;Uzbequist\u00e1n;Vanuatu;Venezuela;Vietnam;Xap\u00f3n;Xeorxia;Xibuti;Xordania;Zambia
+country=Pa\u00eds
+covered_extension=Cobertura da extensi\u00f3n
+created_with=Creado con
+defined_by_view_extent=
+description=Descripci\u00f3n
+description_URL=URL descrici\u00f3n
+dimension=Dimensi\u00f3n
+dimensiones=Dimensi\u00f3ns
+disagregate_layers=
+e-mail=Correo electr\u00f3nico
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Eliminar extremos
+error=Erro
+error_writting_file=Erro ao escribir o arquivo
+estilos=Estilos
+export=Exportar
+export_to_map_context=
+extents_no_coincidentes=Extensi\u00f3ns non coincidentes
+fax=Fax
+Fichero=Arquivo
+fichero_existe=Arquivo existe
+file_name=Arquivo
+file_version=Versi\u00f3n do arquivo
+fit_WMS_layer=Axustar capa WMS
+format=Formato
+formato=Formato
+formatos=Formatos
+georeferenciado=
+height=Alto
+html_in_a_new_view=<HTML>Crea unha vista nova no proxecto. A nova vista conter\u00e1 t\u00f3dalas capas definidas polo arquivo.</HTML>
+html_in_other_view=<HTML>Engade as capas na vista que especifique da lista seguinte\:</HTML>
+html_in_the_current_view=<HTML>Engade as capas definidas no arquivo \u00e1 vista activa.</HTML>
+id=ID
+import=Importar
+import_map_context=Importar mapas dende un arquivo Web Map Context de OGC
+in=en
+info=Informaci\u00f3n
+Informacion=Informaci\u00f3n
+interval=Int\u00e9rvalo
+invalid_dimension_values=
+is_required=\u00e9 obligatorio
+keywords=Palabras clave
+layer=Capa
+layer_abstract=Resumo da capa
+layer_name=Nome da capa
+layer_title=T\u00edtulo da capa
+layers_in_other_view=Capas na vista que eu escolla
+layers_in_the_current_view=Capas na vista actual
+lineal_directo=Lineal directo
+logo_URL=URL logotipo
+m/pixel=metros/pixel
+map_context_file_error=Erro no arquivo Web Map Context
+map_extent=Extensi\u00f3
+map_size_in_pixels=Tama\u00f1o do mapa (p\u00edxeles)
+metadatos=Metadatos
+move_layer_down=Mover abaixo
+move_layer_up=Mover arriba
+must_specify_a_file=Debe especificar un arquivo de destino.
+name=Nome
+none_selected=Ning\u00fan seleccionado
+not_available=Non dispo\u00f1ible
+num_bandas=N\u00famero de bandas
+ogc_mapcontext_file=OGC Web Map Context
+ok=Aceptar
+Ok=Aceptar
+opacidad=Opacidade
+open_layers_as=Abrir as capas como
+options=Opci\u00f3ns
+origen_de_datos=Origen de dades
+postcode=C\u00f3digo postal
+previsualizacion=Previsualizaci\u00f3n
+problems_encountered_while_importing=
+properties=Propiedades
+propiedades_raster=Propiedades do raster
+Proyecciones=
+realce=Realce
+recorte_colas=Recorte colas
+refresh_capabilities=Refrescar cach\u00e9
+refresh_capabilities_tooltip=Marque esta casilla para sobreescribir os datos anteriores.
+remove=Quitar
+seleccionar_srs=Seleccionar SRS
+select_formats=Seleccionar formatos
+select_layers=Seleccionar capas
+selected_dimensions=Dimensi\u00f3ns seleccionadas
+selected_layers=Capas seleccionadas
+server=Servidor
+server_abstract=Resumo do servidor
+server_cant_render_layers=Este servidor non pode renderizar estas capas xuntas. \nFaga petici\u00f3ns separadas para cada capa.
+server_timeout=Rematou o tempo de conexi\u00f3n ao servidor
+server_title=T\u00edtulo do servidor
+server_type=Tipo de servidor
+service_info=Informaci\u00f3n do servicio
+set=Establecer
+settings=Axustes
+settings_editor=Editor de axustes
+show_layer_names=Amosar nomes de capas
+si=
+siguiente=Seguinte
+single_value=Valor simple
+state_or_province=Estado/Provincia
+style=Estilo
+tamano=Tama\u00f1o\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e9fono
+tipo_dato=Tipo dato
+title=T\u00edtulo
+to=Hata
+transparencia=Transparencia
+unknown_response_format=Formato de resposta desco\u00f1ecido
+unsupported_crs=
+unsupported_map_context_version=
+unsupported_version=Versi\u00f3n non soportada
+use_custom_size=Tama\u00f1o personalizado
+use_full_extent=
+use_view_size=Tama\u00f1o da vista
+value=Valor
+version=Versi\u00f3n
+version_conflict=Conflicto de versi\u00f3n
+view=Vista
+Vista=Vista
+web_map_context=Web Map Context
+web_map_context_settings=Propiedades Web Map Context
+width=Ancho
+wms_cant_connect=
+wms_not_queryable=Este servidor non acepta petici\u00f3ns deste tipo
+wms_properties=Propiedades WMS
+wms_server_error=Erro do servidor WMS
+wms_transparency=Transparenza
+WMSLayer=Capa WMS
+xmax=xmax
+xmin=xmin
+ymax=ymax
+ymin=ymin

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/text_gl.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/config/text_en.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/config/text_en.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/config/text_en.properties	(revision 25287)
@@ -0,0 +1,381 @@
+#Translations for language [en]
+#Fri Oct 10 09:47:23 CEST 2008
+
+abrir=Open
+advertencia_nad=WARNING:The transformation will be applied only into the limits of the grids. 
+angle=Angle
+anterior=Previous
+aplicar_capa=CRS of the layer
+aplicar_vista=CRS of the layer
+apply=Apply
+area=Area
+browse=Browse
+buscar=Search
+calculated_in=Calculated for
+cancel=Cancel
+codeSelectedCrs=Selectec CRS code
+code_transformation=Transformation code
+codigo=Code
+COMP=COMP
+compound=Compound
+coordinate_reference_systems= Coordinate Reference Systems
+criterio_busqueda= Search criteria
+crs_layer=CRS of the layer
+crs_no_selected=CRS not selected
+crs_not_projected=CRS not proyected
+crs_not_soported=CRS not supported
+crs_view=CRS of the view
+crsAndTransformation=CRS and Transformation
+crsRepeat=Repeated CRS
+crsview=CrsView
+datum=Datum
+deleteUsr="Delete user CRS"?
+descripcion=Description
+description_area=Description of the area
+detalles=Details
+details=Details
+detailsTransformation=Details of the transformation
+ellipsoid=Ellipsoid
+EPSG=EPSG
+error_adding_default_value_to_projection_parameter=Error inserting default value in projection parameter
+error_adding_max_value_to_projection_parameter=Error inserting maximun value in projection parameter
+error_adding_min_value_to_projection_parameter=Error inserting minimun value in projection parameter
+error_adding_parameter_projection_name=Error inserting projection parameter name
+error_adding_projection_acronym=Error inserting projection acronym
+error_adding_projection_name=Error inserting projection name
+error_adding_projection_parameter=Error inserting projection parameter 
+error_adding_unit_name=Error inserting unit name 
+error_obtaining_default_value_to_projection_parameter=Error getting default value in projection parameter
+error_obtaining_max_value_to_projection_parameter=Error getting maximun value in projection parameter
+error_obtaining_min_value_to_projection_parameter=Error getting minimun value in projection parameter
+error_obtaining_projection_acronym=Error getting projection acronym
+error_obtaining_projection_name=Error getting projection name
+error_obtaining_projection_parameter_name=Error getting Error projection parameter name
+error_obtaining_unit_list_of_projection_parameter=Error getting the list of projection parameter units
+error_obtaining_unit_name=Error getting unit name 
+error_prime_meridiam_parameters=Error in prime-meridian parameter. 
+ESRI=ESRI
+fill_name=Fill name
+finalizar=Finish
+fuente=Source
+geogcs=Geogcs
+greenwichLongitude=Meridian length
+grids_en=Grids on
+IAU2000=IAU2000
+in=in
+in_proj4_projection=In proj4 Projection
+incorrect_domain=Incorrect domain
+infocrs=Info CRS
+infoCRS=CRS Information
+Informacion=Information
+info_transformations=Transformation Information
+initial_jcrs_warning=<html><b>\u00a1ATENCI\u00d3N\!</b><br>Testing verison of JCRS Plugin. It may contain important errors.</html>
+invFlattening=Inverse flattening
+inv_f=Inverse flattening
+importar=Import
+importarRejilla=Import grid
+lat_max=Maximun latitude
+lat_min=Minimun latitude
+latitude_of_standar_parallel=Latitude of standar parallel
+long=Longitude
+long_max=Maximun Longitude
+long_min=Minimun Longitude
+Mercator=Mercator
+name=Name
+nadfile_not_found= Grids File not found.
+nadfile_bad_format=Invalid Grids File format.
+nadgrids=Grid NTv2
+nadgrids_file=Grids File
+nameDatum=Datum name
+nameSelectedCrs=CRS name
+name_transformation=Transformation name
+newCRS=User CRS
+no=No
+no_results=Results not found.
+node_count=Number of nodes.
+nombre=Name
+not_admit_azimut_close_to=not admit azimut close to
+not_admit_different_azimut_and_spin_axis=not admit different azimut and spin axis
+not_admit_scale_factor_and_latitude_of_origin=not admit scale factor and latitude of origin
+not_admit_latitude_origin_close_to_the_poles=not admit latitude origin close to the poles
+not_admit_parameter=not admit parameter
+not_equal_lat_1_and_lat_2=not equal lat 1 and lat 2
+not_geographic_nor_projected=not geographic nor projected
+not_in_parameter_list=not in parameter list
+not_in_proj4=Not in Proj4
+not_zero_lat_1=lat_1 can't be 0
+not_values_90_or_minus_90_lat_2=lat_2 can't be 90 or -90
+nuevo_crs=New CRS
+numeric_format=This field only accept numeric characters
+Oblique_Mercator=Oblique Mercator
+Oblique_Stereographic=Oblique Stereographic
+ok=Accept
+Ok=Accept
+out_of_domain=out of domain
+parameters=parameters
+por_area=By area
+por_codigo=By code
+por_nombre=By name
+position_out_of_valid_limits=osition out of valid limits
+primem=Primem
+primeMeridian=Prime Meridian
+problem_with_wkt_try_manually=Problem with wkt, try it manually
+proj4Chain=proj4 String
+projcs=Projcs
+projected=Projected
+projection=Projection
+proyeccion_actual=Actual Projection
+recents_transformation=Recent Transformations
+repository=Repository
+scale=Scale (ppm)
+scale_factor=Scale factor
+seleccionar=Select
+seleccion_nadgrids=Grids File calculated for
+selecciona_sistema_de_referencia=Select reference system
+seleccionar_crs=Select CRS
+seleccione_crs_capa=Select layer CRS
+seleccione_crs_vista=Select view CRS
+seleccione_transformacion=Select Tansformation
+seleccionarRejilla=Select grid
+semiMajorAxis=Semi-major axis
+semMay=Semi-major axis
+semMen=Semi.minor axis
+si=Yes
+siguiente=Next
+sin_transformacion=No transformation
+source_crs=Source CRS
+spheroid=Spheroid
+recientes=Recent
+target_crs=Tarjet CRS
+the_parameter=The parameter
+the_projection=the projection
+tipo=Type
+transformation=Transformation
+transformation_code=Transformation code
+transformacion_epsg=EPSG Transformation
+transformacion_manual=Manual Transformation
+transformacion_compuesta= Compound Transformation
+transformation_name=Transformation name
+transformacion_vista=View transformation
+transformacion_capa=Layer transformation
+transformations=Transformations
+type_transformation=Transformation type
+ultimos_crs_utilizados=Recent CRSs
+units=Units
+units_p=Units_p
+user=User
+USR=USR
+valor=Value
+white_Textbox=White textbox
+wkt=WKT
+x_Rotation=X rotation (sexa. sec.)
+x_Translation=X traslation (meters)
+y_Rotation=Y rotation (sexa. sec.)
+y_Translation=Y traslation (meters)
+z_Rotation=Z rotation (sexa. sec.)
+z_Translation=Z traslation(meters)
+Dat_NombreCrs=Name
+Dat_CodeCrs=Code
+Dat_DefinirPor=Defined by
+Dat_nDatum=Datum
+Dat_nElipsoide=Ellipsoid
+Dat_nMeridian=Meridian
+Dat_Datum=Datum name
+Dat_Importar=Import
+Dat_Elips=Ellipsoid name
+Dat_SemMay=Semi-major Axis
+Dat_SemMen=Semi-minor Axis
+Dat_InvF=Inverse Flattening
+Dat_Meridian=Meridian name
+Dat_Long=Longitude
+Dat_InvFToolTipText=Set Inverse Flattening parameter
+Dat_SemMayToolTipText=Set Semi-major Axis parameter 
+Dat_SemMenToolTipText=Set Semi-minor Axis parameter
+SistCoor_titmarco=Coordinate system
+SistCoor_Geografico2D=Geographic 2D
+SistCoor_Proyactado=Projected
+SistCoor_Proyeccion=Projection
+SistCoor_Parametro=Parameter
+SistCoor_Valor=Value
+SistCoor_Unidades=Units
+SistCoor_cbToolTip=Selecciona una opci\u00f3n
+DefCrsUsr_existente=From an existing CRS
+DefCrsUsr_Seleccionar_Crs=Select recent Crs
+DefCrsUsr_nuevo=From user definitions
+DefCrsUsr_wkt=From a WKT String
+DefCrsUsr_importar_wkt=Import Wkt String
+crs_usuario=User CRS
+nombre_proyeccion= Proyection Name
+wz_anterior=Previous
+wz_cancel=Cancel
+wz_fin=Finish
+wz_siguiente=Next
+wz_titulo=User defined CRS
+editar=Edit
+nuevo=New
+eliminar=Remove
+more_info=Extra CRS information
+buscar_por_criterio_seleccion=CRS Search by selected criteria
+
+
+#ANGLE UNITS:
+
+radian=radians
+degree=sexagesimal degrees
+arc-minute=minutes of arc
+arc-second=seconds of arc
+grad=centesimal degrees
+gon=centesimal degrees
+degree_minute_second=degree minute second (sexagesimal)
+degree_minute_second_hemisphere=degree minute second hemisphere (sexagesimal)
+microradian=microradians
+sexagesimal_DMS=sexagesimal DMS
+sexagesimal_DM=sexagesimal DM
+centesimal_minute=centesimal minutes
+centesimal_second=centesimal seconds
+mil_6400=mil 6400
+degree_minute=sexagesimal minutes
+degree_hemisphere=sexagesimal minutes hemisphere
+hemisphere_degree= sexagesimal degrees hemisferio
+degree_minute_hemisphere=--
+hemisphere_degree_minute=--
+hemisphere_degree_minute_second=--
+sexagesimal_DMS.s=sexagesimal DMS.s
+degree_(supplier_to_define_representation)=sexagesimal degrees(DEG)
+
+
+#LENGHT UNITS:
+
+metre=meters
+foot=feet
+US_survey_foot=US survey feet
+Clarke's_foot=Clarke's feet
+fathom=fathoms
+nautical_mile=nautical miles
+German_legal_metre=German legal metres
+US_survey_chain=US survey chains
+US_survey_link=US survey link
+US_survey_mile=US surveymiles
+kilometre=kilometres
+Clarke's_yard=Clarke's yards
+Clarke's_chain=Clarke's chains
+Clarke's_link=Clarke's links
+British_yard_(Sears_1922)=British yards (Sears 1922)
+British_foot_(Sears_1922)=British feet(Sears 1922)
+British_chain_(Sears_1922)=British chains (Sears 1922)
+British_link_(Sears_1922)=British links (Sears 1922)
+British_yard_(Benoit_1895_A)=British yards (Benoit 1895 A)
+British_foot_(Benoit_1895_A)=British feet (Benoit 1895 A)
+British_chain_(Benoit_1895_A)=British chains (Benoit 1895 A)
+British_link_(Benoit_1895_A)=British links(Benoit 1895 A)
+British_yard_(Benoit_1895_B)=British yards(Benoit 1895 B)
+British_foot_(Benoit_1895_B)=Britishfeet(Benoit 1895 B)
+British_chain_(Benoit_1895_B)=British chains (Benoit 1895 B)
+British_link_(Benoit_1895_B)=British links (Benoit 1895 B)
+British_foot_(1865)=Britishfeet (1865)
+Indian_foot=Indian feet
+Indian_foot_(1937)=Indian feet(1937)
+Indian_foot_(1962)=Indian feet(1962)
+Indian_foot_(1975)=Indian feet(1975)
+Indian_yard=Indian yards
+Indian_yard_(1937)=Indian yards(1937)
+Indian_yard_(1962)=Indian yards(1962)
+Indian_yard_(1975)=Indian yards(1975)
+Statute_mile=Statute miles
+Gold_Coast_foot=Gold Coast feet
+British_foot_(1936)=British feet (1936)
+yard=yards
+chain=chains
+link=links
+British_yard_(Sears_1922_truncated)=British yards (Sears 1922 truncated)
+Bin_width_330_US_survey_feet=Bin width 330 US survey feet
+Bin_width_165_US_survey_feet=Bin width 165 US survey feet
+Bin_width_82.5_US_survey_feet=Bin width 82.5 US survey feet
+Bin_width_37.5_metres=Bin width 37.5 metres
+Bin_width_25_metres=Bin width 25 metres
+Bin_width_12.5_metres=Bin width 12.5 metres
+Bin_width_6.25_metresBin width 6.25 metres
+Bin_width_3.125_metres=Bin width 3.125 metres
+British_foot_(Sears_1922_truncated)=British feet (Sears 1922 truncated)
+British_chain_(Sears_1922_truncated)=British chains (Sears 1922 truncated)
+British_link_(Sears_1922_truncated)=British links (Sears 1922 truncated)
+
+# Coordinate System Parameters:
+
+altitude=Altitude
+azimuth=Azimuth
+central_meridian=Central meridian
+Central_meridian=Central meridian
+false_easting=False easting
+false_northing=False northing
+Height=Height
+latitude_of_center=Latitude of center
+Latitude_Of_1st_Point=Latitude of 1st point
+Latitude_Of_2nd_Point=Latitude of 2nd pint
+latitude_of_origin=Latitude of origin
+latitude_of_standard_parallel=Latitude of standard parallel
+longitude_of_center=Longitude of center
+Longitude_Of_1st_Point=Longitude of 1st point
+Longitude_Of_2nd_Point=Longitude of 2nd point
+pseudo_standard_parallel_1=Pseudo standard parallel
+rectified_grid_angle=rectified height
+satellite_height=satelite height
+scale_factor=Scale Factor
+semi_major=Semi Major
+semi_minor=Semi Minor
+standard_parallel_1=Standard parallel 1
+standard_parallel_2=Standard parallel 2
+
+#PROJECTION NAMES:
+
+Aitoff=Aitoff
+Albers_Conic_Equal_Area=Albers Conic Equal Area
+Azimuthal_Equidistant=Azimuthal Equidistant
+Bonne=Bonne
+Cassini_Soldner=Cassini Soldner
+Craster_Parabolic=Craster Parabolic
+Cylindrical_Equal_Area=Cylindrical Equal Area
+Eckert_I=Eckert I
+Eckert_II=Eckert II
+Eckert_III=Eckert III
+Eckert_IV=Eckert IV
+Eckert_V=Eckert V
+Eckert_VI=Eckert VI
+Equidistant_Conic=Equidistant Conic
+Equirectangular=Equirectangular
+GEOS=GEOS
+Gall_Stereographic=Gall Stereographic
+Gnomonic=Gnomonic
+Goode=Goode
+Hammer_Aitoff=Hammer Aitoff
+Krovak=Krovak
+Laborde_Madagascar=Laborde Madagascar
+Lambert_Azimuthal_Equal_Area=Lambert Azimuthal Equal Area
+Lambert_Conformal_Conic=Lambert Conformal Conic
+Lambert_Conformal_Conic_1SP=Lambert Conformal Conic 1SP
+Lambert_Conformal_Conic_2SP=Lambert Conformal Conic 2SP
+Lambert_Conformal_Conic_2SP_Belgium=Lambert Conformal Conic 2SP Belgium
+Lambert_Conic_Near_Conformal=Lambert Conic Near Conformal
+Loximuthal=Loximuthal
+McBryde_Thomas_Flat_Polar_Quartic=McBryde Thomas Flat Polar Quartic
+Mercator_1SP=Mercator 2SP
+Mercator_2SP=Mercator 2SP
+Miller_Cylindrical=Miller Cylindrical
+Mollweide=Mollweide
+Near_Sided_Perspective=Near Sided Perspective
+New_Zealand_Map_Grid=New Zealand Map Grid
+Orthographic=Orthographic
+Polar_Stereographic=Polar Stereographic
+Polyconic=Polyconic
+Quartic_Authalic=Quartic Authalic
+Robinson=Robinson
+Sinusoidal=Sinusoidal
+Stereographic=Stereographic
+Stereographic_North_Pole=Stereographic North Pole
+Stereographic_South_Pole=Stereographic South Pole
+Swiss_Oblique_Cylindrical=Swiss Oblique Cylindrical
+Transverse_Mercator=Transverse Mercator
+VanDerGrinten=VanDerGrinten
+Winkel_I=Winkel I
+Winkel_II=Winkel II
+Winkel_Tripel=Winkel Tripel

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/text_en.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/config/about.htm
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/config/about.htm	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/config/about.htm	(revision 25287)
@@ -0,0 +1,39 @@
+<html>
+  <head>
+    <title>Extensi&oacute;n JCRS</title>
+    <meta content="">
+    <style></style>
+  </head>
+  <body>
+<table width="60%" border="0">
+  <tr>
+    <td width="35%"><img src="images/logoidr.png" width="127" height="100"></td>
+    <td width="65%"><div align="right"><img src="images/teledeteccion.png" width="368" height="100"></div></td>
+  </tr>
+  <tr>
+    <td colspan="2"><font face="Arial, Helvetica, sans-serif">&copy; Copyright
+      Generalitat Valenciana, Instituto de Desarrollo Regional, UCLM 2006.</font></td>
+  </tr>
+</table>
+  <h3>Extesi&oacute;n JCRS V 0.2</h3>
+  <h4>&iexcl;Atenci&oacute;n! Esta es una versi&oacute;n para pruebas, puede presentar errores importantes.</h4>
+  <p>Extensi&oacute;n para el manejo de Sistemas de Referencia de Coordenadas:</p> 
+  <ul>
+  	 <li>Nuevos repositorios de CRSs: EPSG, ESRI, IAU2000</li>
+  	 <li>CRSs Definidos por el usuario</li> 
+     <li>Transformaciones EPSG</li>
+     <li>Transformaciones por fichero Rejilla (NTv2)</li>
+     <li>Transformaciones definidas por el usuario</li>
+     <li>Transformaciones compuestas</li>
+     <li>...</li> 
+  </ul>
+  <p>Librer&iacute;as utilizadas:</p> 
+  <ul>
+  	 <li>PROJ.4</li>
+  	 <li>GeoTools</li> 
+     <li>jGridShift</li>
+  </ul>
+  <p>Responsable t&eacute;cnico: Dr. David Hern&aacute;ndez L&oacute;pez (david.hernandez@uclm.es)</p> 
+  <p><br><br><b>Code name: extJCRS-0.2-#build.number#</b></p>
+  </body>
+</html>
\ No newline at end of file

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/about.htm
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/config/db_esri.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/config/db_esri.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/config/db_esri.properties	(revision 25287)
@@ -0,0 +1,20 @@
+#HSQL database
+#Wed Nov 29 14:18:46 CET 2006
+hsqldb.cache_file_scale=1
+runtime.gc_interval=0
+hsqldb.first_identity=0
+version=1.7.3
+modified=no
+hsqldb.script_format=0
+sql.enforce_size=false
+hsqldb.cache_size_scale=10
+hsqldb.cache_scale=14
+hsqldb.version=1.7.3
+hsqldb.log_size=200
+sql.enforce_strict_size=false
+readonly=true
+hsqldb.compatible_version=1.7.2
+hsqldb.original_version=1.7.3
+sql.compare_in_locale=false
+hsqldb.nio_data_file=true
+hsqldb.cache_version=1.7.0

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/db_esri.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/config/config.xml
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/config/config.xml	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/config/config.xml	(revision 25287)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<plugin-config>
+	<depends plugin-name="com.iver.cit.gvsig"/>
+	<libraries library-dir="."/>
+	<resourceBundle name="text"/>
+	<extensions>
+		<extension class-name="org.gvsig.crs.JCrsExtension"
+			description="M�dulo de JCrs." 
+			active="true" 
+			priority="1">
+		</extension>
+		<extension class-name="org.gvsig.crs.InitialWarningExtension"
+			description="Advertencia JCRS." 
+			active="true" 
+			priority="1">
+		</extension>
+	</extensions>		
+</plugin-config>
\ No newline at end of file

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/config.xml
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/config/text_cs.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/config/text_cs.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/config/text_cs.properties	(revision 25287)
@@ -0,0 +1,165 @@
+#Translations for language [cs]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=
+abstract=Abstrakt
+add=P\u0159idat
+address=Adre\u00e7a
+advanced=
+advanced_settings=
+ancho_alto=\u0160\u00ed\u0159ka X v\u00fd\u0161ka
+anterior=P\u0159edchoz\u00ed
+apply=Pou\u017e\u00edt
+bands=Okraje
+brillo=
+brillo_y_contraste=
+browse=
+cancel=Zru\u0161it
+cannotReproject=Nelze znovuzobrazit sou\u0159adnicov\u00fd syst\u00e9m
+cant_reproject_from_any_of=
+capas=Vrstvy
+city=
+clear=Vy\u010distit
+conectar=Spojit
+connect_error=Chyba spojen\u00ed
+contact_info=
+contact_organization=
+contact_person=Jm\u00e9no
+contact_position=C\u00e0rrec
+contraste=Contrast
+coor_geograficas=Geografick\u00e9 sou\u0159adnice
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=
+covered_extension=Roz\u0161\u00ed\u0159en\u00ed
+created_with=
+defined_by_view_extent=
+description=Popis
+description_URL=
+dimension=Rozm\u011br
+dimensiones=Rozm\u011bry
+disagregate_layers=\u00daprava struktury vrstev
+e-mail=E-mail
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Odstranit hrany
+error=Error
+error_writting_file=
+estilos=Styly
+export=Exportovat
+export_to_map_context=
+extents_no_coincidentes=Zvolen\u00e1 hranice nesouhlas\u00ed s p\u016fvodn\u00edm obr\u00e1zkem.
+fax=Fax
+Fichero=Soubor
+fichero_existe=Zvolen\u00fd soubor ji\u017e existuje jako vrstva
+file_name=
+file_version=
+fit_WMS_layer=Upravit WMS Vrstvu
+format=Form\u00e1t
+formato=Form\u00e1t
+formatos=Form\u00e1ty
+georeferenciado=
+height=
+html_in_a_new_view=
+html_in_other_view=
+html_in_the_current_view=
+id=ID
+import=Import
+import_map_context=
+in=v
+info=Informace
+Informacion=Informace
+interval=Interval
+invalid_dimension_values=
+is_required=\u00e9s obligatori
+keywords=Paraules clau
+layer=Vrstva
+layer_abstract=Abstrakt
+layer_name=N\u00e1zev vrstvy
+layer_title=N\u00e1zev vrstvy
+layers_in_other_view=
+layers_in_the_current_view=
+lineal_directo=P\u0159\u00edmo line\u00e1rn\u00ed
+logo_URL=URL logotip
+m/pixel=metros/pixel
+map_context_file_error=
+map_extent=Roz\u0161\u00ed\u0159en\u00ed
+map_size_in_pixels=
+metadatos=Metadatos
+move_layer_down=Dol\u016f
+move_layer_up=Nahoru
+must_specify_a_file=
+name=Jm\u00e9no
+none_selected=Nic nezvoleno
+not_available=Nen\u00ed k dispozici
+num_bandas=Okrajov\u00e9 hodnoty
+ogc_mapcontext_file=OGC Web Map Context
+ok=Budi\u017e
+Ok=Budi\u017e
+opacidad=Stupe\u0148 pr\u016fsvitnosti
+open_layers_as=
+options=
+origen_de_datos=P\u016fvod dat
+postcode=
+previsualizacion=
+problems_encountered_while_importing=
+properties=Vlastnosti
+propiedades_raster=Vlastnosti rastru
+Proyecciones=
+realce=vylep\u0161en\u00ed
+recorte_colas=O\u0159ez fronty
+refresh_capabilities=Obnovit cache
+refresh_capabilities_tooltip=P\u0159epsat lok\u00e1ln\u00ed data
+remove=Odstranit
+seleccionar_srs=Vybrat SRS
+select_formats=Zvolen\u00e9 form\u00e1ty
+select_layers=Vybrat vrstvu
+selected_dimensions=Zvolen\u00e9 rozm\u011bry
+selected_layers=Zvolen\u00e9 vrstvy
+server=Server
+server_abstract=Shrnut\u00ed
+server_cant_render_layers=Tento WMS nem\u016f\u017ee spojit tyto vrstvy. \nPokuste se odd\u011blit dotazy pro ka\u017edou vrstvu.
+server_timeout=WMS vypr\u0161el \u010dasov\u00fd limit
+server_title=N\u00e1zev
+server_type=Typ serveru
+service_info=Informace o serveru
+set=Nastavit
+settings=Nastaven\u00ed
+settings_editor=Editor nastaven\u00ed
+show_layer_names=
+si=
+siguiente=Dal\u0161\u00ed
+single_value=Jedna hodnota
+state_or_province=Estat/Prov\u00edncia
+style=Styl
+tamano=Velikost\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e8fon
+tipo_dato=Datov\u00fd typ
+title=N\u00e1zev
+to=Do
+transparencia=Pr\u016fhlednost
+unknown_response_format=Nezn\u00e1m\u00fd form\u00e1t odpov\u011bdi
+unsupported_crs=
+unsupported_map_context_version=
+unsupported_version=
+use_custom_size=
+use_full_extent=
+use_view_size=
+value=Hodnota
+version=Versi\u00f3
+version_conflict=Konflikt verz\u00ed
+view=Pohled
+Vista=Pohled
+web_map_context=
+web_map_context_settings=
+width=Ampl\u00e0ria
+wms_cant_connect=Nelze se spojit s WMS
+wms_not_queryable=Server neum\u00ed vyhled\u00e1vat
+wms_properties=WMS vlastnosti
+wms_server_error=Chyba WMS
+wms_transparency=Pr\u016fhlednost
+WMSLayer=WMS vrstva
+xmax=maximum X
+xmin=minimum X
+ymax=maximum Y
+ymin=minimum Y

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/text_cs.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/config/usr.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/config/usr.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/config/usr.properties	(revision 25287)
@@ -0,0 +1,20 @@
+#HSQL database
+#Mon May 21 10:22:10 CEST 2007
+hsqldb.cache_file_scale=1
+runtime.gc_interval=0
+hsqldb.first_identity=0
+version=1.7.3
+modified=yes
+hsqldb.script_format=0
+sql.enforce_size=false
+hsqldb.cache_size_scale=10
+hsqldb.cache_scale=14
+hsqldb.version=1.7.3
+hsqldb.log_size=200
+sql.enforce_strict_size=false
+readonly=false
+hsqldb.compatible_version=1.7.2
+hsqldb.original_version=1.7.3
+sql.compare_in_locale=false
+hsqldb.nio_data_file=true
+hsqldb.cache_version=1.7.0

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/usr.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/config/esri.script
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/esri.script
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/config/db_epsg.script
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/db_epsg.script
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/config/text_fr.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/config/text_fr.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/config/text_fr.properties	(revision 25287)
@@ -0,0 +1,165 @@
+#Translations for language [fr]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=
+abstract=R\u00e9sum\u00e9
+add=Ajouter
+address=Adre\u00e7a
+advanced=
+advanced_settings=
+ancho_alto=Largeur X hauteur
+anterior=Pr\u00e9c\u00e9dent
+apply=Appliquer
+bands=Bandes
+brillo=Brightness
+brillo_y_contraste=
+browse=
+cancel=Annuler
+cannotReproject=No es pot reprojectar aquest sistema de refer\u00e8ncia
+cant_reproject_from_any_of=
+capas=Couches g\u00e9ographiques
+city=
+clear=Effacer
+conectar=Connecter
+connect_error=
+contact_info=
+contact_organization=Organitzaci\u00f3
+contact_person=Nom
+contact_position=C\u00e0rrec
+contraste=Contrast
+coor_geograficas=Coordonn\u00e9es g\u00e9ographiques
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=
+covered_extension=
+created_with=Creat amb
+defined_by_view_extent=
+description=Description
+description_URL=
+dimension=Dimension
+dimensiones=Dimensions
+disagregate_layers=
+e-mail=E-mail
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Eliminer les extr\u00eames
+error=Error
+error_writting_file=
+estilos=Styles
+export=Exporter
+export_to_map_context=
+extents_no_coincidentes=Les dimmensions de l'image selectionn\u00e9e ne co\u00efncident pas avec celles de l'image d'origine.
+fax=Fax
+Fichero=Fichier
+fichero_existe=Le fichier selectionn\u00e9 existe d\u00e9j\u00e0
+file_name=Nom de fichier 
+file_version=
+fit_WMS_layer=Ajuster \u00e0 la couche WMS
+format=Format
+formato=Format
+formatos=Formats
+georeferenciado=
+height=
+html_in_a_new_view=<HTML>Crea una vista nova al projecte. La nova vista contindr\u00e0 totes les capes definides pel fitxer.</HTML>
+html_in_other_view=<HTML>Afegeix les capes a la vista que especifique de les de la llista seg\u00fcent.</HTML>
+html_in_the_current_view=<HTML>Afegeix les capes definides pel fitxer a la actual vista activa.</HTML>
+id=ID
+import=
+import_map_context=
+in=\u00e0 l'int\u00e9rieur
+info=Information
+Informacion=
+interval=Intervalle
+invalid_dimension_values=
+is_required=\u00e9s obligatori
+keywords=Paraules clau
+layer=Couche
+layer_abstract=R\u00e9sum\u00e9
+layer_name=Nom de la couche
+layer_title=Titre de la couche
+layers_in_other_view=Capes la vista que jo trie
+layers_in_the_current_view=
+lineal_directo=Lin\u00e9aire direct
+logo_URL=URL logotip
+m/pixel=metros/pixel
+map_context_file_error=
+map_extent=Extension
+map_size_in_pixels=Tamany del mapa (p\u00edxels)
+metadatos=Metadatos
+move_layer_down=Moure avall
+move_layer_up=Moure amunt
+must_specify_a_file=
+name=Nom
+none_selected=Aucune selection
+not_available=No disponible
+num_bandas=Nombre de bandes
+ogc_mapcontext_file=OGC Web Map Context
+ok=Accepter
+Ok=Accepter
+opacidad=Opacit\u00e9
+open_layers_as=
+options=
+origen_de_datos=Origine des donn\u00e9es
+postcode=
+previsualizacion=
+problems_encountered_while_importing=
+properties=Propri\u00e9t\u00e9s
+propiedades_raster=Propri\u00e9t\u00e9s du raster
+Proyecciones=
+realce=R\u00e9heussement
+recorte_colas=Couper les r\u00e9sidus
+refresh_capabilities=Refrescar mem\u00f2ria cau
+refresh_capabilities_tooltip=Marque esta casella per a sobreescriure les dades anteriores.
+remove=Quitter
+seleccionar_srs=S\u00e9lectionner SRS
+select_formats=S\u00e9lection des formats
+select_layers=S\u00e9lectionner des couches
+selected_dimensions=S\u00e9lectionner une dimension
+selected_layers=Couches s\u00e9lectionn\u00e9es
+server=Serveur
+server_abstract=R\u00e9sum\u00e9
+server_cant_render_layers=Aquest servidor WMS no pot renderitzar aquestes dues capes conjuntament.\nSepareles en dues cosultes diferents.
+server_timeout=WMS d\u00e9lais d\u00e9pass\u00e9
+server_title=Titre
+server_type=Type de server
+service_info=Information sur le service
+set=Etablir
+settings=
+settings_editor=
+show_layer_names=
+si=
+siguiente=Suivant
+single_value=Valeur unique
+state_or_province=
+style=Style
+tamano=Taille\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e8fon
+tipo_dato=Type de donn\u00e9e
+title=Titre
+to=Jusqu'\u00e0
+transparencia=Transparence
+unknown_response_format=
+unsupported_crs=
+unsupported_map_context_version=
+unsupported_version=Versi\u00f3 no suportada
+use_custom_size=
+use_full_extent=
+use_view_size=
+value=Valeur
+version=Versi\u00f3
+version_conflict=Conflicte de versi\u00f3
+view=Vue
+Vista=Vue
+web_map_context=
+web_map_context_settings=
+width=Ampl\u00e0ria
+wms_cant_connect=Cannot connect to WMS
+wms_not_queryable=Aquest servidor no accepta peticions d\u0092aquest tipus
+wms_properties=Propri\u00e9t\u00e9s WMS
+wms_server_error=Error del servidor WMS
+wms_transparency=Transparence
+WMSLayer=Couche WMS
+xmax=X minimum
+xmin=X minimum
+ymax=Y minimum
+ymin=Y minimum

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/text_fr.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/config/text_eu.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/config/text_eu.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/config/text_eu.properties	(revision 25287)
@@ -0,0 +1,165 @@
+#Translations for language [eu]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=Bista berria
+abstract=Laburpena
+add=Gehitu
+address=Helbidea
+advanced=Aurreratua
+advanced_settings=Aukera aurreratuak
+ancho_alto=Zabalera altuera
+anterior=Aurrekoa
+apply=Aplikatu
+bands=Bandak
+brillo=Distira
+brillo_y_contraste=Distira eta kontrastea
+browse=Aztertu
+cancel=Utzi
+cannotReproject=Koordenatu sistema hau ezin da berriro proiektatu
+cant_reproject_from_any_of=
+capas=Geruzak
+city=Herria
+clear=Garbitu
+conectar=Konektatu
+connect_error=Konexio-errorea
+contact_info=Harremanetarako informazioa
+contact_organization=Antolaketa
+contact_person=Izena
+contact_position=Kargua
+contraste=Kontrastea
+coor_geograficas=Koordenatu geografikoak
+could_not_find_web_map_context_file=
+countries_of_the_world=Afganistan;Albania;Aljeria;Ameriketako Samoa;Andorra;Angola;Anguilla;Antartika;Antigua eta Barbuda;Argentina;Armenia;Aruba;Ascension uhartea;Australia;Austria;Azerbaijan;Bahamak;Bahrain;Bangladesh;Barbados;Bielorrusia;Belgika;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia-Herzegovina;Botswana;Bouvet uhartea;Brazil;Indiako ozeanoko Britainiar Lurraldea;Brunei;Bulgaria;Burkina Faso;Burundi;Kanbodia;Kamerun;Kanada;Cabo Verde;Cayman uharteak;Afrika Erdiko Errepublika;Txad;Txile;Txina;Christmas uhartea;Kokoen uhartea(Keeling);Kolonbia;Komoreak;Kongo (KED);Kongo;Cook uharteak;Costa Rica;Boli Kosta;Kroazia;Kuba;Zipre;Txekiar Errepublika;Danimarka;Djibouti;Dominika;Dominikar Errepublika;Ekuador;Egipto;El Salvador;Ekuatore Ginea;Eritrea;Estonia;Etiopia;Falkland uharteak;Faroe uharteak;Fiji;Finlandia;Frantzia;Guyana Frantsesa;Polinesia Frantsesa;Hegoaldeko eta Antartikoko Frantziako lurraldea;Gabon;Gambia;Georgia;Alemania;Ghana;Gibraltar;Grezia;Groenlandia;Grenada;Guadalupe;Guam;Guatemala;Guernesey;Ginea;Ginea-Bissau;Guyana;Haiti;Heard uhartea eta McDonald uharteak;Honduras;Hong Kong SAR;Hungaria;Islandia;India;Indonesia;Iran;Irak;Irlanda;Man uhartea;Israel;Italia;Jamaika;Japonia;Jordania;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kirgizistan;Laos;Latvia;Libano;Lesotho;Liberia;Libia;Liechtenstein;Lituania;Luxenburgo;Macau SAR;Mazedonia;Madagaskar;Malawi;Malaysia;Maldivak;Mali;Malta;Marshall uharteak;Martinika;Mauritania;Maurizio;Mayotte;Mexiko;Mikronesia;Moldavia;Monako;Mongolia;Montserrat;Maroko;Mozambike;Myanmar;Namibia;Nauru;Nepal;Holandarren Antillak;Herbehereak;Kaledonia Berria;Zeelanda Berria;Nikaragua;Niger;Nigeria;Niue;Norfolk uhartea;Ipar Korea;Mariana uharteak;Norvegia;Oman;Pakistan;Palau;Palestinako Agintea;Panama;Papua Ginea Berria;Paraguai;Peru;Filipinak;Pitcairn uharteak;Polonia;Portugal;Puerto Rico;Qatar;Reunion;Errumania;Errusia;Ruanda;Samoa;San Marino;Santo Tome eta Principe;Saudi Arabia;Senegal;Serbia eta Montenegro;Seychelleak;Sierra Leona;Singapur;Eslovakia;Eslovenia;Solomon uharteak;Somalia;Hegoafrika;South Georgia eta hegoaldeko Sandwich uharteak;Espainia;Sri Lanka;Santa Helena;St. Kitts eta Nevis;St. Luzia;Sain-Pierre eta Mikelune;Saint Vincent eta Grenadinak;Sudan;Surinam;Svalbard eta Jan Mayen;Swazilandia;Suedia;Suitza;Siria;Taiwan;Tadjikistan;Tanzania;Thailandia;Timor-Leste;Togo;Tokelau;Tonga;Trinidad eta Tobago;Tristan da Cunha;Tunisia;Turkia;Turkmenistan;Turk eta Caiko uharteak;Tuvalu;Uganda;Ukraina;Arabiar Emirerri Batuak;Britainia Handia;Ameriketako Estatu Batuak;Estatu Batuetako Garrantzia Txikiko Uharte Periferikoak;Uruguai;Uzbekistan;Vanuatu;Vatikano Hiria;Venezuela;Vietnam;Birjina uharteak;Birjina uharteak,Britainia;Wallis eta Futuna;Yemen;Zambia;Zimbabwe
+country=Herrialdea
+covered_extension=Hedaduraren estaldura
+created_with=Honekin sortua\:
+defined_by_view_extent=
+description=Deskripzioa
+description_URL=URL deskribapena
+dimension=Neurria
+dimensiones=Neurriak
+disagregate_layers=Geruzen egitura mantendu
+e-mail=e-posta
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Ezabatu muturrak
+error=Errorea
+error_writting_file=Errorea fitxategia idaztean
+estilos=Estiloak
+export=Esportatu
+export_to_map_context=
+extents_no_coincidentes=Hedadurak ez datoz bat
+fax=Faxa
+Fichero=Fitxategia
+fichero_existe=Fitxategia badago
+file_name=Fitxategia
+file_version=Fitxategiaren bertsioa
+fit_WMS_layer=Doitu WMS geruza
+format=Formatua
+formato=Formatua
+formatos=Formatuak
+georeferenciado=
+height=Altuera
+html_in_a_new_view=Sortu bista berria proiektuan. Bista berrian fitxategiak zehaztutako geruza guztiak jasoko dira.
+html_in_other_view=Gehitu geruzak zerrenda honetan zehaztutako bistan\:
+html_in_the_current_view=<HTML>Fitxategian zehaztutako geruzak aktibo dagoen bistan gehitzen ditu.</HTML>
+id=ID
+import=Inportatu
+import_map_context=Inportatu mapak OGC Web Map Context fitxategi batetik
+in=hemen\:
+info=Informazioa
+Informacion=Informazioa
+interval=Tartea
+invalid_dimension_values=
+is_required=nahitaezkoa da
+keywords=Gako-hitzak
+layer=Geruza
+layer_abstract=Laburpena
+layer_name=Geruzaren izena
+layer_title=Geruzaren izenburua
+layers_in_other_view=Geruzak nik aukeratutako bistan
+layers_in_the_current_view=Oraingo bistako geruzak
+lineal_directo=Zuzeneko lineala
+logo_URL=URL logotipoa
+m/pixel=metros/pixel
+map_context_file_error=Errorea Web Map Context fitxategian
+map_extent=Luzapena
+map_size_in_pixels=Maparen tamaina (pixelak)
+metadatos=Metadatos
+move_layer_down=Behera mugitu
+move_layer_up=Gora mugitu
+must_specify_a_file=Xede fitxategi bat zehaztu behar duzu.
+name=Izena
+none_selected=Ez da bat ere ez hautatu
+not_available=Ez dago erabilgarri
+num_bandas=Banda kopurua
+ogc_mapcontext_file=OGC Web Map Context
+ok=Ados
+Ok=Ados
+opacidad=Opakotasuna
+open_layers_as=Zabaldu geruzak honela\:
+options=Aukerak
+origen_de_datos=Datu-iturburua
+postcode=Posta kodea
+previsualizacion=Aurrebista
+problems_encountered_while_importing=
+properties=Ezaugarriak
+propiedades_raster=Raster-aren ezaugarriak
+Proyecciones=
+realce=Irtengunea
+recorte_colas=Ilarak ebaki
+refresh_capabilities=Eguneratu aurrememoria
+refresh_capabilities_tooltip=Markatu lauki hau aurreko datuen gainean idazteko
+remove=Kendu
+seleccionar_srs=Hautatu SRS
+select_formats=Hautatu formatuak
+select_layers=Hautatu geruzak
+selected_dimensions=Hautatutako dimentsioak
+selected_layers=Hautatutako geruzak
+server=Zerbitzaria
+server_abstract=Aurkibidea
+server_cant_render_layers=Zerbitzari honek ezin ditu geruza horiek batera errendatu. Saia zaitez geruza bakoitzerako eskari bat egiten
+server_timeout=Server timeout
+server_title=Zerbitzariaren izenburua
+server_type=Zerbitzari mota
+service_info=Zerbitzuari buruzko argibideak
+set=Ezarri
+settings=Doikuntzak
+settings_editor=Doikuntza-editorea
+show_layer_names=Erakutsi geruzen izenak
+si=
+siguiente=Hurrengoa
+single_value=Balio bakuna
+state_or_province=Estatua/Probintzia
+style=Estiloa
+tamano=Tamaina\:
+tamPixX=
+tamPixY=
+telephone=Telefonoa
+tipo_dato=Datu mota
+title=Izenburua
+to=Honaino
+transparencia=Gardentasuna
+unknown_response_format=Erantzunaren formatua ezezaguna da
+unsupported_crs=
+unsupported_map_context_version=Web Map Context fitxategiaren bertsioa ezin da jasan
+unsupported_version=Ezin da bertsio hori jasan
+use_custom_size=Tamaina pertsonalizatua
+use_full_extent=
+use_view_size=Bistaren tamaina
+value=Balioa
+version=Bertsioa
+version_conflict=Bertsio-gatazka
+view=Bista
+Vista=Bista
+web_map_context=Web Map Context
+web_map_context_settings=Web Map Context fitxategiaren ezaugarriak
+width=Zabalera
+wms_cant_connect=Ezin izan da WMSrekin konexioa egin
+wms_not_queryable=Zerbitzari honek ez ditu era horretako eskariak onartzen
+wms_properties=WMS ezaugarriak
+wms_server_error=WMS zerbitzariaren errorea
+wms_transparency=Gardentasuna
+WMSLayer=WMS geruza
+xmax=xmax
+xmin=xmin
+ymax=ymax
+ymin=ymin

Property changes on: tags/JCRS_V02_BN11/extJCRS/config/text_eu.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/JCRS_V02_BN11/extJCRS/images/search.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/images/search.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/images/page_left.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/images/page_left.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/images/teledeteccion.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/images/teledeteccion.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/images/buscar.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/images/buscar.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/images/logoidr.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/images/logoidr.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/build.number
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/build.number	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/build.number	(revision 25287)
@@ -0,0 +1,3 @@
+#Build Number for ANT. Do not edit!
+#Fri Oct 03 14:08:27 BST 2008
+build.number=9

Property changes on: tags/JCRS_V02_BN11/extJCRS/build.number
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/JCRS_V02_BN11/extJCRS/install/build.properties
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/install/build.properties	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/install/build.properties	(revision 25287)
@@ -0,0 +1,16 @@
+#SUSTITUIR POR EL DIRECTORIO DE EXTENSION, ej: com.iver.aytovalencia.visor1
+MAIN_INSTALL_PLUGIN=org.gvsig.crs
+
+
+#VERIFICAR LOS NUMEROS DE VERSION
+EXTENSIONS=com.iver.cit.gvsig,${MAIN_INSTALL_PLUGIN}
+version=1.1
+bversion=1_1
+gvSIG.version=1_1_2
+
+#SUSTITUIR POR EL NOMBRE DE PLUGIN, ej: visorRuido
+APPNAME=extensionJCRS
+
+
+#SUSTITUIR POR EL DIRECTORIO DE SALIDA, ej: /tmp/myExtension
+OUTPUT_DIR= /home/jlgomez/extJCRS
Index: tags/JCRS_V02_BN11/extJCRS/install/distribucion_1.5.sh
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/install/distribucion_1.5.sh	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/install/distribucion_1.5.sh	(revision 25287)
@@ -0,0 +1,327 @@
+#!/bin/bash
+
+# Si se produce un error, salimos inmediatamente
+set -e
+
+# Obtenemos el locale
+LOC=`echo $LANG | sed 's/_.*//'`
+
+# Comprobar que estamos en el directorio adecuado
+if [ "$LOC" = "es" ] ; then
+  ERROR_BASEDIR="Este script debe invocarse desde el directorio raiz del workspace o desde el directorio \'install\'"
+else
+  ERROR_BASEDIR="This script must be run from the workspace\'s root directory or from the \'install\' directory"
+fi
+[ -d _fwAndami ] && [ -d install ] && cd install
+if [ ! -d instalador-gvSIG-lin ] || [ ! -d instalador-gvSIG-win ] || [ ! -d ../_fwAndami ] ; then
+        echo $ERROR_BASEDIR
+        exit 1 ;
+fi
+
+DIR_BASE=`pwd`
+
+source variables.sh
+# Get a version with format 1_x_x
+UNDERSCORE_VERSION=`echo $FULLVERSION | sed 's/\./_/g'`
+# The name of the dir which will be ZIPed, containing the resulting installer
+INSTALLER_DIR="$APPNAME"-$FULLVERSION\_installer
+JARNAME="$APPNAME"-"$FULLVERSION".jar
+# The extension targets on the this version of gvSIG:
+GVSIG_VERSION=1.0
+
+BUILDNUMBER=`sed -n 's/build.number=//p' ../_fwAndami/gvSIG/extensiones/com.iver.cit.gvsig/build.number`
+
+#ZIPNAME="$APPNAME"-"$UNDERSCORE_VERSION"\_"$BUILDNUMBER".zip
+DIR_LIN=instalador-gvSIG-lin
+DIR_WIN=instalador-gvSIG-win
+DIR_MAC=instalador-gvSIG-mac
+BASE_FILE_NAME="$APPNAME"-"$UNDERSCORE_VERSION"-"$BUILDNUMBER"
+WINDOWSZIP="$BASE_FILE_NAME"-windows-i586_j1_5.7z
+LINUXZIP="$BASE_FILE_NAME"-linux-i586_J1_5.tgz
+
+LINUXBIN="$BASE_FILE_NAME"-linux-i586_J1_5.bin
+LINUXBINWITHJRE="$BASE_FILE_NAME"-linux-i586-withjre_J1_5.bin
+
+WINDOWSEXE="$BASE_FILE_NAME"-windows-i586_J1_5.exe
+WINDOWSEXEWITHJRE="$BASE_FILE_NAME"-windows-i586-withjre_J1_5.exe
+
+MAC_10_ZIP="$BASE_FILE_NAME"-mac-10_4.zip
+
+#Directorios
+#OUTPUT_DIR=/mnt/sercartlin/grupo-sig-ca/Testing/Versiones/v"$FULLVERSION"\_"$BUILDNUMBER"
+OUTPUT_DIR="$TARGET_DIR"/v"$FULLVERSION"\_"$BUILDNUMBER"
+PATH_SOURCE_EXT=../_fwAndami/gvSIG/extensiones
+PATH_SOURCE_MANDAT_EXT=../../../../../_fwAndami/gvSIG/extensiones
+
+
+echo "*****************"
+echo "      BASE       "
+echo "*****************"
+# Para Linux
+echo -n "$DIR_BASE"/"$DIR_LIN" "-- "
+cd "$DIR_BASE"/"$DIR_LIN"
+rm bin -rf
+mkdir -p bin/gvSIG/extensiones
+cp installer_files/LEEME installer_files/LLIG-ME installer_files/README bin
+cp resources/gpl.txt bin
+# No enlazamos directamente el directorio lib para no incluir el directorio CVS
+mkdir -p bin/lib
+cd "$DIR_BASE"/"$DIR_LIN"/bin/lib
+for i in ../../../../_fwAndami/lib/*.jar ; do
+  ln -s "$i" .
+done
+for i in ../../../../_fwAndami/lib/*.zip ; do
+  ln -s "$i" .
+done
+cd "$DIR_BASE"/"$DIR_LIN"
+ln -s ../../../_fwAndami/andami.jar bin/
+ln -s ../../../_fwAndami/castor.properties bin/
+#cp resources/andami-config.xml bin
+echo OK.
+
+
+# Para Windows
+echo -n "$DIR_BASE"/"$DIR_WIN" "-- "
+cd "$DIR_BASE"/"$DIR_WIN"
+rm bin -rf
+mkdir -p bin/gvSIG/extensiones
+cp installer_files/LEEME.txt installer_files/LLIG-ME.txt installer_files/README.txt bin
+cp resources/gpl.txt bin
+# No enlazamos directamente el directorio lib para no incluir el directorio CVS
+mkdir -p bin/lib
+cd "$DIR_BASE"/"$DIR_WIN"/bin/lib
+for i in ../../../../_fwAndami/lib/*.jar ; do
+  ln -s "$i" .
+done
+for i in ../../../../_fwAndami/lib/*.zip ; do
+  ln -s "$i" .
+done
+cd "$DIR_BASE"/"$DIR_WIN"
+ln -s ../../../_fwAndami/andami.jar bin
+ln -s ../../../_fwAndami/castor.properties bin/
+#cp resources/andami-config.xml bin
+
+#Copiamos el lanzador y sus tracuciones al tmpResources
+rm -Rf tmpResources
+mkdir tmpResources
+cp -R ../launcher/izpack-launcher-1.3/dist/* ./tmpResources
+mv ./tmpResources/launcher-Win32.exe ./tmpResources/gvSIG.exe
+cp -R ./jre_installers_1.5/jai_imageio-1_0_01-lib-windows ./tmpResources
+#Quitamos el ini, manifest y los CVS
+rm ./tmpResources/*.ini ./tmpResources/*.manifest
+find ./tmpResources -name CVS -type d -exec rm -rf {} 2> /dev/null ';' || true
+find ./tmpResources -name .svn -type d -exec rm -rf {} 2> /dev/null ';' || true
+cp ./resources/gvSIG.ini.J15 ./tmpResources/gvSIG.ini
+echo OK.
+
+# Estas extensiones se copian directamente al directorio destino, ya que no vamos a dar
+# opcion a no instalarlas, son obligatorias
+cd "$DIR_BASE"
+i=0
+while [ ! -z ${MANDATORY_EXTENSIONS[$i]} ]
+do
+  echo ln -s "$PATH_SOURCE_MANDAT_EXT"/${MANDATORY_EXTENSIONS[$i]} "$DIR_LIN"/bin/gvSIG/extensiones
+  ln -s "$PATH_SOURCE_MANDAT_EXT"/${MANDATORY_EXTENSIONS[$i]} "$DIR_LIN"/bin/gvSIG/extensiones
+  echo ln -s "$PATH_SOURCE_MANDAT_EXT"/${MANDATORY_EXTENSIONS[$i]} "$DIR_WIN"/bin/gvSIG/extensiones
+  ln -s "$PATH_SOURCE_MANDAT_EXT"/${MANDATORY_EXTENSIONS[$i]} "$DIR_WIN"/bin/gvSIG/extensiones
+  i=`expr $i + 1`
+done
+
+echo "*****************"
+[ $LOC = "es" ] && echo "   EXTENSIONES   "
+[ $LOC != "es" ] && echo "   EXTENSIONS   "
+echo "*****************"
+
+rm -rf $DIR_LIN/extensiones
+mkdir $DIR_LIN/extensiones
+rm -rf $DIR_WIN/extensiones
+mkdir $DIR_WIN/extensiones
+
+i=0
+while [ ! -z ${EXTENSIONS[$i]} ]
+do
+  [ $LOC = "es" ] && echo "Copiando "${EXTENSIONS[$i]}
+  [ $LOC != "es" ] && echo "Copying "${EXTENSIONS[$i]}
+  echo cp "$PATH_SOURCE_EXT"/${EXTENSIONS[$i]} "$DIR_LIN"/extensiones -rf
+  cp "$PATH_SOURCE_EXT"/${EXTENSIONS[$i]} "$DIR_LIN"/extensiones -rf
+  echo cp "$PATH_SOURCE_EXT"/${EXTENSIONS[$i]} "$DIR_WIN"/extensiones -rf
+  cp "$PATH_SOURCE_EXT"/${EXTENSIONS[$i]} "$DIR_WIN"/extensiones -rf
+  i=`expr $i + 1`
+done
+
+## Eliminamos el driver de oracle
+find -L . -name ojdbc14.jar -type f -exec rm -rf {} 2> /dev/null ';' || true
+find -L . -name gt2-oracle-spatial-2.2.1.jar -type f -exec rm -rf {} 2> /dev/null ';' || true
+find -L . -name sdoapi.jar -type f -exec rm -rf {} 2> /dev/null ';' || true
+
+
+echo "*****************"
+echo "    INST-WIN     "
+echo "*****************"
+# Generar el instalador (jar) para windows
+cd "$DIR_BASE"/"$DIR_WIN"
+rm "$JARNAME" -f
+ant -DJARNAME="$JARNAME" -DGVSIG_VERSION="$GVSIG_VERSION" -DAPPNAME="$APPNAME" -DINSTALL_FILE="install_15.xml"
+
+echo "*****************"
+echo "    INST-LIN     "
+echo "*****************"
+# Generar el instalador (jar) para Linux
+cd "$DIR_BASE"/"$DIR_LIN"
+rm "$JARNAME" -f
+ant -DJARNAME="$JARNAME" -DGVSIG_VERSION="$GVSIG_VERSION" -DAPPNAME="$APPNAME"
+
+
+echo "******************"
+[ $LOC = "es" ] && echo " GENERAR DISTRIB "
+[ $LOC != "es" ] && echo " GENERATE DISTRIB "
+echo "******************"
+# Generar el tar.gz para Linux y el EXE para Windows
+
+mkdir -p "$OUTPUT_DIR"
+echo "- Linux"
+## Para Linux
+cd "$DIR_BASE"/"$DIR_LIN"
+rm -Rf "$INSTALLER_DIR"
+cp -a installer_files "$INSTALLER_DIR"
+rm -R "$INSTALLER_DIR"/CVS 2> /dev/null && true
+# Set the correct version number in the scripts and files
+if [ -f  "$INSTALLER_DIR"/install.sh ] ; then
+  sed "s/JARNAME/$JARNAME/" "$INSTALLER_DIR"/install.sh > "$INSTALLER_DIR"/install.sh.bak
+  mv "$INSTALLER_DIR"/install.sh.bak "$INSTALLER_DIR"/install.sh ;
+  chmod +x "$INSTALLER_DIR"/install.sh
+fi
+#mv "$JARNAME" "$INSTALLER_DIR"
+cp "$JARNAME" "$INSTALLER_DIR"
+tar -cvzf "$LINUXZIP" "$INSTALLER_DIR"
+rm -Rf "$INSTALLER_DIR"
+mv "$LINUXZIP" "$OUTPUT_DIR"
+
+## Nueva instalacion para linux
+cd "$DIR_BASE"/"$DIR_LIN"
+rm -Rf "$INSTALLER_DIR"
+mkdir -p "$INSTALLER_DIR"/tmp_gvSIGInstall
+cp "$JARNAME" "$INSTALLER_DIR"/tmp_gvSIGInstall
+cd "$INSTALLER_DIR"
+cp -R "$DIR_BASE"/launcher/izpack-launcher-1.3_linux/dist/* ./tmp_gvSIGInstall
+find . -name CVS -type d -exec rm -rf {} 2> /dev/null ';' || true
+find . -name .svn -type d -exec rm -rf {} 2> /dev/null ';' || true
+rm ./tmp_gvSIGInstall/launcher.ini
+cp "$DIR_BASE"/"$DIR_LIN"/resources/launcher.ini.j15 ./tmp_gvSIGInstall/launcher.ini
+sed "s/%JARNAME%/$JARNAME/" ./tmp_gvSIGInstall/launcher.ini > ./tmp_gvSIGInstall/launcher.ini.bak
+mv ./tmp_gvSIGInstall/launcher.ini.bak ./tmp_gvSIGInstall/launcher.ini;
+
+tar -cvzf ./tmp.tgz ./tmp_gvSIGInstall
+cp "$DIR_BASE"/"$DIR_LIN"/jre/*-1_5_0_*.gz ./tmp_gvSIGInstall
+tar -cvzf ./tmp_wjre.tgz ./tmp_gvSIGInstall
+echo '#!/bin/sh' > xx.tmp
+lcount=`cat xx.tmp "$DIR_BASE"/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh | wc -l`
+lcount=$(($lcount+2)) # sumamos dos: uno por la linea siguiente y otro para el inicio
+echo "lcount=$lcount" >> xx.tmp
+cat xx.tmp "$DIR_BASE"/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh ./tmp.tgz  > "$LINUXBIN"
+cat xx.tmp "$DIR_BASE"/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh ./tmp_wjre.tgz  > "$LINUXBINWITHJRE"
+rm xx.tmp
+chmod a+x "$LINUXBIN" "$LINUXBINWITHJRE"
+mv "$LINUXBINWITHJRE" "$LINUXBIN" "$OUTPUT_DIR"
+cd "$DIR_BASE"/"$DIR_LIN"
+rm -Rf "$INSTALLER_DIR"
+## Fin Nueva instalacion para linux
+rm "$JARNAME"
+
+
+
+
+## Para Windows
+echo "- Windows"
+#set -x
+cd "$DIR_BASE"/"$DIR_WIN"
+rm -Rf "$INSTALLER_DIR"
+cp -a installer_files "$INSTALLER_DIR"
+
+cp -aR ../launcher/izpack-launcher-1.3/dist/* "$INSTALLER_DIR"
+rm -f "$INSTALLER_DIR"/install.bat
+cp ./resources/launcher-Win32.ini.j15 "$INSTALLER_DIR"/launcher-Win32.ini
+
+find "$INSTALLER_DIR" -name CVS -type d -exec rm -rf {} 2> /dev/null ';' || true
+find "$INSTALLER_DIR" -name .svn -type d -exec rm -rf {} 2> /dev/null ';' || true
+
+## hacemos las sustituciones de la variable
+sed "s/%JARNAME%/$JARNAME/" "$INSTALLER_DIR"/launcher-Win32.ini > "$INSTALLER_DIR"/launcher-Win32.ini.bak
+mv "$INSTALLER_DIR"/launcher-Win32.ini.bak "$INSTALLER_DIR"/launcher-Win32.ini;
+
+
+mv "$JARNAME" "$INSTALLER_DIR"
+cd "$INSTALLER_DIR"
+
+if [ -f  "$DIR_BASE"/"$DIR_WIN"/"$WINDOWSZIP" ] ; then
+	rm -f "$DIR_BASE"/"$DIR_WIN"/"$WINDOWSZIP"
+fi
+"$DIR_BASE"/launcher/7z/7za a -r "$DIR_BASE"/"$DIR_WIN"/"$WINDOWSZIP" *
+cd -
+sed "s/%TITLE%/$APPNAME-$UNDERSCORE_VERSION\_$BUILDNUMBER/" ../launcher/7z/dist_config.txt > dist_config.txt
+cat ../launcher/7z/7zS.sfx  dist_config.txt "$WINDOWSZIP" > "$WINDOWSEXE"
+
+### paquete con los instalables de JRE, Jai y Jai i/o
+"$DIR_BASE"/launcher/7z/7za a "$DIR_BASE"/"$DIR_WIN"/"$WINDOWSZIP" "$DIR_BASE"/"$DIR_WIN"/jre_installers_1.5/*.exe
+cat ../launcher/7z/7zS.sfx  dist_config.txt "$WINDOWSZIP" > "$WINDOWSEXEWITHJRE"
+
+###
+
+
+rm dist_config.txt
+rm "$WINDOWSZIP"
+
+rm -Rf "$INSTALLER_DIR"
+
+mv "$WINDOWSEXE" "$OUTPUT_DIR"
+mv "$WINDOWSEXEWITHJRE" "$OUTPUT_DIR"
+
+# Limpiamos tmpResources
+cd "$DIR_BASE"/"$DIR_WIN"
+rm -r ./tmpResources
+cd -
+
+
+## Para Mac
+echo "- Mac"
+if type ant 2>/dev/null >/dev/null; then
+	cd "$DIR_BASE"/"$DIR_MAC"
+	if ant -Dbuild.number="$BUILDNUMBER" -f build.xml; then
+		zip -rq "$MAC_10_ZIP" gvSIG*.app
+		rm -r gvSIG*.app
+		mv "$MAC_10_ZIP" "$OUTPUT_DIR"
+	else
+		echo "No se ha generado el paquete para Mac 10 . Compruebe que su ant tiene jarbundler instalado
+
+			  Nota: debemos tener incluido en el ANT_HOME/lib el
+	    	  jar jarbundler-1.9.jar que se puede encontrar en http://jarbundler.sourceforge.net/
+	    "
+
+	fi
+
+else
+	    echo "No se ha encontrado el ant en el path de ejecucion:
+	    Es necesario para poder generar la distribucion para el Mac.
+
+	    Nota: debemos tener tambien incluido en el ANT_HOME/lib el
+	    jar jarbundler-1.9.jar que se puede encontrar en http://jarbundler.sourceforge.net/
+	    "
+fi
+
+
+## Limpiamos
+
+rm -rf $DIR_LIN/extensiones
+rm -rf $DIR_LIN/bin
+rm -rf $DIR_WIN/extensiones
+rm -rf $DIR_WIN/bin
+
+echo "*****************"
+echo "    FIN     "
+echo "*****************"
+
+echo ""
+echo "Generados los ficheros:"
+echo "$OUTPUT_DIR"
+ls -lh "$OUTPUT_DIR"
+cd "$DIR_BASE"

Property changes on: tags/JCRS_V02_BN11/extJCRS/install/distribucion_1.5.sh
___________________________________________________________________
Added: svn:executable
   + *

Index: tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_spa
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_spa	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_spa	(revision 25287)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Ruta a gvSIG:"/>
+</langpack>
Index: tags/JCRS_V02_BN11/extJCRS/install/resources/configfile
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/install/resources/configfile	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/install/resources/configfile	(revision 25287)
@@ -0,0 +1,32 @@
+#fichero ASCII, saltos de linea UNIX (ASCII 10)
+#comentarios en linea empezada con #
+#se aceptan lineas en blanco
+#Formato de parametros: 
+#nombre de parametro en una linea, contenido en siguiente/s linea/s
+#si donde deberia haber "contenido del parametro" hay una linea en blanco, se entiende que se quiere parametro vacio
+#Si un parametro no se define, se supone vacio.
+
+#Parametro oldAndamiMD5 puede tener varios valores (se respetan todos, puede no haber ninguno)
+#MD5 de andami.jar v1.0
+#oldAndamiMD5
+#c5427c92842398101136818b66e7dbc8
+
+#MD5 de andami.jar v1.0.1
+#oldAndamiMD5
+#b5bba7f20d0c2f3faed511c0b66039ef
+
+#Parametro oldVersion contiene un STRING con el que decir al usuario las versiones actualizables (sera igual en todos los idiomas!)
+#puede estar vacio
+#oldVersion
+#1.0 / 1.0.1
+
+#Parametro newName contiene nuevo nombre para bundle actualizado (sin extension)
+#si vacio, no se cambiara el nombre (util para instalar extensiones, que no tienen por que modificar el nombre del gvSIG)
+#newName
+#gvSIG 1.0.2 build 891
+
+#Parametro newSuffix contiene nuevo sufijo para bundle "actualizado" (autoinstaller y/o normal)
+#si vacio, no se cambiara el nombre
+#si se especifica newName y newSuffix, se aplica primero newName y luego newSuffix
+#newSuffix
+#SEXTANTE
Index: tags/JCRS_V02_BN11/extJCRS/install/resources/images/Logo_gvsig_gva.jpg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/install/resources/images/Logo_gvsig_gva.jpg
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_cat
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_cat	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_cat	(revision 25287)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Ruta a gvSIG:"/>
+</langpack>
Index: tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_fra
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_fra	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_fra	(revision 25287)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Path to gvSIG:"/>
+</langpack>
Index: tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_eng
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_eng	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_eng	(revision 25287)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Path to gvSIG:"/>
+</langpack>
Index: tags/JCRS_V02_BN11/extJCRS/install/resources/userInputSpec.xml
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/install/resources/userInputSpec.xml	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/install/resources/userInputSpec.xml	(revision 25287)
@@ -0,0 +1,21 @@
+<userInput>
+	<panel order="0">
+		<field 	type="search" 
+				variable="INSTALL_PATH"
+				size="45">
+  			<description align="left" />
+  			<spec 	txt="Path to gvSIG:" 
+		  			id="text.label"
+  					checkfilename="bin/andami.jar"
+        			type="directory" 
+        			result="directory">
+  			<choice value="/usr/local/gvSIG_1.0" os="unix" />
+  			<choice value="/opt/gvSIG_1.0" os="unix" />
+  			<choice value="$USER_HOME/gvSIG_1.0" os="unix" />
+  			<choice value="C:\Archivos de Programa\gvSIG_1.0" os="windows" />
+  			<choice value="C:\Program Files\gvSIG_1.0" os="windows" />
+  			</spec>
+		</field>
+	</panel>
+</userInput>
+
Index: tags/JCRS_V02_BN11/extJCRS/install/resources/LEEME.html
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/install/resources/LEEME.html	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/install/resources/LEEME.html	(revision 25287)
@@ -0,0 +1,62 @@
+<html>
+<head>
+<style type="text/css">
+html, body, h1, h2, h3, h4, div, p, ul, li, input {
+   font-family: Arial, Helvetica, sans-serif;
+}
+
+h1 {
+   font-size: large;
+}
+
+h2 {
+   font-size: large;
+}
+
+h3 {
+   font-size: medium;
+}
+</style>
+</head>
+<body>
+<h1>Gesti&oacute;n de Sistemas de Referencia de Coordenadas (CRSs)</h1>
+
+<h2>Autores:</h2>
+<ul>
+<li>Generalitat Valenciana
+ (Conselleria d'Infraestructures i Transport).</li>
+<li>Instituto de Desarrollo Regional. Secci&oacute;n de Teledetecci&oacute;n y SIG.</li>
+</ul>
+
+<p>Software con licencia GNU/GPL
+(http://www.fsf.org/licensing/licenses/gpl.html)</p>
+
+<p>Información y soporte:
+	http://www.idr-ab.uclm.es/<p>
+	
+<h2>&iexcl;Atenci&oacute;n!: Esta es una versi&oacute;n en pruebas. Puede contener errores importantes.</h2>
+
+<h2>Requisitos de la aplicaci&oacute;n:</h2>
+<h3>Sistema</h3>
+<ul>
+<li>M&iacute;nimos: Pentium III / 256 MB RAM.</li>
+<li>Recomendables: Pentium IV / 512 MB RAM.</li>
+<li>Sistemas operativos: plataformas Windows y Linux.</li>
+</ul>
+
+<h3>Software instalado</h3> (disponible en http://www.gvsig.gva.es o en http://java.sun.com)
+<ul>
+<li>gvSIG-1.1.2</li>
+</ul>
+
+<h2>M&aacute;s informaci&oacute;n y soporte sobre gvSIG en:</h2>
+<h3> Web oficial del proyecto:</h3>
+	http://www.gvsig.gva.es
+
+<h3>Listas de distribuci&oacute;n:</h3>
+<span style="monospace"> http://runas.cap.gva.es/mailman/listinfo/gvsig_usuarios</span> (soporte para usuarios).
+<span style="monospace"> http://runas.cap.gva.es/mailman/listinfo/gvsig_desarrolladores</span> (soporte para desarrolladores).
+<span style="monospace"> http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional</span> (soporte para desarrolladores o usuarios de habla no hispana).
+
+</body>
+</html>
Index: tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_deu
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_deu	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_deu	(revision 25287)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Path to gvSIG:"/>
+</langpack>
Index: tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_ita
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_ita	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_ita	(revision 25287)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Path to gvSIG:"/>
+</langpack>
Index: tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_por
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_por	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_por	(revision 25287)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Path to gvSIG:"/>
+</langpack>
Index: tags/JCRS_V02_BN11/extJCRS/install/resources/gpl.txt
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/install/resources/gpl.txt	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/install/resources/gpl.txt	(revision 25287)
@@ -0,0 +1,125 @@
+	GNU GENERAL PUBLIC LICENSE
+	Version 2, June 1991
+
+	 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
+
+		Preamble
+
+	The licenses for most software are designed to take away your freedom to share and change it.  By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.  This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it.  (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.)  You can apply it to your programs, too.
+
+	When we speak of free software, we are referring to freedom, not price.  Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
+
+	To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
+
+	For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have.  You must make sure that they, too, receive or can get the source code.  And you must show them these terms so they know their
+rights.
+
+	We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
+
+	Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software.  If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
+
+	Finally, any free program is threatened constantly by software	patents.  We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary.  To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
+
+	The precise terms and conditions for copying, distribution and modification follow.
+
+				GNU GENERAL PUBLIC LICENSE
+	TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+	0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License.  The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language.  (Hereinafter, translation is included without limitation in the term "modification".)  Each licensee is addressed as "you".
+
+	Activities other than copying, distribution and modification are not covered by this License; they are outside its scope.  The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
+
+1.	You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
+
+2.	You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
+
+a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
+
+b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
+
+c)	If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License.  (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works.  But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
+
+3.	You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
+
+a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
+
+b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
+
+c)	Accompany it with the information you received as to the offer to distribute corresponding source code.  (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for making modifications to it.  For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable.  However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
+
+If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
+
+4.	You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License.  Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
+
+5.	You are not required to accept this License, since you have not signed it.  However, nothing else grants you permission to modify or distribute the Program or its derivative works.  These actions are prohibited by law if you do not accept this License.  Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
+
+6.	Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions.  You may not impose any further restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to this License.
+
+7.	If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License.  If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all.  For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices.  Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
+
+This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
+
+8.	If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded.  In such case, this License incorporates the limitation as if written in the body of this License.
+
+9.	The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time.  Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation.  If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
+
+10.	If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission.  For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this.  Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
+
+NO WARRANTY
+
+11.	BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+12.	IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+END OF TERMS AND CONDITIONS
+
+How to Apply These Terms to Your New Programs
+
+If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
+
+To do so, attach the following notices to the program.  It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
+
+<one line to give the program's name and a brief idea of what it does.> Copyright (C) <year>  <name of author>
+
+This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
+
+Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License.  Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary.  Here is a sample; alter the names:
+
+Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+<signature of Ty Coon>, 1 April 1989
+Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into proprietary programs.  If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library.  If this is what you want to do, use the GNU Library General Public License instead of this License.
\ No newline at end of file
Index: tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_cze
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_cze	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_cze	(revision 25287)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Path to gvSIG:"/>
+</langpack>
Index: tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_val
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_val	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/install/resources/userInputLang.xml_val	(revision 25287)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Ruta a gvSIG:"/>
+</langpack>
Index: tags/JCRS_V02_BN11/extJCRS/install/HOWTO-BUILD.txt
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/install/HOWTO-BUILD.txt	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/install/HOWTO-BUILD.txt	(revision 25287)
@@ -0,0 +1,7 @@
+ C�MO GENERAR EL INSTALADOR:
+ ===========================
+- gvSIG debe estar correctamente construido en ../_fwAndami/bin 
+- En el fichero variables.sh hay algunas variables que nos pueden interesar, que permiten personalizar el nombre del plugin, la versi�n, el directorio destino, etc. La variable  APPNAME normalmente valdr� "gvSIG", pero puede tiener nombre si estamos empaquetando una extensi�n (por ejemplo,  "nomenclatorIGN").
+- Definir los packs adecuados en el fichero XML de configuraci�n (install.xml), y revisar el fichero en general.
+- Definir las extensiones a incluir en el directorio variables.sh.
+- Lanzar el script distribucion.sh.
Index: tags/JCRS_V02_BN11/extJCRS/install/buildExt.xml
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/install/buildExt.xml	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/install/buildExt.xml	(revision 25287)
@@ -0,0 +1,287 @@
+<project name="instalador-gvSIG" default="init" basedir=".">
+	
+	<dirname file="${ant.file.instalador-gvSIG}" property="base_dir"/>
+	<dirname file="${base_dir}" property="project_dir"/>
+	<dirname file="${project_dir}" property="workspace_dir"/>
+	
+	<import file="${workspace_dir}/binaries/ant/utilities.xml"/>
+	
+	<property file="build.properties"/>
+	<property file="${workspace_dir}/_fwAndami/gvSIG/extensiones/com.iver.cit.gvsig/build.number" prefix="gvSIG."/>
+	<property file="${project_dir}/build.number"/>
+	
+	<property name="dir_inst" location="/usr/local"/>
+	<!--<property name="base_dir" location="./"/>		-->
+	<property name="izpack_dir" location="${workspace_dir}/install/IzPack"/>
+	<property name="dir_libs" location="${izpack_dir}/lib"/>
+	
+	
+	<property name="GVSIG_INSTALLDIR" location="${workspace_dir}/install"/>
+	<property name="ANDAMI_DIR" location="${workspace_dir}/_fwAndami"/>
+	<property name="INSTALLER_DIR" value="${APPNAME}-${version}_installer"/>
+	<property name="JARNAME" value="${APPNAME}-${version}.jar"/>
+	<property name="DIR_LIN_GVSIG" location="${GVSIG_INSTALLDIR}/instalador-gvSIG-lin"/>
+	<property name="DIR_WIN_GVSIG" location="${GVSIG_INSTALLDIR}/instalador-gvSIG-win"/>
+	<property name="baseFileName" value="gvsig_${APPNAME}-${version}-${build.number}"/>
+	<property name="WINDOWSZIP" value="${baseFileName}-windows-i586.7z" />
+	<property name="LINUXBIN" value="${baseFileName}-linux-i586.bin"/>
+	<property name="WINDOWSEXE" value="${baseFileName}-windows-i586.exe"/>
+	<property name="MAC_10_ZIP" value="${baseFileName}-mac-10_4.zip"/>
+	<property name="autoinstalador" value="${APPNAME}_Installer" />
+	<property name="OUTPUT_DIR" location="./dist/v${version}/${build.number}"/> <!--CAMBIAR ESTO SEGUN DIRECTORIO OUTPUT -->
+	
+	<condition property="LAUNCHER7Z" value="${GVSIG_INSTALLDIR}/launcher/7z/7za" else="${GVSIG_INSTALLDIR}/launcher/7z/7z.exe">
+		<os family="unix" />
+	</condition>
+	
+	<taskdef name="izpack" classpath="${dir_libs}/compiler.jar" classname="com.izforge.izpack.ant.IzPackTask"/>
+	
+	
+	<condition property="Lang.Is.Spanish">
+		<contains string="${env.LANG}" substring="es"/>
+	</condition>
+	<condition property="directorio.base">
+		<available file="${base_dir}/install.xml" type="file" />
+	</condition>
+	
+	<target name="E_Spanish" if="Lang.Is.Spanish">
+		<property name="ERROR_BASEDIR" value="En el directorio ${base_dir} no se encuentra el fichero install.xml" />
+	</target>
+	
+	<target name="E_notSpanish" unless="Lang.Is.Spanish">
+		<property name="ERROR_BASEDIR" value="Cannot find install.xml in ${base_dir} folder " />
+	</target>
+	
+	<target name="check" depends="E_Spanish,E_notSpanish">
+		<fail message="${ERROR_BASEDIR}" unless="directorio.base"/>
+	</target>
+	
+	
+	
+	<target name="init" depends="check,CopyFiles,CreateJar,Installation,InstallMac,CleanDir" >
+		
+	</target>
+	<target name="CopyFiles" description="Copia de ficheros de librerias y de las extensiones necesarias">
+		<delete dir="${base_dir}/bin"/>
+		<copy file="${base_dir}/resources/gpl.txt" todir="./bin"/>
+		<mkdir dir="${base_dir}/bin/lib"/>
+		<!-- 		copiamos los jar y zip que tenemos en _fwAndami/lib		 -->
+		<copy todir="${base_dir}/bin/lib">
+			<fileset dir="${ANDAMI_DIR}/lib">
+				<include name="*.jar"/>
+				<include name="*.zip"/>
+			</fileset>
+		</copy>
+		
+		<copy todir="${base_dir}/bin" file="${ANDAMI_DIR}/andami.jar"/>
+		<copy todir="${base_dir}/bin" file="${ANDAMI_DIR}/castor.properties"/>
+		
+		<!-- 		PARA WINDOWS -->
+		
+		
+		<delete dir="${base_dir}/tmpResources"/>
+		<mkdir dir="${base_dir}/tmpResources" />
+		
+		<!-- 	Copiamos el lanzador y sus traduciones al tmpResources,sin copiar el ini, manifest y los CVS (ANT excluye carpetas CVS por defecto -->
+		<copy todir="${base_dir}/tmpResources">
+			<fileset dir="${GVSIG_INSTALLDIR}/launcher/izpack-launcher-1.3/dist/">
+				<include name="**/"/>
+				<exclude name="**/*.ini"/>
+				<exclude name="**/*.manifest"/>
+			</fileset>
+		</copy>
+		<move file="${base_dir}/tmpResources/launcher-Win32.exe" tofile="./tmpResources/gvSIG.exe"/>
+		
+		
+		
+		
+		<for list="${EXTENSIONS}" param="extensions">
+			<sequential>
+				<copy todir="${base_dir}/extensiones/@{extensions}">
+					<fileset dir="${ANDAMI_DIR}/gvSIG/extensiones/@{extensions}"/>
+				</copy>
+				<echo>extension ----> @{extensions} </echo>
+			</sequential>
+		</for>
+	</target>
+	<target name="CreateJar" description="Generacion del instalador Jar">
+		<izpack input="${base_dir}/install.xml"
+			output="${base_dir}/${JARNAME}"
+			installerType="standard"
+			basedir="${base_dir}"
+			izPackDir="${izpack_dir}/"/>
+	</target>
+	<!-- 		generar el tar.gz para linux -->
+	<target name="Installation" description="Generacion de la distribucion">
+		
+		<mkdir dir="${OUTPUT_DIR}" />
+		<delete dir="${base_dir}/${INSTALLER_DIR}"/>
+		<mkdir dir="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall"/>
+		<copy file="${base_dir}/${JARNAME}" todir="./${INSTALLER_DIR}/tmp_gvSIGInstall"/>
+		
+		<!-- 		carpetas CVS no se copiaran, ANT las excluye por defecto -->
+		<copy todir="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall">
+			<fileset dir="${GVSIG_INSTALLDIR}/launcher/izpack-launcher-1.3_linux/dist/"/>
+		</copy>
+		
+		<chmod file="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall/launcher-Linux" perm="ugo+rx"/>
+		<delete file="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall/launcher.ini"/>
+		<copy file="${DIR_LIN_GVSIG}/resources/launcher.ini.j15" tofile="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall/launcher.ini"/>
+		<replace file="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall/launcher.ini" token="%JARNAME%" value="${JARNAME}"/>
+		
+		<!-- 		comprimimos la carpeta tmp_gvSIGInstall en tmp.tgz  -->
+		<tar destfile="${base_dir}/${INSTALLER_DIR}/tmp.tgz"  compression="gzip">
+			<tarfileset dir="${base_dir}/${INSTALLER_DIR}" mode="755" >
+				<include name="tmp_gvSIGInstall/launcher-Linux"/>
+			</tarfileset>
+			<tarfileset dir="${base_dir}/${INSTALLER_DIR}">
+				<include name="tmp_gvSIGInstall/*"/>
+				<exclude name="tmp_gvSIGInstall/launcher-Linux"/>
+			</tarfileset>
+		</tar>
+		<echo message="#!/bin/sh${line.separator}" file="./${INSTALLER_DIR}/xx.tmp" />
+		<echo message="lcount=59${line.separator}" file="./${INSTALLER_DIR}/xx.tmp" append="true" /> <!-- OJO SI SE TOCA EL FICHERO h_gvSIG-install.sh - 59 -> num de lineas del fichero + 2 -->
+		<concat destfile="${base_dir}/${INSTALLER_DIR}/${LINUXBIN}" binary="true" >
+			<fileset file="${base_dir}/${INSTALLER_DIR}/xx.tmp"/>
+			<fileset file="${GVSIG_INSTALLDIR}/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh"/>
+			<fileset file="${base_dir}/${INSTALLER_DIR}/tmp.tgz"/>
+		</concat>
+		<chmod file="${base_dir}/${INSTALLER_DIR}/${LINUXBIN}" perm="ugo+rx"/>
+		<delete file="${base_dir}/${INSTALLER_DIR}/xx.tmp"/>
+		<move file="${base_dir}/${INSTALLER_DIR}/${LINUXBIN}" todir="${OUTPUT_DIR}" />
+		<delete dir="${base_dir}/${INSTALLER_DIR}"/>
+		
+		
+		
+		<!-- 		PARA WINDOWS  -->
+		<delete dir="${base_dir}/${INSTALLER_DIR}"/>
+		<mkdir dir="${base_dir}/${INSTALLER_DIR}"/>
+		<copy todir="${base_dir}/${INSTALLER_DIR}">
+			<fileset dir="${GVSIG_INSTALLDIR}/launcher/izpack-launcher-1.3/dist"/>
+		</copy>
+		<delete file="${base_dir}/${INSTALLER_DIR}/launcher-Win32.ini"/>
+		<copy todir="${base_dir}/${INSTALLER_DIR}/" file="${DIR_WIN_GVSIG}/resources/launcher-Win32.ini.j15"/>
+		<move file="${base_dir}/${INSTALLER_DIR}/launcher-Win32.ini.j15" tofile="${base_dir}/${INSTALLER_DIR}/launcher-Win32.ini"/>
+		<replace file="${base_dir}/${INSTALLER_DIR}/launcher-Win32.ini" token="%JARNAME%" value="${JARNAME}"/>
+		<move file="${base_dir}/${JARNAME}" todir="./${INSTALLER_DIR}"/>
+		<delete file="${base_dir}/${WINDOWSZIP}"/>
+		<exec executable="${LAUNCHER7Z}">
+			<arg line="a -r ${WINDOWSZIP} ./${INSTALLER_DIR}/*"/>
+		</exec>
+		<copy file="${GVSIG_INSTALLDIR}/launcher/7z/dist_config.txt" tofile="./dist_config.txt"/>
+		<replace file="${base_dir}/dist_config.txt" token="%TITLE%" value="${APPNAME}-${bversion}_${build.number}" />
+		<concat destfile="${base_dir}/${WINDOWSEXE}" binary="true">
+			<fileset file="${GVSIG_INSTALLDIR}/launcher/7z/7zS.sfx"/>
+			<fileset file="${base_dir}/dist_config.txt"/>
+			<fileset file="${base_dir}/${WINDOWSZIP}"/>
+		</concat>
+		<move file="${WINDOWSEXE}" todir="${OUTPUT_DIR}"/>
+	</target>
+	
+	<target name="InstallMac" description="Actualizador para MAC">
+		<property name="tmp_mac" location="${base_dir}/tmpResources_mac"/>
+		
+		<delete dir="${tmp_mac}" failonerror="no"/>
+		
+		<mkdir dir="${tmp_mac}"/>
+		
+		
+		<ant antfile="build-updater.xml" dir="${GVSIG_INSTALLDIR}/instalador-gvSIG-mac">
+			<property name="NOMBRE_BUNDLE" value="${autoinstalador}"/>
+			<property name="DIR_DESTINO" value="${tmp_mac}"/>
+		</ant>
+		
+		<copy todir="${tmp_mac}/${autoinstalador}.app/Contents/Resources" file="./resources/configfile" overwrite="yes"/>
+		
+		<replace file="${tmp_mac}/${autoinstalador}.app/Contents/Resources/configfile"
+			 token="%BUILD.NUMBER%"
+			 value="${build.number}"/>
+		
+		
+		<property name="mac_install_path_bin" value="${tmp_mac}/${autoinstalador}.app/Contents/Resources/updates/gvSIGbin"/>
+		<property name="mac_install_path_gvsig" value="${mac_install_path_bin}/gvSIG"/>
+		<property name="mac_install_path_ext" value="${mac_install_path_gvsig}/extensiones"/>
+		
+		<copy todir="${mac_install_path_ext}">
+			<fileset dir="extensiones">
+				<include name="org/gvsig/crs"/>
+			</fileset>
+		</copy>
+
+		<copy todir="${mac_install_path_gvsig}">
+			<fileset dir=".">
+				<include name="extensiones/com.iver.cit.gvsig/lib/jcrs.jar"/>
+				<include name="extensiones/com.iver.cit.gvsig/lib/db_epsg.jar"/>
+				<include name="extensiones/com.iver.cit.gvsig/lib/db_esri.jar"/>
+				<include name="extensiones/com.iver.cit.gvsig/lib/db_iau2000.jar"/>
+				<include name="extensiones/com.iver.cit.gvsig/lib/db_usr.jar"/>
+			</fileset>
+		</copy>
+		<!-- Copiar en los directorios los ficheros a instalar:   
+		     ${mac_install_path_bin} ==> directorio 'bin' de la instalacion (donde esta andami.jar)
+		     ${mac_install_path_gvsig} ==> directorio 'bin/gvSIG' de la instalacion
+		     ${mac_install_path_ext} ==> directorio 'bin/gvSIG/extensiones'
+		     
+		
+		
+		Ejemplos:
+		
+		* Actualizar andami.jar:
+		
+		<copy todir="${mac_install_path_bin}" file="bin/andami.jar"/>
+		
+		
+		* Copiar una libreria al directorio de lib del plugin de gvSIG:
+		
+		<copy todir="${mac_install_path_gvsig}">
+			<fileset dir=".">
+				<include name="extensiones/com.iver.cit.gvsig/lib/myLib.jar"/>
+			</fileset>
+		</copy>
+		
+		* Copiar el directorio entero del plugin 'myPlugin':
+		     
+		<copy todir="${mac_install_path_ext}">
+			<fileset dir="extensiones">
+				<include name="myPlugin/**/**"/>
+			</fileset>
+		</copy>
+
+		* Copiar todos los ficheros 'about.htm'
+		<copy todir="${mac_install_path_ext}">
+			<fileset dir="extensiones">
+				<include name="**/about.htm"/>
+			</fileset>
+		</copy>
+		
+		     
+		     -->
+		
+		
+		
+		<zip destfile="${OUTPUT_DIR}/${MAC_10_ZIP}">
+			<zipfileset dir="${tmp_mac}"
+				    includes="${autoinstalador}.app/**"
+				    excludes="${autoinstalador}.app/Contents/MacOS/*"
+				    />
+			<zipfileset dir="${tmp_mac}"
+				    includes="${autoinstalador}.app/Contents/MacOS/*"
+				    filemode="755"
+				    />
+			
+		</zip>
+		
+		<delete dir="${tmp_mac}"/>
+	</target>
+	
+	<target name="CleanDir" description="Limpiamos los directorios creados">
+		
+		<delete file="${base_dir}/${WINDOWSZIP}" />
+		<delete file="${base_dir}/dist_config.txt" />
+		<delete dir="${base_dir}/${INSTALLER_DIR}" />
+		<delete dir="${base_dir}/tmpResources" />
+		<delete dir="extensiones"/>
+		<delete dir="bin"/>
+	</target>
+	
+</project>
Index: tags/JCRS_V02_BN11/extJCRS/install/variables.sh
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/install/variables.sh	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/install/variables.sh	(revision 25287)
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+export APPNAME=gvSIG
+export FULLVERSION='1.1.2'
+export TARGET_DIR=/tmp/versiones/
+#export TARGET_DIR=/mnt/sercartlin/grupo-sig-ca/Testing/Versiones/
+
+
+## estas extensiones se muestran en los packs, y se puede elegir instalarlos o no
+## (el fichero install.xml también debe estar actualizado para reflejar esto)
+EXTENSIONS=(
+com.iver.cit.gvsig.cad
+com.iver.cit.gvsig.jdbc_spatial
+com.iver.cit.gvsig.wcs
+com.iver.cit.gvsig.wfs2
+com.iver.cit.gvsig.wms
+com.iver.gvsig.datalocator
+com.iver.cit.gvsig.geoprocess
+com.iver.cit.gvsig.geoprocessextensions
+es.gva.cit.gvsig.catalogClient
+org.gvsig.georeferencing
+org.gvsig.rasterTools
+org.gvsig.scripting
+com.iver.gvsig.centerviewpoint
+es.prodevelop.cit.gvsig.arcims
+com.iver.gvsig.expresionfield
+com.iver.cit.gvsig.annotation
+org.gvsig.crs
+com.iver.cit.gvsig.oracle_spatial
+)
+
+## estas extensiones se instalan pero no se muestran en los packs
+MANDATORY_EXTENSIONS=(
+com.iver.cit.gvsig
+com.iver.core
+com.iver.gvsig.addeventtheme
+)
+
Index: tags/JCRS_V02_BN11/extJCRS/install/.project
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/install/.project	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/install/.project	(revision 25287)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>install</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>
Index: tags/JCRS_V02_BN11/extJCRS/install/install.xml
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/install/install.xml	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/install/install.xml	(revision 25287)
@@ -0,0 +1,86 @@
+<installation version="1.0">
+	<info>
+		<appname>EXTENSION_JCRS</appname> <!-- A SUSTITUR POR EL NOMBRE DE EXTENSION, POR EJEMPLO: "VISOR_RUIDO" -->
+		<appversion>0.1</appversion>
+		<authors>
+			<author name="Generalitat Valenciana. Conselleria d'Infraestructures i Transport" email="" />
+			<author name="Instituto de Desarrollo Regional. Seccio�n de Teledetecci�n y SIG" email="" />
+		</authors>
+		<url>http://www.gvsig.gva.es/</url>
+		<javaversion>1.5</javaversion>
+	</info>
+
+	<guiprefs height="600" resizable="yes" width="800">
+		<laf name="liquid">
+			<os family="unix" />
+		</laf>
+		<laf name="liquid">
+			<os family="windows" />
+		</laf>
+	</guiprefs>
+
+	<locale>
+		<langpack iso3="spa"/>
+		<langpack iso3="val"/>
+		<langpack iso3="eng"/>
+		<langpack iso3="cat"/>
+		<langpack iso3="chn"/>
+		<langpack iso3="cze"/>
+		<langpack iso3="dan"/>
+		<langpack iso3="deu"/>
+		<langpack iso3="fin"/>
+		<langpack iso3="fra"/>
+		<langpack iso3="glg"/>
+		<langpack iso3="hun"/>
+		<langpack iso3="ita"/>
+		<langpack iso3="jpn"/>
+		<langpack iso3="mys"/>
+		<langpack iso3="ned"/>
+		<langpack iso3="nor"/>
+		<langpack iso3="pol"/>
+		<langpack iso3="por"/>
+		<langpack iso3="rom"/>
+		<langpack iso3="rus"/>
+		<langpack iso3="scg"/>
+		<langpack iso3="svk"/>
+		<langpack iso3="swe"/>
+		<langpack iso3="ukr"/>
+	</locale>
+
+	<resources>
+		<res src="resources/gpl.txt" id="LicencePanel.licence"/>
+		<res src="resources/LEEME.html" id="HTMLInfoPanel.info"/>
+		<res src="resources/images/Logo_gvsig_gva.jpg" id="Installer.image"/>
+		<res src="resources/userInputSpec.xml" id="userInputSpec.xml"/>
+		<parsable targetfile="resources/userInputSpec.xml"/>
+		<res src="resources/userInputLang.xml_val" id="userInputLang.xml_val" />
+		<res src="resources/userInputLang.xml_spa" id="userInputLang.xml_spa" />
+	</resources>
+
+	<panels>
+		<panel classname="HTMLInfoPanel"/>
+		<panel classname="LicencePanel"/>
+		<panel classname="PacksPanel"/>
+		<panel classname="UserInputPanel"/>
+		<panel classname="InstallPanel"/>
+		<panel classname="SimpleFinishPanel"/>
+	</panels>
+
+	<packs>
+
+		<pack name="Extension_JCRS" required="yes">  <!--A SUSTITUIR POR LA EXTENSION, EJ: Extension VISOR_RUIDO-->
+			<description>Extensi�n para la gestion de Sistemas de Referencia de Coordenadas (CRSs).</description> <!--A SUSTITUIR POR LA DESCRIPCION, EJ: Extension para manejo de... -->
+			<file targetdir="$INSTALL_PATH/bin/gvSIG/extensiones/" src="extensiones/org.gvsig.crs" override="true"/> 
+			<!--SUSTITUR POR LA EXTENSION, ej: com.iver.ayto.visorRuido-->
+			<!--además, si hay que copiar algo fuera del directorio de la extension, hay que añadirlo-->
+			<file targetdir="$INSTALL_PATH/bin/gvSIG/extensiones/com.iver.cit.gvsig/lib" src="extensiones/com.iver.cit.gvsig/lib/jcrs.jar" override="true"/>
+			<file targetdir="$INSTALL_PATH/bin/gvSIG/extensiones/com.iver.cit.gvsig/lib" src="extensiones/com.iver.cit.gvsig/lib/db_epsg.jar" override="true"/>
+			<file targetdir="$INSTALL_PATH/bin/gvSIG/extensiones/com.iver.cit.gvsig/lib" src="extensiones/com.iver.cit.gvsig/lib/db_esri.jar" override="true"/>
+			<file targetdir="$INSTALL_PATH/bin/gvSIG/extensiones/com.iver.cit.gvsig/lib" src="extensiones/com.iver.cit.gvsig/lib/db_iau2000.jar" override="true"/>
+			<file targetdir="$INSTALL_PATH/bin/gvSIG/extensiones/com.iver.cit.gvsig/lib" src="extensiones/com.iver.cit.gvsig/lib/db_usr.jar" override="true"/>
+		</pack>
+
+
+	</packs>
+
+</installation>
Index: tags/JCRS_V02_BN11/extJCRS/install/distribucion.sh
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/install/distribucion.sh	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/install/distribucion.sh	(revision 25287)
@@ -0,0 +1,322 @@
+#!/bin/bash
+
+# Si se produce un error, salimos inmediatamente
+set -e
+
+# Obtenemos el locale
+LOC=`echo $LANG | sed 's/_.*//'`
+
+# Comprobar que estamos en el directorio adecuado
+if [ "$LOC" = "es" ] ; then
+  ERROR_BASEDIR="Este script debe invocarse desde el directorio raiz del workspace o desde el directorio \'install\'"
+else
+  ERROR_BASEDIR="This script must be run from the workspace\'s root directory or from the \'install\' directory"
+fi
+[ -d _fwAndami ] && [ -d install ] && cd install
+if [ ! -d instalador-gvSIG-lin ] || [ ! -d instalador-gvSIG-win ] || [ ! -d ../_fwAndami ] ; then
+        echo $ERROR_BASEDIR
+        exit 1 ;
+fi
+
+DIR_BASE=`pwd`
+
+source variables.sh
+# Get a version with format 1_0_alpha
+UNDERSCORE_VERSION=`echo $FULLVERSION | sed 'y/./_/'`
+# Get a version with format 10_alpha
+BRIEFVERSION=`echo $FULLVERSION | sed 's/\.//'`
+# The name of the dir which will be ZIPed, containing the resulting installer
+INSTALLER_DIR="$APPNAME"-$FULLVERSION\_installer
+JARNAME="$APPNAME"-"$FULLVERSION".jar
+# The extension targets on the this version of gvSIG:
+GVSIG_VERSION=1.0
+
+BUILDNUMBER=`sed -n 's/build.number=//p' ../_fwAndami/gvSIG/extensiones/com.iver.cit.gvsig/build.number`
+
+#ZIPNAME="$APPNAME"-"$UNDERSCORE_VERSION"\_"$BUILDNUMBER".zip
+DIR_LIN=instalador-gvSIG-lin
+DIR_WIN=instalador-gvSIG-win
+DIR_MAC=instalador-gvSIG-mac
+WINDOWSZIP="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-windows-i586.7z
+LINUXZIP="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-linux-i586.tgz
+
+LINUXBIN="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-linux-i586.bin
+LINUXBINWITHJRE="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-linux-i586-withjre.bin
+
+WINDOWSEXE="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-windows-i586.exe
+WINDOWSEXEWITHJRE="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-windows-i586-withjre.exe
+
+MAC_10_ZIP="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-mac-10_3.zip
+
+#Directorios
+#OUTPUT_DIR=/mnt/sercartlin/grupo-sig-ca/Testing/Versiones/v"$FULLVERSION"\_"$BUILDNUMBER"
+OUTPUT_DIR="$TARGET_DIR"/v"$FULLVERSION"\_"$BUILDNUMBER"
+PATH_SOURCE_EXT=../_fwAndami/gvSIG/extensiones
+PATH_SOURCE_MANDAT_EXT=../../../../../_fwAndami/gvSIG/extensiones
+
+
+echo "*****************"
+echo "      BASE       "
+echo "*****************"
+# Para Linux
+echo -n "$DIR_BASE"/"$DIR_LIN" "-- "
+cd "$DIR_BASE"/"$DIR_LIN"
+rm bin -rf
+mkdir -p bin/gvSIG/extensiones
+cp installer_files/LEEME installer_files/LLIG-ME installer_files/README bin
+cp resources/gpl.txt bin
+# No enlazamos directamente el directorio lib para no incluir el directorio CVS
+mkdir -p bin/lib
+cd "$DIR_BASE"/"$DIR_LIN"/bin/lib
+for i in ../../../../_fwAndami/lib/*.jar ; do
+  ln -s "$i" .
+done
+for i in ../../../../_fwAndami/lib/*.zip ; do
+  ln -s "$i" .
+done
+cd "$DIR_BASE"/"$DIR_LIN"
+ln -s ../../../_fwAndami/andami.jar bin/
+ln -s ../../../_fwAndami/castor.properties bin/
+#cp resources/andami-config.xml bin
+echo OK.
+
+
+# Para Windows
+echo -n "$DIR_BASE"/"$DIR_WIN" "-- "
+cd "$DIR_BASE"/"$DIR_WIN"
+rm bin -rf
+mkdir -p bin/gvSIG/extensiones
+cp installer_files/LEEME.txt installer_files/LLIG-ME.txt installer_files/README.txt bin
+cp resources/gpl.txt bin
+# No enlazamos directamente el directorio lib para no incluir el directorio CVS
+mkdir -p bin/lib
+cd "$DIR_BASE"/"$DIR_WIN"/bin/lib
+for i in ../../../../_fwAndami/lib/*.jar ; do
+  ln -s "$i" .
+done
+for i in ../../../../_fwAndami/lib/*.zip ; do
+  ln -s "$i" .
+done
+cd "$DIR_BASE"/"$DIR_WIN"
+ln -s ../../../_fwAndami/andami.jar bin
+ln -s ../../../_fwAndami/castor.properties bin/
+#cp resources/andami-config.xml bin
+
+#Copiamos el lanzador y sus tracuciones al tmpResources
+rm -Rf tmpResources
+mkdir tmpResources
+cp -R ../launcher/izpack-launcher-1.3/dist/* ./tmpResources
+mv ./tmpResources/launcher-Win32.exe ./tmpResources/gvSIG.exe
+#Quitamos el ini, manifest y los CVS
+rm ./tmpResources/*.ini ./tmpResources/*.manifest
+find ./tmpResources -name CVS -type d -exec rm -rf {} 2> /dev/null ';' || true
+cp ./resources/gvSIG.ini ./tmpResources/gvSIG.ini
+echo OK.
+
+# Estas extensiones se copian directamente al directorio destino, ya que no vamos a dar
+# opcion a no instalarlas, son obligatorias
+cd "$DIR_BASE"
+i=0
+while [ ! -z ${MANDATORY_EXTENSIONS[$i]} ]
+do
+  echo ln -s "$PATH_SOURCE_MANDAT_EXT"/${MANDATORY_EXTENSIONS[$i]} "$DIR_LIN"/bin/gvSIG/extensiones
+  ln -s "$PATH_SOURCE_MANDAT_EXT"/${MANDATORY_EXTENSIONS[$i]} "$DIR_LIN"/bin/gvSIG/extensiones
+  echo ln -s "$PATH_SOURCE_MANDAT_EXT"/${MANDATORY_EXTENSIONS[$i]} "$DIR_WIN"/bin/gvSIG/extensiones
+  ln -s "$PATH_SOURCE_MANDAT_EXT"/${MANDATORY_EXTENSIONS[$i]} "$DIR_WIN"/bin/gvSIG/extensiones
+  i=`expr $i + 1`
+done
+
+echo "*****************"
+[ $LOC = "es" ] && echo "   EXTENSIONES   "
+[ $LOC != "es" ] && echo "   EXTENSIONS   "
+echo "*****************"
+
+rm -rf $DIR_LIN/extensiones
+mkdir $DIR_LIN/extensiones
+rm -rf $DIR_WIN/extensiones
+mkdir $DIR_WIN/extensiones
+
+i=0
+while [ ! -z ${EXTENSIONS[$i]} ]
+do
+  [ $LOC = "es" ] && echo "Copiando "${EXTENSIONS[$i]}
+  [ $LOC != "es" ] && echo "Copying "${EXTENSIONS[$i]}
+  echo cp "$PATH_SOURCE_EXT"/${EXTENSIONS[$i]} "$DIR_LIN"/extensiones -rf
+  cp "$PATH_SOURCE_EXT"/${EXTENSIONS[$i]} "$DIR_LIN"/extensiones -rf
+  echo cp "$PATH_SOURCE_EXT"/${EXTENSIONS[$i]} "$DIR_WIN"/extensiones -rf
+  cp "$PATH_SOURCE_EXT"/${EXTENSIONS[$i]} "$DIR_WIN"/extensiones -rf
+  i=`expr $i + 1`
+done
+
+## Eliminamos el driver de oracle
+find -L . -name ojdbc14.jar -type f -exec rm -rf {} 2> /dev/null ';' || true
+find -L . -name gt2-oracle-spatial-2.2.1.jar -type f -exec rm -rf {} 2> /dev/null ';' || true
+find -L . -name sdoapi.jar -type f -exec rm -rf {} 2> /dev/null ';' || true
+
+
+echo "*****************"
+echo "    INST-WIN     "
+echo "*****************"
+# Generar el instalador (jar) para windows
+cd "$DIR_BASE"/"$DIR_WIN"
+rm "$JARNAME" -f
+ant -DJARNAME="$JARNAME" -DGVSIG_VERSION="$GVSIG_VERSION" -DAPPNAME="$APPNAME"
+
+echo "*****************"
+echo "    INST-LIN     "
+echo "*****************"
+# Generar el instalador (jar) para Linux
+cd "$DIR_BASE"/"$DIR_LIN"
+rm "$JARNAME" -f
+ant -DJARNAME="$JARNAME" -DGVSIG_VERSION="$GVSIG_VERSION" -DAPPNAME="$APPNAME"
+
+
+echo "******************"
+[ $LOC = "es" ] && echo " GENERAR DISTRIB "
+[ $LOC != "es" ] && echo " GENERATE DISTRIB "
+echo "******************"
+# Generar el tar.gz para Linux y el EXE para Windows
+
+mkdir -p "$OUTPUT_DIR"
+echo "- Linux"
+## Para Linux
+cd "$DIR_BASE"/"$DIR_LIN"
+rm -Rf "$INSTALLER_DIR"
+cp -a installer_files "$INSTALLER_DIR"
+rm -R "$INSTALLER_DIR"/CVS 2> /dev/null && true
+# Set the correct version number in the scripts and files
+if [ -f  "$INSTALLER_DIR"/install.sh ] ; then
+  sed "s/JARNAME/$JARNAME/" "$INSTALLER_DIR"/install.sh > "$INSTALLER_DIR"/install.sh.bak
+  mv "$INSTALLER_DIR"/install.sh.bak "$INSTALLER_DIR"/install.sh ;
+  chmod +x "$INSTALLER_DIR"/install.sh
+fi
+#mv "$JARNAME" "$INSTALLER_DIR"
+cp "$JARNAME" "$INSTALLER_DIR"
+tar -cvzf "$LINUXZIP" "$INSTALLER_DIR"
+rm -Rf "$INSTALLER_DIR"
+mv "$LINUXZIP" "$OUTPUT_DIR"
+
+## Nueva instalacion para linux
+cd "$DIR_BASE"/"$DIR_LIN"
+rm -Rf "$INSTALLER_DIR"
+mkdir -p "$INSTALLER_DIR"/tmp_gvSIGInstall
+cp "$JARNAME" "$INSTALLER_DIR"/tmp_gvSIGInstall
+cd "$INSTALLER_DIR"
+cp -R "$DIR_BASE"/launcher/izpack-launcher-1.3_linux/dist/* ./tmp_gvSIGInstall
+find . -name CVS -type d -exec rm -rf {} 2> /dev/null ';' || true
+
+sed "s/%JARNAME%/$JARNAME/" ./tmp_gvSIGInstall/launcher.ini > ./tmp_gvSIGInstall/launcher.ini.bak
+mv ./tmp_gvSIGInstall/launcher.ini.bak ./tmp_gvSIGInstall/launcher.ini;
+
+tar -cvzf ./tmp.tgz ./tmp_gvSIGInstall
+cp "$DIR_BASE"/"$DIR_LIN"/jre/*-1_4_2_*.gz ./tmp_gvSIGInstall
+tar -cvzf ./tmp_wjre.tgz ./tmp_gvSIGInstall
+echo '#!/bin/sh' > xx.tmp
+lcount=`cat xx.tmp "$DIR_BASE"/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh | wc -l`
+lcount=$(($lcount+2)) # sumamos dos: uno por la linea siguiente y otro para el inicio
+echo "lcount=$lcount" >> xx.tmp
+cat xx.tmp "$DIR_BASE"/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh ./tmp.tgz  > "$LINUXBIN"
+cat xx.tmp "$DIR_BASE"/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh ./tmp_wjre.tgz  > "$LINUXBINWITHJRE"
+rm xx.tmp
+chmod a+x "$LINUXBIN" "$LINUXBINWITHJRE"
+mv "$LINUXBINWITHJRE" "$LINUXBIN" "$OUTPUT_DIR"
+cd "$DIR_BASE"/"$DIR_LIN"
+rm -Rf "$INSTALLER_DIR"
+## Fin Nueva instalacion para linux
+rm "$JARNAME"
+
+
+
+
+## Para Windows
+echo "- Windows"
+#set -x
+cd "$DIR_BASE"/"$DIR_WIN"
+rm -Rf "$INSTALLER_DIR"
+cp -a installer_files "$INSTALLER_DIR"
+
+cp -aR ../launcher/izpack-launcher-1.3/dist/* "$INSTALLER_DIR"
+rm -f "$INSTALLER_DIR"/install.bat
+
+find "$INSTALLER_DIR" -name CVS -type d -exec rm -rf {} 2> /dev/null ';' || true
+
+## hacemos las sustituciones de la variable
+sed "s/%JARNAME%/$JARNAME/" "$INSTALLER_DIR"/launcher-Win32.ini > "$INSTALLER_DIR"/launcher-Win32.ini.bak
+mv "$INSTALLER_DIR"/launcher-Win32.ini.bak "$INSTALLER_DIR"/launcher-Win32.ini;
+
+
+mv "$JARNAME" "$INSTALLER_DIR"
+cd "$INSTALLER_DIR"
+
+if [ -f  "$DIR_BASE"/"$DIR_WIN"/"$WINDOWSZIP" ] ; then
+	rm -f "$DIR_BASE"/"$DIR_WIN"/"$WINDOWSZIP"
+fi
+"$DIR_BASE"/launcher/7z/7za a -r "$DIR_BASE"/"$DIR_WIN"/"$WINDOWSZIP" *
+cd -
+sed "s/%TITLE%/$APPNAME-$BRIEFVERSION\_$BUILDNUMBER/" ../launcher/7z/dist_config.txt > dist_config.txt
+cat ../launcher/7z/7zS.sfx  dist_config.txt "$WINDOWSZIP" > "$WINDOWSEXE"
+
+### paquete con los instalables de JRE, Jai y Jai i/o
+"$DIR_BASE"/launcher/7z/7za a "$DIR_BASE"/"$DIR_WIN"/"$WINDOWSZIP" "$DIR_BASE"/"$DIR_WIN"/jre_installers/*.exe
+cat ../launcher/7z/7zS.sfx  dist_config.txt "$WINDOWSZIP" > "$WINDOWSEXEWITHJRE"
+
+###
+
+
+rm dist_config.txt
+rm "$WINDOWSZIP"
+
+rm -Rf "$INSTALLER_DIR"
+
+mv "$WINDOWSEXE" "$OUTPUT_DIR"
+mv "$WINDOWSEXEWITHJRE" "$OUTPUT_DIR"
+
+# Limpiamos tmpResources
+cd "$DIR_BASE"/"$DIR_WIN"
+rm -r ./tmpResources
+cd -
+
+
+## Para Mac
+echo "- Mac"
+if type ant 2>/dev/null >/dev/null; then
+	cd "$DIR_BASE"/"$DIR_MAC"
+	if ant -Dbuild.number="$BUILDNUMBER" -Djvmversion="1.4+" -f build.xml; then
+		zip -r "$MAC_10_ZIP" gvSIG*.app
+		rm -r gvSIG*.app
+		mv "$MAC_10_ZIP" "$OUTPUT_DIR"
+	else
+		echo "No se ha generado el paquete para Mac 10 . Compruebe que su ant tiene jarbundler instalado
+
+			  Nota: debemos tener incluido en el ANT_HOME/lib el
+	    	  jar jarbundler-1.9.jar que se puede encontrar en http://jarbundler.sourceforge.net/
+	    "
+
+	fi
+
+else
+	    echo "No se ha encontrado el ant en el path de ejecucion:
+	    Es necesario para poder generar la distribucion para el Mac.
+
+	    Nota: debemos tener tambien incluido en el ANT_HOME/lib el
+	    jar jarbundler-1.9.jar que se puede encontrar en http://jarbundler.sourceforge.net/
+	    "
+fi
+
+
+## Limpiamos
+
+rm -rf $DIR_LIN/extensiones
+rm -rf $DIR_LIN/bin
+rm -rf $DIR_WIN/extensiones
+rm -rf $DIR_WIN/bin
+
+echo "*****************"
+echo "    FIN     "
+echo "*****************"
+
+echo ""
+echo "Generados los ficheros:"
+echo "$OUTPUT_DIR"
+ls -lh "$OUTPUT_DIR"
+cd "$DIR_BASE"
Index: tags/JCRS_V02_BN11/extJCRS/install/HOWTO-Generate Distribution
===================================================================
--- tags/JCRS_V02_BN11/extJCRS/install/HOWTO-Generate Distribution	(revision 0)
+++ tags/JCRS_V02_BN11/extJCRS/install/HOWTO-Generate Distribution	(revision 25287)
@@ -0,0 +1,25 @@
+========================
+	DISTRIBUCION SVN
+========================
+
+* Para la generación de distribucines se ha usado el RapidSVN.
+* Abrir el RapidSVN, una vez conectado con el repositorio, ir a Tags y crear
+la carpeta tmp_build(si ya esta habrá que eliminarla antes de crearla). En comentario
+poner pre_v1_x_Build_x (sustituir x según corresponda).
+* Copiamos todos las carpetas que estan en branches/vX dentro de la carpeta tmp_build
+que acabamos de crear. (la ruta a introducir sería https://gvsig.org/svn/gvSIG/tags/tmp_build)
+* Hacer un switch del workspace: Team->Switch, y hay que cambiar en la ruta la parte "branches/vX"
+por tags/tmp_build. Esto no se realiza sobre todos los proyectos a la vez, segun que plugin SVN 
+se tenga en el Eclipse, se tendrá que hacer proyecto por proyecto, o se podrá hacer por conjuntos 
+de proyectos que comparten la misma carpeta.
+* Generar la distribución. Primero se lanzará el clean_all y build_all (appgvSIG/build.xml)
+y se comprobara que el programa funciona adecuadamente. Después se lanzara el make_binaries_distribution.
+* Lanzamos el distribution_1.5.sh para generar los binarios, los probamos y si todo funciona correctamente
+hacemos commit de los build.number con formato v1_X_Build_X.
+* De nuevo, como se hizo anteriormente, se hara un switch hacia "branches/vX".
+* Se debe renombrar el "tags/tmp_build" por "tags/v1_X_Build_X"
+* Se tiene que hacer une Merge (Team->Merge) seleccionando Advanced:
+	Source 1: Trunk
+	Source 2: "tags/v1_X_Build_X"
+Esto tambien dependiendo del Plugin SVN de Eclipse se hara por proyectos o por conjuntos.
+*Por último hacer commit sobre los cambios oportunos en el Trunk. 
\ No newline at end of file
Index: tags/JCRS_V02_BN11/extJCRS/lib/org.gvsig.crs.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/lib/org.gvsig.crs.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/JCRS_V02_BN11/extJCRS/lib/jGridShiftApi.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/JCRS_V02_BN11/extJCRS/lib/jGridShiftApi.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

