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

java.lang.Object
  extended by bibliothek.gui.dock.station.stack.tab.MenuLineLayoutPossibility

public class MenuLineLayoutPossibility
extends java.lang.Object

A possibility for a layout of tabs, menus and actions as described by the MenuLineLayout.

Author:
Benjamin Sigg

Constructor Summary
MenuLineLayoutPossibility(MenuLineLayoutPane pane, Size tab, Size menu, Size info)
          Creates a new layout.
 
Method Summary
 void apply()
          Applies the sizes specified in this layout.
 MenuLineLayoutPane getPane()
          Gets the representation of the TabPane for which which possible layout is evaluated.
 java.awt.Dimension getSize()
          Gets the size this layout requires.
 boolean isPreferred()
          Tells whether this layout is a preferred layout.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MenuLineLayoutPossibility

public MenuLineLayoutPossibility(MenuLineLayoutPane pane,
                                 Size tab,
                                 Size menu,
                                 Size info)
Creates a new layout.

Parameters:
pane - the TabPane for which this possible layout is checked
tab - the size of the tabs, not null
menu - the size of the menu, may be null to indicate that the menu is invisible
info - the size of the info panel, may be null if there is no info panel to show
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isPreferred

public boolean isPreferred()
Tells whether this layout is a preferred layout. A preferred layout shows all tabs, has no menu, and the info panel (if present) has its preferred size.

Returns:
true if this layout is a preferred layout

getPane

public MenuLineLayoutPane getPane()
Gets the representation of the TabPane for which which possible layout is evaluated.

Returns:
the pane, not null

getSize

public java.awt.Dimension getSize()
Gets the size this layout requires.

Returns:
the size

apply

public void apply()
Applies the sizes specified in this layout.