public class DisplayGroup extends BaseDisplayObject implements Container, 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<DisplayObject> |
mChildren |
protected java.util.ArrayList<DisplayObject> |
mChildrenDisplayOrder |
protected java.util.HashMap<java.lang.String,DisplayObject> |
mChildrenIds |
protected boolean |
mClippingEnabled |
protected RectF |
mClipStageRect |
protected int |
mNumChildren |
protected int[] |
mOriginalScissor |
protected boolean |
mOriginalScissorEnabled |
protected boolean |
mTouchable |
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, TAGCACHE_WHEN_CHILDREN_CHANGED, CACHE_WHEN_CHILDREN_STABLEFLIP_X, FLIP_YALL, 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 |
|---|
DisplayGroup() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addChild(DisplayObject child) |
boolean |
addChild(DisplayObject child,
int index) |
void |
clearCache()
Clear cache manually when it is no longer needed.
|
void |
dispose() |
boolean |
draw(GLState glState) |
protected boolean |
drawChildren(GLState glState) |
int |
getCachePolicy() |
int |
getCacheProjection() |
DisplayObject |
getChildAt(int index) |
DisplayObject |
getChildById(java.lang.String id) |
int |
getChildIndex(DisplayObject child) |
int |
getNumChildren()
Get the number of children, not including grand children
|
int |
getNumGrandChildren()
Get number of children including grand children
|
java.lang.String |
getObjectTree(java.lang.String prefix)
for Debugging
|
protected void |
initCache(GLState glState,
PointF size) |
boolean |
isCacheEnabled() |
protected boolean |
isChildInBounds(DisplayObject child)
Test to see if a child can be seen in this container.
|
boolean |
isClippingEnabled() |
boolean |
isTouchable() |
boolean |
isWrapContenHeight() |
boolean |
isWrapContentWidth() |
protected void |
onAddedChild(DisplayObject child) |
void |
onAddedToScene(Scene scene) |
protected void |
onRemovedChild(DisplayObject child) |
void |
onRemovedFromScene() |
boolean |
onTouchEvent(MotionEvent event)
Note: This is called from UI-Thread
|
void |
removeAllChildren() |
boolean |
removeChild(DisplayObject child) |
boolean |
removeChild(int index) |
boolean |
sendChildToBottom(DisplayObject child) |
boolean |
sendChildToTop(DisplayObject 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<DisplayObject> childrenDisplayOrder) |
void |
setClippingEnabled(boolean clippingEnabled)
Enable/Disable Bound-clipping.
|
void |
setTouchable(boolean touchable) |
void |
setWrapContentHeight(boolean wrapHeight) |
void |
setWrapContentWidth(boolean wrapWidth) |
void |
setXMLAttributes(XmlPullParser xmlParser,
UIManager manager) |
boolean |
swapChildren(DisplayObject child1,
DisplayObject child2)
Swap the indeces of 2 children.
|
boolean |
swapChildren(int index1,
int index2)
Swap the indeces of 2 children.
|
protected void |
updateChildren(int deltaTime) |
addManipulator, drawBounds, drawEnd, drawStart, drawWireframe, getAlpha, getBlendFunc, getBounds, getColor, getDebugFlags, getFps, getGlobalPosition, getHeight, getId, getInheritedBlendFunc, getInheritedColor, getManipulator, getMask, getMatrix, getNumManipulators, getOrigin, getParent, getParentMatrix, getPivot, getPosition, getRotation, getScale, getScene, getSceneSize, getSize, getSkew, getUIConstraint, getWidth, getX, getY, getZ, globalToLocal, invalidate, invalidate, isAlive, isAlphaTestEnabled, isAutoUpdateBounds, isBypassCameraClipping, isOriginAtCenter, isPerspectiveEnabled, isVisible, localToGlobal, move, moveTo, onAdded, onCreateChildren, onPreConcatParentMatrix, onRemoved, queueEvent, removeAllManipulators, removeFromParent, 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, update, updateBounds, validateclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetMatrix, getScene, getSize, globalToLocal, invalidate, invalidate, localToGlobal, queueEventprotected 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<DisplayObject> mChildren
protected java.util.ArrayList<DisplayObject> mChildrenDisplayOrder
protected java.util.HashMap<java.lang.String,DisplayObject> mChildrenIds
protected int mNumChildren
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 void updateChildren(int deltaTime)
updateChildren in class BaseDisplayObjectpublic boolean draw(GLState glState)
draw in interface DisplayObjectdraw in class BaseDisplayObjectprotected boolean drawChildren(GLState glState)
drawChildren in class BaseDisplayObjectprotected boolean isChildInBounds(DisplayObject child)
child - protected void initCache(GLState glState, PointF size)
public void clearCache()
clearCache in interface Cacheable#setCacheEnabled(boolean)}public void dispose()
dispose in interface Displayabledispose in class BaseDisplayObjectpublic boolean addChild(DisplayObject child)
public boolean addChild(DisplayObject child, int index)
public boolean removeChild(DisplayObject child)
removeChild in interface Containerpublic boolean removeChild(int index)
public void removeAllChildren()
removeAllChildren in interface Parentablepublic DisplayObject getChildAt(int index)
getChildAt in interface Containerpublic int getChildIndex(DisplayObject child)
getChildIndex in interface Containerpublic DisplayObject getChildById(java.lang.String id)
getChildById in interface Containerpublic boolean swapChildren(DisplayObject child1, DisplayObject child2)
swapChildren in interface Containerchild1 - child2 - public boolean swapChildren(int index1,
int index2)
swapChildren in interface Parentableindex1 - index2 - public boolean sendChildToTop(DisplayObject child)
public boolean sendChildToBottom(DisplayObject child)
public int getNumChildren()
getNumChildren in interface ParentablegetNumGrandChildren()public int getNumGrandChildren()
getNumGrandChildren in interface ParentablegetNumChildren()public boolean onTouchEvent(MotionEvent event)
onTouchEvent in interface Touchablepublic void setTouchable(boolean touchable)
setTouchable in interface Touchablepublic boolean isTouchable()
isTouchable in interface Touchablepublic boolean isClippingEnabled()
isClippingEnabled in interface Parentablepublic void setClippingEnabled(boolean clippingEnabled)
setClippingEnabled in interface ParentableclippingEnabled - public boolean isCacheEnabled()
isCacheEnabled in interface Cacheablepublic void setCacheEnabled(boolean cacheEnabled)
setCacheEnabled in interface CacheablecacheEnabled - #setCachePolicy(int)},
#setCacheProjection(int)},
#clearCache()}public int getCachePolicy()
public void setCachePolicy(int cachePolicy)
cachePolicy - #setCacheEnabled(boolean)},
#setCacheProjection(int)},
#clearCache()}public int getCacheProjection()
public void setCacheProjection(int cacheProjection)
cacheProjection - #setCacheEnabled(boolean)},
#setCachePolicy(int)},
#clearCache()}public void setChildrenDisplayOrder(java.util.ArrayList<DisplayObject> 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 DisplayObjectsetXMLAttributes in class BaseDisplayObjectprotected void onAddedChild(DisplayObject child)
protected void onRemovedChild(DisplayObject child)
public void onAddedToScene(Scene scene)
onAddedToScene in interface DisplayableonAddedToScene in class BaseDisplayObjectpublic void onRemovedFromScene()
onRemovedFromScene in interface DisplayableonRemovedFromScene in class BaseDisplayObjectpublic java.lang.String getObjectTree(java.lang.String prefix)
getObjectTree in interface DisplayablegetObjectTree in class BaseDisplayObject