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, 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 |
---|
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, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getMatrix, getScene, getSize, globalToLocal, invalidate, 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<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 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 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 Displayable
dispose
in class BaseDisplayObject
public boolean addChild(DisplayObject child)
public boolean addChild(DisplayObject child, int index)
public boolean removeChild(DisplayObject child)
removeChild
in interface Container
public boolean removeChild(int index)
public void removeAllChildren()
removeAllChildren
in interface Parentable
public DisplayObject getChildAt(int index)
getChildAt
in interface Container
public int getChildIndex(DisplayObject child)
getChildIndex
in interface Container
public DisplayObject getChildById(java.lang.String id)
getChildById
in interface Container
public boolean swapChildren(DisplayObject child1, DisplayObject child2)
swapChildren
in interface Container
child1
- child2
- public boolean swapChildren(int index1, int index2)
swapChildren
in interface Parentable
index1
- index2
- public boolean sendChildToTop(DisplayObject child)
public boolean sendChildToBottom(DisplayObject child)
public int getNumChildren()
getNumChildren
in interface Parentable
getNumGrandChildren()
public int getNumGrandChildren()
getNumGrandChildren
in interface Parentable
getNumChildren()
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
- #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 DisplayObject
setXMLAttributes
in class BaseDisplayObject
protected void onAddedChild(DisplayObject child)
protected void onRemovedChild(DisplayObject 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 java.lang.String getObjectTree(java.lang.String prefix)
getObjectTree
in interface Displayable
getObjectTree
in class BaseDisplayObject