本文整理汇总了Java中org.oscim.map.Animator类的典型用法代码示例。如果您正苦于以下问题:Java Animator类的具体用法?Java Animator怎么用?Java Animator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Animator类属于org.oscim.map包,在下文中一共展示了Animator类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setMapLocation
import org.oscim.map.Animator; //导入依赖的package包/类
/**
* Set map location with or without animation
*
* @param map
* @param boundingBox
* @param locationAnimationTime
*/
public static void setMapLocation(final Map map, final BoundingBox boundingBox, int locationAnimationTime) {
final Animator animator = map.animator();
// zero will not move the map, set 1 ms
if (locationAnimationTime == 0 || isAnimateLocation == false) {
locationAnimationTime = 1;
}
animator.cancel();
animator.animateTo(//
locationAnimationTime,
boundingBox,
Easing.Type.SINE_INOUT,
Animator.ANIM_MOVE | Animator.ANIM_SCALE);
}
示例2: centerOn_shouldCallAnimateTo
import org.oscim.map.Animator; //导入依赖的package包/类
@Test
public void centerOn_shouldCallAnimateTo() throws Exception {
Animator animator = Mockito.mock(Animator.class);
TestMap map = (TestMap) controller.getMap();
map.setAnimator(animator);
Location location = new Location("expected");
location.setLatitude(21.0);
location.setLongitude(45.0);
controller.centerOn(location);
Mockito.verify(animator).animateTo(new GeoPoint(21.0, 45.0));
}
示例3: setUp
import org.oscim.map.Animator; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
mockMap = Mockito.mock(Map.class);
mockViewport = Mockito.mock(ViewController.class);
mockAnimator = Mockito.mock(Animator.class);
layer = new MapEventLayer(mockMap);
when(mockMap.viewport()).thenReturn(mockViewport);
when(mockMap.animator()).thenReturn(mockAnimator);
when(mockMap.getHeight()).thenReturn(6);
argumentCaptor = ArgumentCaptor.forClass(float.class);
}
示例4: actionZoomShowEntireTour
import org.oscim.map.Animator; //导入依赖的package包/类
public void actionZoomShowEntireTour() {
if (_allBoundingBox == null) {
// a tour is not yet displayed
showToursFromTourProvider();
return;
}
final Map map25 = _mapApp.getMap();
map25.post(new Runnable() {
@Override
public void run() {
final Animator animator = map25.animator();
animator.cancel();
animator.animateTo(//
2000,
_allBoundingBox,
Easing.Type.SINE_INOUT,
Animator.ANIM_MOVE | Animator.ANIM_SCALE);
map25.updateMap(true);
}
});
}