|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbuoy.event.EventSource
buoy.widget.Widget
buoy.widget.WidgetContainer
buoy.widget.BTabbedPane
public class BTabbedPane
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:
Nested Class Summary | |
---|---|
static class |
BTabbedPane.TabPosition
This inner class represents a position for the tabs. |
Field Summary | |
---|---|
static BTabbedPane.TabPosition |
BOTTOM
|
static BTabbedPane.TabPosition |
LEFT
|
static BTabbedPane.TabPosition |
RIGHT
|
static BTabbedPane.TabPosition |
TOP
|
Constructor Summary | |
---|---|
BTabbedPane()
Create a new BTabbedPane with the tabs along the top. |
|
BTabbedPane(BTabbedPane.TabPosition pos)
Create a new TabbedContainer. |
Method Summary | |
---|---|
void |
add(Widget widget,
java.lang.String tabName)
Add a Widget to this container. |
void |
add(Widget widget,
java.lang.String tabName,
javax.swing.Icon image)
Add a Widget to this container. |
void |
add(Widget widget,
java.lang.String tabName,
javax.swing.Icon image,
int index)
Add a Widget to this container. |
Widget |
getChild(int i)
Get the i'th child of this container. |
int |
getChildCount()
Get the number of children in this container. |
int |
getChildIndex(Widget widget)
Get the index of a particular Widget. |
java.util.Collection<Widget> |
getChildren()
Get a Collection containing all child Widgets of this container. |
javax.swing.JTabbedPane |
getComponent()
Get the java.awt.Component corresponding to this Widget. |
int |
getSelectedTab()
Get the index of the tab which is currently selected. |
javax.swing.Icon |
getTabImage(int index)
Get the image displayed on a particular tab. |
java.lang.String |
getTabName(int index)
Get the name displayed on a particular tab. |
BTabbedPane.TabPosition |
getTabPosition()
Get the position of the tabs (TOP, LEFT, BOTTOM, or RIGHT). |
void |
layoutChildren()
Layout the child Widgets. |
void |
remove(int index)
Remove a child Widget from this container. |
void |
remove(Widget widget)
Remove a child Widget from this container. |
void |
removeAll()
Remove all child Widgets from this container. |
void |
setSelectedTab(int index)
Set which tab is selected. |
void |
setTabImage(int index,
javax.swing.Icon image)
Set the image displayed on a particular tab. |
void |
setTabName(int index,
java.lang.String name)
Set the name displayed on a particular tab. |
void |
setTabPosition(BTabbedPane.TabPosition pos)
Set the position of the tabs (TOP, LEFT, BOTTOM, or RIGHT). |
Methods inherited from class buoy.widget.WidgetContainer |
---|
isOpaque, setOpaque |
Methods inherited from class buoy.widget.Widget |
---|
addEventLink, dispatchEvent, getBackground, getBounds, getCursor, getFont, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, hasFocus, isEnabled, isFocusable, isVisible, repaint, requestFocus, setBackground, setCursor, setEnabled, setFocusable, setFont, setName, setVisible |
Methods inherited from class buoy.event.EventSource |
---|
addEventLink, addEventLink, removeEventLink |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final BTabbedPane.TabPosition TOP
public static final BTabbedPane.TabPosition LEFT
public static final BTabbedPane.TabPosition BOTTOM
public static final BTabbedPane.TabPosition RIGHT
Constructor Detail |
---|
public BTabbedPane()
public BTabbedPane(BTabbedPane.TabPosition pos)
pos
- the position for the tabs (TOP, LEFT, BOTTOM, or RIGHT)Method Detail |
---|
public javax.swing.JTabbedPane getComponent()
Widget
getComponent
in class Widget
public int getChildCount()
getChildCount
in class WidgetContainer
public Widget getChild(int i)
public java.util.Collection<Widget> getChildren()
getChildren
in class WidgetContainer
public void layoutChildren()
layoutChildren
in class WidgetContainer
public void add(Widget widget, java.lang.String tabName)
widget
- the Widget to addtabName
- the name to display on the tabpublic void add(Widget widget, java.lang.String tabName, javax.swing.Icon image)
widget
- the Widget to addtabName
- the name to display on the tabimage
- the image to display on the tabpublic void add(Widget widget, java.lang.String tabName, javax.swing.Icon image, int index)
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 tabpublic void remove(Widget widget)
remove
in class WidgetContainer
widget
- the Widget to removepublic void remove(int index)
index
- the index of the Widget to removepublic void removeAll()
removeAll
in class WidgetContainer
public int getChildIndex(Widget widget)
widget
- the Widget to locate
public BTabbedPane.TabPosition getTabPosition()
public void setTabPosition(BTabbedPane.TabPosition pos)
public java.lang.String getTabName(int index)
index
- the index of the tabpublic void setTabName(int index, java.lang.String name)
index
- the index of the tabname
- the name to displaypublic javax.swing.Icon getTabImage(int index)
index
- the index of the tabpublic void setTabImage(int index, javax.swing.Icon image)
index
- the index of the tabimage
- the image to displaypublic int getSelectedTab()
public void setSelectedTab(int index)
index
- the index of the tab
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |