Revision 15445 import/ext3D/branches/ext3D_v1.1/libAnimation/src/com/iver/cit/gvsig/animation/traks/AnimationTimeTrack.java

View differences:

AnimationTimeTrack.java
1 1
package com.iver.cit.gvsig.animation.traks;
2 2

  
3
import java.sql.Time;
4 3
import java.util.ArrayList;
5 4
import java.util.Iterator;
6 5
import java.util.List;
7

  
8 6
import com.iver.cit.gvsig.animation.IAnimationType;
9 7
import com.iver.cit.gvsig.animation.interval.AnimationFunctionInterval;
10 8
import com.iver.cit.gvsig.animation.interval.AnimationKeyFrameInterval;
11 9
import com.iver.cit.gvsig.animation.interval.IAnimationInterval;
12 10
import com.iver.cit.gvsig.animation.interval.IAnimationTimeInterval;
13
import com.iver.utiles.IPersistance;
14 11
import com.iver.utiles.XMLEntity;
15 12

  
16 13
public class AnimationTimeTrack implements IAnimationTrack {
17 14

  
18 15
	private IAnimationType animationType;
19 16

  
20
	private String name;
17
	private String Name;
21 18

  
22 19
	private String Description;
23 20

  
......
31 28

  
32 29
	private Object animatedObject;
33 30

  
31
	private String className ;
32

  
34 33
	public AnimationTimeTrack(IAnimationType animationType) {
35 34
		this.animationTimeIntervalList = new ArrayList();
36 35
		this.animationType = animationType;
......
50 49
	}
51 50

  
52 51
	public String getName() {
53
		return this.name;
52
		return this.Name;
54 53
	}
55 54

  
56 55

  
......
128 127
	}
129 128

  
130 129
	public void setName(String name) {
131
		this.name = name;
130
		this.Name = name;
132 131
	}
133 132
	
134 133
	public String toString() {
......
178 177
		
179 178
		
180 179
		XMLEntity xml = new XMLEntity();
181
		xml.putProperty("className", this.getClassName());
182
		xml.putProperty("type", animationType);
180
		xml.putProperty("class_name", this.getClassName());
181
		xml.putProperty("name", Name);
183 182
		xml.putProperty("description",Description );
184
		xml.putProperty("animated_object", animatedObject);
185 183
		xml.putProperty("begin_time", beginTime);
186 184
		xml.putProperty("end_time", endTime);
187 185
		
188
		for (int i = 0; i < this.animationTimeIntervalList.size(); i++) {
189
			IAnimationTimeInterval timeInterval = (IAnimationTimeInterval) this.animationTimeIntervalList.get(i);			
190
			timeInterval.getXMLEntity();	
191
		}		
192
		return null;
186
//		for (int i = 0; i < this.animationTimeIntervalList.size(); i++) {
187
//			IAnimationTimeInterval timeInterval = (IAnimationTimeInterval) this.animationTimeIntervalList.get(i);			
188
//			timeInterval.getXMLEntity();	
189
//		}		
190
		return xml;
193 191
	}
194 192
	
195 193
	public void setXMLEntity(XMLEntity xml) {
196 194
		// TODO Auto-generated method stub
197
		if (xml.contains("type"))
198
			animationType = (IAnimationType) xml.getObjectProperty("type");		
199
		if (xml.contains("descripcion"))
195
		if (xml.contains("class_name"))
196
			className =	xml.getStringProperty("class_name");
197
		if (xml.contains("name"))
198
			Name =	xml.getStringProperty("name");
199
		if (xml.contains("description"))
200 200
			Description = xml.getStringProperty("description");
201
		if (xml.contains("animateted_object"))
202
			animatedObject = xml.getObjectProperty("animated_object");
203 201
		if (xml.contains("begin_time"))
204 202
			beginTime = xml.getDoubleProperty("begin_time");
205 203
		if (xml.contains("end_time"))
206 204
			endTime = xml.getDoubleProperty("end_time");
207
	//	this.setBeginTime(new Time(Long.parseLong(xml.getStringProperty("animated_object"))));
208 205
		
206
//		
207
//		for (int i = 0; i < this.animationTimeIntervalList.size(); i++) {
208
//			IAnimationTimeInterval timeInterval = (IAnimationTimeInterval) this.animationTimeIntervalList.get(i);			
209
//			timeInterval.setXMLEntity(xml);	
210
//		}		
209 211
		
210
		
211
		for (int i = 0; i < this.animationTimeIntervalList.size(); i++) {
212
			IAnimationTimeInterval timeInterval = (IAnimationTimeInterval) this.animationTimeIntervalList.get(i);			
213
			timeInterval.setXMLEntity(xml);	
214
		}		
215
		
216 212
	}
217 213
	
218 214
}

Also available in: Unified diff