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

All Known Implementing Classes:
DefaultMenuLineLayoutStrategy

public interface MenuLineLayoutStrategy

Provides customizeable algorithms used by the MenuLineLayout, these algorithms tell how exactly to lay out the items of a TabPane.

Author:
Benjamin Sigg

Method Summary
 double getScore(MenuLineLayoutPossibility possibility, Size menuSize, Size infoSize, Size tabSize)
          Calculates how good a layout with the given sizes is.
 

Method Detail

getScore

double getScore(MenuLineLayoutPossibility possibility,
                Size menuSize,
                Size infoSize,
                Size tabSize)
Calculates how good a layout with the given sizes is. To calculate the score the method may call Size.getScore(). MenuLineLayout will create different combinations of Size, call this method, and use the one combination with the highest score.

Parameters:
possibility - a description of the layout that might be applied
menuSize - the size of the menu, can be null if the menu is now shown
infoSize - the size of the info-component, can be null if the component is not shown
tabSize - the size of the tabs, can be null if there are no tabs
Returns:
the score, a value between 0.0 and 1.0