public abstract class

BaseMenuItemDecorator

extends Object
implements IMenuItem
java.lang.Object
   ↳ org.anddev.andengine.entity.scene.menu.item.decorator.BaseMenuItemDecorator
Known Direct Subclasses

Class Overview

(c) 2010 Nicolas Gramlich (c) 2011 Zynga Inc.

Summary

Public Constructors
BaseMenuItemDecorator(IMenuItem pMenuItem)
Public Methods
void attachChild(IEntity pEntity)
boolean attachChild(IEntity pEntity, int pIndex)
void callOnChildren(IEntity.IEntityCallable pEntityCallable)
void callOnChildren(IEntity.IEntityMatcher pEntityMatcher, IEntity.IEntityCallable pEntityCallable)
void clearEntityModifiers()
void clearUpdateHandlers()
boolean collidesWith(IShape pOtherShape)
boolean contains(float pX, float pY)
float[] convertLocalToSceneCoordinates(float[] pCoordinates, float[] pReuse)
float[] convertLocalToSceneCoordinates(float[] pCoordinates)
float[] convertLocalToSceneCoordinates(float pX, float pY)
float[] convertLocalToSceneCoordinates(float pX, float pY, float[] pReuse)
float[] convertSceneToLocalCoordinates(float pX, float pY)
float[] convertSceneToLocalCoordinates(float[] pCoordinates)
float[] convertSceneToLocalCoordinates(float pX, float pY, float[] pReuse)
float[] convertSceneToLocalCoordinates(float[] pCoordinates, float[] pReuse)
boolean detachChild(IEntity pEntity)
WARNING: This function should be called from within postRunnable(Runnable) which is registered to a Scene or the Engine itself, because otherwise it may throw an IndexOutOfBoundsException in the Update-Thread or the GL-Thread!
IEntity detachChild(IEntity.IEntityMatcher pEntityMatcher)
WARNING: This function should be called from within postRunnable(Runnable) which is registered to a Scene or the Engine itself, because otherwise it may throw an IndexOutOfBoundsException in the Update-Thread or the GL-Thread!
void detachChildren()
boolean detachChildren(IEntity.IEntityMatcher pEntityMatcher)
WARNING: This function should be called from within postRunnable(Runnable) which is registered to a Scene or the Engine itself, because otherwise it may throw an IndexOutOfBoundsException in the Update-Thread or the GL-Thread!
boolean detachSelf()
IEntity findChild(IEntity.IEntityMatcher pEntityMatcher)
float getAlpha()
float getBaseHeight()
float getBaseWidth()
float getBlue()
IEntity getChild(int pIndex)
int getChildCount()
int getChildIndex(IEntity pEntity)
IEntity getFirstChild()
float getGreen()
float getHeight()
float getHeightScaled()
int getID()
float getInitialX()
float getInitialY()
IEntity getLastChild()
Transformation getLocalToSceneTransformation()
IEntity getParent()
float getRed()
float getRotation()
float getRotationCenterX()
float getRotationCenterY()
float getScaleCenterX()
float getScaleCenterY()
float getScaleX()
float getScaleY()
float[] getSceneCenterCoordinates()
Transformation getSceneToLocalTransformation()
Object getUserData()
float getWidth()
float getWidthScaled()
float getX()
float getY()
int getZIndex()
boolean hasParent()
boolean isChildrenIgnoreUpdate()
boolean isChildrenVisible()
boolean isCullingEnabled()
boolean isIgnoreUpdate()
boolean isRotated()
boolean isScaled()
boolean isVisible()
boolean onAreaTouched(TouchEvent pSceneTouchEvent, float pTouchAreaLocalX, float pTouchAreaLocalY)
This method only fires if this Scene.ITouchArea is registered to the Scene via registerTouchArea(ITouchArea).
void onAttached()
void onDetached()
void onDraw(GL10 pGL, Camera pCamera)
final void onSelected()
final void onUnselected()
void onUpdate(float pSecondsElapsed)
void registerEntityModifier(IEntityModifier pEntityModifier)
void registerUpdateHandler(IUpdateHandler pUpdateHandler)
void reset()
void setAlpha(float pAlpha)
void setBlendFunction(int pSourceBlendFunction, int pDestinationBlendFunction)
boolean setChildIndex(IEntity pEntity, int pIndex)
void setChildrenIgnoreUpdate(boolean pChildrenIgnoreUpdate)
void setChildrenVisible(boolean pChildrenVisible)
void setColor(float pRed, float pGreen, float pBlue)
void setColor(float pRed, float pGreen, float pBlue, float pAlpha)
void setCullingEnabled(boolean pCullingEnabled)
void setIgnoreUpdate(boolean pIgnoreUpdate)
void setInitialPosition()
void setParent(IEntity pEntity)
void setPosition(IEntity pOtherEntity)
void setPosition(float pX, float pY)
void setRotation(float pRotation)
void setRotationCenter(float pRotationCenterX, float pRotationCenterY)
void setRotationCenterX(float pRotationCenterX)
void setRotationCenterY(float pRotationCenterY)
void setScale(float pScale)
void setScale(float pScaleX, float pScaleY)
void setScaleCenter(float pScaleCenterX, float pScaleCenterY)
void setScaleCenterX(float pScaleCenterX)
void setScaleCenterY(float pScaleCenterY)
void setScaleX(float pScaleX)
void setScaleY(float pScaleY)
void setUserData(Object pUserData)
void setVisible(boolean pVisible)
void setZIndex(int pZIndex)
void sortChildren()
Sorts the IEntitys based on their ZIndex.
void sortChildren(Comparator<IEntity> pEntityComparator)
Sorts the IEntitys based on the Comparator supplied.
boolean swapChildren(IEntity pEntityA, IEntity pEntityB)
boolean swapChildren(int pIndexA, int pIndexB)
boolean unregisterEntityModifier(IEntityModifier pEntityModifier)
boolean unregisterEntityModifiers(IEntityModifier.IEntityModifierMatcher pEntityModifierMatcher)
boolean unregisterUpdateHandler(IUpdateHandler pUpdateHandler)
boolean unregisterUpdateHandlers(IUpdateHandler.IUpdateHandlerMatcher pUpdateHandlerMatcher)
Protected Methods
abstract void onMenuItemReset(IMenuItem pMenuItem)
abstract void onMenuItemSelected(IMenuItem pMenuItem)
abstract void onMenuItemUnselected(IMenuItem pMenuItem)
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.anddev.andengine.engine.handler.IUpdateHandler
From interface org.anddev.andengine.entity.IEntity
From interface org.anddev.andengine.entity.scene.Scene.ITouchArea
From interface org.anddev.andengine.entity.scene.menu.item.IMenuItem
From interface org.anddev.andengine.entity.shape.IShape
From interface org.anddev.andengine.opengl.IDrawable

