Class Stack
- java.lang.Object
-
- com.badlogic.gdx.scenes.scene2d.Actor
-
- com.badlogic.gdx.scenes.scene2d.Group
-
- com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup
-
- com.badlogic.gdx.scenes.scene2d.ui.Stack
-
public class Stack extends WidgetGroup
A stack is a container that sizes its children to its size and positions them at 0,0 on top of each other.The preferred and min size of the stack is the largest preferred and min size of any children. The max size of the stack is the smallest max size of any children.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Actor actor)floatgetMaxHeight()Zero indicates no max height.floatgetMaxWidth()Zero indicates no max width.floatgetMinHeight()floatgetMinWidth()floatgetPrefHeight()floatgetPrefWidth()voidinvalidate()Invalidates this actor's layout, causingLayout.layout()to happen the next timeLayout.validate()is called.voidlayout()Computes and caches any information needed for drawing and, if this actor has children, positions and sizes each child, callsLayout.invalidate()on any each child whose width or height has changed, and callsLayout.validate()on each child.-
Methods inherited from class com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup
childrenChanged, draw, hit, invalidateHierarchy, needsLayout, pack, setFillParent, setLayoutEnabled, sizeChanged, validate
-
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Group
act, addActor, addActorAfter, addActorAt, addActorBefore, applyTransform, applyTransform, clear, clear, clearChildren, clearChildren, computeTransform, debugAll, drawChildren, drawDebug, drawDebugChildren, findActor, getChild, getChildren, getCullingArea, hasChildren, isTransform, localToDescendantCoordinates, removeActor, removeActor, removeActorAt, resetTransform, resetTransform, setCullingArea, setDebug, setStage, setTransform, swapActor, swapActor, toString
-
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Actor
addAction, addCaptureListener, addListener, ancestorsVisible, ascendantsVisible, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, debug, drawDebugBounds, fire, firstAscendant, getActions, getCaptureListeners, getColor, getDebug, getHeight, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getStage, getTop, getTouchable, getUserObject, getWidth, getX, getX, getY, getY, getZIndex, hasActions, hasKeyboardFocus, hasParent, hasScrollFocus, isAscendantOf, isDescendantOf, isTouchable, isTouchFocusListener, isTouchFocusTarget, isVisible, localToActorCoordinates, localToAscendantCoordinates, localToParentCoordinates, localToScreenCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, positionChanged, remove, removeAction, removeCaptureListener, removeListener, rotateBy, rotationChanged, scaleBy, scaleBy, scaleChanged, screenToLocalCoordinates, setBounds, setColor, setColor, setDebug, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setParent, setPosition, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setTouchable, setUserObject, setVisible, setWidth, setX, setX, setY, setY, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, toBack, toFront
-
-
-
-
Constructor Detail
-
Stack
public Stack()
-
Stack
public Stack(Actor... actors)
-
-
Method Detail
-
invalidate
public void invalidate()
Description copied from interface:LayoutInvalidates this actor's layout, causingLayout.layout()to happen the next timeLayout.validate()is called. This method should be called when state changes in the actor that requires a layout but does not change the minimum, preferred, maximum, or actual size of the actor (meaning it does not affect the parent actor's layout).- Specified by:
invalidatein interfaceLayout- Overrides:
invalidatein classWidgetGroup
-
add
public void add(Actor actor)
-
layout
public void layout()
Description copied from interface:LayoutComputes and caches any information needed for drawing and, if this actor has children, positions and sizes each child, callsLayout.invalidate()on any each child whose width or height has changed, and callsLayout.validate()on each child. This method should almost never be called directly, insteadLayout.validate()should be used.- Specified by:
layoutin interfaceLayout- Overrides:
layoutin classWidgetGroup
-
getPrefWidth
public float getPrefWidth()
- Specified by:
getPrefWidthin interfaceLayout- Overrides:
getPrefWidthin classWidgetGroup
-
getPrefHeight
public float getPrefHeight()
- Specified by:
getPrefHeightin interfaceLayout- Overrides:
getPrefHeightin classWidgetGroup
-
getMinWidth
public float getMinWidth()
- Specified by:
getMinWidthin interfaceLayout- Overrides:
getMinWidthin classWidgetGroup
-
getMinHeight
public float getMinHeight()
- Specified by:
getMinHeightin interfaceLayout- Overrides:
getMinHeightin classWidgetGroup
-
getMaxWidth
public float getMaxWidth()
Description copied from interface:LayoutZero indicates no max width.- Specified by:
getMaxWidthin interfaceLayout- Overrides:
getMaxWidthin classWidgetGroup
-
getMaxHeight
public float getMaxHeight()
Description copied from interface:LayoutZero indicates no max height.- Specified by:
getMaxHeightin interfaceLayout- Overrides:
getMaxHeightin classWidgetGroup
-
-