|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttablelayout.TableLocRec
public class TableLocRec
This class parses the string which specifies the layout for a component. The layout string specifies the column, row, column span, row span, and options for each component. The options field is optional. The options are parsed by the TableOpts class. Components which are not named in the layout specification are positioned in column 0, row 0, with colum and row spans of 1, all the options will be false. If the layout is changed after the TableLocRec is created, then a complete re-layout is performed. Each layout specification is of the form:
name col row [opts]
TableLayout
,
TableOpts
Field Summary | |
---|---|
int |
col
Position of column in table (>=0) |
int |
col_span
Horizontal widget span (>=1) |
TableOpts |
options
Justify, grow and shrink constraint options |
int |
orig_height
Original heigth of the cell |
int |
orig_width
Original width of the cell |
int |
row
Position of row in table (>=0) |
int |
row_span
Vertical widget span (>=1) |
int |
same_height
The height of the cell, changed because of sameHeight constraint |
int |
same_width
The width of the cell, changed because of sameWidth constraint |
Constructor Summary | |
---|---|
TableLocRec()
|
|
TableLocRec(String layout)
|
Method Summary | |
---|---|
Object |
clone()
Creates a clone of the object. |
static int |
compareColSpan(TableLocRec loc1,
TableLocRec loc2)
Compaires the span width of two columns, returns the difference in span width |
static int |
compareRowSpan(TableLocRec loc1,
TableLocRec loc2)
Compaires the span height of two rows, returns the difference in span height |
int |
preferredHeight()
Returns the preferred heigth of the layout component |
int |
preferredWidth()
Returns the preferred width of the layout component |
String |
toString()
Returns the String representation |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int col
public int row
public int col_span
public int row_span
public int orig_width
public int orig_height
public int same_width
public int same_height
public TableOpts options
TableOpts
Constructor Detail |
---|
public TableLocRec()
public TableLocRec(String layout)
layout
- the string that specifies the layoutMethod Detail |
---|
public Object clone()
clone
in class Object
public String toString()
toString
in class Object
public static int compareColSpan(TableLocRec loc1, TableLocRec loc2)
loc1
- the first columnloc2
- the second columnpublic static int compareRowSpan(TableLocRec loc1, TableLocRec loc2)
loc1
- the first rowloc2
- the second rowpublic int preferredWidth()
public int preferredHeight()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |