public class EclipseTabPane extends CombinedStackDockComponent<EclipseTab,EclipseMenu,EclipseTabInfo> implements BorderedComponent
EclipseTabPane uses a generic TabPainter to create its
tabs and to change its border.CombinedStackDockComponent.MetaLAYOUT_MANAGER, USE_SMALL_MINIMUM_SIZE| Constructor and Description |
|---|
EclipseTabPane(EclipseTheme theme,
DockStation station)
Creates a new pane.
|
| Modifier and Type | Method and Description |
|---|---|
protected BorderForwarder |
createBorderModifier(JComponent target)
Creates the
BorderForwarder that is used to set the border of this
panel. |
protected BorderForwarder |
createContentBorderModifier(Dockable dockable,
JComponent component)
Creates a
BorderForwarder for the content component for the tab of dockable |
protected CombinedStackDockContentPane |
createContentPane(CombinedStackDockComponent<EclipseTab,EclipseMenu,EclipseTabInfo> self)
Creates the content pane for
this component. |
protected Component |
createLayerAt(Component component,
Dockable dockable)
Creates a layer between
component and this panel. |
Insets |
getContentInsets()
|
JComponent |
getLayerAt(int index)
Gets the index'th
Component on this tab. |
TabPanePainter |
getPainter()
Gets the
TabPanePainter which paints decorations for
this panel. |
DockStation |
getStation()
Gets the station on which this pane lies.
|
TabPainter |
getTabPainter()
Gets the
TabPainter that is currently responsible for creating
new tabs for this pane. |
EclipseTheme |
getTheme()
Gets the theme which created this pane.
|
boolean |
hasBorder()
Whether this kind of component already has a border.
|
int |
indexOfVisible(TabComponent tab)
Gets the index of
tab in respect to the Dockables
of this pane, ignores any invisible tab. |
boolean |
isSingleTabComponent()
Tells whether this
StackDockComponent should be shown even if
the StackDockStation has only one child. |
protected void |
menuRemoved(EclipseMenu menu)
Informs this pane that
menu will never be used again and
all resources associated with menu should be freed. |
EclipseMenu |
newMenu()
Creates a new
TabMenu that has this as parent. |
protected EclipseTab |
newTab(Dockable dockable)
|
void |
setContentBorderAt(int index,
Border border)
Used by
TabComponents and by TabPainters this method
advises the EclipseTabPane to put border
around the contents of tab index. |
void |
setController(DockController controller)
Connects this pane with
controller. |
void |
setInfoComponent(EclipseTabInfo info)
Sets the info component.
|
void |
setPainter(TabPanePainter painter)
Sets the
TabPanePainter which will paint decorations for
this panel. |
protected void |
tabRemoved(EclipseTab tab)
Informs this pane that
tab will never be used again and
all resources associated with tab should be freed. |
void |
updateFullBorder()
Updates the border that is around this whole pane.
|
protected void |
updateTabPainter()
Called when the
TabPainter has been exchanged or to initialize
this EclipseTabPane. |
addStackDockComponentListener, addTab, addToMenu, clearTabs, createBackground, createDefaultRepresentation, fireTabChanged, getAvailableArea, getBoundsAt, getComponent, getConfiguration, getContentAt, getDockableAt, getIndexOfTabAt, getInfoHandler, getMenuHandler, getMinimumSize, getMinimumSize, getOnTab, getPreferredSize, getPreferredSize, getSelectedBounds, getSelectedIndex, getTabAt, getTabCount, getTabHandler, getZOrder, insertTab, moveTab, putOnTab, putTab, remove, removeAll, removeFromMenu, removeStackDockComponentListener, removeTab, repaint, revalidate, setComponentAt, setEnabledAt, setIconAt, setSelectedBounds, setSelectedDockable, setSelectedIndex, setTitleAt, setTooltipAt, setZOrderaddTabPaneListener, createMenu, destroyMenu, discardComponentsAndRebuild, doLayout, fireAdded, fireControllerChanged, fireInfoComponentChanged, fireRemoved, fireSelectionChanged, getController, getDockable, getDockableCount, getDockables, getDockTabPlacement, getInfoComponent, getLayoutManager, getMenu, getMenuList, getMenus, getSelectedDockable, getTab, getTabs, getTabsList, getVisibleTab, getVisibleTabCount, indexOf, indexOfVisible, insert, listeners, move, putInMenu, removeTabPaneListener, setDockTabPlacement, setLayoutManagerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDockTabPlacementgetDockTabPlacement, setDockTabPlacementpublic EclipseTabPane(EclipseTheme theme, DockStation station)
theme - the theme which created this panestation - the owner of this pane, may be nullprotected CombinedStackDockContentPane createContentPane(CombinedStackDockComponent<EclipseTab,EclipseMenu,EclipseTabInfo> self)
CombinedStackDockComponentthis component. This method
may be called by the constructor.createContentPane in class CombinedStackDockComponent<EclipseTab,EclipseMenu,EclipseTabInfo>self - thisnullpublic void setController(DockController controller)
AbstractTabPanecontroller.setController in interface StackDockComponentsetController in class CombinedStackDockComponent<EclipseTab,EclipseMenu,EclipseTabInfo>controller - the realm in which this pane works, may be nullpublic void setInfoComponent(EclipseTabInfo info)
AbstractTabPanesetInfoComponent in class AbstractTabPane<EclipseTab,EclipseMenu,EclipseTabInfo>info - the new component, can be nullAbstractTabPane.getInfoComponent()public EclipseTheme getTheme()
nullpublic DockStation getStation()
public TabPainter getTabPainter()
TabPainter that is currently responsible for creating
new tabs for this pane.protected void updateTabPainter()
TabPainter has been exchanged or to initialize
this EclipseTabPane.public void setPainter(TabPanePainter painter)
TabPanePainter which will paint decorations for
this panel.painter - the new painter, can be nullpublic TabPanePainter getPainter()
TabPanePainter which paints decorations for
this panel.nullpublic void updateFullBorder()
updateFullBorder in interface BorderedComponentprotected BorderForwarder createBorderModifier(JComponent target)
BorderForwarder that is used to set the border of this
panel.target - the target component, not nullnullprotected BorderForwarder createContentBorderModifier(Dockable dockable, JComponent component)
CombinedStackDockComponentBorderForwarder for the content component for the tab of dockablecreateContentBorderModifier in class CombinedStackDockComponent<EclipseTab,EclipseMenu,EclipseTabInfo>dockable - the item that is showncomponent - the component which is influencedprotected EclipseTab newTab(Dockable dockable)
AbstractTabPaneTab that has this as parent and
represents dockable. The new tab should not be stored in
any collection.newTab in class AbstractTabPane<EclipseTab,EclipseMenu,EclipseTabInfo>dockable - the element for which a new tab is requiredprotected void tabRemoved(EclipseTab tab)
AbstractTabPanetab will never be used again and
all resources associated with tab should be freed. This
method is only called if tab is invisible.tabRemoved in class AbstractTabPane<EclipseTab,EclipseMenu,EclipseTabInfo>tab - the tab to destroypublic int indexOfVisible(TabComponent tab)
tab in respect to the Dockables
of this pane, ignores any invisible tab.tab - the tab to searchpublic EclipseMenu newMenu()
AbstractTabPaneTabMenu that has this as parent.newMenu in class AbstractTabPane<EclipseTab,EclipseMenu,EclipseTabInfo>protected void menuRemoved(EclipseMenu menu)
AbstractTabPanemenu will never be used again and
all resources associated with menu should be freed. This
method is only called if menu is invisible.menuRemoved in class AbstractTabPane<EclipseTab,EclipseMenu,EclipseTabInfo>menu - the destroyed menupublic void setContentBorderAt(int index,
Border border)
TabComponents and by TabPainters this method
advises the EclipseTabPane to put border
around the contents of tab index.index - the index of the tabborder - the new border, may be nullprotected Component createLayerAt(Component component, Dockable dockable)
CombinedStackDockComponentcomponent 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.createLayerAt in class CombinedStackDockComponent<EclipseTab,EclipseMenu,EclipseTabInfo>component - the representation of dockabledockable - the element for which a new layer is createdcomponent
or componentpublic JComponent getLayerAt(int index)
CombinedStackDockComponentComponent on this tab. This Component
is not a Dockable but a layer between dockable and this panel.getLayerAt in class CombinedStackDockComponent<EclipseTab,EclipseMenu,EclipseTabInfo>index - the index of a tab.public Insets getContentInsets()
public boolean hasBorder()
StackDockComponenthasBorder in interface StackDockComponenttrue if this has a border, false
if the parent should paint one.public boolean isSingleTabComponent()
StackDockComponentStackDockComponent should be shown even if
the StackDockStation has only one child.isSingleTabComponent in interface StackDockComponenttrue if this component should always be shownCopyright © 2017 Docking Frames. All rights reserved.