Index: applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/legend/gui/General.java
===================================================================
--- applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/legend/gui/General.java	(revision 37834)
+++ applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/legend/gui/General.java	(working copy)
@@ -60,7 +60,6 @@ import java.text.ParseException;
 import javax.swing.BorderFactory;
 import javax.swing.ButtonGroup;
 import javax.swing.JCheckBox;
-import javax.swing.JComboBox;
 import javax.swing.JLabel;
 import javax.swing.JPanel;
 import javax.swing.JRadioButton;
@@ -83,8 +82,6 @@ import com.iver.andami.PluginServices;
 import com.iver.andami.messages.NotificationManager;
 import com.iver.cit.gvsig.fmap.drivers.DBLayerDefinition;
 import com.iver.cit.gvsig.fmap.drivers.DriverIOException;
-import com.iver.cit.gvsig.fmap.drivers.dbf.DBFDriver;
-import com.iver.cit.gvsig.fmap.drivers.shp.IndexedShpDriver;
 import com.iver.cit.gvsig.fmap.edition.VectorialEditableAdapter;
 import com.iver.cit.gvsig.fmap.layers.FLayer;
 import com.iver.cit.gvsig.fmap.layers.FLyrDefault;
@@ -93,7 +90,6 @@ import com.iver.cit.gvsig.fmap.layers.ReadableVectorial;
 import com.iver.cit.gvsig.fmap.layers.VectorialAdapter;
 import com.iver.cit.gvsig.fmap.layers.VectorialDBAdapter;
 import com.iver.cit.gvsig.fmap.layers.VectorialFileAdapter;
-import com.iver.cit.gvsig.project.documents.view.IProjectView;
 import com.iver.cit.gvsig.project.documents.view.legend.CreateSpatialIndexMonitorableTask;
 import com.iver.utiles.swing.threads.IMonitorableTask;
 
