bibliothek.gui.dock.station.stack.tab
Class DefaultMenuLineLayoutStrategy
java.lang.Object
bibliothek.gui.dock.station.stack.tab.DefaultMenuLineLayoutStrategy
- All Implemented Interfaces:
- MenuLineLayoutStrategy
public class DefaultMenuLineLayoutStrategy
- extends Object
- implements MenuLineLayoutStrategy
The default implementation of MenuLineLayoutStrategy provides a generic
setting that should work for most cases.
- Author:
- Benjamin Sigg
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultMenuLineLayoutStrategy
public DefaultMenuLineLayoutStrategy()
getScore
public double getScore(MenuLineLayoutPossibility possibility,
Size menuSize,
Size infoSize,
Size tabSize)
- Description copied from interface:
MenuLineLayoutStrategy
- 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.
- Specified by:
getScore in interface MenuLineLayoutStrategy
- Parameters:
possibility - a description of the layout that might be appliedmenuSize - the size of the menu, can be null if the menu is now showninfoSize - the size of the info-component, can be null if the component is not showntabSize - the size of the tabs, can be null if there are no tabs
- Returns:
- the score, a value between
0.0 and 1.0