public abstract class AbstractUniGroup extends BaseDisplayObject implements UniContainer, Cacheable, Touchable
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
ATT_CACHE_ENABLED |
protected static java.lang.String |
ATT_CLIPPING_ENABLED |
protected static java.lang.String |
ATT_TOUCHABLE |
protected DummyDrawer |
mCacheDrawer |
protected boolean |
mCacheEnabled |
protected FrameBuffer |
mCacheFrameBuffer |
protected int |
mCachePolicy |
protected int |
mCacheProjection |
protected java.util.ArrayList<StackableObject> |
mChildren |
protected java.util.ArrayList<StackableObject> |
mChildrenDisplayOrder |
protected java.util.HashMap<java.lang.String,StackableObject> |
mChildrenIds |
protected boolean |
mClippingEnabled |
protected RectF |
mClipStageRect |
protected Matrix |
mMatrixForVertices |
protected int |
mNumChildren |
protected int |
mNumDrawingChildren |
protected int[] |
mOriginalScissor |
protected boolean |
mOriginalScissorEnabled |
protected Texture |
mTexture |
protected boolean |
mTextureLoaded |
protected boolean |
mTouchable |
protected UniContainer |
mUniParent |
protected java.util.ArrayList<Touchable> |
mVisibleTouchables |
protected boolean |
mWrapContentHeight |
protected boolean |
mWrapContentWidth |
ATT_ALPHA, ATT_ANIMATOR, ATT_BLEND_MODE, ATT_COLOR, ATT_DEBUG, ATT_ORIGIN_AT_CENTER, ATT_ROTATION, ATT_VISIBLE, mAlive, mAlpha, mAlphaTestEnabled, mAutoUpdateBounds, mBlendFunc, mBounds, mBypassCameraClipping, mColor, mDebugFlags, mFrameDuration, mHasTransformValues, mId, mInvalidateFlags, mManipulators, mMask, mMatrix, mNumManipulators, mOrigin, mParent, mPerspectiveEnabled, mPivot, mPosition, mRotation, mRotationVectorX, mRotationVectorY, mRotationVectorZ, mScale, mScene, mSceneSize, mSize, mSkew, mTransformMatrix, mTransformMatrixValues, mUIConstraint, mVisible, mZ, TAG
CACHE_WHEN_CHILDREN_CHANGED, CACHE_WHEN_CHILDREN_STABLE
FLIP_X, FLIP_Y
ALL, ALPHA, BLEND, BOUNDS, CACHE, CHILDREN, COLOR, DEPTH, FRAME, ORIGIN, PARENT, PARENT_BOUNDS, PERSPECTIVE, PIVOT, POSITION, ROTATION, SCALE, SIZE, SKEW, TEXTURE, TEXTURE_COORDS, TRANSFORM_MATRIX, VERTICES, VISIBILITY, VISUAL
Constructor and Description |
---|
AbstractUniGroup() |
Modifier and Type | Method and Description |
---|---|
boolean |
addChild(StackableObject child) |
boolean |
addChild(StackableObject child,
int index) |
void |
clearCache() |
void |
dispose() |
boolean |
draw(GLState glState) |
protected boolean |
drawChildren(GLState glState) |
int |
getCachePolicy() |
int |
getCacheProjection() |
StackableObject |
getChildAt(int index) |
StackableObject |
getChildById(java.lang.String id) |
int |
getChildIndex(StackableObject child) |
GLColor |
getInheritedColor() |
int |
getNumChildren()
Get the number of children, not including grand children
|
int |
getNumGrandChildren()
Get number of children including grand children
|
int |
getNumStackedChildren() |
java.lang.String |
getObjectTree(java.lang.String prefix)
for Debugging
|
Parentable |
getParent() |
protected Matrix |
getParentMatrix() |
Texture |
getTexture() |
protected void |
initCache(GLState glState,
PointF size) |
void |
invalidate(int flags) |
boolean |
isCacheEnabled() |
protected boolean |
isChildInBounds(StackableObject child)
Test to see if a child can be seen in this container.
|
boolean |
isClippingEnabled() |
boolean |
isTouchable() |
boolean |
isWrapContenHeight() |
boolean |
isWrapContentWidth() |
void |
onAdded(Container container)
This is called after this object is added to a Container
|
void |
onAdded(UniContainer container) |
protected void |
onAddedChild(StackableObject child) |
void |
onAddedToScene(Scene scene) |
protected void |
onPreConcatParentMatrix() |
void |
onRemoved()
This is called after this object is removed from a Container
|
protected void |
onRemovedChild(StackableObject child) |
void |
onRemovedFromScene() |
protected void |
onTextureLoaded(Texture texture) |
boolean |
onTouchEvent(MotionEvent event)
Note: This is called from UI-Thread
|
void |
removeAllChildren() |
boolean |
removeChild(int index) |
boolean |
removeChild(StackableObject child) |
boolean |
removeFromParent() |
boolean |
sendChildToBottom(StackableObject child) |
boolean |
sendChildToTop(StackableObject child) |
void |
setCacheEnabled(boolean cacheEnabled)
Enable/disable cache.
|
void |
setCachePolicy(int cachePolicy)
Set how to you want to cache
|
void |
setCacheProjection(int cacheProjection) |
void |
setChildrenDisplayOrder(java.util.ArrayList<StackableObject> childrenDisplayOrder) |
void |
setClippingEnabled(boolean clippingEnabled)
Enable/Disable Bound-clipping.
|
protected void |
setNumDrawingChildren(int num) |
void |
setTexture(Texture texture) |
void |
setTouchable(boolean touchable) |
void |
setWrapContentHeight(boolean wrapHeight) |
void |
setWrapContentWidth(boolean wrapWidth) |
void |
setXMLAttributes(XmlPullParser xmlParser,
UIManager manager) |
protected abstract int |
stackChildAt(GLState glState,
StackableObject child,
int index) |
protected boolean |
stackChildren(GLState glState) |
boolean |
swapChildren(int index1,
int index2)
Swap the indeces of 2 children.
|
boolean |
swapChildren(StackableObject child1,
StackableObject child2)
Swap the indeces of 2 children.
|
boolean |
update(int deltaTime) |
protected void |
updateChildren(int deltaTime) |
addManipulator, drawBounds, drawEnd, drawStart, drawWireframe, getAlpha, getBlendFunc, getBounds, getColor, getDebugFlags, getFps, getGlobalPosition, getHeight, getId, getInheritedBlendFunc, getManipulator, getMask, getMatrix, getNumManipulators, getOrigin, getPivot, getPosition, getRotation, getScale, getScene, getSceneSize, getSize, getSkew, getUIConstraint, getWidth, getX, getY, getZ, globalToLocal, invalidate, isAlive, isAlphaTestEnabled, isAutoUpdateBounds, isBypassCameraClipping, isOriginAtCenter, isPerspectiveEnabled, isVisible, localToGlobal, move, moveTo, onCreateChildren, queueEvent, removeAllManipulators, removeManipulator, rotate, setAlive, setAlpha, setAlphaTestEnabled, setAutoUpdateBounds, setBlendFunc, setBypassCameraClipping, setColor, setDebugFlags, setFps, setId, setMask, setOrigin, setOrigin, setOriginAtCenter, setPerspectiveEnabled, setPivot, setPivot, setPivotAtCenter, setPosition, setPosition, setRotation, setRotationVector, setScale, setScale, setSize, setSize, setSkew, setUIConstraint, setVisible, setX, setY, setZ, shouldDraw, toString, updateBounds, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getMatrix, getScene, getSize, globalToLocal, invalidate, localToGlobal, queueEvent
protected static final java.lang.String ATT_TOUCHABLE
protected static final java.lang.String ATT_CLIPPING_ENABLED
protected static final java.lang.String ATT_CACHE_ENABLED
protected java.util.ArrayList<StackableObject> mChildren
protected java.util.ArrayList<StackableObject> mChildrenDisplayOrder
protected java.util.HashMap<java.lang.String,StackableObject> mChildrenIds
protected int mNumChildren
protected int mNumDrawingChildren
protected java.util.ArrayList<Touchable> mVisibleTouchables
protected boolean mTouchable
protected FrameBuffer mCacheFrameBuffer
protected DummyDrawer mCacheDrawer
protected boolean mCacheEnabled
protected int mCacheProjection
protected int mCachePolicy
protected boolean mClippingEnabled
protected boolean mOriginalScissorEnabled
protected int[] mOriginalScissor
protected RectF mClipStageRect
protected boolean mWrapContentWidth
protected boolean mWrapContentHeight
protected Texture mTexture
protected boolean mTextureLoaded
protected UniContainer mUniParent
protected Matrix mMatrixForVertices
protected void updateChildren(int deltaTime)
updateChildren
in class BaseDisplayObject
public boolean draw(GLState glState)
draw
in interface DisplayObject
draw
in class BaseDisplayObject
protected boolean drawChildren(GLState glState)
drawChildren
in class BaseDisplayObject
protected boolean stackChildren(GLState glState)
protected abstract int stackChildAt(GLState glState, StackableObject child, int index)
protected void onPreConcatParentMatrix()
onPreConcatParentMatrix
in class BaseDisplayObject
public Texture getTexture()
getTexture
in interface UniContainer
public void setTexture(Texture texture)
setTexture
in interface UniContainer
texture
- the texture to setpublic GLColor getInheritedColor()
getInheritedColor
in interface Displayable
getInheritedColor
in class BaseDisplayObject
public boolean update(int deltaTime)
update
in interface Displayable
update
in class BaseDisplayObject
public final void invalidate(int flags)
invalidate
in interface Displayable
invalidate
in interface Parentable
invalidate
in class BaseDisplayObject
protected boolean isChildInBounds(StackableObject child)
child
- protected void initCache(GLState glState, PointF size)
public void clearCache()
clearCache
in interface Cacheable
public void dispose()
dispose
in interface Displayable
dispose
in class BaseDisplayObject
public boolean addChild(StackableObject child)
addChild
in interface UniContainer
public boolean addChild(StackableObject child, int index)
addChild
in interface UniContainer
public boolean removeChild(StackableObject child)
removeChild
in interface UniContainer
public boolean removeChild(int index)
public void removeAllChildren()
removeAllChildren
in interface Parentable
public StackableObject getChildAt(int index)
getChildAt
in interface UniContainer
public int getChildIndex(StackableObject child)
getChildIndex
in interface UniContainer
public StackableObject getChildById(java.lang.String id)
getChildById
in interface UniContainer
public boolean swapChildren(StackableObject child1, StackableObject child2)
swapChildren
in interface UniContainer
child1
- child2
- public boolean swapChildren(int index1, int index2)
swapChildren
in interface Parentable
index1
- index2
- public boolean sendChildToTop(StackableObject child)
public boolean sendChildToBottom(StackableObject child)
public int getNumChildren()
getNumChildren
in interface Parentable
getNumGrandChildren()
public int getNumGrandChildren()
getNumGrandChildren
in interface Parentable
getNumChildren()
public int getNumStackedChildren()
getNumStackedChildren
in interface UniContainer
protected void setNumDrawingChildren(int num)
public boolean onTouchEvent(MotionEvent event)
onTouchEvent
in interface Touchable
public void setTouchable(boolean touchable)
setTouchable
in interface Touchable
public boolean isTouchable()
isTouchable
in interface Touchable
public boolean isClippingEnabled()
isClippingEnabled
in interface Parentable
public void setClippingEnabled(boolean clippingEnabled)
setClippingEnabled
in interface Parentable
clippingEnabled
- public boolean isCacheEnabled()
isCacheEnabled
in interface Cacheable
public void setCacheEnabled(boolean cacheEnabled)
setCacheEnabled
in interface Cacheable
cacheEnabled
- public int getCachePolicy()
public void setCachePolicy(int cachePolicy)
cachePolicy
- #Cacheable
public int getCacheProjection()
public void setCacheProjection(int cacheProjection)
public void setChildrenDisplayOrder(java.util.ArrayList<StackableObject> childrenDisplayOrder)
public boolean isWrapContentWidth()
public void setWrapContentWidth(boolean wrapWidth)
public void setWrapContentHeight(boolean wrapHeight)
public boolean isWrapContenHeight()
public void setXMLAttributes(XmlPullParser xmlParser, UIManager manager)
setXMLAttributes
in interface DisplayObject
setXMLAttributes
in class BaseDisplayObject
public void onAdded(Container container)
BaseDisplayObject
onAdded
in interface DisplayObject
onAdded
in class BaseDisplayObject
public void onAdded(UniContainer container)
public void onRemoved()
BaseDisplayObject
onRemoved
in interface Displayable
onRemoved
in class BaseDisplayObject
protected void onAddedChild(StackableObject child)
protected void onRemovedChild(StackableObject child)
public void onAddedToScene(Scene scene)
onAddedToScene
in interface Displayable
onAddedToScene
in class BaseDisplayObject
public void onRemovedFromScene()
onRemovedFromScene
in interface Displayable
onRemovedFromScene
in class BaseDisplayObject
public boolean removeFromParent()
removeFromParent
in interface Displayable
removeFromParent
in class BaseDisplayObject
public final Parentable getParent()
getParent
in interface Displayable
getParent
in class BaseDisplayObject
protected Matrix getParentMatrix()
getParentMatrix
in class BaseDisplayObject
protected void onTextureLoaded(Texture texture)
texture
- public java.lang.String getObjectTree(java.lang.String prefix)
getObjectTree
in interface Displayable
getObjectTree
in class BaseDisplayObject