|
||||||||||
| 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. |
static PropertyKey<Boolean> |
USE_SMALL_MINIMUM_SIZE
When calculating the minimum size of a TabPane, then prefer using really small minimum sizes
over showing the content correctly. |
| 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. |
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. |
TabPlacement |
getDockTabPlacement()
Tells at which side tabs are to be displayed. |
LonelyTabPaneComponent |
getInfoComponent()
Gets the info component, the info component shows some additional information. |
Dimension |
getMinimumSize(Dockable dockable)
Gets the minimum size that is required to show the child dockable. |
Tab |
getOnTab(Dockable dockable)
Gets the tab-button for dockable, if no tab-button
for dockable exists a new button should be created. |
Dimension |
getPreferredSize(Dockable dockable)
Gets the preferred size that is required to show the child dockable. |
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). |
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(Rectangle bounds)
Sets the boundaries of the selected Dockable. |
void |
setSelectedDockable(Dockable dockable)
Sets the dockable which is current selected on this pane. |
| Field Detail |
|---|
static final PropertyKey<TabLayoutManager> LAYOUT_MANAGER
TabPane to set the boundaries of its children.
static final PropertyKey<Boolean> USE_SMALL_MINIMUM_SIZE
TabPane, then prefer using really small minimum sizes
over showing the content correctly.
| 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 emptyDimension getMinimumSize(Dockable dockable)
dockable.
dockable - one of the children of this pane
dockableDimension getPreferredSize(Dockable dockable)
dockable.
dockable - one of the children of this pane
dockableDockable getSelectedDockable()
Dockable on this pane (this
is the one child that is visible).
null unless there are no
children at allvoid setSelectedDockable(Dockable dockable)
Dockable that is already a child of this pane.
dockable - the newly selected dockableTabPlacement getDockTabPlacement()
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
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)Rectangle getAvailableArea()
Tabs, TabMenus and
the visible Dockable (setSelectedBounds(Rectangle))
must find their place.
width and
height 1.Rectangle getSelectedBounds()
selected Dockable
has (independent of whether such a Dockable exists).
nullvoid setSelectedBounds(Rectangle bounds)
selected Dockable.
bounds - the boundaries of the selected child
IllegalArgumentException - if bounds is nullLonelyTabPaneComponent getInfoComponent()
null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||