svn-gvsig-desktop / import / ext3D / branches / ext3D_v1.1 / ExtAnimation2D / src / com / iver / cit / gvsig / animation / AnimationLayer2D.java @ 15437
History | View | Annotate | Download (2.04 KB)
1 |
package com.iver.cit.gvsig.animation; |
---|---|
2 |
|
3 |
import com.iver.cit.gvsig.animation.IAnimationType; |
4 |
import com.iver.cit.gvsig.animation.keyframe.IAnimationTypeKeyFrame; |
5 |
import com.iver.cit.gvsig.animation.keyframe.IInterpolator; |
6 |
import com.iver.cit.gvsig.project.ProjectExtent; |
7 |
import com.iver.cit.gvsig.project.documents.view.gui.View; |
8 |
|
9 |
public class AnimationLayer2D implements IAnimationTypeKeyFrame { |
10 |
|
11 |
private String className = "AnimationLayer2D"; |
12 |
private String description = "Animacion para zoom de capas"; |
13 |
private String name = "Animacion de zoom capas"; |
14 |
private int typeTrack = IAnimationType.TIME_TYPE_TRACK; |
15 |
private IInterpolator interpolator;
|
16 |
private View view; |
17 |
|
18 |
public AnimationLayer2D() {
|
19 |
this.interpolator = new Interpolator2D(); |
20 |
} |
21 |
|
22 |
public String getClassName() { |
23 |
return className;
|
24 |
} |
25 |
|
26 |
public String getDescription() { |
27 |
return description;
|
28 |
} |
29 |
|
30 |
public String getName() { |
31 |
return name;
|
32 |
} |
33 |
|
34 |
public void setClassName(String className) { |
35 |
this.className = className;
|
36 |
} |
37 |
|
38 |
public void setDescription(String description) { |
39 |
this.description = description;
|
40 |
} |
41 |
|
42 |
public void setName(String name) { |
43 |
this.name = name;
|
44 |
} |
45 |
|
46 |
public void AppliesToObject(Object animated) { |
47 |
|
48 |
// Casting the animated object
|
49 |
KeyFrame2D keyFrame2D = (KeyFrame2D) animated; |
50 |
// Applies to object
|
51 |
this.view.getMapControl().getViewPort().setExtent(
|
52 |
((ProjectExtent) keyFrame2D.getAnimatedObject()).getExtent()); |
53 |
// Repainting the object
|
54 |
this.view.getMapControl().drawMap(true); |
55 |
// this.view.repaintMap();
|
56 |
} |
57 |
|
58 |
public int getTypeTrack() { |
59 |
return typeTrack;
|
60 |
} |
61 |
|
62 |
public void setTypeTrack(int typeTrack) { |
63 |
this.typeTrack = typeTrack;
|
64 |
|
65 |
} |
66 |
|
67 |
public IInterpolator getInterpolator() {
|
68 |
return this.interpolator; |
69 |
} |
70 |
|
71 |
public void setInterpolator(IInterpolator interpolator) { |
72 |
this.interpolator = interpolator;
|
73 |
|
74 |
} |
75 |
|
76 |
public Object getAnimatedObject() { |
77 |
// TODO Auto-generated method stub
|
78 |
return this.view; |
79 |
} |
80 |
|
81 |
public void setAnimatedObject(Object object) { |
82 |
this.view = (View) object; |
83 |
|
84 |
} |
85 |
|
86 |
} |