|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StackDockComponent
A StackDockComponent is a Component that can show other Components
.
StackDockComponents are used by StackDockStations
to display their children.
The component has one child which is "selected" (assuming there is at
least one child). This one child should be visible, the other children
should be hidden. The user must have an interface to change the
selection at any time.
A StackDockComponent
should respect the side
at which the tabs are to be placed.
StackDockStation
,
DefaultStackDockComponent
,
JTabbedPane
Method Summary | |
---|---|
void |
addChangeListener(ChangeListener listener)
Adds a ChangeListener to this component. |
void |
addTab(String title,
Icon icon,
Component comp,
Dockable dockable)
Adds a new child at an unspecified location. |
Rectangle |
getBoundsAt(int index)
Gets the location and size of the graphical element that allows the user to select the index 'th child. |
Component |
getComponent()
Gets a Component on which the children of this
StackDockComponent will be displayed. |
int |
getSelectedIndex()
Gets the index of the currently selected dockable |
int |
getTabCount()
Gets the number of children that are added to this StackDockComponent. |
boolean |
hasBorder()
Whether this kind of component already has a border. |
void |
insertTab(String title,
Icon icon,
Component comp,
Dockable dockable,
int index)
Adds a new child at the location index . |
void |
remove(int index)
Removes the child at location index . |
void |
removeAll()
Removes all children from this component |
void |
removeChangeListener(ChangeListener listener)
Removes a ChangeListener which was added earlier. |
void |
setComponentAt(int index,
Component component)
Sets the component which should be shown at tab index . |
void |
setController(DockController controller)
Sets the controller for which this component manages its children. |
void |
setIconAt(int index,
Icon newIcon)
Sets the icon of the child at location index . |
void |
setSelectedIndex(int index)
Selects the component at location index . |
void |
setTabPlacement(TabPlacement tabSide)
Sets at which side tabs should be displayed. |
void |
setTitleAt(int index,
String newTitle)
Sets the title of the child at location index . |
void |
setTooltipAt(int index,
String newTooltip)
Sets the tooltip of the child at location index . |
Method Detail |
---|
void addChangeListener(ChangeListener listener)
ChangeListener
to this component. The listener will be
called when the selected component changes.
listener
- the new listenervoid removeChangeListener(ChangeListener listener)
ChangeListener
which was added earlier.
listener
- the listener to removeint getSelectedIndex()
void setSelectedIndex(int index)
index
.
index
- the index of the selected componentRectangle getBoundsAt(int index)
index
'th child.
index
- the index of the child
null
if the element is not directly visiblevoid addTab(String title, Icon icon, Component comp, Dockable dockable)
title
- the title of the childicon
- an icon to display for the child or null
comp
- the new child to displaydockable
- the Dockable for which the tab is usedvoid insertTab(String title, Icon icon, Component comp, Dockable dockable, int index)
index
.
title
- the title of the childicon
- an icon to display for the child or null
comp
- the new child to displaydockable
- the Dockable for which the tab is usedindex
- the index that the new child should haveint getTabCount()
void removeAll()
void remove(int index)
index
.
index
- the index of the childvoid setTitleAt(int index, String newTitle)
index
.
index
- the index of the childnewTitle
- the new titlevoid setTooltipAt(int index, String newTooltip)
index
.
index
- the index of the childnewTooltip
- the new tooltip, can be null
void setIconAt(int index, Icon newIcon)
index
.
index
- the index of the childnewIcon
- the new icon, null
if no icon
should be displayedvoid setComponentAt(int index, Component component)
index
.
index
- the index where to show component
component
- the new content, not null
void setTabPlacement(TabPlacement tabSide)
tabSide
- the side, not null
Component getComponent()
Component
on which the children of this
StackDockComponent
will be displayed.
Component
void setController(DockController controller)
controller
- the controller or null
boolean hasBorder()
true
if this has a border, false
if the parent should paint one.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |