Class CappedLayout

java.lang.Object
com.blackrook.gui.layout.CappedLayout
All Implemented Interfaces:
GUILayout

public class CappedLayout extends Object implements GUILayout
A layout that orients objects by resizing them.
Author:
Matthew Tropiano
  • Field Details

  • Constructor Details

    • CappedLayout

      public CappedLayout()
      Creates a new capped layout in horizontal style.
    • CappedLayout

      public CappedLayout(CappedLayout.Style style)
      Creates a new capped layout.
      Parameters:
      style - the style of the layout.
  • Method Details

    • resizeChild

      public void resizeChild(GUIObject object, int index, int childTotal)
      Description copied from interface: GUILayout
      Called when a child object needs resizing. DO NOT RESIZE THE PARENT OBJECT IN THIS METHOD, AS IT MAY CAUSE AN INFINITE LOOP TO OCCUR.
      Specified by:
      resizeChild in interface GUILayout
      Parameters:
      object - the object to resize.
      index - the child index while traversing through the list of children.
      childTotal - the total number of children.