Package tripleplay.ui.layout
Class TableLayout
java.lang.Object
tripleplay.ui.Layout
tripleplay.ui.layout.TableLayout
Lays out elements in a simple tabular form, where each row has uniform height.
Frills are kept to a minimum.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Defines a colspan constraint.static class
A configurator for a table column.Nested classes/interfaces inherited from class tripleplay.ui.Layout
Layout.Constraint
-
Field Summary
Modifier and TypeFieldDescriptionstatic final TableLayout.Column
The default column configuration. -
Constructor Summary
ConstructorDescriptionTableLayout
(int columns) Creates a table layout with the specified number of columns, each with the default configuration.TableLayout
(TableLayout.Column... columns) Creates a table layout with the specified columns. -
Method Summary
Modifier and TypeMethodDescriptionConfigures the vertical alignment of cells to the bottom of their row.alignTop()
Configures the vertical alignment of cells to the top of their row.static <T extends Element<?>>
Tcolspan
(T elem, int colspan) Configures a colspan constraint onelem
.int
columns()
Returns the number of columns configured for this table.static TableLayout.Column[]
columns
(int count) Creates an array ofcolumns
columns, each with default configuration.pythagoras.f.Dimension
computeSize
(Container<?> elems, float hintX, float hintY) Computes and returns the size needed to arrange children of the supplied container according to their preferred size, given the specified x and y size hints.Configures cells to be stretched vertically to take up the entire height of their row.gaps
(int rowgap, int colgap) Configures the gap between successive rows and successive columns.void
Lays out the supplied elements into a region of the specified dimensions.minRowHeight
(float minRowHeight) Configures the minimum row height.
-
Field Details
-
COL
The default column configuration.
-
-
Constructor Details
-
TableLayout
public TableLayout(int columns) Creates a table layout with the specified number of columns, each with the default configuration. -
TableLayout
Creates a table layout with the specified columns.
-
-
Method Details
-
columns
Creates an array ofcolumns
columns, each with default configuration. -
colspan
Configures a colspan constraint onelem
. -
gaps
Configures the gap between successive rows and successive columns. The default gap is zero. -
alignTop
Configures the vertical alignment of cells to the top of their row. -
alignBottom
Configures the vertical alignment of cells to the bottom of their row. -
fillHeight
Configures cells to be stretched vertically to take up the entire height of their row. -
minRowHeight
Configures the minimum row height.- Parameters:
minRowHeight
- Minimum row heigh.
-
columns
public int columns()Returns the number of columns configured for this table. -
computeSize
Description copied from class:Layout
Computes and returns the size needed to arrange children of the supplied container according to their preferred size, given the specified x and y size hints.- Specified by:
computeSize
in classLayout
-
layout
Description copied from class:Layout
Lays out the supplied elements into a region of the specified dimensions.
-