bibliothek.gui.dock.station.stack.tab.layouting
Class LineTabsLayoutBlock

java.lang.Object
  extended by bibliothek.gui.dock.station.stack.tab.layouting.TabsLayoutBlock
      extended by bibliothek.gui.dock.station.stack.tab.layouting.LineTabsLayoutBlock
All Implemented Interfaces:
LayoutBlock

public class LineTabsLayoutBlock
extends TabsLayoutBlock

This TabsLayoutBlock orders its tabs in a line.

Author:
Benjamin Sigg

Nested Class Summary
 class LineTabsLayoutBlock.LineSize
          Size information about a line on a LineTabsLayoutBlock.
protected  class LineTabsLayoutBlock.SizeCollector
          Used to calculate the minimum and preferred size of a set of Tabs.
protected  class LineTabsLayoutBlock.ZOrder
          Calculates the z-order of various components requiring only a subset of all comparisons
 
Nested classes/interfaces inherited from class bibliothek.gui.dock.station.stack.tab.layouting.TabsLayoutBlock
TabsLayoutBlock.TabsSize
 
Constructor Summary
LineTabsLayoutBlock()
           
 
Method Summary
protected  void checkSelection()
          Creates the tab that should be selected and adds it at an appropriate location.
 void doLayout()
          Updates the layout of this block.
 LineTabsLayoutBlock.LineSize[] getSizes()
          Creates a map of all sizes for which this block knows how to make an optimal layout.
 boolean isSameSize()
          If set, then all tabs have the same height (width) if laid out horizontal (vertical).
 void setSameSize(boolean sameSize)
          If set, then all tabs have the same height (width) if laid out horizontal (vertical).
 
Methods inherited from class bibliothek.gui.dock.station.stack.tab.layouting.TabsLayoutBlock
addTab, checkExistence, getBounds, getDockableTabMap, getOrientation, getOriginalTabLocations, getPane, getSelectedTab, getTabs, getTabsCount, getTabsOrderedByImportance, indexOfTab, insertTab, insertTab, isVisible, removeAllTabs, removeTab, removeTab, setBounds, setLayout, setOrientation, setPane
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineTabsLayoutBlock

public LineTabsLayoutBlock()
Method Detail

isSameSize

public boolean isSameSize()
If set, then all tabs have the same height (width) if laid out horizontal (vertical).

Returns:
true if all tabs have the same size

setSameSize

public void setSameSize(boolean sameSize)
If set, then all tabs have the same height (width) if laid out horizontal (vertical).

Parameters:
sameSize - whether all tabs should have the same height.

checkSelection

protected void checkSelection()
Creates the tab that should be selected and adds it at an appropriate location. Note that the additional tab might lead to a situation where there is not enough space. If a selected tab already exists then this method does nothing.


getSizes

public LineTabsLayoutBlock.LineSize[] getSizes()
Description copied from interface: LayoutBlock
Creates a map of all sizes for which this block knows how to make an optimal layout. If for example this block consists of 12 buttons, then different sizes might lead to a row of 12 blocks, to 2 rows of 6 blocks, to 3 rows of 4 blocks, etc...

Returns:
the map of sizes, may be empty or null

doLayout

public void doLayout()
Description copied from class: TabsLayoutBlock
Updates the layout of this block. The layout includes the location and size of all the Tabs managed by this block. This method must not add or remove tabs from the block.

Specified by:
doLayout in class TabsLayoutBlock