|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wings.SAbstractLayoutManager
org.wings.SGridLayout
public class SGridLayout
Swing-like grid layout.
| Field Summary | |
|---|---|
protected int |
border
|
protected int |
cols
|
protected ArrayList |
components
|
protected int |
hgap
The horizontal gap (in pixels) specifiying the space between columns. |
protected boolean |
renderFirstLineAsHeader
|
protected int |
rows
|
protected int |
vgap
The vertical gap (in pixels) which specifiying the space between rows. |
| Fields inherited from class org.wings.SAbstractLayoutManager |
|---|
cg, container, preferredSize |
| Fields inherited from interface org.wings.SConstants |
|---|
BASELINE, BLOCK_ALIGN, BOTTOM, BOTTOM_ALIGN, CENTER, CENTER_ALIGN, HORIZONTAL, JUSTIFY, LEFT, LEFT_ALIGN, NO_ALIGN, RIGHT, RIGHT_ALIGN, TOP, TOP_ALIGN, UID_DIVIDER, VERTICAL |
| Constructor Summary | |
|---|---|
SGridLayout()
creates a new grid layout with 1 row and 1 column extent |
|
SGridLayout(int cols)
creats a new grid layout with the given number of columns |
|
SGridLayout(int rows,
int cols)
creats a new grid layout with the given number of columns and rows |
|
SGridLayout(int rows,
int cols,
int hgap,
int vgap)
creats a new grid layout with the given number of columns and rows and the given gaps |
|
| Method Summary | |
|---|---|
void |
addComponent(SComponent c,
Object constraint,
int index)
Adds a component to the layout manager |
int |
getBorder()
Typical PLAFs will render this layout as invisible table (border = 0). |
int |
getColumns()
returns the number of columns |
List |
getComponents()
returns a list of all components |
int |
getHgap()
Gets the horizontal gap between components in pixel. |
boolean |
getRenderFirstLineAsHeader()
setRenderFirstLineAsHeader(boolean) |
int |
getRows()
returns the number of rows |
int |
getVgap()
Gets the vertical gap between components in pixel. |
void |
removeComponent(SComponent c)
Removes a component from the layout manager |
void |
setBorder(int borderWidth)
Typical PLAFs will render this layout as invisible table (border = 0). |
void |
setColumns(int c)
sets the number of columns |
void |
setHgap(int hgap)
Sets the horizontal gap between components to the specified value in pixe. |
void |
setRenderFirstLineAsHeader(boolean renderAsTH)
Renders the first line as HTML <th> instead regular <tr>. |
void |
setRows(int r)
sets the number of rows |
void |
setVgap(int vgap)
Sets the vertical gap between components to the specified value in pixel. |
| Methods inherited from class org.wings.SAbstractLayoutManager |
|---|
getCG, getContainer, getPreferredSize, setCG, setContainer, setPreferredSize, updateCG, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ArrayList components
protected int rows
protected int cols
protected int border
protected boolean renderFirstLineAsHeader
protected int hgap
protected int vgap
| Constructor Detail |
|---|
public SGridLayout()
public SGridLayout(int cols)
cols - number of columns
public SGridLayout(int rows,
int cols)
rows - number of rowscols - number of columns
public SGridLayout(int rows,
int cols,
int hgap,
int vgap)
rows - number of rowscols - number of columnshgap - horizontal gapvgap - vertical gap| Method Detail |
|---|
public void setColumns(int c)
c - number of columnspublic int getColumns()
public void setRows(int r)
r - number of rowspublic int getRows()
public void addComponent(SComponent c,
Object constraint,
int index)
SLayoutManager
c - The new componentconstraint - A (sometimes optional) constraint objectpublic void removeComponent(SComponent c)
SLayoutManager
c - The new componentpublic List getComponents()
public int getHgap()
public void setHgap(int hgap)
hgap - the horizontal gap between componentspublic int getVgap()
public void setVgap(int vgap)
vgap - the vertical gap between componentspublic void setBorder(int borderWidth)
setBorder in interface SLayoutManagersetBorder in class SAbstractLayoutManagerborderWidth - The rendered border with in pixelpublic int getBorder()
getBorder in interface SLayoutManagergetBorder in class SAbstractLayoutManagerpublic void setRenderFirstLineAsHeader(boolean renderAsTH)
<th> instead regular <tr>.
renderAsTH - true if first line should be rendered as headerpublic boolean getRenderFirstLineAsHeader()
setRenderFirstLineAsHeader(boolean)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||