Revision 23596
trunk/libraries/libAnimationCommon/src/main/java/com/iver/cit/gvsig/animation/animationType/AnimationTypeFactoryTransparency.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2005 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
*/ |
|
19 |
|
|
1 | 20 |
package com.iver.cit.gvsig.animation.animationType; |
2 | 21 |
|
3 | 22 |
import com.iver.cit.gvsig.animation.AnimationFactory; |
trunk/libraries/libAnimationCommon/src/main/java/com/iver/cit/gvsig/animation/animationType/AnimationKeyFrameTransparencyFactory.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2005 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
*/ |
|
19 |
|
|
1 | 20 |
package com.iver.cit.gvsig.animation.animationType; |
2 | 21 |
|
3 | 22 |
import com.iver.cit.gvsig.animation.AnimationFactory; |
trunk/libraries/libAnimationCommon/src/main/java/com/iver/cit/gvsig/animation/animationType/AnimationTransparency.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2005 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
*/ |
|
19 |
|
|
1 | 20 |
package com.iver.cit.gvsig.animation.animationType; |
2 | 21 |
|
3 | 22 |
import com.iver.andami.PluginServices; |
... | ... | |
18 | 37 |
|
19 | 38 |
public class AnimationTransparency implements IAnimationTypeKeyFrame { |
20 | 39 |
|
21 |
private String className;// = this.getClass().getName(); |
|
22 | 40 |
private String description = "Animacion basada en Transparencias"; |
23 | 41 |
private String name = "AnimationTransparency"; |
24 | 42 |
private int typeTrack = IAnimationType.TIME_TYPE_TRACK; |
25 | 43 |
private IInterpolator interpolator; |
26 |
private BaseView view; |
|
27 |
String nameView; |
|
28 |
//private AnimationObjectTransparency animationObjectTransparency; |
|
44 |
private String nameView; |
|
29 | 45 |
private IAnimatedObject animationObjectTransparency = new AnimationObjectTransparency() ; |
30 | 46 |
private String titleWindow; |
31 | 47 |
|
... | ... | |
45 | 61 |
} |
46 | 62 |
|
47 | 63 |
public void setClassName(String className) { |
48 |
this.className = className; |
|
49 | 64 |
} |
50 | 65 |
|
51 | 66 |
public void setDescription(String description) { |
... | ... | |
138 | 153 |
|
139 | 154 |
public XMLEntity getXMLEntity() { |
140 | 155 |
|
141 |
//View3D myActualView = null; |
|
142 | 156 |
|
143 | 157 |
XMLEntity xml = new XMLEntity(); |
144 | 158 |
xml.putProperty("className", this.getClassName()); |
145 | 159 |
xml.putProperty("description", description); |
146 | 160 |
xml.putProperty("animationTrackTipe", typeTrack); |
147 |
//xml.putProperty("nameClassView", animationObjectTransparency.getNameView()); |
|
148 |
//myActualView = (View3D) animationObjectTransparency.getAnimatedView(); |
|
149 | 161 |
|
150 | 162 |
BaseView myActualView = (BaseView) animationObjectTransparency.getAnimatedObject("view"); |
151 | 163 |
xml.putProperty("nameClassView", myActualView.getClass().getName()); |
152 | 164 |
|
153 |
|
|
154 |
|
|
155 | 165 |
titleWindow = myActualView.getWindowInfo().getTitle(); |
156 | 166 |
xml.putProperty("titleWindow", titleWindow); |
157 | 167 |
xml.addChild(((IPersistence)this.interpolator).getXMLEntity()); |
... | ... | |
160 | 170 |
|
161 | 171 |
public void setXMLEntity(XMLEntity xml) { |
162 | 172 |
|
163 |
String nameLayer; |
|
164 | 173 |
|
165 |
if (xml.contains("className")) |
|
166 |
this.className= xml.getStringProperty("className"); |
|
167 | 174 |
if (xml.contains("animationTrackTipe")) |
168 | 175 |
this.typeTrack = xml.getIntProperty("animationTrackTipe"); |
169 | 176 |
if (xml.contains("nameView")) |
170 | 177 |
this.nameView = xml.getStringProperty("nameView"); |
171 |
if (xml.contains("nameLayer")) |
|
172 |
nameLayer = xml.getStringProperty("nameLayer"); |
|
173 | 178 |
|
174 | 179 |
//Acceding to the InterpolatorX of the AnimationTypeX |
175 | 180 |
XMLEntity xmlInterpolator = xml.getChild(0); |
176 | 181 |
try { |
177 | 182 |
String class_name = xmlInterpolator.getStringProperty("className"); |
178 |
Class classInterpolator = Class.forName(class_name); |
|
183 |
Class<?> classInterpolator = Class.forName(class_name);
|
|
179 | 184 |
Object obj = classInterpolator .newInstance(); |
180 | 185 |
IPersistence objPersist = (IPersistence) obj; |
181 | 186 |
objPersist.setXMLEntity(xmlInterpolator); |
trunk/libraries/libAnimationCommon/src/main/java/com/iver/cit/gvsig/animation/interpolator/InterpolatorTransparency.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2005 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
*/ |
|
19 |
|
|
1 | 20 |
package com.iver.cit.gvsig.animation.interpolator; |
2 | 21 |
|
3 | 22 |
import java.util.List; |
... | ... | |
19 | 38 |
public class InterpolatorTransparency implements IInterpolator { |
20 | 39 |
|
21 | 40 |
public BaseView view; |
22 |
private String className;// = this.getClass().getName(); |
|
23 | 41 |
private String description = "Interpolaci?n basada en Transparencias"; |
24 | 42 |
private String name = "InterpolatorTransparency"; |
25 | 43 |
|
26 | 44 |
private AnimationObjectTransparency animationObjectTransparency = new AnimationObjectTransparency() ; |
27 | 45 |
|
28 |
public IKeyFrame interpolate(List kfList, int index, double time) { |
|
46 |
public IKeyFrame interpolate(List<IKeyFrame> kfList, int index, double time) {
|
|
29 | 47 |
KeyFrameTransparency KF = new KeyFrameTransparency(); |
30 | 48 |
|
31 | 49 |
// if the list of keyframes is empty. |
32 | 50 |
if (kfList == null) |
33 | 51 |
return null; |
34 | 52 |
|
35 |
// if (this.view == null) |
|
36 |
// return null; |
|
37 |
// |
|
38 |
|
|
39 | 53 |
|
40 | 54 |
switch (kfList.size()) { |
41 | 55 |
// this case when there are only has 2 keyframes |
... | ... | |
87 | 101 |
} |
88 | 102 |
|
89 | 103 |
|
90 |
|
|
91 |
|
|
92 |
|
|
93 | 104 |
public Object getAnimatedObject() { |
94 | 105 |
return this.animationObjectTransparency; |
95 |
//return this.view; |
|
96 | 106 |
} |
97 | 107 |
|
98 | 108 |
|
... | ... | |
100 | 110 |
this.animationObjectTransparency = (AnimationObjectTransparency) object; |
101 | 111 |
this.view = (BaseView) animationObjectTransparency.getAnimatedView(); |
102 | 112 |
} |
103 |
// public Object getAnimatedObject() { |
|
104 |
// |
|
105 |
// return this.view; |
|
106 |
// } |
|
107 |
// |
|
108 |
// public void setAnimatedObject(Object ani) { |
|
109 |
// this.view = (View3D) ani; |
|
110 |
// } |
|
111 | 113 |
|
112 | 114 |
public IInterpolatorTimeFuntion getFuntion() { |
113 |
// TODO Auto-generated method stub |
|
114 | 115 |
return null; |
115 | 116 |
} |
116 | 117 |
|
117 | 118 |
|
118 | 119 |
public void setFuntion(IInterpolatorTimeFuntion arg0) { |
119 | 120 |
// TODO Auto-generated method stub |
120 |
|
|
121 | 121 |
} |
122 | 122 |
|
123 | 123 |
public String getClassName() { |
... | ... | |
144 | 144 |
} |
145 | 145 |
|
146 | 146 |
public void setXMLEntity(XMLEntity xml) { |
147 |
if (xml.contains("className")) |
|
148 |
this.className= xml.getStringProperty("className"); |
|
149 | 147 |
if (xml.contains("description")) |
150 | 148 |
this.description = xml.getStringProperty("description"); |
151 |
|
|
152 | 149 |
} |
153 | 150 |
|
154 | 151 |
} |
trunk/libraries/libAnimationCommon/src/main/java/com/iver/cit/gvsig/animation/keyFrame/KeyFrameTransparency.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2005 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
*/ |
|
19 |
|
|
1 | 20 |
package com.iver.cit.gvsig.animation.keyFrame; |
2 | 21 |
|
3 | 22 |
import java.util.List; |
... | ... | |
2 | 21 |
|
3 |
|
|
4 | 22 |
import com.iver.cit.gvsig.animation.keyframe.IKeyFrame; |
5 | 23 |
import com.iver.cit.gvsig.fmap.layers.FLyrDefault; |
6 |
import com.iver.utiles.IPersistence; |
|
7 | 24 |
import com.iver.utiles.XMLEntity; |
... | ... | |
24 | 41 |
private int levelTransparency; |
25 | 42 |
private boolean visibility; |
26 | 43 |
private FLyrDefault layerDefault; |
27 |
private String className; |
|
28 | 44 |
private String layerName; |
29 | 45 |
|
30 | 46 |
|
... | ... | |
47 | 63 |
*/ |
48 | 64 |
|
49 | 65 |
public String getName() { |
50 |
// TODO Auto-generated method stub |
|
51 | 66 |
return this.name; |
52 | 67 |
} |
53 | 68 |
|
54 |
public List getPropertiesList() { |
|
55 |
// TODO Auto-generated method stub |
|
69 |
public List<IKeyFrame> getPropertiesList() { |
|
56 | 70 |
return null; |
57 | 71 |
} |
58 | 72 |
|
... | ... | |
66 | 80 |
|
67 | 81 |
} |
68 | 82 |
|
69 |
public void setPropertiesList(List list) { |
|
83 |
public void setPropertiesList(List<IKeyFrame> list) {
|
|
70 | 84 |
// TODO Auto-generated method stub |
71 | 85 |
} |
72 | 86 |
|
... | ... | |
167 | 181 |
|
168 | 182 |
try { |
169 | 183 |
this.layerName = xml.getStringProperty("layerName"); |
170 |
Class classProp = Class.forName(this.layerName); |
|
184 |
Class<?> classProp = Class.forName(this.layerName);
|
|
171 | 185 |
Object obj = classProp.newInstance(); |
172 |
//IPersistence objPersist = (IPersistence) obj; |
|
173 |
//objPersist.setXMLEntity(xml); |
|
174 | 186 |
this.layerDefault = (FLyrDefault) obj; |
175 | 187 |
} catch (Exception e) { |
176 | 188 |
|
trunk/libraries/libAnimationCommon/src/main/java/com/iver/cit/gvsig/animation/keyFrame/AnimationKeyFrameTransparencyFactory.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2005 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
*/ |
|
19 |
|
|
1 | 20 |
package com.iver.cit.gvsig.animation.keyFrame; |
2 | 21 |
|
3 | 22 |
import com.iver.cit.gvsig.animation.AnimationFactory; |
trunk/libraries/libAnimationCommon/src/main/java/com/iver/cit/gvsig/animation/animatedObject/AnimationObjectTransparency.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2005 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
*/ |
|
19 |
|
|
1 | 20 |
package com.iver.cit.gvsig.animation.animatedObject; |
2 | 21 |
|
3 |
import com.iver.cit.gvsig.animation.animatedObject.AnimatedObjectBase; |
|
4 | 22 |
import com.iver.cit.gvsig.fmap.layers.FLyrDefault; |
5 |
import com.iver.cit.gvsig.project.documents.view.gui.BaseView; |
|
6 | 23 |
|
7 | 24 |
public class AnimationObjectTransparency extends AnimatedObjectBase{ |
8 | 25 |
|
9 |
private String className; |
|
10 |
private String nameView; |
|
11 | 26 |
private String nameLayer; |
12 |
private BaseView view; |
|
13 | 27 |
private FLyrDefault layerDefault; |
14 | 28 |
|
15 | 29 |
|
16 |
|
|
17 | 30 |
public String getClassName() { |
18 | 31 |
return this.getClass().getName(); |
19 | 32 |
} |
20 | 33 |
|
21 | 34 |
public void setClassName(String className) { |
22 |
this.className = className; |
|
23 | 35 |
} |
24 | 36 |
|
25 |
// public String getNameView() { |
|
26 |
// return nameView; |
|
27 |
// } |
|
28 |
// |
|
29 |
// public void setNameView(String nameView) { |
|
30 |
// this.nameView = nameView; |
|
31 |
// } |
|
32 |
|
|
33 | 37 |
public String getNameLayer() { |
34 | 38 |
return nameLayer; |
35 | 39 |
} |
... | ... | |
38 | 42 |
this.nameLayer = nameLayer; |
39 | 43 |
} |
40 | 44 |
|
41 |
// public Object getAnimatedView() { |
|
42 |
// return view; |
|
43 |
// } |
|
44 |
// |
|
45 |
// public void setAnimatedView(Object object) { |
|
46 |
// this.view = (BaseView) object; |
|
47 |
// this.nameView = this.view.getName(); |
|
48 |
// } |
|
49 |
|
|
50 | 45 |
public Object getAnimatedView() { |
51 | 46 |
return this.getAnimatedObject("view"); |
52 | 47 |
} |
Also available in: Unified diff