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

java.lang.Object
  extended by bibliothek.gui.dock.station.stack.tab.AbstractTabLayoutManagerPane
      extended by bibliothek.gui.dock.station.stack.tab.MenuLineLayoutPane
All Implemented Interfaces:
TabPaneListener

public class MenuLineLayoutPane
extends AbstractTabLayoutManagerPane

Represents one of the TabPanes that are managed by a MenuLineLayout.

Author:
Benjamin Sigg

Constructor Summary
MenuLineLayoutPane(MenuLineLayout layout, TabPane pane)
          Creates new layout information for pane.
 
Method Summary
 void destroy()
          Informs this layout that it is no longer used and can release any resource.
 int getIndexOfTabAt(Point mouseLocation)
          Searches the index of the tab beneath mouseLocation.
 LayoutBlock getInfo()
          Gets the info Component that is shown on this pane.
 MenuLineLayout getLayout()
          Gets the MenuLineLayout that is using this pane.
protected  MenuLineLayoutPossibility getLayout(Size tabSize, Size menuSize, Size infoSize)
          Creates a possible layout for the given sizes.
 MenuLayoutBlock getMenu()
          Gets the menu that is shown on this pane.
 Dimension getMinimumSize()
          Calculates the minimal size required.
 Dimension getPreferredSize()
          Calculates the preferred size to show all elements.
 TabsLayoutBlock getTabs()
          Gets the tabs that are shown on this pane.
 void infoComponentChanged(TabPane pane, LonelyTabPaneComponent oldInfo, LonelyTabPaneComponent newInfo)
          Called if the TabPane.getInfoComponent() was replaced.
 void layout()
          Updates the number of shown tabs and the boundaries of tabs, menu and info.
 
Methods inherited from class bibliothek.gui.dock.station.stack.tab.AbstractTabLayoutManagerPane
added, controllerChanged, getPane, isUseSmallMinimumSize, removed, selectionChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MenuLineLayoutPane

public MenuLineLayoutPane(MenuLineLayout layout,
                          TabPane pane)
Creates new layout information for pane.

Parameters:
layout - the layout using this pane
pane - the owner of this information
Method Detail

getTabs

public TabsLayoutBlock getTabs()
Gets the tabs that are shown on this pane.

Returns:
the tabs

getInfo

public LayoutBlock getInfo()
Gets the info Component that is shown on this pane.

Returns:
the info component

getMenu

public MenuLayoutBlock getMenu()
Gets the menu that is shown on this pane.

Returns:
the menu

getPreferredSize

public Dimension getPreferredSize()
Calculates the preferred size to show all elements.

Returns:
the preferred size

getMinimumSize

public Dimension getMinimumSize()
Calculates the minimal size required.

Returns:
the minimal size

destroy

public void destroy()
Informs this layout that it is no longer used and can release any resource.


getLayout

public MenuLineLayout getLayout()
Gets the MenuLineLayout that is using this pane.

Returns:
the layout, not null

getIndexOfTabAt

public int getIndexOfTabAt(Point mouseLocation)
Searches the index of the tab beneath mouseLocation.

Parameters:
mouseLocation - the location of the mouse
Returns:
the index of the tab beneath mouseLocation or -1

layout

public void layout()
Updates the number of shown tabs and the boundaries of tabs, menu and info.


getLayout

protected MenuLineLayoutPossibility getLayout(Size tabSize,
                                              Size menuSize,
                                              Size infoSize)
Creates a possible layout for the given sizes.

Parameters:
tabSize - the sizes of the tabs
menuSize - the size of the menu
infoSize - the size of the info component
Returns:
a possible layout

infoComponentChanged

public void infoComponentChanged(TabPane pane,
                                 LonelyTabPaneComponent oldInfo,
                                 LonelyTabPaneComponent newInfo)
Description copied from interface: TabPaneListener
Called if the TabPane.getInfoComponent() was replaced.

Specified by:
infoComponentChanged in interface TabPaneListener
Overrides:
infoComponentChanged in class AbstractTabLayoutManagerPane
Parameters:
pane - the source of this event
oldInfo - the old info component, may be null
newInfo - the new info component, may be null