|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbibliothek.gui.dock.station.stack.CombinedStackDockComponent<C>
C
- the type of the tabspublic abstract class CombinedStackDockComponent<C extends CombinedTab>
A StackDockComponent
which is a combination of other components.
Constructor Summary | |
---|---|
CombinedStackDockComponent()
Constructs a new FlatTab |
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. |
protected abstract C |
createTab(Dockable dockable)
Creates a new tab which will be shown on this component. |
protected abstract void |
destroy(C tab)
Deletes a tab that was earlier created by #createTab() . |
protected void |
fireStateChange()
Sends a ChangeEvent to all registered
ChangeListeners |
Rectangle |
getBoundsAt(int index)
Gets the location and size of the graphical element that allows the user to select the index 'th child. |
JComponent |
getComponent()
Gets a Component on which the children of this
StackDockComponent will be displayed. |
DockController |
getController()
Gets the controller for which this component renders its content. |
int |
getSelectedIndex()
Gets the index of the currently selected component |
C |
getTab(int index)
Gets the index'th tab of this component. |
int |
getTabCount()
Gets the number of children that are added to this StackDockComponent. |
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 |
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 |
setTitleAt(int index,
String newTitle)
Sets the title of the child at location index . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CombinedStackDockComponent()
Method Detail |
---|
public void setController(DockController controller)
StackDockComponent
setController
in interface StackDockComponent
controller
- the controller or null
public DockController getController()
public C getTab(int index)
index
- the index of the tab
protected abstract C createTab(Dockable dockable)
dockable
- the Dockable for which the tab will be used
protected abstract void destroy(C tab)
#createTab()
.
tab
- the tab which is no longer neededpublic void addChangeListener(ChangeListener listener)
StackDockComponent
ChangeListener
to this component. The listener will be
called when the selected component changes.
addChangeListener
in interface StackDockComponent
listener
- the new listenerpublic void removeChangeListener(ChangeListener listener)
StackDockComponent
ChangeListener
which was added earlier.
removeChangeListener
in interface StackDockComponent
listener
- the listener to removeprotected void fireStateChange()
ChangeEvent
to all registered
ChangeListeners
public int getSelectedIndex()
StackDockComponent
getSelectedIndex
in interface StackDockComponent
public void setSelectedIndex(int index)
StackDockComponent
index
.
setSelectedIndex
in interface StackDockComponent
index
- the index of the selected componentpublic Rectangle getBoundsAt(int index)
StackDockComponent
index
'th child.
getBoundsAt
in interface StackDockComponent
index
- the index of the child
public void addTab(String title, Icon icon, Component comp, Dockable dockable)
StackDockComponent
addTab
in interface StackDockComponent
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 usedpublic void insertTab(String title, Icon icon, Component comp, Dockable dockable, int index)
StackDockComponent
index
.
insertTab
in interface StackDockComponent
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 havepublic int getTabCount()
StackDockComponent
getTabCount
in interface StackDockComponent
public void removeAll()
StackDockComponent
removeAll
in interface StackDockComponent
public void remove(int index)
StackDockComponent
index
.
remove
in interface StackDockComponent
index
- the index of the childpublic void setTitleAt(int index, String newTitle)
StackDockComponent
index
.
setTitleAt
in interface StackDockComponent
index
- the index of the childnewTitle
- the new titlepublic void setIconAt(int index, Icon newIcon)
StackDockComponent
index
.
setIconAt
in interface StackDockComponent
index
- the index of the childnewIcon
- the new icon, null
if no icon
should be displayedpublic JComponent getComponent()
StackDockComponent
Component
on which the children of this
StackDockComponent
will be displayed.
getComponent
in interface StackDockComponent
Component
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |