Revision 20201 trunk/libraries/libAnimationCommon/src/main/java/com/iver/cit/gvsig/animation/keyFrame/KeyFrameTransparency.java

View differences:

KeyFrameTransparency.java
1 1
package com.iver.cit.gvsig.animation.keyFrame;
2 2

  
3 3
import java.util.List;
4

  
5

  
4 6
import com.iver.cit.gvsig.animation.keyframe.IKeyFrame;
5 7
import com.iver.cit.gvsig.fmap.layers.FLyrDefault;
8
import com.iver.utiles.IPersistence;
6 9
import com.iver.utiles.XMLEntity;
7 10

  
8 11

  
......
22 25
	private boolean visibility;
23 26
	private FLyrDefault layerDefault;
24 27
	private String className;
28
	private String layerName;
29
	
25 30

  
26 31

  
27 32
	/**
......
141 146
		xml.putProperty("levelTransparency", levelTransparency);
142 147
		xml.putProperty("visibility", visibility);
143 148
		xml.putProperty("time", time);
149
		xml.putProperty("layerName", layerDefault.getClass().getName());
144 150
		
145 151
		return xml;
146 152
	}
......
157 163
			this.visibility = xml.getBooleanProperty("visibility");
158 164
		if (xml.contains("time"))
159 165
			this.time = xml.getDoubleProperty("time");
166
		
167

  
168
		try {
169
			this.layerName = xml.getStringProperty("layerName");
170
			Class classProp = Class.forName(this.layerName);
171
			Object obj = classProp.newInstance();
172
			//IPersistence objPersist = (IPersistence) obj;
173
			//objPersist.setXMLEntity(xml);
174
			this.layerDefault = (FLyrDefault) obj;
175
		} catch (Exception e) {
176
			
177
		}
160 178
	}
161

  
162 179
}

Also available in: Unified diff