bibliothek.gui.dock.station.stack.tab
Interface TabLayoutManager

All Known Implementing Classes:
AbstractTabLayoutManager, MenuLineLayout, RowLayout

public interface TabLayoutManager

A TabLayoutManager is responsible for managing the location and size of tags, menus and info-component of a TabPane. The manager can make use of LayoutBlocks to simplify its algorithms.

Author:
Benjamin Sigg
See Also:
TabPane.LAYOUT_MANAGER

Method Summary
 int getIndexOfTabAt(TabPane pane, Point mouseLocation)
          Finds out which tab is below the mouse at location mouseLocation.
 Dimension getMinimumSize(TabPane pane)
          Gets the minimal size that TabPane.getAvailableArea() should return.
 Dimension getPreferredSize(TabPane pane)
          Gets the preferred size that TabPane.getAvailableArea() should return.
 void install(TabPane pane)
          Informs this TabLayoutManager that from now on it will have to layout pane.
 void layout(TabPane pane)
          Lays out the tabs on pane, this manager is free to make any layout it wishes.
 void uninstall(TabPane pane)
          Informs this TabLayoutManager that it has no longer to look after pane.
 

Method Detail

layout

void layout(TabPane pane)
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

getMinimumSize

Dimension getMinimumSize(TabPane pane)
Gets the minimal size that TabPane.getAvailableArea() should return.

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

getPreferredSize

Dimension getPreferredSize(TabPane pane)
Gets the preferred size that TabPane.getAvailableArea() should return.

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

getIndexOfTabAt

int getIndexOfTabAt(TabPane pane,
                    Point mouseLocation)
Finds out which tab is below the mouse at location mouseLocation.

Parameters:
pane - the panel for which to search the tab
mouseLocation - the location of the mouse
Returns:
the index of the tab beneath mouseLocation or null

install

void install(TabPane pane)
Informs this TabLayoutManager that from now on it will have to layout pane.

Parameters:
pane - a pane that will be given to layout(TabPane)

uninstall

void uninstall(TabPane pane)
Informs this TabLayoutManager that it has no longer to look after pane.

Parameters:
pane - a TabPane that will no longer be given to layout(TabPane)