|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jmex.bui.layout.BLayoutManager
com.jmex.bui.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. |
protected class |
TableLayout.Metrics
|
| Field Summary | |
|---|---|
protected int |
_colgap
|
protected boolean |
_equalRows
|
protected boolean[] |
_fixedColumns
|
protected TableLayout.Alignment |
_halign
|
protected HashMap<BComponent,Dimension> |
_pscache
|
protected int |
_rowgap
|
protected TableLayout.Alignment |
_valign
|
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 | |
|---|---|
protected TableLayout.Metrics |
computeMetrics(BContainer target,
boolean preferred,
int whint)
|
Dimension |
computePreferredSize(BContainer 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. |
protected int |
computeRows(BContainer target,
boolean preferred)
|
void |
layoutContainer(BContainer 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. |
protected int |
sum(int[] values)
|
| Methods inherited from class com.jmex.bui.layout.BLayoutManager |
|---|
addLayoutComponent, removeLayoutComponent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, 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.jmex.bui.layout.TableLayout.Alignment).
protected TableLayout.Alignment _halign
protected TableLayout.Alignment _valign
protected boolean _equalRows
protected int _rowgap
protected int _colgap
protected boolean[] _fixedColumns
protected HashMap<BComponent,Dimension> _pscache
| 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(BContainer target,
int whint,
int hhint)
BLayoutManager
computePreferredSize in class BLayoutManagerpublic void layoutContainer(BContainer target)
BLayoutManager
layoutContainer in class BLayoutManager
protected TableLayout.Metrics computeMetrics(BContainer target,
boolean preferred,
int whint)
protected int computeRows(BContainer target,
boolean preferred)
protected int sum(int[] values)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||