|
WUI : API |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.westofj.wui.WGridLayout
Arranges Widget
components in a WContainer
in a grid.
If rows are specified but the number of columns are 0, the number of columns will be calculated based on the number of widgets in the container.
If columns are specified but the number of rows are 0, the number of rows will be calculated based on the number of widgets in the container.
If both rows and columns are specified, the number of columns takes precedence.
Widgets are rendered into the grid from left to right then top to bottom.
Constructor Summary | |
WGridLayout()
Constructs a grid layout manager. |
|
WGridLayout(int columns,
int rows)
Constructs a grid layout manager with the specified number of rows and columns. |
Method Summary | |
int |
getColumns()
Returns the number of columns. |
WHorizontalAlignment |
getDefaultHorizontalAlignment()
Returns the horizontal alignment of the layout. |
WVerticalAlignment |
getDefaultVerticalAlignment()
Returns the vertical alignment of the layout. |
WHorizontalAlignment |
getHorizontalAlignment(int column)
Returns the horizontal alignment of the column. |
int |
getRows()
Returns the number of rows. |
void |
render(WContainer container,
WRunner runner,
WRenderContext context,
PrintWriter out)
Renders the WContainer . |
void |
setColumns(int columns)
Sets the number of columns in the grid layout. |
void |
setDefaultHorizontalAlignment(WHorizontalAlignment alignment)
Sets the horizontal alignment of the layout to the specified alignment. |
void |
setDefaultVerticalAlignment(WVerticalAlignment alignment)
Sets the vertical alignment of the layout to the specified alignment. |
void |
setHorizontalAlignment(int column,
WHorizontalAlignment alignment)
Sets the horizontal alignment of the column to the specified alignment. |
void |
setRows(int rows)
Sets the number of rows in the grid layout. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WGridLayout()
public WGridLayout(int columns, int rows)
columns
- the number of columns in the layout, 0 indicates not
specified.rows
- the number of rows in the layout, 0 indicates not specified.Method Detail |
public final int getColumns()
public WHorizontalAlignment getDefaultHorizontalAlignment()
public WVerticalAlignment getDefaultVerticalAlignment()
public WHorizontalAlignment getHorizontalAlignment(int column)
public final int getRows()
public final void render(WContainer container, WRunner runner, WRenderContext context, PrintWriter out) throws WRenderException
WLayoutManager
WContainer
.
render
in interface WLayoutManager
container
- the container to render.runner
- the current runner context.out
- the PrintWriter
to which to render the
WContainer
instance.
WRenderException
public final void setColumns(int columns)
columns
- the number of columns in the layout.public void setDefaultHorizontalAlignment(WHorizontalAlignment alignment)
alignment
- the horizontal alignment of the layout.public void setDefaultVerticalAlignment(WVerticalAlignment alignment)
alignment
- the vertical alignment of the layout.public void setHorizontalAlignment(int column, WHorizontalAlignment alignment)
alignment
- the horizontal alignment of the layout.public final void setRows(int rows)
rows
- the number of rows in the layout.
|
Copyright (c) 2003 West of J - All rights reserved. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |