Class RowLayout

java.lang.Object
com.ardor3d.extension.ui.layout.UILayout
com.ardor3d.extension.ui.layout.RowLayout

public class RowLayout extends UILayout
This layout places components in either a horizontal or vertical row, ordered as they are placed in their container. Depending on settings, the layout may also take any extra space in the container and divide it up equally among child components that are marked as "layout resizeable".
  • Constructor Details

    • RowLayout

      public RowLayout(boolean horizontal)
      Construct a new RowLayout
      Parameters:
      horizontal - true if we should lay out horizontally, false if vertically
    • RowLayout

      public RowLayout(boolean horizontal, boolean expandsHorizontally, boolean expandsVertically)
      Construct a new RowLayout
      Parameters:
      horizontal - true if we should lay out horizontally, false if vertically
      expandsHorizontally - true (the default) if horizontal free space in the container should be divided up among the child components.
      expandsVertically - true (the default) if vertical free space in the container should be divided up among the child components.
  • Method Details

    • isHorizontal

      public boolean isHorizontal()
      Returns:
      true if we lay out horizontally, false if vertically
    • isExpandsHorizontally

      public boolean isExpandsHorizontally()
      Returns:
      true (the default) if horizontal free space in the container should be divided up among the child components.
    • isExpandsVertically

      public boolean isExpandsVertically()
      Returns:
      true (the default) if vertical free space in the container should be divided up among the child components.
    • layoutContents

      public void layoutContents(UIContainer container)
      Description copied from class: UILayout
      Perform the actual layout of the contents in the given container.
      Specified by:
      layoutContents in class UILayout
      Parameters:
      container - the container to layout
    • updateMinimumSizeFromContents

      public void updateMinimumSizeFromContents(UIContainer container)
      Description copied from class: UILayout
      Update the minimum size of this container, based on the contents of the provided container and this layout.
      Specified by:
      updateMinimumSizeFromContents in class UILayout
      Parameters:
      container - the container to update
    • getSpacing

      public int getSpacing()
    • setSpacing

      public void setSpacing(int spacing)