Public Constructors

public BaseMenuItemDecorator (IMenuItem pMenuItem)

Public Methods

public void attachChild (IEntity pEntity)

public boolean attachChild (IEntity pEntity, int pIndex)

public void callOnChildren (IEntity.IEntityCallable pEntityCallable)

public void callOnChildren (IEntity.IEntityMatcher pEntityMatcher, IEntity.IEntityCallable pEntityCallable)

public void clearEntityModifiers ()

public void clearUpdateHandlers ()

public boolean collidesWith (IShape pOtherShape)

public boolean contains (float pX, float pY)

public float[] convertLocalToSceneCoordinates (float[] pCoordinates, float[] pReuse)

public float[] convertLocalToSceneCoordinates (float[] pCoordinates)

public float[] convertLocalToSceneCoordinates (float pX, float pY)

public float[] convertLocalToSceneCoordinates (float pX, float pY, float[] pReuse)

public float[] convertSceneToLocalCoordinates (float pX, float pY)

public float[] convertSceneToLocalCoordinates (float[] pCoordinates)

public float[] convertSceneToLocalCoordinates (float pX, float pY, float[] pReuse)

public float[] convertSceneToLocalCoordinates (float[] pCoordinates, float[] pReuse)

public boolean detachChild (IEntity pEntity)

WARNING: This function should be called from within postRunnable(Runnable) which is registered to a Scene or the Engine itself, because otherwise it may throw an IndexOutOfBoundsException in the Update-Thread or the GL-Thread!

public IEntity detachChild (IEntity.IEntityMatcher pEntityMatcher)

WARNING: This function should be called from within postRunnable(Runnable) which is registered to a Scene or the Engine itself, because otherwise it may throw an IndexOutOfBoundsException in the Update-Thread or the GL-Thread!

public void detachChildren ()

public boolean detachChildren (IEntity.IEntityMatcher pEntityMatcher)

WARNING: This function should be called from within postRunnable(Runnable) which is registered to a Scene or the Engine itself, because otherwise it may throw an IndexOutOfBoundsException in the Update-Thread or the GL-Thread!

public boolean detachSelf ()

