|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.opengl.gui.layout.LayoutManager
com.threerings.opengl.gui.layout.TableLayout
public class TableLayout
Lays out components in a simple grid arrangement, wherein the width and height of each column and row is defined by the widest preferred width and height of any component in that column and row.
The table layout defaults to left horizontal alignment and top vertical alignment.
| Nested Class Summary | |
|---|---|
static class |
TableLayout.Alignment
An enumeration class representing alignments. |
| Field Summary | |
|---|---|
static TableLayout.Alignment |
BOTTOM
Bottom justifies the table contents within the container. |
static TableLayout.Alignment |
CENTER
Centers the table contents within the container. |
static TableLayout.Alignment |
LEFT
Left justifies the table contents within the container. |
static TableLayout.Alignment |
RIGHT
Right justifies the table contents within the container. |
static TableLayout.Alignment |
STRETCH
Divides the column space among the columns in proportion to their preferred size. |
static TableLayout.Alignment |
TOP
Top justifies the table contents within the container. |
| Constructor Summary | |
|---|---|
TableLayout(int columns)
Creates a table layout with the specified number of columns and a zero pixel gap between rows and columns. |
|
TableLayout(int columns,
int rowgap,
int colgap)
Creates a table layout with the specified number of columns and the specifeid gap between rows and columns. |
|
| Method Summary | |
|---|---|
Dimension |
computePreferredSize(Container target,
int whint,
int hhint)
Computes the preferred size for the supplied container, based on the preferred sizes of its children and the layout policy implemented by this manager. |
void |
layoutContainer(Container target)
Effects the layout policy of this manager on the supplied target, adjusting the size and position of its children based on the size and position of the target at the time of this call. |
TableLayout |
setEqualRows(boolean equalRows)
Configures whether or not the table will force all rows to be a uniform size. |
TableLayout |
setFixedColumn(int column,
boolean fixed)
Configures a column as fixed or free. |
TableLayout |
setHorizontalAlignment(TableLayout.Alignment align)
Configures the horizontal alignment (or stretching) of this table. |
TableLayout |
setVerticalAlignment(TableLayout.Alignment align)
Configures the vertical alignment of this table. |
| Methods inherited from class com.threerings.opengl.gui.layout.LayoutManager |
|---|
addLayoutComponent, getConstraints, removeLayoutComponent |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final TableLayout.Alignment LEFT
public static final TableLayout.Alignment CENTER
public static final TableLayout.Alignment RIGHT
public static final TableLayout.Alignment TOP
public static final TableLayout.Alignment BOTTOM
public static final TableLayout.Alignment STRETCH
setHorizontalAlignment(com.threerings.opengl.gui.layout.TableLayout.Alignment).
| Constructor Detail |
|---|
public TableLayout(int columns)
public TableLayout(int columns,
int rowgap,
int colgap)
| Method Detail |
|---|
public TableLayout setHorizontalAlignment(TableLayout.Alignment align)
public TableLayout setVerticalAlignment(TableLayout.Alignment align)
public TableLayout setFixedColumn(int column,
boolean fixed)
STRETCH horizontal alignment, extra space is divided up among all of the
non-fixed columns. All columns are non-fixed by default.
public TableLayout setEqualRows(boolean equalRows)
public Dimension computePreferredSize(Container target,
int whint,
int hhint)
LayoutManager
computePreferredSize in class LayoutManagerpublic void layoutContainer(Container target)
LayoutManager
layoutContainer in class LayoutManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||