Class Window

All Implemented Interfaces:
Cullable, Layout
Direct Known Subclasses:
ListClassUsagesWindow, ListenerGroupViewer

public class Window extends Table
  • Field Details

    • headerLayout

      public Table headerLayout
    • title

      public Label title
    • main

      public Table main
    • minWidth

      public float minWidth
    • minHeight

      public float minHeight
    • maxWidth

      public float maxWidth
    • maxHeight

      public float maxHeight
  • Constructor Details

    • Window

      public Window()
    • Window

      public Window(Window.WindowStyle style)
      Will be automatically brought to front when shown. UiLayer will be removed when this window is disposed - create new layer for every new window
  • Method Details

    • getScrollPane

      @Null public ScrollPane getScrollPane()
    • setCloseHandler

      public void setCloseHandler(ObjectConsumer<ObjectConsumer<Boolean>> cb)
    • getStyle

      public Window.WindowStyle getStyle()
    • getHeaderHeight

      public int getHeaderHeight()
    • getContentHeight

      public int getContentHeight()
    • setContents

      public Cell<Actor> setContents(Actor v)
    • getContents

      public Actor getContents()
    • positionChanged

      public void positionChanged()
    • setResizeable

      public void setResizeable(boolean enabled)
    • setDraggable

      public void setDraggable(boolean enabled)
    • flash

      public void flash()
    • bringToFront

      public void bringToFront()
    • getBox

      public static Rectangle getBox(Actor actor, Rectangle out)
    • getBox

      public Rectangle getBox(Rectangle out)
    • getContentBox

      public Rectangle getContentBox(Rectangle out)
    • addListener

      public void addListener(Window.WindowListener listener)
    • removeListener

      public void removeListener(Window.WindowListener listener)
    • getWindowListeners

      public Array<Window.WindowListener> getWindowListeners()
    • setTitle

      public void setTitle(CharSequence str)
      Also updates names of the main inner actors
    • getTitle

      public StringBuilder getTitle()
    • setAnimated

      public void setAnimated(boolean animated)
    • isAnimated

      public boolean isAnimated()
    • isResizeable

      public boolean isResizeable()
    • setAppearAlign

      public void setAppearAlign(int align)
    • alignToPoint

      public void alignToPoint(float x, float y, int align)
    • showAtCursor

      public void showAtCursor()
    • show

      public void show()
    • showAtPoint

      public void showAtPoint(float x, float y)
    • showAtPointAligned

      public void showAtPointAligned(float x, float y, int align)
    • getWindowAlign

      public int getWindowAlign()
    • close

      public void close()
      Close the window. The window will be hidden and won't be removed from the scene. If you want it to be removed, add a WindowListener (closed) and call window.remove() there. If closeHandler is set, it will be called first and may cancel the effect of close()
    • fitToContentSimple

      public void fitToContentSimple()
      Same as fitToContent using current window align, both vertically and horizontally. Current size is not treated as a min size.
    • fitToContent

      public void fitToContent(int cornerPivot, boolean horizontally, boolean vertically, boolean currentSizeIsMin)
    • setPositionByCorner

      public void setPositionByCorner(int corner, float x, float y)
    • setPosition

      public void setPosition(float x, float y, int pivot)
      Description copied from class: Actor
      Sets the position using the specified alignment. Note this may set the position to non-integer coordinates.
      Overrides:
      setPosition in class Actor
    • clampWindowPosition

      public boolean clampWindowPosition()
    • act

      public void act(float delta)
      Description copied from class: Actor
      Updates the actor based on time. Typically this is called each frame by Stage.act(float).

      The default implementation calls Action.act(float) on each action and removes actions that are complete.

      Overrides:
      act in class Group
      Parameters:
      delta - Time in seconds since the last frame.
    • setPosition

      public void setPosition(float x, float y)
      Description copied from class: Actor
      Sets the position of the actor's bottom left corner.
      Overrides:
      setPosition in class Actor
    • setSize

      public void setSize(float width, float height)
      Description copied from class: Actor
      Sets the width and height.
      Overrides:
      setSize in class Actor
    • getMinWidth

      public float getMinWidth()
      Specified by:
      getMinWidth in interface Layout
      Overrides:
      getMinWidth in class Table
    • getMinHeight

      public float getMinHeight()
      Specified by:
      getMinHeight in interface Layout
      Overrides:
      getMinHeight in class Table
    • getMaxWidth

      public float getMaxWidth()
      Description copied from interface: Layout
      Zero indicates no max width.
      Specified by:
      getMaxWidth in interface Layout
      Overrides:
      getMaxWidth in class WidgetGroup
    • getMaxHeight

      public float getMaxHeight()
      Description copied from interface: Layout
      Zero indicates no max height.
      Specified by:
      getMaxHeight in interface Layout
      Overrides:
      getMaxHeight in class WidgetGroup
    • toString

      public String toString()
      Description copied from class: Group
      Returns a description of the actor hierarchy, recursively.
      Overrides:
      toString in class Group
    • moveIntoViewport

      public static Rectangle moveIntoViewport(Rectangle rect, Vector2 viewportSize)