Revision 23596 trunk/libraries/libAnimationCommon/src/main/java/com/iver/cit/gvsig/animation/interpolator/InterpolatorTransparency.java
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 |
} |
Also available in: Unified diff