bibliothek.gui.dock.station.split
Class PerspectiveSplitDockGrid

java.lang.Object
  extended by bibliothek.gui.dock.station.split.AbstractSplitDockGrid<PerspectiveDockable>
      extended by bibliothek.gui.dock.station.split.PerspectiveSplitDockGrid

public class PerspectiveSplitDockGrid
extends AbstractSplitDockGrid<PerspectiveDockable>

An implementation of AbstractSplitDockGrid that works with PerspectiveDockables.

Author:
Benjamin Sigg
See Also:
SplitDockPerspective

Nested Class Summary
 
Nested classes/interfaces inherited from class bibliothek.gui.dock.station.split.AbstractSplitDockGrid
AbstractSplitDockGrid.Line, AbstractSplitDockGrid.Node<D>
 
Constructor Summary
PerspectiveSplitDockGrid()
          Creates a new, empty grid.
PerspectiveSplitDockGrid(String layout, Map<Character,PerspectiveDockable[]> dockables)
          Creates a grid by reading a string which represents a grid.
The argument layout is a string divided by newline "\n".
 
Method Summary
protected  PerspectiveDockable[] array(int size)
          Creates a D-array of length size.
 PerspectiveSplitDockTree toTree()
          Converts the current grid into a tree.
 
Methods inherited from class bibliothek.gui.dock.station.split.AbstractSplitDockGrid
addDockable, addHorizontalDivider, addPlaceholders, addVerticalDivider, bestFittingLine, combine, diff, fillTree, getLines, getNodes, penalty, setPlaceholderMap, setSelected, tree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerspectiveSplitDockGrid

public PerspectiveSplitDockGrid()
Creates a new, empty grid.


PerspectiveSplitDockGrid

public PerspectiveSplitDockGrid(String layout,
                                Map<Character,PerspectiveDockable[]> dockables)
Creates a grid by reading a string which represents a grid.
The argument layout is a string divided by newline "\n". Every line represents a y-coordinate, the position of a character in a line represents a x-coordinate. The minimal and the maximal x- and y-coordinates for a character is searched, and used to call addDockable, where the Dockable-array is taken from the Map dockables.

Parameters:
layout - the layout, a string divided by newlines
dockables - the Dockables to add, only entries whose character is in the String layout.
Method Detail

array

protected PerspectiveDockable[] array(int size)
Description copied from class: AbstractSplitDockGrid
Creates a D-array of length size.

Specified by:
array in class AbstractSplitDockGrid<PerspectiveDockable>
Parameters:
size - the size of the new array
Returns:
the new array

toTree

public PerspectiveSplitDockTree toTree()
Converts the current grid into a tree.

Returns:
the tree which represents this grid
See Also:
SplitDockStation.dropTree(SplitDockTree)