Package globus.glmap
Class GLMapAnimation
java.lang.Object
globus.glmap.GLNativeObject
globus.glmap.GLMapAnimation
- All Implemented Interfaces:
AutoCloseable
GLMapAnimation defines animation of objects parameters that will be executed
synchronously.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceFlyToModestatic @interfaceType of transition -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel(boolean setFinalValues) Cancels animationvoiddecelerate(MapPoint speed) Defines the scrolling speed at the end of map scrolling movement.intReturns fly to modevoidsetAngle(GLMapDrawable drawable, float angle) Sets new angle of drawablevoidsetDuration(double duration) Sets duration of animationvoidsetFlyToMode(int flyToMode) Sets new fly to mode.voidsetFocusPoint(MapPoint focusPoint) Sets focus point of zoom and rotate animationsvoidsetOffset(GLMapDrawable drawable, short ox, short oy) Sets new offset of drawablevoidsetOnFinish(Runnable onFinish) Sets callback that will be called when animation finishedvoidsetPosition(GLMapDrawable drawable, MapPoint position) Set new position of drawablevoidsetScale(GLMapDrawable drawable, double scale) Sets new scale of drawablevoidsetTransition(int transition) Sets transition of animationMethods inherited from class globus.glmap.GLNativeObject
close, dispose
-
Field Details
-
None
public static final int NoneNo transition- See Also:
-
Linear
public static final int LinearLinear transition- See Also:
-
EaseIn
public static final int EaseInEase in transition- See Also:
-
EaseOut
public static final int EaseOutEase out transition- See Also:
-
EaseInOut
public static final int EaseInOutEase in-out transition- See Also:
-
-
Constructor Details
-
GLMapAnimation
public GLMapAnimation()Default constructor
-
-
Method Details
-
setOnFinish
Sets callback that will be called when animation finished- Parameters:
onFinish- callback
-
setTransition
public void setTransition(int transition) Sets transition of animation- Parameters:
transition- new transition of animation
-
setDuration
public void setDuration(double duration) Sets duration of animation- Parameters:
duration- duration in seconds
-
setFocusPoint
Sets focus point of zoom and rotate animations- Parameters:
focusPoint- focus point
-
setFlyToMode
public void setFlyToMode(int flyToMode) Sets new fly to mode. Default is FlyToMode.Continue.- Parameters:
flyToMode- mode to set
-
getFlyToMode
public int getFlyToMode()Returns fly to mode- Returns:
- current fly to mode
-
setPosition
Set new position of drawable- Parameters:
drawable- drawable to modifyposition- new position
-
setScale
Sets new scale of drawable- Parameters:
drawable- drawable to modifyscale- new scale
-
setAngle
Sets new angle of drawable- Parameters:
drawable- drawable to modifyangle- new angle
-
setOffset
Sets new offset of drawable- Parameters:
drawable- drawable to modifyox- new x offsetoy- new y offset
-
decelerate
Defines the scrolling speed at the end of map scrolling movement.- Parameters:
speed- initial speed of decelerate
-
cancel
public void cancel(boolean setFinalValues) Cancels animation- Parameters:
setFinalValues- if true animated parameters will be set to their final values
-