Package com.prineside.tdi2.scene2d.ui
Class Stack
java.lang.Object
com.prineside.tdi2.scene2d.Actor
com.prineside.tdi2.scene2d.Group
com.prineside.tdi2.scene2d.ui.WidgetGroup
com.prineside.tdi2.scene2d.ui.Stack
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.
- Author:
- Nathan Sweet
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
float
Zero indicates no max height.float
Zero indicates no max width.float
float
float
float
void
Invalidates this actor's layout, causingLayout.layout()
to happen the next timeLayout.validate()
is called.void
layout()
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.prineside.tdi2.scene2d.ui.WidgetGroup
draw, getMaxHeightValue, getMaxWidthValue, getMinHeightValue, getMinWidthValue, getPrefHeightValue, getPrefWidthValue, hit, invalidateHierarchy, needsLayout, pack, setFillParent, setLayoutEnabled, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setPrefHeight, setPrefHeight, setPrefWidth, setPrefWidth, setWidth, validate
Methods inherited from class com.prineside.tdi2.scene2d.Group
act, addActor, addActorAfter, addActorAt, addActorBefore, clear, clear, clearChildren, clearChildren, debugAll, drawDebug, findActor, getChild, getChildren, getCullingArea, hasChildren, isTransform, localToDescendantCoordinates, removeActor, removeActor, removeActorAt, setCullingArea, setDebug, setTransform, swapActor, swapActor, toString
Methods inherited from class com.prineside.tdi2.scene2d.Actor
addAction, addCaptureListener, addListener, ancestorsVisible, ascendantsVisible, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, debug, 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, remove, removeAction, removeCaptureListener, removeListener, rotateBy, scaleBy, scaleBy, screenToLocalCoordinates, setBounds, setColor, setColor, setDebug, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setPosition, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setTouchable, setUserObject, setVisible, setX, setX, setY, setY, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, toBack, toFront
-
Constructor Details
-
Stack
public Stack() -
Stack
-
-
Method Details
-
invalidate
public void invalidate()Description copied from interface:Layout
Invalidates 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:
invalidate
in interfaceLayout
- Overrides:
invalidate
in classWidgetGroup
-
add
-
layout
public void layout()Description copied from interface:Layout
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. This method should almost never be called directly, insteadLayout.validate()
should be used.- Specified by:
layout
in interfaceLayout
- Overrides:
layout
in classWidgetGroup
-
getPrefWidth
public float getPrefWidth()- Specified by:
getPrefWidth
in interfaceLayout
- Overrides:
getPrefWidth
in classWidgetGroup
-
getPrefHeight
public float getPrefHeight()- Specified by:
getPrefHeight
in interfaceLayout
- Overrides:
getPrefHeight
in classWidgetGroup
-
getMinWidth
public float getMinWidth()- Specified by:
getMinWidth
in interfaceLayout
- Overrides:
getMinWidth
in classWidgetGroup
-
getMinHeight
public float getMinHeight()- Specified by:
getMinHeight
in interfaceLayout
- Overrides:
getMinHeight
in classWidgetGroup
-
getMaxWidth
public float getMaxWidth()Description copied from interface:Layout
Zero indicates no max width.- Specified by:
getMaxWidth
in interfaceLayout
- Overrides:
getMaxWidth
in classWidgetGroup
-
getMaxHeight
public float getMaxHeight()Description copied from interface:Layout
Zero indicates no max height.- Specified by:
getMaxHeight
in interfaceLayout
- Overrides:
getMaxHeight
in classWidgetGroup
-