Revision 19225

View differences:

trunk/libraries/libAnimation/src/com/iver/cit/gvsig/animation/AnimationContainer.java
1 1
package com.iver.cit.gvsig.animation;
2 2

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

  
6 7
import com.iver.cit.gvsig.animation.traks.AnimationDatedTrack;
......
12 13
public class AnimationContainer implements IPersistence {
13 14

  
14 15
	// IAnimationTrakc List.
15
	public List AnimationTrackList;
16
	public List<IAnimationTrack>  AnimationTrackList;
16 17

  
17 18
	private int trackListSize=0;
18 19

  
......
21 22
	private static AnimationPlayer animationPlayer = new AnimationPlayer();
22 23

  
23 24
	public AnimationContainer() {
24
		List aniTrackList = this.getAnimationTrackList();
25
		aniTrackList = new ArrayList();
25
		List<IAnimationTrack> aniTrackList = this.getAnimationTrackList();
26
		aniTrackList = new ArrayList<IAnimationTrack>();
26 27
		this.setAnimationTrackList(aniTrackList);
27 28
	}
28 29

  
......
30 31
	 * @param animationType
31 32
	 * @return
32 33
	 */
33
	public List getTackListOfType(IAnimationType animationType) {
34
		List typeList = new ArrayList();
34
	public List<IAnimationTrack> getTackListOfType(IAnimationType animationType) {
35
		List<IAnimationTrack> typeList = new ArrayList<IAnimationTrack>();
35 36
		for (int i = 0; i < this.AnimationTrackList.size(); i++) {
36 37
			IAnimationTrack trackElement = (IAnimationTrack) this.AnimationTrackList
37 38
					.get(i);
......
50 51
	 */
51 52
	public IAnimationTrack CreateDatedTrack(IAnimationType animationType) {
52 53

  
53
		List aniTrackList = this.getAnimationTrackList();
54
		List<IAnimationTrack> aniTrackList = this.getAnimationTrackList();
54 55
		if (aniTrackList == null) {
55
			aniTrackList = new ArrayList();
56
			aniTrackList = new ArrayList<IAnimationTrack>();
56 57
		}
57 58
		AnimationDatedTrack ADTrack = new AnimationDatedTrack(animationType);
58 59
		aniTrackList.add(ADTrack);
......
62 63

  
63 64
	public IAnimationTrack CreateTimeTrack(IAnimationType animationType) {
64 65

  
65
		List aniTrackList = this.getAnimationTrackList();
66
		List<IAnimationTrack> aniTrackList = this.getAnimationTrackList();
66 67
		if (aniTrackList == null) {
67
			aniTrackList = new ArrayList();
68
			aniTrackList = new ArrayList<IAnimationTrack>();
68 69
		}
69 70
		AnimationTimeTrack ADTrack = new AnimationTimeTrack(animationType);
70 71
		aniTrackList.add(ADTrack);
......
112 113
	 * 
113 114
	 */
114 115
	public void removeAllTrack() {
115
		this.AnimationTrackList.clear();
116
		for (Iterator<IAnimationTrack> iterator = AnimationTrackList.iterator(); iterator.hasNext();) {
117
			removeTrack(iterator.next());
118
		}
116 119
	}
117 120

  
118 121
	/**
119 122
	 * @return
120 123
	 */
121
	public List getAnimationTrackList() {
124
	public List<IAnimationTrack> getAnimationTrackList() {
122 125
		return AnimationTrackList;
123 126
	}
124 127

  
125 128
	/**
126 129
	 * @param animationTrackList
127 130
	 */
128
	public void setAnimationTrackList(List animationTrackList) {
131
	public void setAnimationTrackList(List<IAnimationTrack> animationTrackList) {
129 132
		AnimationTrackList = animationTrackList;
130 133
	}
131 134
	
132 135
	public String toString() {
133 136
		String result = "";
134
		List ATL = this.AnimationTrackList;
137
		List<IAnimationTrack> ATL = this.AnimationTrackList;
135 138
		result += "Mostrando lista de tracks:";
136 139
		if ((ATL == null) || ATL.isEmpty()) {
137 140
			result += "\nLista vacia";
......
146 149
	}
147 150

  
148 151
	public void apply(double Tini, double Tend) {
149
		List ATL = this.AnimationTrackList;
152
		List<IAnimationTrack> ATL = this.AnimationTrackList;
150 153
		System.out.println("Tiempo de inicio: " + Tini + " tiempo final "
151 154
				+ Tend);
152 155
		if ((ATL != null) && !ATL.isEmpty()) {
......
219 222
		// Node IAnimationTrack in the animation tree. Calling setXmlEntity() methods.
220 223
		// Reconstruyendo el framework. Paso: nuevo IAnimationTrack, AnimationDateTrack o AnimationTimeTrack.
221 224
		
222
		List trackList = new ArrayList<IAnimationTrack>();
225
		List<IAnimationTrack> trackList = new ArrayList<IAnimationTrack>();
223 226
		for (int i = 1; i <= this.trackListSize; i++) {//desde el hijo 1 que es el primer track hasta el ?ltimo track.
224 227
			XMLEntity xmlTrack = xml.getChild(i);
225 228
			class_name = xmlTrack.getStringProperty("className");//Accedemos al tipo de track.
226 229
				try {
227
					Class classTrack = Class.forName(class_name);
230
					Class<?> classTrack = Class.forName(class_name);
228 231
					Object obj = classTrack .newInstance();
229 232
					IPersistence objPersist = (IPersistence) obj;
230 233
					objPersist.setXMLEntity(xmlTrack);
trunk/libraries/libAnimation/src/com/iver/cit/gvsig/animation/interval/AnimationKeyFrameInterval.java
16 16

  
17 17
public class AnimationKeyFrameInterval implements IAnimationTimeInterval {
18 18

  
19
	private List KeyFrameList;
19
	private List<IKeyFrame> KeyFrameList;
20 20

  
21 21
	private double initialTime = 0;
22 22

  
......
30 30

  
31 31
	private IKeyFrame keyframe;
32 32

  
33
	public List getKeyFrameList() {
33
	public List<IKeyFrame> getKeyFrameList() {
34 34
		return KeyFrameList;
35 35
	}
36 36

  
37
	public void setKeyFrameList(List keyFrameList) {
37
	public void setKeyFrameList(List<IKeyFrame> keyFrameList) {
38 38
		KeyFrameList = keyFrameList;
39 39
	}
40 40

  
......
66 66
	public String toString() {
67 67

  
68 68
		String result;
69
		List KFL = this.KeyFrameList;
69
		List<IKeyFrame> KFL = this.KeyFrameList;
70 70
		if (KFL != null) {
71 71
			result = "Mostrando lista de KeyFrames del intervalo Tini:"
72 72
					+ this.getInitialTime() + " Tend" + this.getEndTime();
73
			for (Iterator iter = KFL.iterator(); iter.hasNext();) {
73
			for (Iterator<IKeyFrame> iter = KFL.iterator(); iter.hasNext();) {
74 74
				Object element = (Object) iter.next();
75 75
				result += "\n" + element;
76 76
			}
......
88 88

  
89 89
		IKeyFrame previus = null;
90 90
		IKeyFrame next = null;
91
		List KFLInterpolate = new ArrayList();
91
		List<IKeyFrame> KFLInterpolate = new ArrayList<IKeyFrame>();
92 92

  
93
		List KFL = this.KeyFrameList;
93
		List<IKeyFrame> KFL = this.KeyFrameList;
94 94
		if (KFL != null) {
95
			for (Iterator iter = KFL.iterator(); iter.hasNext();) {
95
			for (Iterator<IKeyFrame> iter = KFL.iterator(); iter.hasNext();) {
96 96
				IKeyFrame element = (IKeyFrame) iter.next();
97 97
				double KFtime = element.getTime();
98 98
				boolean asigned = false;
......
183 183
		// Node IKeyFrame in the animation tree. Calling setXmlEntity() methods.
184 184
		// Reconstruyendo el framework. Paso: nuevos(seg?n el n?mero de keyframes del intervalo) IKeyFrame, del  
185 185
		// 									  tipo KeyFrameX, seg?n la animaci?n.
186
		List timeKeyFrameList = new ArrayList<IKeyFrame>();
186
		List<IKeyFrame> timeKeyFrameList = new ArrayList<IKeyFrame>();
187 187
		for (int i = 0; i < this.keyFrameListSize; i++) {// Desde el hijo 0.
188 188
			
189 189
			XMLEntity xmlKeyframe = xml.getChild(i);

Also available in: Unified diff