当前位置: 首页>>代码示例>>Java>>正文


Java Animator类代码示例

本文整理汇总了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);
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:24,代码来源:Map25ConfigManager.java

示例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));
}
 
开发者ID:mapzen,项目名称:open,代码行数:12,代码来源:MapControllerTest.java

示例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);
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:12,代码来源:MapEventLayerTest.java

示例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);
			}
		});

	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:33,代码来源:Map25View.java


注:本文中的org.oscim.map.Animator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。