public IEntity findChild (IEntity.IEntityMatcher pEntityMatcher)

public float getAlpha ()

public float getBaseHeight ()

public float getBaseWidth ()

public float getBlue ()

public IEntity getChild (int pIndex)

public int getChildCount ()

public int getChildIndex (IEntity pEntity)

public IEntity getFirstChild ()

public float getGreen ()

public float getHeight ()

public float getHeightScaled ()

public int getID ()

public float getInitialX ()

public float getInitialY ()

public IEntity getLastChild ()

public Transformation getLocalToSceneTransformation ()

public IEntity getParent ()

public float getRed ()

public float getRotation ()

public float getRotationCenterX ()

public float getRotationCenterY ()

public float getScaleCenterX ()

public float getScaleCenterY ()

public float getScaleX ()

public float getScaleY ()

public float[] getSceneCenterCoordinates ()

public Transformation getSceneToLocalTransformation ()

public Object getUserData ()

public float getWidth ()

public float getWidthScaled ()

public float getX ()

public float getY ()

public int getZIndex ()

public boolean hasParent ()

public boolean isChildrenIgnoreUpdate ()

public boolean isChildrenVisible ()

public boolean isCullingEnabled ()

public boolean isIgnoreUpdate ()

public boolean isRotated ()

public boolean isScaled ()

public boolean isVisible ()

public boolean onAreaTouched (TouchEvent pSceneTouchEvent, float pTouchAreaLocalX, float pTouchAreaLocalY)

This method only fires if this Scene.ITouchArea is registered to the Scene via registerTouchArea(ITouchArea).

Returns

public void onAttached ()

public void onDetached ()

public void onDraw (GL10 pGL, Camera pCamera)

public final void onSelected ()

public final void onUnselected ()

public void onUpdate (float pSecondsElapsed)

public void registerEntityModifier (IEntityModifier pEntityModifier)

public void registerUpdateHandler (IUpdateHandler pUpdateHandler)

public void reset ()

public void setAlpha (float pAlpha)

public void setBlendFunction (int pSourceBlendFunction, int pDestinationBlendFunction)

public boolean setChildIndex (IEntity pEntity, int pIndex)

public void setChildrenIgnoreUpdate (boolean pChildrenIgnoreUpdate)

public void setChildrenVisible (boolean pChildrenVisible)

public void setColor (float pRed, float pGreen, float pBlue)

public void setColor (float pRed, float pGreen, float pBlue, float pAlpha)

public void setCullingEnabled (boolean pCullingEnabled)

public void setIgnoreUpdate (boolean pIgnoreUpdate)

public void setInitialPosition ()

public void setParent (IEntity pEntity)

public void setPosition (IEntity pOtherEntity)

public void setPosition (float pX, float pY)

public void setRotation (float pRotation)

public void setRotationCenter (float pRotationCenterX, float pRotationCenterY)

public void setRotationCenterX (float pRotationCenterX)

public void setRotationCenterY (float pRotationCenterY)

public void setScale (float pScale)

public void setScale (float pScaleX, float pScaleY)

public void setScaleCenter (float pScaleCenterX, float pScaleCenterY)

public void setScaleCenterX (float pScaleCenterX)

public void setScaleCenterY (float pScaleCenterY)

public void setScaleX (float pScaleX)

public void setScaleY (float pScaleY)

public void setUserData (Object pUserData)

public void setVisible (boolean pVisible)

public void setZIndex (int pZIndex)

public void sortChildren ()

Sorts the IEntitys based on their ZIndex. Sort is stable.

public void sortChildren (Comparator<IEntity> pEntityComparator)

Sorts the IEntitys based on the Comparator supplied. Sort is stable.

public boolean swapChildren (IEntity pEntityA, IEntity pEntityB)

public boolean swapChildren (int pIndexA, int pIndexB)

public boolean unregisterEntityModifier (IEntityModifier pEntityModifier)

public boolean unregisterEntityModifiers (IEntityModifier.IEntityModifierMatcher pEntityModifierMatcher)

public boolean unregisterUpdateHandler (IUpdateHandler pUpdateHandler)

public boolean unregisterUpdateHandlers (IUpdateHandler.IUpdateHandlerMatcher pUpdateHandlerMatcher)

Protected Methods

protected abstract void onMenuItemReset (IMenuItem pMenuItem)

protected abstract void onMenuItemSelected (IMenuItem pMenuItem)

protected abstract void onMenuItemUnselected (IMenuItem pMenuItem)