|
||||||||||
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.BToolBar
public class BToolBar
A BToolBar is a WidgetContainer which displays a series of Widgets in a row or column. It is
similar to a RowContainer
or ColumnContainer
, but has a different appearance.
Most often, the child Widgets are BButtons
with icons, and they act as shortcuts for performing
common operations.
Nested Class Summary | |
---|---|
static class |
BToolBar.Orientation
This inner class represents an orientation for the toolbar. |
Field Summary | |
---|---|
static BToolBar.Orientation |
HORIZONTAL
|
static BToolBar.Orientation |
VERTICAL
|
Constructor Summary | |
---|---|
BToolBar()
Create a new BToolBar whose orientation is set to HORIZONTAL. |
|
BToolBar(BToolBar.Orientation orientation)
Create a new BToolBar. |
Method Summary | |
---|---|
void |
add(Widget widget)
Add a Widget (usually a BButton) to the end of the toolbar. |
void |
add(Widget widget,
int index)
Add a Widget (usually a BButton) to the toolbar. |
void |
addSeparator()
Add a dividing line (a BSeparator) to the end of the toolbar. |
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.JToolBar |
getComponent()
Get the java.awt.Component corresponding to this Widget. |
BToolBar.Orientation |
getOrientation()
Get the orientation of this toolbar. |
void |
layoutChildren()
Layout the child Widgets. |
void |
remove(Widget widget)
Remove a child Widget from this container. |
void |
removeAll()
Remove all child Widgets from this container. |
void |
setOrientation(BToolBar.Orientation orientation)
Set the orientation of this toolbar. |
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 BToolBar.Orientation HORIZONTAL
public static final BToolBar.Orientation VERTICAL
Constructor Detail |
---|
public BToolBar()
public BToolBar(BToolBar.Orientation orientation)
orientation
- the orientation of the toolbarMethod Detail |
---|
public javax.swing.JToolBar getComponent()
Widget
getComponent
in class Widget
public BToolBar.Orientation getOrientation()
public void setOrientation(BToolBar.Orientation orientation)
public void add(Widget widget)
widget
- the Widget to addpublic void add(Widget widget, int index)
widget
- the Widget to addindex
- the position at which to add itpublic void addSeparator()
public int getChildCount()
getChildCount
in class WidgetContainer
public Widget getChild(int i)
public java.util.Collection<Widget> getChildren()
getChildren
in class WidgetContainer
public void remove(Widget widget)
remove
in class WidgetContainer
public void removeAll()
removeAll
in class WidgetContainer
public int getChildIndex(Widget widget)
widget
- the Widget to locate
public void layoutChildren()
layoutChildren
in class WidgetContainer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |