bibliothek.gui.dock.station.toolbar.group
Interface ToolbarGroupDividerStrategy

All Known Implementing Classes:
DefaultToolbarGroupDividierStrategy

public interface ToolbarGroupDividerStrategy

A ToolbarGroupDividerStrategy is responsible for painting dividers between Dockables. It can reserve some empty space between Dockables to have enough space for painting.

Author:
Benjamin Sigg

Field Summary
static ToolbarGroupDividerStrategy NULL
          Represents the strategy that does not exist.
 
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.
 

Field Detail

NULL

static final ToolbarGroupDividerStrategy NULL
Represents the strategy that does not exist.

Method Detail

getColumn

int getColumn(int index)
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.

Parameters:
index - the index of a column
Returns:
the empty space left of it

getLine

int getLine(int column,
            int index)
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.

Parameters:
column - the column in which to search
index - the index of the cell
Returns:
the size of the gap

paint

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.

Parameters:
parent - the parent container
g - the graphics context to use
layoutManager - detailed information about the children to paint