|
WUI : API |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.westofj.wui.Widget org.westofj.wui.WAbstractContainer org.westofj.wui.WContainer
A collection of widgets. Containers utilize WLayoutManager
instances
to define how they appear on the display.
Constructor Summary | |
WContainer()
Constructs a container with the default layout. |
|
WContainer(WLayoutManager layoutManager)
Constructs a container with the specified layout manager. |
Method Summary | |
void |
add(Widget widget)
Add the specified widget to the container. |
void |
clear()
Removes all widgets from the container. |
Widget |
get(int index)
Returns the widget at the specified index within the container. |
Widget |
get(String name)
|
WLayoutManager |
getLayoutManager()
Returns the layout manager that renders the display. |
List |
getWidgets()
Returns the widgets contained within the container as a list. |
void |
remove(Widget widget)
Removes the specified widget from the container. |
void |
render(WRunner runner,
WRenderContext context,
PrintWriter out)
Renders the widget to the display. |
void |
replace(Widget current,
Widget next)
Replaces the first occurrance of one widget with another. |
Widget |
set(int index,
Widget widget)
Sets the widget at the specified index. |
void |
setLayoutManager(WLayoutManager layoutManager)
Sets the layout manager that renders the display. |
int |
size()
Returns the number of widgets in the container. |
Methods inherited from class org.westofj.wui.WAbstractContainer |
getBackgroundColor, getBorder, getBorderColor, getBorderStyle, getBorderUnit, getColor, getFont, getHeight, getHeightUnit, getPadding, getPaddingUnit, getSpacing, getSpacingUnit, getWidth, getWidthUnit, setBackgroundColor, setBorder, setBorder, setBorder, setBorderColor, setBorderStyle, setBorderUnit, setColor, setFont, setHeight, setHeight, setHeightUnit, setPadding, setPadding, setPaddingUnit, setSpacing, setSpacingUnit, setWidth, setWidth, setWidthUnit |
Methods inherited from class org.westofj.wui.Widget |
addChangeListener, getRunner, handleNoParams, handleParams, hasChangeListeners, removeChangeListener, stateChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WContainer()
public WContainer(WLayoutManager layoutManager)
layoutManager
- the layout manager that will render the display.Method Detail |
public void add(Widget widget)
widget
- the widget to add to the container.public void clear()
public Widget get(int index)
index
- the index of the widget.
public Widget get(String name)
public final WLayoutManager getLayoutManager()
public List getWidgets()
public void remove(Widget widget)
widget
- the widget to remove from the container.public void render(WRunner runner, WRenderContext context, PrintWriter out) throws WRenderException
Widget
render
in class Widget
runner
- the current runner context.out
- the output for the display.
WRenderException
public void replace(Widget current, Widget next)
current
- the widget to replace.next
- the new widget.public Widget set(int index, Widget widget)
index
- the index of the widget.widget
- the widget to place into the container at the specified
index.
public final void setLayoutManager(WLayoutManager layoutManager)
layoutManager
- the layout manager that renders the display.public int size()
|
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 |