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

java.lang.Object
  extended by bibliothek.gui.dock.station.stack.tab.TabComponentLayoutManager
All Implemented Interfaces:
LayoutManager

public class TabComponentLayoutManager
extends Object
implements LayoutManager

A LayoutManager that can be used by Components that show an OrientedLabel and a ButtonPanel.

Author:
Benjamin Sigg

Constructor Summary
TabComponentLayoutManager(OrientedLabel label, ButtonPanel panel)
          Creates a new layout manager.
 
Method Summary
 void addLayoutComponent(String name, Component comp)
           
 int getFreeSpaceBetweenLabelAndActions()
          Gets the size of the gap between text/icon and actions.
 int getFreeSpaceToOpenSide()
          Gets the size of the open side.
 int getFreeSpaceToParallelBorder()
          Gets the size of the border at the side of the Dockable
 int getFreeSpaceToSideBorder()
          Gets the size of the free space between the borders that are on the same line as the text/icon and the actions.
 void layoutContainer(Container parent)
           
 Dimension minimumLayoutSize(Container parent)
           
 Dimension preferredLayoutSize(Container parent)
           
 void removeLayoutComponent(Component comp)
           
 void setFreeSpaceBetweenLabelAndActions(int freeSpaceBetweenLabelAndActions)
          Sets the size of the gap that is between the label (icon and text) and the DockActions (if there are any).
 void setFreeSpaceToOpenSide(int freeSpaceToOpenSide)
          Sets the size of the free space between content and the open side.
 void setFreeSpaceToParallelBorder(int freeSpaceToParallelBorder)
          Sets the size of the free space between content and the border at the side of the Dockable.
 void setFreeSpaceToSideBorder(int freeSpaceToSideBorder)
          Sets the size of the free space between the borders that are on the same line as the text/icon and the actions.
 void setOrientation(TabPlacement orientation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TabComponentLayoutManager

public TabComponentLayoutManager(OrientedLabel label,
                                 ButtonPanel panel)
Creates a new layout manager.

Parameters:
label - the label shown on the tab
panel - the actions shown on the tab
Method Detail

setFreeSpaceToOpenSide

public void setFreeSpaceToOpenSide(int freeSpaceToOpenSide)
Sets the size of the free space between content and the open side.

Parameters:
freeSpaceToOpenSide - the size

getFreeSpaceToOpenSide

public int getFreeSpaceToOpenSide()
Gets the size of the open side.

Returns:
the size
See Also:
setFreeSpaceToOpenSide(int)

setFreeSpaceBetweenLabelAndActions

public void setFreeSpaceBetweenLabelAndActions(int freeSpaceBetweenLabelAndActions)
Sets the size of the gap that is between the label (icon and text) and the DockActions (if there are any).

Parameters:
freeSpaceBetweenLabelAndActions - the size

getFreeSpaceBetweenLabelAndActions

public int getFreeSpaceBetweenLabelAndActions()
Gets the size of the gap between text/icon and actions.

Returns:
the size
See Also:
setFreeSpaceBetweenLabelAndActions(int)

setFreeSpaceToParallelBorder

public void setFreeSpaceToParallelBorder(int freeSpaceToParallelBorder)
Sets the size of the free space between content and the border at the side of the Dockable.

Parameters:
freeSpaceToParallelBorder - the size

getFreeSpaceToParallelBorder

public int getFreeSpaceToParallelBorder()
Gets the size of the border at the side of the Dockable

Returns:
the size
See Also:
setFreeSpaceToParallelBorder(int)

setFreeSpaceToSideBorder

public void setFreeSpaceToSideBorder(int freeSpaceToSideBorder)
Sets the size of the free space between the borders that are on the same line as the text/icon and the actions.

Parameters:
freeSpaceToSideBorder - the size

getFreeSpaceToSideBorder

public int getFreeSpaceToSideBorder()
Gets the size of the free space between the borders that are on the same line as the text/icon and the actions.

Returns:
the size
See Also:
setFreeSpaceToSideBorder(int)

setOrientation

public void setOrientation(TabPlacement orientation)

addLayoutComponent

public void addLayoutComponent(String name,
                               Component comp)
Specified by:
addLayoutComponent in interface LayoutManager

preferredLayoutSize

public Dimension preferredLayoutSize(Container parent)
Specified by:
preferredLayoutSize in interface LayoutManager

layoutContainer

public void layoutContainer(Container parent)
Specified by:
layoutContainer in interface LayoutManager

minimumLayoutSize

public Dimension minimumLayoutSize(Container parent)
Specified by:
minimumLayoutSize in interface LayoutManager

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Specified by:
removeLayoutComponent in interface LayoutManager