Java VerticalAlign类代码示例(javaverticalalign类代码示例汇总)

本文整理汇总了Java中org.andengine.util.adt.align.VerticalAlign的典型用法代码示例。如果您正苦于以下问题:Java VerticalAlign类的具体用法?Java VerticalAlign怎么用?Java VerticalAlign使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Java VerticalAlign类代码示例(javaverticalalign类代码示例汇总)

VerticalAlign类属于org.andengine.util.adt.align包,在下文中一共展示了VerticalAlign类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getMenuItemY

import org.andengine.util.adt.align.VerticalAlign; //导入依赖的package包/类
protected float getMenuItemY(final MenuScene pMenuScene, final int pIndex) {
	final float menuSceneHeight = pMenuScene.getHeight();

	final IMenuItem menuItem = pMenuScene.getMenuItem(pIndex);

	/* Prepare vertical position. */
	float baseY;
	switch (this.mVerticalAlign) {
		case TOP:
			baseY = menuSceneHeight;
			break;
		case CENTER:
			baseY = (0.5f * menuSceneHeight) + (this.mOverallHeight * 0.5f);
			break;
		case BOTTOM:
			baseY = this.mOverallHeight;
			break;
		default:
			throw new IllegalArgumentException("Unexpected " + VerticalAlign.class.getSimpleName() + " with value: '" + this.mVerticalAlign + "'.");
	}

	final float menuItemHeight = menuItem.getHeight();

	/* Determine vertical position. */
	final float y = baseY - (menuItemHeight * 0.5f) - (pIndex * (menuItemHeight + this.mMenuItemSpacing));

	return y + this.mOffsetY;
} 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:29,代码来源:MenuSceneAnimator.java

示例2: MenuSceneAnimator

import org.andengine.util.adt.align.VerticalAlign; //导入依赖的package包/类
public MenuSceneAnimator(final HorizontalAlign pHorizontalAlign, final VerticalAlign pVerticalAlign) {
	this.mHorizontalAlign = pHorizontalAlign;
	this.mVerticalAlign = pVerticalAlign;
} 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:5,代码来源:MenuSceneAnimator.java

示例3: getVerticalAlign

import org.andengine.util.adt.align.VerticalAlign; //导入依赖的package包/类
@Override
public VerticalAlign getVerticalAlign() {
	return this.mVerticalAlign;
} 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:5,代码来源:MenuSceneAnimator.java

示例4: setVerticalAlign

import org.andengine.util.adt.align.VerticalAlign; //导入依赖的package包/类
@Override
public void setVerticalAlign(final VerticalAlign pVerticalAlign) {
	this.mVerticalAlign = pVerticalAlign;
} 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:5,代码来源:MenuSceneAnimator.java

示例5: SlideMenuSceneAnimator

import org.andengine.util.adt.align.VerticalAlign; //导入依赖的package包/类
public SlideMenuSceneAnimator(final HorizontalAlign pHorizontalAlign, final VerticalAlign pVerticalAlign) {
	this(pHorizontalAlign, pVerticalAlign, SlideMenuSceneAnimator.DIRECTION_DEFAULT, SlideMenuSceneAnimator.EASEFUNCTION_DEFAULT);
} 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:4,代码来源:SlideMenuSceneAnimator.java

示例6: InstantMenuSceneAnimator

import org.andengine.util.adt.align.VerticalAlign; //导入依赖的package包/类
public InstantMenuSceneAnimator(final HorizontalAlign pHorizontalAlign, final VerticalAlign pVerticalAlign) {
	super(pHorizontalAlign, pVerticalAlign);
} 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:4,代码来源:InstantMenuSceneAnimator.java

示例7: AlphaMenuSceneAnimator

import org.andengine.util.adt.align.VerticalAlign; //导入依赖的package包/类
public AlphaMenuSceneAnimator(final HorizontalAlign pHorizontalAlign, final VerticalAlign pVerticalAlign) {
	this(pHorizontalAlign, pVerticalAlign, AlphaMenuSceneAnimator.EASEFUNCTION_DEFAULT);
} 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:4,代码来源:AlphaMenuSceneAnimator.java

本文标签属性:

示例:示例英文

代码:代码编程

java:javascript18岁

VerticalAlign:attachment

上一篇:C# StringFormatFlags枚举代码示例(c#stringformatflags枚举典型用法代码示例汇总)
下一篇:辖区什么意思(辖区是什么意思)

为您推荐