@@ -107,15 +103,12 @@ import com.iver.utiles.swing.threads.IMonitorableTask;
  * with the properties of the layer.
  * @author jmorell
  *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
  */
 public class General extends AbstractThemeManagerPage {
 
 	private static final long serialVersionUID = 1L;
     private FLayer layer;
-	private IProjectView view;
-	private NumberFormat nf = NumberFormat.getInstance();
+    private NumberFormat nf = NumberFormat.getInstance();
 	private JPanel pnlLayerName = null;
 	private GridBagLayoutPanel pnlScale = null;
 	private JPanel pnlProperties = null;
@@ -126,30 +119,15 @@ public class General extends AbstractThemeManagerPage {
 	private JRadioButton rdBtnShowAlways = null;
 	private JRadioButton rdBtnDoNotShow = null;
 	private JTextField txtMinScale = null;
-	private JComboBox cmbLinkField = null;
-    private JTextField txtLinkExtension = null;
-    private JComboBox cmbLinkType = null;
     private JCheckBox jCheckBoxSpatialIndex = null;
-	private JPanel pnlHyperLink;
-	private JLabel lblLinkExtension;
-	private JLabel lblLinkField;
-	private JLabel lblDefaultAction;
-	private JPanel pnlFieldAndExtension;
-	private JPanel pnlHyperLinkAction;
-	private JScrollPane scrlProperties;
+    private JScrollPane scrlProperties;
+
 
-    /**
-	 * This is the default constructor.
-	 */
 	public General() {
 		super();
 		initialize();
 	}
-	/**
-	 * This method initializes this
-	 *
-	 * @return void
-	 */
+
 	private  void initialize() {
 		this.setLayout(new BorderLayout());
 		GridBagLayoutPanel aux = new GridBagLayoutPanel();
@@ -157,20 +135,11 @@ public class General extends AbstractThemeManagerPage {
 		aux.addComponent(new JBlank(10, 10));
 		aux.addComponent(getJCheckBoxSpatialIndex());
 		aux.addComponent("", getPnlScale());
-//		JPanel aux2 = new JPanel(new GridLayout(1,1));
-//		aux2.add(getPnlProperties());
-//		aux2.add(getPnlHyperLink());
-//		aux.addComponent("", aux2);
-
 		aux.addComponent("", getPnlProperties());
-
-
-
 		aux.setPreferredSize(getPreferredSize());
 		this.add(aux, BorderLayout.CENTER);
 		this.add(new JBlank(5, 10), BorderLayout.WEST);
 		this.add(new JBlank(5, 10), BorderLayout.EAST);
-
 	}
 
 
@@ -209,62 +178,9 @@ public class General extends AbstractThemeManagerPage {
 		}
 		txtLayerName.setText(layer.getName());
 		showLayerInfo();
+    }
 
 
-		// old hyperlink stuff
-//		if (PluginServices.getMainFrame() != null)
-//		if  (PluginServices.getMDIManager().getActiveWindow() instanceof BaseView ){
-//		    BaseView theView = (BaseView)PluginServices.getMDIManager().getActiveWindow();
-//		    view = theView.getModel();
-//            try {
-//                if (layer instanceof AlphanumericData) {
-//                    AlphanumericData ad = (AlphanumericData) layer;
-//                    DataSource ds;
-//                    ds = ad.getRecordset();
-//                    String[] names = new String[ds.getFieldCount()];
-//                    for (int i = 0; i < ds.getFieldCount(); i++) {
-//                        names[i] = ds.getFieldName(i);
-//                    }
-//                    DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(names);
-//                    cmbLinkField.setModel(defaultModel);
-//
-//                    if (layer.getLinkProperties().getField()!=null)
-//                    	cmbLinkField.setSelectedItem(layer.getLinkProperties().getField());
-//                    else
-//                    	cmbLinkField.setSelectedItem(view.getSelectedField());
-//                } else {
-//                    cmbLinkField = new JComboBox();
-//                }
-//             } catch (ReadDriverException e) {
-//                NotificationManager.addError("No se pudo obtener la tabla", e);
-//            }
-//
-//
-//            if(layer.getLinkProperties().getExt()!=null)
-//            	getTxtLinkExtension().setText(layer.getLinkProperties().getExt());
-//
-//            getCmbLinkType().addItem(PluginServices.getText(this,
-//               	"Enlazar_a_ficheros_de_imagen"));
-//            getCmbLinkType().addItem(PluginServices.getText(this,
-//            	"Enlazar_a_fichero_de_texto"));
-//
-//            getCmbLinkType().addItem(PluginServices.getText(this,
-//            	"Enlazar_a_documento_PDF"));
-//            getCmbLinkType().addItem(PluginServices.getText(this,
-//        		"Enlazar_a_imagen_SVG"));
-//
-//            if (layer.getLinkProperties().getType()!=-1)
-//            	getCmbLinkType().setSelectedIndex(layer.getLinkProperties().getType());
-//
-//		}
-
-	}
-
-	/**
-	 * This method initializes jPanel
-	 *
-	 * @return javax.swing.JPanel
-	 */
 	private JPanel getPnlLayerName() {
 		if (pnlLayerName == null) {
 			lblLayerName = new JLabel();
@@ -277,11 +193,7 @@ public class General extends AbstractThemeManagerPage {
 		}
 		return pnlLayerName;
 	}
-	/**
-	 * This method initializes jPanel1
-	 *
-	 * @return javax.swing.JPanel
-	 */
+
 	private GridBagLayoutPanel getPnlScale() {
 		if (pnlScale == null) {
 			pnlScale = new GridBagLayoutPanel();
@@ -323,12 +235,11 @@ public class General extends AbstractThemeManagerPage {
 		}
 		return pnlScale;
 	}
-	/**
-	 * This method initializes jPanel2, this contains the ScrollPane with the
-	 * properies.
-	 *
-	 * @return javax.swing.JPanel
-	 */
+	
+    /**
+     * This method initializes pnlProperties, the jpanel which contains the
+     * ScrollPane with the properties.
+     */
 	private JPanel getPnlProperties() {
 		if (pnlProperties == null) {
 			pnlProperties = new JPanel(new GridBagLayout());
@@ -340,7 +251,7 @@ public class General extends AbstractThemeManagerPage {
 				);
 			GridBagConstraints constraints = new GridBagConstraints();
 			constraints.insets = new Insets(5, 5, 5, 5);
-			constraints.fill = constraints.BOTH;
+	    constraints.fill = GridBagConstraints.BOTH;
 			constraints.weightx = 1.0;
 			constraints.weighty = 1.0;
 			pnlProperties.add(getScrlProperties(), constraints);
@@ -348,11 +259,6 @@ public class General extends AbstractThemeManagerPage {
 		return pnlProperties;
 	}
 
-	/**
-	 * This method initializes jTextField
-	 *
-	 * @return javax.swing.JTextField
-	 */
 	private JTextField getTxtLayerName() {
 		if (txtLayerName == null) {
 			txtLayerName = new JTextField(25);
@@ -361,10 +267,6 @@ public class General extends AbstractThemeManagerPage {
 		return txtLayerName;
 	}
 
-	/**
-	 * This method initializes TxtMaxScale
-	 * @return jTextField1
-	 */
 	private JTextField getTxtMaxScale() {
 		if (txtMaxScale == null) {
 			txtMaxScale = new JTextField(15);
@@ -372,11 +274,11 @@ public class General extends AbstractThemeManagerPage {
 		}
 		return txtMaxScale;
 	}
-	/**
-	 * This method initilizes TxtArea, in this TextArea sets the text with
-	 * the properties of the layer
-	 * @return
-	 */
+	
+    /**
+     * This method initializes propertiesTextArea, where are display the
+     * properties of the layer
+     */
 	private JTextArea getPropertiesTextArea() {
 		if (propertiesTextArea == null) {
 			propertiesTextArea = new JTextArea();
@@ -387,11 +289,6 @@ public class General extends AbstractThemeManagerPage {
 		return propertiesTextArea;
 	}
 
-	/**
-	 * This method initializes jScrollPane
-	 *
-	 * @return javax.swing.JScrollPane
-	 */
 	private JScrollPane getScrlProperties() {
 		if (scrlProperties == null) {
 			scrlProperties = new JScrollPane();
@@ -401,11 +298,7 @@ public class General extends AbstractThemeManagerPage {
 		}
 		return scrlProperties;
 	}
-	/**
-	 * This method initializes jRadioButton
-	 *
-	 * @return javax.swing.JRadioButton
-	 */
+
 	private JRadioButton getRdBtnShowAlways() {
 		if (rdBtnShowAlways == null) {
 			rdBtnShowAlways = new JRadioButton();
@@ -420,11 +313,7 @@ public class General extends AbstractThemeManagerPage {
 		}
 		return rdBtnShowAlways;
 	}
-	/**
-	 * This method initializes jRadioButton1
-	 *
-	 * @return javax.swing.JRadioButton
-	 */
+
 	private JRadioButton getRdBtnDoNotShowWhen() {
 		if (rdBtnDoNotShow == null) {
 			rdBtnDoNotShow = new JRadioButton();
@@ -438,11 +327,7 @@ public class General extends AbstractThemeManagerPage {
 		}
 		return rdBtnDoNotShow;
 	}
-	/**
-	 * This method initializes jTextField2
-	 *
-	 * @return javax.swing.JTextField
-	 */
+
 	private JTextField getTxtMinScale() {
 		if (txtMinScale == null) {
 			txtMinScale = new JTextField(15);
@@ -454,107 +339,8 @@ public class General extends AbstractThemeManagerPage {
 	private String getLayerName(){
 		return txtLayerName.getText().toString();
 	}
-    /**
-     * This method initializes jPanel3, this panel contains the components of the
-     * HyperLink
-     *
-     * @return javax.swing.JPanel
-     */
-    private JPanel getPnlHyperLink() {
-    	if (pnlHyperLink == null) {
-    		pnlHyperLink = new JPanel();
-    		pnlHyperLink.setBorder(BorderFactory.createTitledBorder(
-    				BorderFactory.createEtchedBorder(EtchedBorder.LOWERED),
-    					PluginServices.getText(this, "Hiperenlace"),
-    					TitledBorder.DEFAULT_JUSTIFICATION,
-    					TitledBorder.DEFAULT_POSITION, null, null)
-    				);
-    		JPanel aux = new JPanel(new BorderLayout());
-    		pnlHyperLink.setLayout(new BorderLayout());
-    		aux.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
-    		aux.add(getPnlFieldAndExtension(), BorderLayout.NORTH);
-    		aux.add(getPnlHyperLinkAction(), BorderLayout.CENTER);
-    		pnlHyperLink.add(aux);
-    	}
-    	return pnlHyperLink;
-    }
 
 
-    private JPanel getPnlFieldAndExtension() {
-    	if (pnlFieldAndExtension == null) {
-    		lblLinkExtension = new JLabel();
-    		lblLinkExtension.setText(" \t \t"+PluginServices.getText(this,"extension"));
-    		lblLinkField = new JLabel();
-    		lblLinkField.setText(PluginServices.getText(this, "Campo"));
-    		pnlFieldAndExtension = new JPanel();
-    		pnlFieldAndExtension.add(lblLinkField, null);
-    		pnlFieldAndExtension.add(getCmbLinkField(), null);
-    		pnlFieldAndExtension.add(lblLinkExtension, null);
-    		pnlFieldAndExtension.add(getTxtLinkExtension(), null);
-    	}
-    	return pnlFieldAndExtension;
-    }
-    /**
-     * This method initializes jPanel8. This panel contains the ComboBox to select
-     * the action, (type of HyperLink)
-     *
-     * @return javax.swing.JPanel
-     */
-    private JPanel getPnlHyperLinkAction() {
-    	if (pnlHyperLinkAction == null) {
-    		lblDefaultAction = new JLabel();
-    		lblDefaultAction.setText(PluginServices.getText(this, "Accion_Predefinida") + "  ");
-    		pnlHyperLinkAction = new JPanel();
-    		pnlHyperLinkAction.add(lblDefaultAction, null);
-    		pnlHyperLinkAction.add(getCmbLinkType(), null);
-    	}
-    	return pnlHyperLinkAction;
-    }
-    /**
-     * This method initializes jComboBox
-     *
-     * @return javax.swing.JComboBox
-     */
-    private JComboBox getCmbLinkField() {
-    	if (cmbLinkField == null) {
-            cmbLinkField = new JComboBox();
-    	}
-    	return cmbLinkField;
-    }
-    /**
-     * This method initializes jTextField
-     *
-     * @return javax.swing.JTextField
-     */
-    private JTextField getTxtLinkExtension() {
-    	if (txtLinkExtension == null) {
-    		txtLinkExtension = new JTextField();
-            txtLinkExtension.setPreferredSize(new Dimension(40,20));
-    	}
-    	return txtLinkExtension;
-    }
-    /**
-     * This method initializes jComboBox1
-     *
-     * @return javax.swing.JComboBox
-     */
-    private JComboBox getCmbLinkType() {
-    	if (cmbLinkType == null) {
-    		cmbLinkType = new JComboBox();
-    	}
-    	return cmbLinkType;
-    }
-    /**
-     * @return Returns the view.
-     */
-    private IProjectView getView() {
-        return view;
-    }
-    /**
-     * This method initializes jCheckBox
-     *
-     * @return javax.swing.JCheckBox
-     */
     private JCheckBox getJCheckBoxSpatialIndex() {
     	if (jCheckBoxSpatialIndex == null) {
     		jCheckBoxSpatialIndex = new JCheckBox();
@@ -564,31 +350,7 @@ public class General extends AbstractThemeManagerPage {
     	return jCheckBoxSpatialIndex;
     }
 
-    /**
-     * Returns the selected Type in the ComboBox
-     */
-    private int getLinkType() {
-        return getCmbLinkType().getSelectedIndex();
-
-    }
-
-    /**
-     * Returns the Selected Field in the ComboBox
-     */
-    private String getSelectedLinkField() {
-        return (String) getCmbLinkField().getSelectedItem();
-    }
-
-    /**
-     * Returns the Extension in the TextField
-     */
-    private String getExtensionLink() {
-        return getTxtLinkExtension().getText();
-    }
 
-    /**
-     * Returns true or false if the CheckBox is marked or not
-     */
     private boolean isSpatialIndexSelected() {
         return getJCheckBoxSpatialIndex().isSelected();
     }
@@ -643,7 +405,6 @@ public class General extends AbstractThemeManagerPage {
 							info = info +
 							PluginServices.getText(this,"url") +": " + dbdef.getConnection().getURL() + "\n";
 						} catch (Exception e) {
-							//TODO: Que hacer aqui?
 							e.printStackTrace();
 						}
 
@@ -672,17 +433,17 @@ public class General extends AbstractThemeManagerPage {
     }
 
     /**
-     * Returns true or false if the scale is activa
+     * Returns true or false if the scale is selected
      */
 	private boolean isScaleActive() {
 		return getRdBtnDoNotShowWhen().isSelected();
 	}
 
     /**
-     * Instanciates a ITask (@see com.iver.utiles.swing.threads.ITask)
-     * to create a spatial index for the selected layer in background.
-     * This task also allow to monitor process evolution, and to cancel
-     * this process.
+     * Instantiates a ITask (@see com.iver.utiles.swing.threads.ITask) to create
+     * a spatial index for the selected layer in background. This task also
+     * allow to monitor process evolution, and to cancel this process.
+     * 
      * @throws DriverException
      * @throws DriverIOException
      */
@@ -692,32 +453,17 @@ public class General extends AbstractThemeManagerPage {
     }
 
 	public void acceptAction() {
-	     // Implementación para hacer funcionar el hyperlink ...
-        //com.iver.cit.gvsig.gui.View theView = (com.iver.cit.gvsig.gui.View)PluginServices.getMDIManager().getActiveView();
-        //ProjectView view = theView.getModel();
-    	if (PluginServices.getMainFrame() != null)
-    	{
-    		IProjectView view = getView();
-    		view.setTypeLink(getLinkType());
-    		if (getSelectedLinkField()!=null)
-    		{
-    			view.setSelectedField(getSelectedLinkField().toString().trim());
-    			view.setExtLink(getExtensionLink());
-
-    		}
-    	}
-
-
+	// does nothing
 	}
 
 	public void cancelAction() {
 		// does nothing
 	}
 
-	/**
-	 * When we press the apply button, sets the new properties of the layer thar the
-	 * user modified using the UI components
-	 */
+	    /**
+     * When we press the apply button, sets the new properties of the layer that
+     * the user modified using the UI components
+     */
 	public void applyAction() {
 		if (isScaleActive()) {
 			try	{
@@ -756,7 +502,6 @@ public class General extends AbstractThemeManagerPage {
 						PluginServices.
 							cancelableBackgroundExecution(getCreateSpatialIndexTask());
 					} catch (ReadDriverException e) {
-						// TODO Auto-generated catch block
 						NotificationManager.addError(e.getMessage(), e);
 					}
                 }
@@ -773,28 +518,11 @@ public class General extends AbstractThemeManagerPage {
 
 
         }
-        //Codigo relacionado
-        if (layer instanceof FLyrVect ){
-			FLyrVect vectlyr=(FLyrVect) layer;
-			if (getSelectedLinkField()!=null){
-				vectlyr.getLinkProperties().setExt(getExtensionLink());
-				vectlyr.getLinkProperties().setField(getSelectedLinkField().toString().trim());
-				vectlyr.getLinkProperties().setType(getLinkType());
-
-				System.out.println("Link Properties");
-				System.out.println("Extensión: " + vectlyr.getLinkProperties().getExt());
-				System.out.println("Campo: " + vectlyr.getLinkProperties().getField());
-				System.out.println("Tipo: " + vectlyr.getLinkProperties().getType());
-			}
-        }
+
 	}
 
-	/*
-	 *  (non-Javadoc)
-	 * @see java.awt.Component#getName()
-	 */
+
 	public String getName() {
 		return PluginServices.getText(this,"General");
 	}
-}  //  @jve:decl-index=0:visual-constraint="10,10"
-
+}
\ No newline at end of file
