Class Stack

All Implemented Interfaces:
Cullable
Direct Known Subclasses:
ItemImage, MultiReqImage, ReqImage

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.

  • Constructor Details

    • Stack

      public Stack()
    • Stack

      public Stack(Element... actors)
  • Method Details

    • invalidate

      public void invalidate()
      Description copied from class: Element
      Invalidates this actor's layout, causing Element.layout() to happen the next time Element.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).
      Overrides:
      invalidate in class WidgetGroup
    • add

      public void add(Element actor)
    • layout

      public void layout()
      Description copied from class: Element
      Computes and caches any information needed for drawing and, if this actor has children, positions and sizes each child, calls Element.invalidate() on any each child whose width or height has changed, and calls Element.validate() on each child. This method should almost never be called directly, instead Element.validate() should be used.
      Overrides:
      layout in class WidgetGroup
    • getPrefWidth

      public float getPrefWidth()
      Overrides:
      getPrefWidth in class WidgetGroup
    • getPrefHeight

      public float getPrefHeight()
      Overrides:
      getPrefHeight in class WidgetGroup
    • getMinWidth

      public float getMinWidth()
      Overrides:
      getMinWidth in class WidgetGroup
    • getMinHeight

      public float getMinHeight()
      Overrides:
      getMinHeight in class WidgetGroup