bibliothek.extension.gui.dock.theme.flat
Class FlatTabPane

java.lang.Object
  extended by bibliothek.gui.dock.station.stack.tab.AbstractTabPane<T,M,I>
      extended by bibliothek.gui.dock.station.stack.CombinedStackDockComponent<FlatTab,FlatMenu,CombinedInfoComponent>
          extended by bibliothek.extension.gui.dock.theme.flat.FlatTabPane
All Implemented Interfaces:
StackDockComponent, TabPane

public class FlatTabPane
extends CombinedStackDockComponent<FlatTab,FlatMenu,CombinedInfoComponent>

A panel that works like a JTabbedPane, but the buttons to change between the children are smaller and "flatter" than the buttons of the JTabbedPane.

Author:
Benjamin Sigg

Field Summary
 
Fields inherited from interface bibliothek.gui.dock.station.stack.tab.TabPane
LAYOUT_MANAGER
 
Constructor Summary
FlatTabPane(StackDockComponentParent parent)
          Creates a new FlatTabPane
 
Method Summary
 DockStation getStation()
           
 boolean hasBorder()
          Whether this kind of component already has a border.
 boolean isSingleTabComponent()
          Tells whether this StackDockComponent should be shown even if the StackDockStation has only one child.
protected  void menuRemoved(FlatMenu menu)
          Informs this pane that menu will never be used again and all resources associated with menu should be freed.
 FlatMenu newMenu()
          Creates a new TabMenu that has this as parent.
protected  FlatTab newTab(Dockable dockable)
          Creates a new Tab that has this as parent and represents dockable.
 void setController(DockController controller)
          Connects this pane with controller.
 void setSelectedBounds(Rectangle bounds)
          Sets the boundaries of the selected Dockable.
protected  void tabRemoved(FlatTab tab)
          Informs this pane that tab will never be used again and all resources associated with tab should be freed.
 
Methods inherited from class bibliothek.gui.dock.station.stack.CombinedStackDockComponent
addChangeListener, addTab, addToMenu, createContentPane, createDefaultRepresentation, createLayerAt, getAvailableArea, getBoundsAt, getComponent, getDockableAt, getInfoHandler, getLayerAt, getMenuHandler, getSelectedBounds, getSelectedIndex, getTabCount, getTabHandler, getZOrder, insertTab, moveTab, putOnTab, remove, removeAll, removeChangeListener, removeFromMenu, repaint, revalidate, setComponentAt, setIconAt, setSelectedDockable, setSelectedIndex, setTitleAt, setTooltipAt, setZOrder
 
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, move, putInMenu, removeTabPaneListener, setInfoComponent, setLayoutManager, setTabPlacement
 
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
setTabPlacement
 

Constructor Detail

FlatTabPane

public FlatTabPane(StackDockComponentParent parent)
Creates a new FlatTabPane

Parameters:
parent - the station which uses this component
Method Detail

newTab

protected FlatTab newTab(Dockable dockable)
Description copied from class: AbstractTabPane
Creates a new Tab that has this as parent and represents dockable. The new tab should not be stored in any collection.

Specified by:
newTab in class AbstractTabPane<FlatTab,FlatMenu,CombinedInfoComponent>
Parameters:
dockable - the element for which a new tab is required
Returns:
the new tab

tabRemoved

protected void tabRemoved(FlatTab tab)
Description copied from class: AbstractTabPane
Informs this pane that tab will never be used again and all resources associated with tab should be freed. This method is only called if tab is invisible.

Specified by:
tabRemoved in class AbstractTabPane<FlatTab,FlatMenu,CombinedInfoComponent>
Parameters:
tab - the tab to destroy

newMenu

public FlatMenu newMenu()
Description copied from class: AbstractTabPane
Creates a new TabMenu that has this as parent.

Specified by:
newMenu in class AbstractTabPane<FlatTab,FlatMenu,CombinedInfoComponent>
Returns:
the new menu

menuRemoved

protected void menuRemoved(FlatMenu menu)
Description copied from class: AbstractTabPane
Informs this pane that menu will never be used again and all resources associated with menu should be freed. This method is only called if menu is invisible.

Specified by:
menuRemoved in class AbstractTabPane<FlatTab,FlatMenu,CombinedInfoComponent>
Parameters:
menu - the destroyed menu

setController

public void setController(DockController controller)
Description copied from class: AbstractTabPane
Connects this pane with controller.

Specified by:
setController in interface StackDockComponent
Overrides:
setController in class CombinedStackDockComponent<FlatTab,FlatMenu,CombinedInfoComponent>
Parameters:
controller - the realm in which this pane works, may be null

setSelectedBounds

public void setSelectedBounds(Rectangle bounds)
Description copied from interface: TabPane
Sets the boundaries of the selected Dockable.

Specified by:
setSelectedBounds in interface TabPane
Overrides:
setSelectedBounds in class CombinedStackDockComponent<FlatTab,FlatMenu,CombinedInfoComponent>
Parameters:
bounds - the boundaries of the selected child

hasBorder

public boolean hasBorder()
Description copied from interface: StackDockComponent
Whether this kind of component already has a border.

Returns:
true if this has a border, false if the parent should paint one.

isSingleTabComponent

public boolean isSingleTabComponent()
Description copied from interface: StackDockComponent
Tells whether this StackDockComponent should be shown even if the StackDockStation has only one child.

Returns:
true if this component should always be shown

getStation

public DockStation getStation()