|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TabPane
A TabPane is a view onto some component that shows a set of
Dockables. Only one Dockable is visible at any time, the others
are hidden behind the visible Dockable. The user can select
the visible Dockable by clicking onto some button (called
a "tab"). There is always one or none button per Dockable.
TabPane can be seen as an extension of StackDockComponent
providing more control over the content of the component.
| Field Summary | |
|---|---|
static PropertyKey<TabLayoutManager> |
LAYOUT_MANAGER
The layout manager used by any TabPane to set the boundaries of its children. |
| Method Summary | |
|---|---|
void |
addTabPaneListener(TabPaneListener listener)
Adds a listener to this pane, the listener has to be informed when elements are added or removed, and when the selection changes. |
TabMenu |
createMenu()
Creates a new menu for this pane. |
void |
destroyMenu(TabMenu menu)
Destroys menu which was created by
this pane. |
java.awt.Rectangle |
getAvailableArea()
Gets the area in which all the Tabs, TabMenus and
the visible Dockable (setSelectedBounds(Rectangle))
must find their place. |
DockController |
getController()
Gets the DockController this pane is associated with. |
Dockable[] |
getDockables()
Gets a list of all Dockables that are stored on this pane. |
LonelyTabPaneComponent |
getInfoComponent()
Gets the info component, the info component shows some additional information. |
Tab |
getOnTab(Dockable dockable)
Gets the tab-button for dockable, if no tab-button
for dockable exists a new button should be created. |
java.awt.Rectangle |
getSelectedBounds()
Gets the boundaries the selected Dockable
has (independent of whether such a Dockable exists). |
Dockable |
getSelectedDockable()
Gets the currently selected Dockable on this pane (this
is the one child that is visible). |
TabPlacement |
getTabPlacement()
Tells at which side tabs are to be displayed. |
Tab[] |
getTabs()
Gets all the tabs that are currently visible on this pane. |
void |
putInMenu(TabMenu menu,
Dockable dockable)
Adds dockable somewhere on menu. |
Tab |
putOnTab(Dockable dockable)
Informs this pane that its child dockable should have a
tab-button. |
void |
removeTabPaneListener(TabPaneListener listener)
Removes a listener from this pane. |
void |
setSelectedBounds(java.awt.Rectangle bounds)
Sets the boundaries of the selected Dockable. |
| Field Detail |
|---|
static final PropertyKey<TabLayoutManager> LAYOUT_MANAGER
TabPane to set the boundaries of its children.
| Method Detail |
|---|
void addTabPaneListener(TabPaneListener listener)
listener - the new listenervoid removeTabPaneListener(TabPaneListener listener)
listener - the listener to removeDockController getController()
DockController this pane is associated with.
nullDockable[] getDockables()
Dockables that are stored on this pane. The list
should be ordered.
null but maybe emptyDockable getSelectedDockable()
Dockable on this pane (this
is the one child that is visible).
null unless there are no
children at allTabPlacement getTabPlacement()
TabLayoutManager, but may be ignored.
nullTab[] getTabs()
null but maybe empty. Note
that the size of this array must be smaller or equal to the array returned
by getDockables().Tab putOnTab(Dockable dockable)
dockable should have a
tab-button. This TabPane may create a new Tab
or reuse an existing Tab. Reusing an existing tab is
recommended. If dockable was part of a TabMenu,
then it should be removed from that menu.dockable already is on a tab then this tab should be reused.
dockable - the element which needs a tab-button
Tab that is only used for dockable
java.lang.IllegalArgumentException - if dockable is either
null or not child of this paneTab getOnTab(Dockable dockable)
dockable, if no tab-button
for dockable exists a new button should be created. Reusing
existing tabs is recommended. Other than putOnTab(Dockable) this
method must not affect any TabMenu showing Dockable.
dockable - the element whose tab is requested
dockableTabMenu createMenu()
void destroyMenu(TabMenu menu)
menu which was created by
this pane.
menu - a menu to destroy
void putInMenu(TabMenu menu,
Dockable dockable)
dockable somewhere on menu. If dockable
is already shown on another menu or Tab, then it has to
be removed from that other menu or tab.
menu - a menu created by this TabPanedockable - some child of thisputOnTab(Dockable)java.awt.Rectangle getAvailableArea()
Tabs, TabMenus and
the visible Dockable (setSelectedBounds(Rectangle))
must find their place.
width and
height 1.java.awt.Rectangle getSelectedBounds()
selected Dockable
has (independent of whether such a Dockable exists).
nullvoid setSelectedBounds(java.awt.Rectangle bounds)
selected Dockable.
bounds - the boundaries of the selected child
java.lang.IllegalArgumentException - if bounds is nullLonelyTabPaneComponent getInfoComponent()
null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||