Package com.ardor3d.extension.ui.layout
Class RowLayout
java.lang.Object
com.ardor3d.extension.ui.layout.UILayout
com.ardor3d.extension.ui.layout.RowLayout
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
boolean
boolean
void
layoutContents
(UIContainer container) Perform the actual layout of the contents in the given container.void
setSpacing
(int spacing) void
updateMinimumSizeFromContents
(UIContainer container) Update the minimum size of this container, based on the contents of the provided container and this layout.
-
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 verticallyexpandsHorizontally
- 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
Description copied from class:UILayout
Perform the actual layout of the contents in the given container.- Specified by:
layoutContents
in classUILayout
- Parameters:
container
- the container to layout
-
updateMinimumSizeFromContents
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 classUILayout
- Parameters:
container
- the container to update
-
getSpacing
public int getSpacing() -
setSpacing
public void setSpacing(int spacing)
-