|
WUI : API |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.westofj.wui.Widget
org.westofj.wui.WTabbedPane
A widget that implements a tab control. Multiple widgets may be added to the tab widget along with associated titles. The titles are displayed as a set of tabs. Only one tab is active at at a time. The widget associated with the active tab is displayed, the other widgets are not.
Constructor Summary | |
WTabbedPane()
Constructs a tab pane. |
Method Summary | |
void |
add(WDisplayable title,
Widget widget)
Adds a widget and an associated title to the tab pane. |
void |
clear()
Removes all tabs from the tab pane. |
int |
getSelectedTab()
Returns the index of the selected tab. |
Widget |
getSelectedWidget()
Returns the widget associated with the currently selected tab. |
int |
getTabCount()
Returns the number of tabs contained within the tab pane. |
WDisplayable |
getTitleAt(int index)
Returns the title of the tab at the specified index. |
Widget |
getWidgetAt(int index)
Returns the widget associated with the tab at the specified index. |
int |
getWidth()
Returns the width scalar value. |
WLengthUnit |
getWidthUnit()
Returns the width units. |
protected void |
handleParams(WRunner runner,
String[] values)
|
boolean |
isEnabledAt(int index)
Returns true if the tab at the specified index is enabled, false otherwise. |
void |
remove(int index)
Removes the tab at the specified index from the tab pane. |
void |
render(WRunner runner,
WRenderContext context,
PrintWriter out)
Renders the widget to the display. |
void |
render2(WRunner runner,
WRenderContext context,
PrintWriter out)
|
void |
render3(WRunner runner,
WRenderContext context,
PrintWriter out)
|
void |
setEnabledAt(int index,
boolean enabled)
Enables or disables the tab at the specified index. |
void |
setSelectedTab(int index)
Sets the selected tab to the tab at the specified index. |
void |
setWidth(int width)
Sets the width scalar value. |
void |
setWidth(int width,
WLengthUnit unit)
Sets the width scalar value. |
void |
setWidthUnit(WLengthUnit widthUnit)
Sets the width units. |
Methods inherited from class org.westofj.wui.Widget |
addChangeListener, getRunner, handleNoParams, hasChangeListeners, removeChangeListener, stateChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WTabbedPane()
Method Detail |
public int getWidth()
public void setWidth(int width)
width
- The width to set.public void setWidth(int width, WLengthUnit unit)
width
- The width to set.public WLengthUnit getWidthUnit()
public void setWidthUnit(WLengthUnit widthUnit)
widthUnit
- The width unit type to set.public void add(WDisplayable title, Widget widget)
title
- the title of the tab.widget
- the widget associated with the tab.public void clear()
public int getSelectedTab()
public Widget getSelectedWidget()
public int getTabCount()
public WDisplayable getTitleAt(int index)
index
- the index of the tab.
public Widget getWidgetAt(int index)
index
- the index of the tab.
public boolean isEnabledAt(int index)
index
- the index of the tab.
public void setEnabledAt(int index, boolean enabled)
index
- the index of the tab.enabled
- true if the tab at the specified index is enabled, false
otherwise.public void remove(int index)
index
- the index of the tab.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 render3(WRunner runner, WRenderContext context, PrintWriter out) throws WRenderException
WRenderException
public void render2(WRunner runner, WRenderContext context, PrintWriter out) throws WRenderException
WRenderException
public void setSelectedTab(int index)
index
- the index of the selected tab.protected void handleParams(WRunner runner, String[] values)
handleParams
in class Widget
|
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 |