|
||||||||||
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
Dockable
s. 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. |
Rectangle |
getAvailableArea()
Gets the area in which all the Tab s, TabMenu s 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 Dockable s 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.
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.
null
Dockable[] getDockables()
Dockable
s 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
dockable
Dimension getPreferredSize(Dockable dockable)
dockable
.
dockable
- one of the children of this pane
dockable
Dockable 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.
null
Tab[] 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
dockable
TabMenu createMenu()
void destroyMenu(TabMenu menu)
menu
which was created
by
this pane.
menu
- a menu to destroyvoid 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 TabPane
dockable
- some child of thisputOnTab(Dockable)
Rectangle getAvailableArea()
Tab
s, TabMenu
s 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).
null
void setSelectedBounds(Rectangle bounds)
selected Dockable
.
bounds
- the boundaries of the selected child
IllegalArgumentException
- if bounds
is null
LonelyTabPaneComponent getInfoComponent()
null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |