libgdx API

com.badlogic.gdx.scenes.scene2d.ui
Class Stack

java.lang.Object
  extended by com.badlogic.gdx.scenes.scene2d.Actor
      extended by com.badlogic.gdx.scenes.scene2d.Group
          extended by com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup
              extended by 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

Field Summary
 
Fields inherited from class com.badlogic.gdx.scenes.scene2d.Group
batchTransform, children, cullingArea, debug, debugTexture, groups, immutableChildren, immutableGroups, lastTouchedChild, localTransform, namesToActors, oldBatchTransform, point, transform, worldTransform
 
Fields inherited from class com.badlogic.gdx.scenes.scene2d.Actor
actions, color, height, name, originX, originY, parent, rotation, scaleX, scaleY, stage, touchable, visible, width, x, y
 
Constructor Summary
Stack()
           
Stack(java.lang.String name)
           
 
Method Summary
 float getMaxHeight()
           
 float getMaxWidth()
           
 float getMinHeight()
           
 float getMinWidth()
           
 float getPrefHeight()
           
 float getPrefWidth()
           
 void layout()
          Computes and caches any information needed for drawing and, if this actor has children, positions and sizes each child and calls Layout.invalidate() and then Layout.validate() on each one.
 
Methods inherited from class com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup
childrenChanged, draw, invalidate, invalidateHierarchy, needsLayout, pack, setFillParent, validate
 
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Group
act, addActor, addActorAfter, addActorAt, addActorBefore, applyTransform, clear, disableDebugging, drawChild, drawChildren, enableDebugging, findActor, getActors, getGroups, hit, isDescendant, removeActor, removeActorRecursive, resetTransform, setCullingArea, sortChildren, swapActor, swapActor, toChildCoordinates, toLocalCoordinates, touchDown, touchMoved, updateTransform
 
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Actor
action, clearActions, getStage, isMarkedToRemove, keyDown, keyTyped, keyUp, markToRemove, remove, scrolled, toLocalCoordinates, toString, touchDragged, touchUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Stack

public Stack()

Stack

public Stack(java.lang.String name)
Method Detail

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 and calls Layout.invalidate() and then Layout.validate() on each one. Usually this should not be called directly, instead Layout.validate() should be used.

Specified by:
layout in interface Layout
Overrides:
layout in class WidgetGroup

getPrefWidth

public float getPrefWidth()

getPrefHeight

public float getPrefHeight()

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

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

libgdx API

Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)