BTabbedPane is a WidgetContainer which arranges its child Widgets in a row.
In addition to the event types generated by all Widgets, BTabbedPanes generate the following event types:
add
public void add(Widget widget,
String tabName)
Add a Widget to this container.
widget
- the Widget to addtabName
- the name to display on the tab
add
public void add(Widget widget,
String tabName,
Icon image)
Add a Widget to this container.
widget
- the Widget to addtabName
- the name to display on the tabimage
- the image to display on the tab
add
public void add(Widget widget,
String tabName,
Icon image,
int index)
Add a Widget to this container.
widget
- the Widget to addtabName
- the name to display on the tabimage
- the image to display on the tabindex
- the position at which to add this tab
getChild
public Widget getChild(int i)
Get the i'th child of this container.
getChildIndex
public int getChildIndex(Widget widget)
Get the index of a particular Widget.
widget
- the Widget to locate
- the position of the Widget within this container
getSelectedTab
public int getSelectedTab()
Get the index of the tab which is currently selected.
getTabImage
public Icon getTabImage(int index)
Get the image displayed on a particular tab.
index
- the index of the tab
getTabName
public String getTabName(int index)
Get the name displayed on a particular tab.
index
- the index of the tab
getTabPosition
public BTabbedPane.TabPosition getTabPosition()
Get the position of the tabs (TOP, LEFT, BOTTOM, or RIGHT).
layoutChildren
public void layoutChildren()
Layout the child Widgets. This may be invoked whenever something has changed (the size of this
WidgetContainer, the preferred size of one of its children, etc.) that causes the layout to no
longer be correct. If a child is itself a WidgetContainer, its layoutChildren() method will be
called in turn.
- layoutChildren in interface WidgetContainer
remove
public void remove(Widget widget)
Remove a child Widget from this container.
- remove in interface WidgetContainer
widget
- the Widget to remove
remove
public void remove(int index)
Remove a child Widget from this container.
index
- the index of the Widget to remove
setSelectedTab
public void setSelectedTab(int index)
Set which tab is selected.
index
- the index of the tab
setTabImage
public void setTabImage(int index,
Icon image)
Set the image displayed on a particular tab.
index
- the index of the tabimage
- the image to display
setTabName
public void setTabName(int index,
String name)
Set the name displayed on a particular tab.
index
- the index of the tabname
- the name to display
setTabPosition
public void setTabPosition(BTabbedPane.TabPosition pos)
Set the position of the tabs (TOP, LEFT, BOTTOM, or RIGHT).