|
||||||||||
| 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
buoyx.docking.DockableWidget
public class DockableWidget
This is a Widget that can be added to a DockingContainer, and rearranged by the user. It is a
container which holds a single content Widget and draws a border around it. By clicking on the
border, the user can drag the DockableWidget to any other DockingContainer in the same window,
group the Widgets in a DockingContainer into tabs, and reorder the Widgets within a tab.
The border drawn by this class consists of a fairly simple title bar. You can change the appearance
of the border by creating a subclass and overriding getBorderInsets(),
paintBorder(java.awt.Graphics2D), and isInDragRegion(java.awt.Point).
| Constructor Summary | |
|---|---|
DockableWidget()
Create a DockableWidget with no content Widget or label. |
|
DockableWidget(Widget content,
java.lang.String label)
Create a DockableWidget. |
|
| Method Summary | |
|---|---|
java.awt.Rectangle |
getBounds()
Get the current location and size of this Widget. |
int |
getChildCount()
Get the number of children in this container. |
java.util.Collection<Widget> |
getChildren()
Get a Collection containing all child Widgets of this container. |
Widget |
getContent()
Get the content Widget. |
java.lang.String |
getLabel()
Get the label which appears in the title bar. |
java.awt.Dimension |
getMinimumSize()
Get the smallest size at which this Widget can reasonably be drawn. |
java.awt.Dimension |
getPreferredSize()
Get the preferred size at which this Widget will look best. |
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 |
setContent(Widget widget)
Set the content Widget. |
void |
setLabel(java.lang.String label)
Set the label which appears in the title bar. |
| Methods inherited from class buoy.widget.WidgetContainer |
|---|
isOpaque, setOpaque |
| Methods inherited from class buoy.widget.Widget |
|---|
addEventLink, dispatchEvent, getBackground, getComponent, getCursor, getFont, getMaximumSize, getName, getParent, 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 |
| Constructor Detail |
|---|
public DockableWidget()
public DockableWidget(Widget content,
java.lang.String label)
content - the content Widgetlabel - the label to appear in the title bar| Method Detail |
|---|
public Widget getContent()
public void setContent(Widget widget)
public java.lang.String getLabel()
public void setLabel(java.lang.String label)
public java.awt.Dimension getPreferredSize()
Widget
getPreferredSize in class Widgetpublic java.awt.Dimension getMinimumSize()
Widget
getMinimumSize in class Widgetpublic int getChildCount()
WidgetContainer
getChildCount in class WidgetContainerpublic java.util.Collection<Widget> getChildren()
WidgetContainer
getChildren in class WidgetContainerpublic void remove(Widget widget)
WidgetContainer
remove in class WidgetContainerpublic void removeAll()
WidgetContainer
removeAll in class WidgetContainerpublic void layoutChildren()
WidgetContainer
layoutChildren in class WidgetContainerpublic java.awt.Rectangle getBounds()
Widget
getBounds in class Widget
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||