com.badlogic.gdx.scenes.scene2d.ui
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
- All Implemented Interfaces:
- Cullable, Layout
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.
- Author:
- Nathan Sweet
Constructor Summary |
Stack()
|
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Group |
act, addActor, addActorAfter, addActorAt, addActorBefore, applyTransform, clear, computeTransform, drawChildren, findActor, getChildren, hit, isTransform, localToDescendantCoordinates, removeActor, resetTransform, setCullingArea, setStage, setTransform, swapActor, swapActor |
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Actor |
addAction, addCaptureListener, addListener, clearActions, clipBegin, clipBegin, clipEnd, fire, getActions, getCaptureListeners, getColor, getHeight, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getStage, getTop, getTouchable, getWidth, getX, getY, getZIndex, hasParent, isAscendantOf, isDescendantOf, isVisible, localToAscendantCoordinates, localToParentCoordinates, localToStageCoordinates, notify, parentToLocalCoordinates, remove, removeAction, removeCaptureListener, removeListener, rotate, scale, scale, screenToLocalCoordinates, setBounds, setColor, setColor, setHeight, setName, setOrigin, setOriginX, setOriginY, setParent, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setTouchable, setVisible, setWidth, setX, setY, setZIndex, size, size, stageToLocalCoordinates, toBack, toFront, toString, translate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Stack
public Stack()
invalidate
public void invalidate()
- Description copied from interface:
Layout
- Invalidates this actor's layout, causing
Layout.layout()
to happen the next time Layout.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 interface Layout
- Overrides:
invalidate
in class WidgetGroup
add
public void add(Actor actor)
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,
calls
Layout.invalidate()
any each child whose width or height has changed, and calls Layout.validate()
on each child.
This method should almost never be called directly, instead Layout.validate()
should be used.
- Specified by:
layout
in interface Layout
- Overrides:
layout
in class WidgetGroup
getPrefWidth
public float getPrefWidth()
- Specified by:
getPrefWidth
in interface Layout
- Overrides:
getPrefWidth
in class WidgetGroup
getPrefHeight
public float getPrefHeight()
- Specified by:
getPrefHeight
in interface Layout
- Overrides:
getPrefHeight
in class WidgetGroup
getMinWidth
public float getMinWidth()
- Specified by:
getMinWidth
in interface Layout
- Overrides:
getMinWidth
in class WidgetGroup
getMinHeight
public float getMinHeight()
- Specified by:
getMinHeight
in interface Layout
- Overrides:
getMinHeight
in class WidgetGroup
getMaxWidth
public float getMaxWidth()
- Specified by:
getMaxWidth
in interface Layout
- Overrides:
getMaxWidth
in class WidgetGroup
getMaxHeight
public float getMaxHeight()
- Specified by:
getMaxHeight
in interface Layout
- Overrides:
getMaxHeight
in class WidgetGroup
Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)