Index: StatusLayerRaster.java
===================================================================
--- StatusLayerRaster.java	(revision 4180)
+++ StatusLayerRaster.java	(revision 4181)
@@ -2,25 +2,26 @@
 *
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
 * of the Valencian Government (CIT)
-* 
+*
 * 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., 51 Franklin Street, Fifth Floor, Boston, 
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA  02110-1301, USA.
-* 
+*
 */
 package org.gvsig.raster.fmap.layers;
 
+import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -50,49 +51,49 @@
 
 /**
  * Esta clase almacena el estado de un raster en cuanto a las caracteristicas
- * de opacidad, bandas y filtros. Estas características pueden ser salvadas a 
- * un xml y recuperadas por la capa a través de las funciones setXMLEntity y 
+ * de opacidad, bandas y filtros. Estas características pueden ser salvadas a
+ * un xml y recuperadas por la capa a través de las funciones setXMLEntity y
  * getXMLEntity
- * 
+ *
  * @deprecated
  * @author Nacho Brodin (nachobrodin@gmail.com)
  */
 public class StatusLayerRaster implements IStatusRaster {
 
 	public static String 			defaultClass    = "org.gvsig.fmap.raster.layers.StatusLayerRaster";
-	
+
 	//Valor de opacidad global de la imagen
 	public int						transparency    = 255;
-	
+
 	//Rangos de transparencia
-	public ArrayList<TransparencyRange>		
+	public ArrayList<TransparencyRange>
 	                                ranges          = new ArrayList<TransparencyRange>();
-		
-	//(Selección de bandas)Número de banda  asignado al Rojo, verde y azul 	
+
+	//(Selección de bandas)Número de banda  asignado al Rojo, verde y azul
 	public int 						bandR           = 0;
 	public int 						bandG           = 1;
 	public int 						bandB           = 2;
-	
-	public List<String>		        files           = new ArrayList<String>();
-	
+
+	public List<File>		        files           = new ArrayList<File>();
+
 	//Filtros para poder montar una nueva pila
 	public List<String>		        filters         = new ArrayList<String>();
 	private DefaultFLyrRaster       layer           = null;
 	private int                     alphaBandNumber = -1;
-	
+
 	//Utilizado para la persistencia
 	private boolean 				loadClass		= false;
-	
+
 	public void loadFromState(PersistentState state, DefaultFLyrRaster layer)throws PersistenceException {
 //		this.layer = layer;
 //		//RECUPERAR PROPIEDADES
-//		
+//
 //		//Recuperamos las propiedades de los filtros
 //		for(int i = 0; i < xml.getPropertyCount(); i++) {
-//			if(xml.getPropertyName(i).startsWith("filter."))	
+//			if(xml.getPropertyName(i).startsWith("filter."))
 //				filters.add(xml.getPropertyName(i) + "=" + xml.getPropertyValue(i));
 //		}
-//		
+//
 //		//Rangos de transparencia
 //		if (xml.contains("filter.transparency.active") && xml.getBooleanProperty("filter.transparency.active")) {
 //			int i = 0;
@@ -114,43 +115,43 @@
 //					if(alpha != 0)
 //						range.setAlpha(alpha);
 //					ranges.add(range);
-//				} else 
+//				} else
 //					break;
 //				i ++;
 //			}
 //		}
-//		
-//		if(xml.contains("filter.transparency.bandnumber")) 
+//
+//		if(xml.contains("filter.transparency.bandnumber"))
 //			alphaBandNumber = xml.getIntProperty("filter.transparency.bandnumber");
-//		
+//
 //		if (xml.contains("raster.opacityLevel")) {
 //			transparency = xml.getIntProperty("raster.opacityLevel");
 //			//Esto soluciona un problema de compatibilidad entre branch v10 y HEAD. Eliminar en futuras versiones
 //			if(nameClass != null && nameClass.compareTo("com.iver.cit.gvsig.fmap.layers.StatusLayerRaster") == 0)
 //				transparency = 255 - transparency;
 //		}
-//				
-//		if (xml.contains("raster.bandR")) 
+//
+//		if (xml.contains("raster.bandR"))
 //			bandR = xml.getIntProperty("raster.bandR");
-//		
-//		if (xml.contains("raster.bandG")) 
+//
+//		if (xml.contains("raster.bandG"))
 //			bandG = xml.getIntProperty("raster.bandG");
-//		
-//		if (xml.contains("raster.bandB")) 
+//
+//		if (xml.contains("raster.bandB"))
 //			bandB = xml.getIntProperty("raster.bandB");
-//		
-//	
+//
+//
 //		int cont = 0;
 //		while(true && cont < 50) {
 //			if (xml.contains("raster.file" + cont)) {
 //				files.add(xml.getStringProperty("raster.file" + cont));
 //				cont++;
-//			}else 
+//			}else
 //				break;
 //		}
-	}	
-	
-	
+	}
+
+
 	@SuppressWarnings("unchecked")
 	public void loadFromState(PersistentState state)
 			throws PersistenceException {
@@ -160,9 +161,9 @@
 		this.bandB = state.getInt("bandB");
 		this.alphaBandNumber = state.getInt("alphaBandNumber");
 		this.loadClass = state.getBoolean("loadClass");
-		
+
 		this.layer = (DefaultFLyrRaster)state.get("layer");
-		
+
 		this.ranges = new ArrayList(state.getList("ranges"));
 		this.files = new ArrayList(state.getList("files"));
 		this.filters = new ArrayList(state.getList("filters"));
@@ -185,7 +186,7 @@
 		this.layer = layer;
 		this.loadClass = loadClass;
 	}
