|
||||||||||
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.DockingContainer
public class DockingContainer
A DockingContainer contains a single content Widget, plus any number of DockableWidgets
.
The DockableWidgets are arranged along one edge of the content Widget, divided into a set of tabs.
The number of tabs, the set of DockableWidgets in each tab, and the order in which they appear are all
configurable.
Once you create one or more DockingContainers and add DockableWidgets to them, the user is free to rearrange them by dragging them with the mouse. This includes reordering the Widgets in a tab, moving them between tabs, moving a Widget from one DockingContainer to a different DockingContainer in the same window, and detaching a Widget so that it appears in a separate dialog.
Whenever the user performs a drag, a DockingEvent
is dispatched to report the event. When the
drag is from one DockingContainer to another one, both the source and target containers will dispatch
events. For drags within a single container, only one event is generated.
Constructor Summary | |
---|---|
DockingContainer()
Create a DockingContainer with no children and tabs along its top edge. |
|
DockingContainer(Widget content,
BTabbedPane.TabPosition tabPosition)
Create a DockingContainer. |
Method Summary | |
---|---|
void |
addDockableWidget(DockableWidget widget)
Add a DockableWidget to this container. |
void |
addDockableWidget(DockableWidget widget,
int tab,
int indexInTab)
Add a new DockableWidget to this container. |
DockableWidget |
getChild(int tab,
int index)
Get a DockableWidget contained in this container. |
int |
getChildCount()
Get the number of children in this container. |
int |
getChildIndexInTab(DockableWidget widget)
Get the position within its tab at which a DockableWidget appears. |
java.util.Collection<Widget> |
getChildren()
Get a Collection containing all child Widgets of this container. |
int |
getChildTabIndex(DockableWidget widget)
Get the index of the tab in which a DockableWidget appears. |
Widget |
getContent()
Get the content Widget. |
boolean |
getHideSingleTab()
When all DockableWidgets are grouped into a single tab, it is possible to save space by hiding the tab. |
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. |
int |
getSelectedTab()
Get which tab is currently displayed. |
BSplitPane |
getSplitPane()
Get the BSplitPane which separates the content Widget from the DockableWidgets. |
int |
getTabChildCount(int tabIndex)
Get the number of DockableWidgets within a particular tab. |
int |
getTabCount()
Get the number of tabs in this container. |
BTabbedPane.TabPosition |
getTabPosition()
Get which side of the content Widget the DockableWidgets appear on. |
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 |
resetToPreferredSizes(int tabIndex)
Reset the positions of the dividers within a single tab based on the preferred sizes of the DockableWidgets it contains. |
void |
setContent(Widget widget)
Set the content Widget. |
void |
setHideSingleTab(boolean hide)
When all DockableWidgets are grouped into a single tab, it is possible to save space by hiding the tab. |
void |
setSelectedTab(int index)
Set which tab is currently displayed. |
void |
setTabPosition(BTabbedPane.TabPosition position)
Set which side of the content Widget the DockableWidgets appear on. |
Methods inherited from class buoy.widget.WidgetContainer |
---|
isOpaque, setOpaque |
Methods inherited from class buoy.widget.Widget |
---|
addEventLink, dispatchEvent, getBackground, getBounds, 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 DockingContainer()
public DockingContainer(Widget content, BTabbedPane.TabPosition tabPosition)
content
- the content WidgettabPosition
- this specifies which side of the content Widget the DockableWidgets will be
placed onMethod Detail |
---|
public Widget getContent()
public void setContent(Widget widget)
public void addDockableWidget(DockableWidget widget)
public void addDockableWidget(DockableWidget widget, int tab, int indexInTab)
widget
- the Widget to addtab
- the index of the tab in which to place the WidgetindexInTab
- the position within the tab at which the Widget should appearpublic int getChildTabIndex(DockableWidget widget)
public int getChildIndexInTab(DockableWidget widget)
public int getTabCount()
public int getTabChildCount(int tabIndex)
public BTabbedPane.TabPosition getTabPosition()
public void setTabPosition(BTabbedPane.TabPosition position)
public int getSelectedTab()
public void setSelectedTab(int index)
public boolean getHideSingleTab()
public void setHideSingleTab(boolean hide)
public void resetToPreferredSizes(int tabIndex)
public int getChildCount()
WidgetContainer
getChildCount
in class WidgetContainer
public java.util.Collection<Widget> getChildren()
WidgetContainer
getChildren
in class WidgetContainer
public DockableWidget getChild(int tab, int index)
tab
- the index of the tab in which the Widget appearsindex
- the index of the Widget within its tabpublic void remove(Widget widget)
WidgetContainer
remove
in class WidgetContainer
public void removeAll()
WidgetContainer
removeAll
in class WidgetContainer
public void layoutChildren()
WidgetContainer
layoutChildren
in class WidgetContainer
public java.awt.Dimension getMinimumSize()
Widget
getMinimumSize
in class Widget
public java.awt.Dimension getPreferredSize()
Widget
getPreferredSize
in class Widget
public BSplitPane getSplitPane()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |