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

java.lang.Object
  extended by bibliothek.gui.dock.station.stack.CombinedStackDockComponent<FlatTab.FlatButton>
      extended by bibliothek.extension.gui.dock.theme.flat.FlatTab
All Implemented Interfaces:
StackDockComponent

@ColorCodes(value={"stack.tab.border.out.selected","stack.tab.border.center.selected","stack.tab.border.out.focused","stack.tab.border.center.focused","stack.tab.border.out","stack.tab.border.center","stack.tab.border","stack.tab.background.top.selected","stack.tab.background.bottom.selected","stack.tab.background.top.focused","stack.tab.background.bottom.focused","stack.tab.background.top","stack.tab.background.bottom","stack.tab.background","stack.tab.foreground.selected","stack.tab.foreground.focused","stack.tab.foreground"})
public class FlatTab
extends CombinedStackDockComponent<FlatTab.FlatButton>

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

Nested Class Summary
protected  class FlatTab.FlatButton
          A small button which can be clicked by the user.
 
Constructor Summary
FlatTab(StackDockStation station)
          Creates a new FlatTab
 
Method Summary
protected  FlatTab.FlatButton createTab(Dockable dockable)
          Creates a new tab which will be shown on this component.
protected  void destroy(FlatTab.FlatButton tab)
          Deletes a tab that was earlier created by CombinedStackDockComponent.createTab(Dockable).
 boolean hasBorder()
          Whether this kind of component already has a border.
 void setController(DockController controller)
          Sets the controller for which this component manages its children.
 void setSelectedIndex(int index)
          Selects the component at location index.
 
Methods inherited from class bibliothek.gui.dock.station.stack.CombinedStackDockComponent
addChangeListener, addTab, fireStateChange, getBoundsAt, getComponent, getController, getSelectedIndex, getTab, getTabCount, insertTab, remove, removeAll, removeChangeListener, setIconAt, setTitleAt, setTooltipAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlatTab

public FlatTab(StackDockStation station)
Creates a new FlatTab

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

createTab

protected FlatTab.FlatButton createTab(Dockable dockable)
Description copied from class: CombinedStackDockComponent
Creates a new tab which will be shown on this component.

Specified by:
createTab in class CombinedStackDockComponent<FlatTab.FlatButton>
Parameters:
dockable - the Dockable for which the tab will be used
Returns:
the new tab

destroy

protected void destroy(FlatTab.FlatButton tab)
Description copied from class: CombinedStackDockComponent
Deletes a tab that was earlier created by CombinedStackDockComponent.createTab(Dockable).

Specified by:
destroy in class CombinedStackDockComponent<FlatTab.FlatButton>
Parameters:
tab - the tab which is no longer needed

setController

public void setController(DockController controller)
Description copied from interface: StackDockComponent
Sets the controller for which this component manages its children.

Specified by:
setController in interface StackDockComponent
Overrides:
setController in class CombinedStackDockComponent<FlatTab.FlatButton>
Parameters:
controller - the controller or null

setSelectedIndex

public void setSelectedIndex(int index)
Description copied from interface: StackDockComponent
Selects the component at location index.

Specified by:
setSelectedIndex in interface StackDockComponent
Overrides:
setSelectedIndex in class CombinedStackDockComponent<FlatTab.FlatButton>
Parameters:
index - the index of the selected component

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.