-	
+
 	public static void registerPersistence() {
 		PersistenceManager manager = ToolsLocator.getPersistenceManager();
 		DynStruct definition = manager.addDefinition(StatusLayerRaster.class,
@@ -197,36 +198,36 @@
 		definition.addDynFieldInt("bandB").setMandatory(true);
 		definition.addDynFieldInt("alphaBandNumber");
 		definition.addDynFieldBoolean("loadClass");
-		
+
 		definition.addDynFieldObject("layer")
 			.setClassOfValue(DefaultFLyrRaster.class);
-		
+
 		definition.addDynFieldList("ranges")
 			.setClassOfItems(TransparencyRange.class);
-		
+
 		definition.addDynFieldList("files")
 			.setClassOfItems(String.class);
 
 		definition.addDynFieldList("filters")
 			.setClassOfItems(String.class);
 	}
-	
+
 	public List<String> getFilters() {
 		return this.filters;
 	}
-	
+
 	public void applyStatus(DefaultFLyrRaster layer) throws NotSupportedExtensionException, RasterDriverException, FilterTypeException, FileNotFoundInListException, OperationNotSupportedException, FilterManagerException, InvalidSourceException {
-										
-		//Eliminamos el fichero inicial y cargamos las bandas si hay para que se carguen 
+
+		//Eliminamos el fichero inicial y cargamos las bandas si hay para que se carguen
 		//en el orden correcto
 		if(layer instanceof DefaultFLyrRaster) {
 			if(files != null && files.size() != 0){
 				//((FLyrRasterSE)layer).delFile((String)files.get(0));
-				for (int i = 1; i < files.size(); i++) 
-					((DefaultFLyrRaster)layer).addFile((String)files.get(i));
+				for (int i = 1; i < files.size(); i++)
+					((DefaultFLyrRaster)layer).addFile(files.get(i));
 			}
 		}
-		
+
 		//Asigna las bandas
 		String[] valuesCI = new String[layer.getDataStore().getBandCount()];
 		valuesCI[bandR] = ColorInterpretation.RED_BAND;
@@ -235,42 +236,42 @@
 		ColorInterpretation ci = RasterLocator.getManager().getDataStructFactory().createColorInterpretation(valuesCI);
 		if(layer.getRender() != null)
 			layer.getRender().setRenderColorInterpretation(ci);
-				
+
 		//Asigna la transparencia
-		Transparency transp = layer.getRender().getRenderingTransparency(); 
-		if(transp != null && transparency != 255) { 
+		Transparency transp = layer.getRender().getRenderingTransparency();
+		if(transp != null && transparency != 255) {
 			transp.setOpacity(transparency);
 			transp.activeTransparency();
 		}
-		
+
 		//Rangos de transparencia
 		if(transp != null && ranges != null) {
 			transp.setTransparencyRangeList(ranges);
 			transp.activeTransparency();
 		}
-		
+
 		//Banda de transparencia
 		if(transp != null && alphaBandNumber != -1) {
 			transp.setTransparencyBand(alphaBandNumber);
 			transp.activeTransparency();
 		}
-		
+
 		//Filtros
 		/*if (layer.getRender().getFilterList() != null) {
 			layer.getRender().getFilterList().createFilterListFromStrings((ArrayList<String>)filters);
 			enhancedCompV10((ArrayList<String>)filters, layer);
 			//sortFilters(layer.getRenderFilterList());
 		}*/
-		
+
 		//Refrescamos todas las vistas
 		layer.getMapContext().invalidate();
 		/*IWindow[] w = PluginServices.getMDIManager().getAllWindows();
 		for (int i = 0; i < w.length; i++) {
-			if(w[i] != null && w[i] instanceof AbstractViewPanel) 
-				((AbstractViewPanel)w[i]).getMapControl().getMapContext().invalidate();	
+			if(w[i] != null && w[i] instanceof AbstractViewPanel)
+				((AbstractViewPanel)w[i]).getMapControl().getMapContext().invalidate();
 		}*/
 	}
-	
+
 	/**
 	 * Método para mantener la compatibilidad con la v10 del realce. El realce de la v10 no
 	 * aporta suficiente información por lo que se añade un filtro de realce generico v1.9
@@ -278,27 +279,27 @@
 	 * @param layer
 	 * @param filterListManager
 	 * @throws FilterTypeException
-	 * @throws FilterManagerException 
+	 * @throws FilterManagerException
 	 */
 	public static void enhancedCompV10(ArrayList<String> filterArguments, DefaultFLyrRaster layer) throws FilterTypeException, FilterManagerException {
 		RasterFilterList filterList = layer.getRender().getFilterList();
 		filterList.remove("enhanced_stretch");
 		filterList.remove("tailTrim");
-		
+
 		/*boolean removed = false;
 		RasterFilterList list = layer.getRender().getFilterList();
 		for (int i = 0; i < list.lenght(); i++) {
-			RasterFilter f = list.get(i); 
-			if(f instanceof TailTrimFilter || f instanceof LinearEnhancementFilter) { 
+			RasterFilter f = list.get(i);
+			if(f instanceof TailTrimFilter || f instanceof LinearEnhancementFilter) {
 				list.remove(f.getName());
 				removed = true;
 			}
 		}
 		if(removed)
 			list.controlTypes();*/
-		
+
 		//Para compatibilidad de realce con proyectos antiguos
-		for (int i = 0; i < filterArguments.size(); i++) { 
+		for (int i = 0; i < filterArguments.size(); i++) {
 			if(((String)filterArguments.get(i)).startsWith("filter.enhanced.active=true")) {
 				RasterFilterListManager enhancementManager = filterList.getManagerByID("EnhancementStretch");
 				Params params = filterList.createEmptyFilterParams();
@@ -310,11 +311,11 @@
 			}
 		}
 	}
-	
+
 	public int[] getRenderBands() {
 		return new int[]{bandR, bandG, bandB};
 	}
-	
+
 	public RasterFilterList getFilterList() throws FilterTypeException {
 		/*RasterManager rManager = RasterLocator.getManager();
 		try {
@@ -324,28 +325,28 @@
 			else {
 				filterList = rManager.createEmptyFilterList(Buffer.TYPE_BYTE);
 			}
-			
+
 			return filterList;
 		} catch (NullPointerException e) {
 			return null;
 		}*/
 		return null;
 	}
-	
+
 	public ColorTable getColorTable() throws FilterTypeException {
 		return layer.getRender().getColorTable();
 	}
-	
+
 	public List<String> getFilterArguments() {
 		return filters;
 	}
-	
+
 	String nameClass = null;
 	/**
 	 * Asigna el nombre de la clase que se ha leido desde el proyecto
 	 * @param nameClass
 	 */
 	public void setNameClass(String nameClass) {
-		this.nameClass = nameClass;		
+		this.nameClass = nameClass;
 	}
 }
\ No newline at end of file
