bibliothek.gui.dock.station.stack.tab
Class MenuLineLayout

java.lang.Object
  extended by bibliothek.gui.dock.station.stack.tab.AbstractTabLayoutManager<MenuLineLayout.Layout>
      extended by bibliothek.gui.dock.station.stack.tab.MenuLineLayout
All Implemented Interfaces:
TabLayoutManager

public class MenuLineLayout
extends AbstractTabLayoutManager<MenuLineLayout.Layout>

Orders tabs in a line, if there is not enough space a menu is used. Also ensures the info-panel has its preferred size.

Author:
Benjamin Sigg

Nested Class Summary
protected  class MenuLineLayout.Layout
          Layout information for a TabPane.
 
Nested classes/interfaces inherited from class bibliothek.gui.dock.station.stack.tab.AbstractTabLayoutManager
AbstractTabLayoutManager.PaneInfo
 
Constructor Summary
MenuLineLayout()
           
 
Method Summary
protected  MenuLineLayout.Layout createInfoFor(TabPane pane)
          Creates a new bag for information about pane.
protected  void destroy(MenuLineLayout.Layout info)
          Called when the information info is no longer required.
protected  AxisConversion getConversion(TabPane pane)
          Creates a new AxisConversion to convert a layout that is at the top of dockables to a layout at the TabPlacement given by pane.
 java.awt.Dimension getMinimumSize(TabPane pane)
          Gets the minimal size that TabPane.getAvailableArea() should return.
 java.awt.Dimension getPreferredSize(TabPane pane)
          Gets the preferred size that TabPane.getAvailableArea() should return.
protected  Size[] getSizes(LayoutBlock block, Size.Type type)
          Collects all the Sizes whose type is type.
protected  Size[] getSizes(Size[] choices, Size.Type type)
          Makes a selection of those Sizes with type.
 void layout(TabPane pane)
          Lays out the tabs on pane, this manager is free to make any layout it wishes.
 
Methods inherited from class bibliothek.gui.dock.station.stack.tab.AbstractTabLayoutManager
getInfo, install, uninstall
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MenuLineLayout

public MenuLineLayout()
Method Detail

createInfoFor

protected MenuLineLayout.Layout createInfoFor(TabPane pane)
Description copied from class: AbstractTabLayoutManager
Creates a new bag for information about pane.

Specified by:
createInfoFor in class AbstractTabLayoutManager<MenuLineLayout.Layout>
Parameters:
pane - some panel
Returns:
the information for pane

destroy

protected void destroy(MenuLineLayout.Layout info)
Description copied from class: AbstractTabLayoutManager
Called when the information info is no longer required.

Specified by:
destroy in class AbstractTabLayoutManager<MenuLineLayout.Layout>
Parameters:
info - the information bag to delete

getMinimumSize

public java.awt.Dimension getMinimumSize(TabPane pane)
Description copied from interface: TabLayoutManager
Gets the minimal size that TabPane.getAvailableArea() should return.

Parameters:
pane - some panel
Returns:
the minimal size of the available area of pane

getPreferredSize

public java.awt.Dimension getPreferredSize(TabPane pane)
Description copied from interface: TabLayoutManager
Gets the preferred size that TabPane.getAvailableArea() should return.

Parameters:
pane - some panel
Returns:
the preferred size of the available area of pane

layout

public void layout(TabPane pane)
Description copied from interface: TabLayoutManager
Lays out the tabs on pane, this manager is free to make any layout it wishes. However, the result should allow the user to still select any tab.

Parameters:
pane - the pane whose tabs should be positioned

getSizes

protected Size[] getSizes(LayoutBlock block,
                          Size.Type type)
Collects all the Sizes whose type is type.

Parameters:
block - the source of the size, may be null
type - the type to search, not null
Returns:
an array containing sizes, may have length 0, never null

getSizes

protected Size[] getSizes(Size[] choices,
                          Size.Type type)
Makes a selection of those Sizes with type.

Parameters:
choices - available sizes
type - the type searched
Returns:
sizes fitting type

getConversion

protected AxisConversion getConversion(TabPane pane)
Creates a new AxisConversion to convert a layout that is at the top of dockables to a layout at the TabPlacement given by pane.

Parameters:
pane - the panel for which the conversion is used
Returns:
the new conversion