bibliothek.gui.dock.station.toolbar.group
Class DefaultToolbarGroupDividierStrategy

java.lang.Object
  extended by bibliothek.gui.dock.station.toolbar.group.DefaultToolbarGroupDividierStrategy
All Implemented Interfaces:
ToolbarGroupDividerStrategy

public class DefaultToolbarGroupDividierStrategy
extends Object
implements ToolbarGroupDividerStrategy

This implementation of ToolbarGroupDividerStrategy paints a line between each column and each line, and a line around at the outside of the Dockables as well.

Author:
Benjamin Sigg

Field Summary
static ToolbarGroupDividerStrategyFactory FACTORY
          a factory creating new DefaultToolbarGroupDividierStrategys
 
Fields inherited from interface bibliothek.gui.dock.station.toolbar.group.ToolbarGroupDividerStrategy
NULL
 
Constructor Summary
DefaultToolbarGroupDividierStrategy(ToolbarGroupDockStation station)
          Creates a new strategy for station.
 
Method Summary
 int getColumn(int index)
          Gets the empty space left of column index.
 int getLine(int column, int index)
          Gets the size of the gap top of the cell index of column.
 void paint(Component parent, Graphics g, ToolbarGridLayoutManager<bibliothek.gui.dock.station.StationChildHandle> layoutManager)
          Allows this strategy to paint on the container that shows the Dockables.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FACTORY

public static final ToolbarGroupDividerStrategyFactory FACTORY
a factory creating new DefaultToolbarGroupDividierStrategys

Constructor Detail

DefaultToolbarGroupDividierStrategy

public DefaultToolbarGroupDividierStrategy(ToolbarGroupDockStation station)
Creates a new strategy for station.

Parameters:
station - the station which will use this strategy, not null
Method Detail

getColumn

public int getColumn(int index)
Description copied from interface: ToolbarGroupDividerStrategy
Gets the empty space left of column index. If there are n columns, then index=n will return the empty space on the right side of the last column.

Specified by:
getColumn in interface ToolbarGroupDividerStrategy
Parameters:
index - the index of a column
Returns:
the empty space left of it

getLine

public int getLine(int column,
                   int index)
Description copied from interface: ToolbarGroupDividerStrategy
Gets the size of the gap top of the cell index of column. If there are n cells, then index=n will return the size of the bottom most gap.

Specified by:
getLine in interface ToolbarGroupDividerStrategy
Parameters:
column - the column in which to search
index - the index of the cell
Returns:
the size of the gap

paint

public void paint(Component parent,
                  Graphics g,
                  ToolbarGridLayoutManager<bibliothek.gui.dock.station.StationChildHandle> layoutManager)
Description copied from interface: ToolbarGroupDividerStrategy
Allows this strategy to paint on the container that shows the Dockables.

Specified by:
paint in interface ToolbarGroupDividerStrategy
Parameters:
parent - the parent container
g - the graphics context to use
layoutManager - detailed information about the children to paint