Index: SelectPackagesPanel.java
===================================================================
--- SelectPackagesPanel.java	(revision 43125)
+++ SelectPackagesPanel.java	(revision 43126)
@@ -3,29 +3,27 @@
  *
  * Copyright (C) 2007-2013 gvSIG Association.
  *
- * 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 3
- * of the License, or (at your option) any later version.
+ * 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 3 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.
+ * 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., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
+ * 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., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
- * For any additional information, do not hesitate to contact us
- * at info AT gvsig.com, or visit our website www.gvsig.com.
+ * For any additional information, do not hesitate to contact us at info AT
+ * gvsig.com, or visit our website www.gvsig.com.
  */
 /*
  * AUTHORS (In addition to CIT):
  * 2010 {Prodevelop}   {Task}
  */
-
 package org.gvsig.installer.swing.impl.execution.panel;
 
 import java.awt.BorderLayout;
@@ -33,14 +31,16 @@
 import java.util.List;
 
 import javax.swing.JPanel;
+import org.apache.commons.lang3.StringUtils;
 
 import org.gvsig.installer.lib.api.PackageInfo;
 import org.gvsig.installer.lib.api.execution.InstallPackageService;
 import org.gvsig.installer.swing.api.SwingInstallerLocator;
+import org.gvsig.installer.swing.api.execution.PackageFilter;
 import org.gvsig.installer.swing.impl.DefaultSwingInstallerManager;
-import org.gvsig.installer.swing.impl.execution.DefaultInstallPackageWizard;
+import org.gvsig.installer.swing.impl.execution.panel.filters.TypeFilter;
 import org.gvsig.installer.swing.impl.execution.panel.model.PackagesTableModel;
