|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.station.stack.tab.AbstractTabPane<T,M,I>
bibliothek.gui.dock.station.stack.CombinedStackDockComponent<T,M,I>
T - the type of the tabsM - the type of the menusI - the type of the additinal info panelpublic abstract class CombinedStackDockComponent<T extends CombinedTab,M extends CombinedMenu,I extends CombinedInfoComponent>
A StackDockComponent which is a combination of other components.
This class also implements TabPane and thus supports the
TabLayoutManager.
| Nested Class Summary | |
|---|---|
protected class |
CombinedStackDockComponent.Meta
Meta information about a Dockable that is shown on this
CombinedStackDockComponent. |
| Field Summary |
|---|
| Fields inherited from interface bibliothek.gui.dock.station.stack.tab.TabPane |
|---|
LAYOUT_MANAGER |
| Constructor Summary | |
|---|---|
CombinedStackDockComponent()
Constructs a new component. |
|
| Method Summary | |
|---|---|
void |
addChangeListener(javax.swing.event.ChangeListener listener)
Adds a ChangeListener to this component. |
void |
addTab(java.lang.String title,
javax.swing.Icon icon,
java.awt.Component comp,
Dockable dockable)
Adds a new child at an unspecified location. |
protected void |
addToMenu(M menu,
Dockable dockable)
Adds dockable somewhere to menu |
protected BackgroundAlgorithm |
createBackground(CombinedStackDockComponent<T,M,I> self)
Creates the background algorithm that is used for this component. |
protected BorderForwarder |
createContentBorderModifier(Dockable dockable,
javax.swing.JComponent component)
Creates a BorderForwarder for the content component for the tab of dockable |
protected CombinedStackDockContentPane |
createContentPane(CombinedStackDockComponent<T,M,I> self)
Creates the content pane for this component. |
DockElementRepresentative |
createDefaultRepresentation(DockElement target)
Creates and returns a new DockElementRepresentative representing target,
the new representation is to be used to cover all the empty areas on this StackDockComponent. |
protected java.awt.Component |
createLayerAt(java.awt.Component component,
Dockable dockable)
Creates a layer between component and this panel. |
java.awt.Rectangle |
getAvailableArea()
Gets the area in which all the Tabs, TabMenus and
the visible Dockable (TabPane.setSelectedBounds(Rectangle))
must find their place. |
java.awt.Rectangle |
getBoundsAt(int index)
Gets the location and size of the graphical element that allows the user to select the index'th child. |
javax.swing.JComponent |
getComponent()
Gets a Component on which the children of this
StackDockComponent will be displayed. |
protected CombinedStackDockComponent.Meta |
getContentAt(int index)
Gets the meta information about the components at location index |
Dockable |
getDockableAt(int index)
Gets the Dockable which was placed at the index'th position. |
CombinedHandler<AbstractTabPaneComponent> |
getInfoHandler()
Gets a handler for info components. |
java.awt.Component |
getLayerAt(int index)
Gets the index'th Component on this tab. |
CombinedHandler<CombinedMenu> |
getMenuHandler()
Gets a handler for menus. |
java.awt.Rectangle |
getSelectedBounds()
Gets the boundaries the selected Dockable
has (independent of whether such a Dockable exists). |
int |
getSelectedIndex()
Gets the index of the currently selected dockable |
int |
getTabCount()
Gets the number of children that are added to this StackDockComponent. |
CombinedHandler<CombinedTab> |
getTabHandler()
Gets a handler for tabs. |
protected int |
getZOrder(java.awt.Component component)
Gets the z order of component. |
void |
insertTab(java.lang.String title,
javax.swing.Icon icon,
java.awt.Component comp,
Dockable dockable,
int index)
Adds a new child at the location index. |
void |
moveTab(int source,
int destination)
Moves the tab at source to location destination. |
T |
putOnTab(Dockable dockable)
Informs this pane that its child dockable should have a
tab-button. |
void |
remove(int index)
Removes the index'th element of this pane. |
void |
removeAll()
Removes all elements from this pane. |
void |
removeChangeListener(javax.swing.event.ChangeListener listener)
Removes a ChangeListener which was added earlier. |
protected void |
removeFromMenu(M menu,
Dockable dockable)
Removes dockable from menu. |
void |
repaint()
Repaints the contents of this component. |
void |
revalidate()
Called when the layout of this pane has become invalid, the default behavior is to call AbstractTabPane.doLayout(). |
void |
setComponentAt(int index,
java.awt.Component component)
Sets the component which should be shown at tab index. |
void |
setController(DockController controller)
Connects this pane with controller. |
void |
setIconAt(int index,
javax.swing.Icon newIcon)
Sets the icon of the child at location index. |
void |
setSelectedBounds(java.awt.Rectangle bounds)
Sets the boundaries of the selected Dockable. |
void |
setSelectedDockable(Dockable dockable)
Selects the child dockable of this pane as the one visible
element. |
void |
setSelectedIndex(int index)
Selects the component at location index. |
void |
setTitleAt(int index,
java.lang.String newTitle)
Sets the title of the child at location index. |
void |
setTooltipAt(int index,
java.lang.String newTooltip)
Sets the tooltip of the child at location index. |
protected void |
setZOrder(java.awt.Component component,
int order)
Sets the z order of component, as higher the z order
as later the component is painted, as more components it can overlap. |
| Methods inherited from class bibliothek.gui.dock.station.stack.tab.AbstractTabPane |
|---|
addTabPaneListener, createMenu, destroyMenu, discardComponentsAndRebuild, doLayout, fireAdded, fireInfoComponentChanged, fireRemoved, fireSelectionChanged, getController, getDockable, getDockableCount, getDockables, getInfoComponent, getLayoutManager, getMenu, getMenuList, getMenus, getMinimumSize, getOnTab, getPreferredSize, getSelectedDockable, getTab, getTabPlacement, getTabs, getTabsList, getVisibleTab, getVisibleTabCount, indexOf, indexOfVisible, insert, listeners, menuRemoved, move, newMenu, newTab, putInMenu, removeTabPaneListener, setInfoComponent, setLayoutManager, setTabPlacement, tabRemoved |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface bibliothek.gui.dock.station.stack.StackDockComponent |
|---|
hasBorder, isSingleTabComponent, setTabPlacement |
| Constructor Detail |
|---|
public CombinedStackDockComponent()
| Method Detail |
|---|
protected CombinedStackDockContentPane createContentPane(CombinedStackDockComponent<T,M,I> self)
this component. This method
may be called by the constructor.
self - this
nullprotected BackgroundAlgorithm createBackground(CombinedStackDockComponent<T,M,I> self)
this component. This method
may be called by the constructor.
self - this
nullpublic void revalidate()
AbstractTabPaneAbstractTabPane.doLayout(). Subclasses may override to
update the layout lazily.
revalidate in class AbstractTabPane<T extends CombinedTab,M extends CombinedMenu,I extends CombinedInfoComponent>public void repaint()
public void addChangeListener(javax.swing.event.ChangeListener listener)
StackDockComponentChangeListener to this component. The listener will be
called when the selected component changes.
addChangeListener in interface StackDockComponentlistener - the new listenerpublic void removeChangeListener(javax.swing.event.ChangeListener listener)
StackDockComponentChangeListener which was added earlier.
removeChangeListener in interface StackDockComponentlistener - the listener to removepublic void setController(DockController controller)
AbstractTabPanecontroller.
setController in interface StackDockComponentsetController in class AbstractTabPane<T extends CombinedTab,M extends CombinedMenu,I extends CombinedInfoComponent>controller - the realm in which this pane works, may be nullpublic CombinedHandler<CombinedTab> getTabHandler()
CombinedTabs from this component in order to change
their visibility.
public CombinedHandler<CombinedMenu> getMenuHandler()
CombinedMenus from this component in order to change
their visibility.
public CombinedHandler<AbstractTabPaneComponent> getInfoHandler()
AbstractTabPaneComponents from this component in order to change
their visibility.
public java.awt.Rectangle getAvailableArea()
TabPaneTabs, TabMenus and
the visible Dockable (TabPane.setSelectedBounds(Rectangle))
must find their place.
getAvailableArea in interface TabPanewidth and
height 1.public java.awt.Rectangle getSelectedBounds()
TabPaneselected Dockable
has (independent of whether such a Dockable exists).
getSelectedBounds in interface TabPanenullpublic void setSelectedBounds(java.awt.Rectangle bounds)
TabPaneselected Dockable.
setSelectedBounds in interface TabPanebounds - the boundaries of the selected childpublic int getSelectedIndex()
StackDockComponent
getSelectedIndex in interface StackDockComponentpublic void setSelectedIndex(int index)
StackDockComponentindex.
setSelectedIndex in interface StackDockComponentindex - the index of the selected componentpublic void setSelectedDockable(Dockable dockable)
AbstractTabPanedockable of this pane as the one visible
element.
setSelectedDockable in class AbstractTabPane<T extends CombinedTab,M extends CombinedMenu,I extends CombinedInfoComponent>dockable - the newly selected element, can be nullpublic java.awt.Rectangle getBoundsAt(int index)
StackDockComponentindex'th child.
getBoundsAt in interface StackDockComponentindex - the index of the child
null
if the element is not directly visiblepublic int getTabCount()
StackDockComponent
getTabCount in interface StackDockComponent
public void addTab(java.lang.String title,
javax.swing.Icon icon,
java.awt.Component comp,
Dockable dockable)
StackDockComponent
addTab in interface StackDockComponenttitle - the title of the childicon - an icon to display for the child or nullcomp - the new child to displaydockable - the Dockable for which the tab is used
public void insertTab(java.lang.String title,
javax.swing.Icon icon,
java.awt.Component comp,
Dockable dockable,
int index)
StackDockComponentindex.
insertTab in interface StackDockComponenttitle - the title of the childicon - an icon to display for the child or nullcomp - the new child to displaydockable - the Dockable for which the tab is usedindex - the index that the new child should havepublic Dockable getDockableAt(int index)
StackDockComponentDockable which was placed at the index'th position.
getDockableAt in interface StackDockComponentindex - the position of the element
public void moveTab(int source,
int destination)
StackDockComponentsource to location destination.
moveTab in interface StackDockComponentsource - the item to movedestination - the target destinationpublic void remove(int index)
AbstractTabPaneindex'th element of this pane.
remove in interface StackDockComponentremove in class AbstractTabPane<T extends CombinedTab,M extends CombinedMenu,I extends CombinedInfoComponent>index - the index of the element to removepublic void removeAll()
AbstractTabPane
removeAll in interface StackDockComponentremoveAll in class AbstractTabPane<T extends CombinedTab,M extends CombinedMenu,I extends CombinedInfoComponent>public T putOnTab(Dockable dockable)
TabPanedockable 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.
putOnTab in interface TabPaneputOnTab in class AbstractTabPane<T extends CombinedTab,M extends CombinedMenu,I extends CombinedInfoComponent>dockable - the element which needs a tab-button
Tab that is only used for dockable
protected void addToMenu(M menu,
Dockable dockable)
AbstractTabPanedockable somewhere to menu
addToMenu in class AbstractTabPane<T extends CombinedTab,M extends CombinedMenu,I extends CombinedInfoComponent>menu - a menu of this panedockable - a new child of menu
protected void removeFromMenu(M menu,
Dockable dockable)
AbstractTabPanedockable from menu.
removeFromMenu in class AbstractTabPane<T extends CombinedTab,M extends CombinedMenu,I extends CombinedInfoComponent>menu - some menu of this panedockable - a child of menu
protected java.awt.Component createLayerAt(java.awt.Component component,
Dockable dockable)
component and this panel. The
object component is a representation of dockable
but not necessarily dockable itself. The default
behavior of this method is to return component.
component - the representation of dockabledockable - the element for which a new layer is created
component
or componentpublic java.awt.Component getLayerAt(int index)
Component on this tab. This Component
is not a Dockable but a layer between dockable and this panel.
index - the index of a tab.
protected CombinedStackDockComponent.Meta getContentAt(int index)
index
index - the index of a tab
public void setTitleAt(int index,
java.lang.String newTitle)
StackDockComponentindex.
setTitleAt in interface StackDockComponentindex - the index of the childnewTitle - the new title
public void setTooltipAt(int index,
java.lang.String newTooltip)
StackDockComponentindex.
setTooltipAt in interface StackDockComponentindex - the index of the childnewTooltip - the new tooltip, can be null
public void setIconAt(int index,
javax.swing.Icon newIcon)
StackDockComponentindex.
setIconAt in interface StackDockComponentindex - the index of the childnewIcon - the new icon, null if no icon
should be displayed
public void setComponentAt(int index,
java.awt.Component component)
StackDockComponentindex.
setComponentAt in interface StackDockComponentindex - the index where to show componentcomponent - the new content, not nullpublic javax.swing.JComponent getComponent()
StackDockComponentComponent on which the children of this
StackDockComponent will be displayed.
getComponent in interface StackDockComponentComponent
protected void setZOrder(java.awt.Component component,
int order)
component, as higher the z order
as later the component is painted, as more components it can overlap.
component - some child of this paneorder - the orderprotected int getZOrder(java.awt.Component component)
component.
component - some child of this pane
public DockElementRepresentative createDefaultRepresentation(DockElement target)
StackDockComponentDockElementRepresentative representing target,
the new representation is to be used to cover all the empty areas on this StackDockComponent.
createDefaultRepresentation in interface StackDockComponenttarget - the target for the new representative, may or may not be a child of this component, not null
null if this StackDockComponent does not allow to
use its free spaces
protected BorderForwarder createContentBorderModifier(Dockable dockable,
javax.swing.JComponent component)
BorderForwarder for the content component for the tab of dockable
dockable - the item that is showncomponent - the component which is influenced
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||