-import org.gvsig.installer.swing.impl.execution.wizard.SelectPackagesWizard;
+import org.gvsig.installer.swing.impl.execution.wizard.SelectPackagesWizardPage;
 
 /**
  * @author gvSIG Team
@@ -48,103 +48,107 @@
  */
 public class SelectPackagesPanel extends JPanel {
 
-	private SelectPackagesWizard wizard;
-	private static final long serialVersionUID = -7554097983061858479L;
-	protected DefaultSwingInstallerManager swingInstallerManager = null;
-	private PackagesTablePanel packagesTablePanel;
+    private SelectPackagesWizardPage wizard;
+    private static final long serialVersionUID = -7554097983061858479L;
+    protected DefaultSwingInstallerManager swingInstallerManager = null;
+    private PackagesTablePanel packagesTablePanel;
 
-	private PackagesTableModel pluginsTableModel = null;
+    private PackagesTableModel pluginsTableModel = null;
 
-	public SelectPackagesPanel(SelectPackagesWizard selectPackagesWizard) {
-		super();
-		this.wizard = selectPackagesWizard;
-		swingInstallerManager = (DefaultSwingInstallerManager) SwingInstallerLocator
-				.getSwingInstallerManager();
-		initComponents();
-	}
+    public SelectPackagesPanel(SelectPackagesWizardPage selectPackagesWizard) {
+        super();
+        this.wizard = selectPackagesWizard;
+        swingInstallerManager = (DefaultSwingInstallerManager) SwingInstallerLocator
+                .getSwingInstallerManager();
+        initComponents();
+    }
 
-	public JPanel getJPanel() {
-		return this;
-	}
+    public JPanel getJPanel() {
+        return this;
+    }
 
-	public void updateTableModel(PackagesTableModel pluginsTableModel) {
-		packagesTablePanel.setTableModel(pluginsTableModel);
-		add(packagesTablePanel, BorderLayout.CENTER);
-	}
+    public void updateTableModel(PackagesTableModel pluginsTableModel) {
+        packagesTablePanel.setTableModel(pluginsTableModel);
+        add(packagesTablePanel, BorderLayout.CENTER);
+    }
 
-	public void selectPackages() {
-		packagesTablePanel.selectPackages();
-	}
+    public void selectPackages() {
+        packagesTablePanel.selectPackages();
+    }
 
-	private void initComponents() {
-		setLayout(new BorderLayout(0, 0));
+    private void initComponents() {
+        setLayout(new BorderLayout(0, 0));
 
-		packagesTablePanel = new PackagesTablePanel(this);
-		add(packagesTablePanel, BorderLayout.CENTER);
-	}
+        packagesTablePanel = new PackagesTablePanel(this);
+        add(packagesTablePanel, BorderLayout.CENTER);
+    }
 
-	public List<PackageInfo> getPackagesToInstall() {
+    public List<PackageInfo> getPackagesToInstall() {
 
-		List<PackageInfo> packages = packagesTablePanel.getPackagesToInstall();
+        List<PackageInfo> packages = packagesTablePanel.getPackagesToInstall();
 
-		List<PackageInfo> packagesToInstall = new ArrayList<PackageInfo>();
-		packagesToInstall.addAll(packages);
-		return packagesToInstall;
-	}
+        List<PackageInfo> packagesToInstall = new ArrayList<PackageInfo>();
+        packagesToInstall.addAll(packages);
+        return packagesToInstall;
+    }
 
-	public boolean isPackageSelected() {
-		return packagesTablePanel.isPackageSelected();
-	}
+    public boolean isPackageSelected() {
+        return packagesTablePanel.isPackageSelected();
+    }
 
-	public void checkIfPluginSelected() {
-		wizard.checkIfPluginSelected();
-	}
+    public void checkIfPluginSelected() {
+        wizard.checkIfPluginSelected();
+    }
 
-	public void packageSelectionChanged(Object value, int row, int column) {
-	}
+    public void packageSelectionChanged(Object value, int row, int column) {
+    }
 
-	public void updatePanel() {
+    public void updatePanel() {
 
-		InstallPackageService installerExecutionService = wizard
-				.getDefaultInstallPackageWizard()
-				.getInstallerExecutionService();
+        InstallPackageService installerExecutionService = wizard
+                .getWizardPanel()
+                .getInstallerExecutionService();
 
-		if (pluginsTableModel == null) {
-			pluginsTableModel = new PackagesTableModel(swingInstallerManager,
-					installerExecutionService, true);
-		}
-		pluginsTableModel.updatePackages();
+        if (pluginsTableModel == null) {
+            pluginsTableModel = new PackagesTableModel(swingInstallerManager,
+                    installerExecutionService, true);
+        }
+        pluginsTableModel.updatePackages();
 
-		updateTableModel(pluginsTableModel);
+        updateTableModel(pluginsTableModel);
 
-		if (wizard.isDefaultPackagesSelectionSet()) {
-			pluginsTableModel.selectDefaultPackages();
-		}
-		
-		
-		
-		
+        if (wizard.isDefaultPackagesSelectionSet()) {
+            pluginsTableModel.selectDefaultPackages();
+        }
 
-	}
+    }
 
-	public DefaultInstallPackageWizard getDefaultInstallPackageWizard() {
-		return wizard.getDefaultInstallPackageWizard();
-	}
+    public PackagesTableModel getModel() {
+        return this.pluginsTableModel;
+    }
 
-	public PackagesTableModel getModel() {
-		return this.pluginsTableModel;
-	}
+    public void clearPanel() {
+        packagesTablePanel.clearAllPanels();
+    }
 
-	public void clearPanel() {
-		packagesTablePanel.clearAllPanels();
-	}
-
     /**
-     * 
+     *
      */
     public void setInitialFilter() {
         packagesTablePanel.setInitialFilter();
-        
+
     }
 
+    public void setBaseFilter(PackageFilter filter) {
+        if (filter == null) {
+            this.packagesTablePanel.setBaseFilter(null);
+            this.packagesTablePanel.setEnabledTypeFilter(true);
+        } else {
+            this.packagesTablePanel.setBaseFilter(filter);
+            if (filter instanceof TypeFilter) {
+                this.packagesTablePanel.setEnabledTypeFilter(false);
+            }
+        }
+    }
+
 }
