bibliothek.gui.dock.wizard
Class WizardSpanStrategy

java.lang.Object
  extended by bibliothek.gui.dock.wizard.WizardSpanStrategy

public class WizardSpanStrategy
extends Object

The WizardSpanStrategy keeps track of the required Spans for a WizardSplitDockStation and adds or removes Spans when necessary.

Author:
Benjamin Sigg

Constructor Summary
WizardSpanStrategy(WizardSplitDockStation station)
           
 
Method Summary
 int getGap()
          Gets the size of the currently selected Span according to setPut(PutInfo).
 int getGap(int column)
          Gets the size of the gap left of column.
 int getGap(int column, int cell)
          Gets the size of the gap between cell and its predecessor.
 int getGap(bibliothek.gui.dock.station.split.Node node, WizardNodeMap map)
          Gets the size of the gap that is currently to be used by node
protected  int getSize(bibliothek.gui.dock.station.span.Span span)
          Gets the current size of span.
 void reset()
          Deletes and recreates all spans.
 void setController(bibliothek.gui.DockController controller)
          Updates the current SpanFactory if necessary.
 void setPut(bibliothek.gui.dock.station.split.PutInfo info)
          Mutates the Spans such that info shows up.
 void unsetPut()
          Immediatelly resets all Spans to have a size of 0.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WizardSpanStrategy

public WizardSpanStrategy(WizardSplitDockStation station)
Method Detail

setController

public void setController(bibliothek.gui.DockController controller)
Updates the current SpanFactory if necessary.

Parameters:
controller - the realm in which this strategy should work

reset

public void reset()
Deletes and recreates all spans.


setPut

public void setPut(bibliothek.gui.dock.station.split.PutInfo info)
Mutates the Spans such that info shows up.

Parameters:
info - the current drop information or null

unsetPut

public void unsetPut()
Immediatelly resets all Spans to have a size of 0.


getGap

public int getGap()
Gets the size of the currently selected Span according to setPut(PutInfo). If there is no Span selected, then this method returns the standard size of a gap.

Returns:
the size of the currently selected gap

getGap

public int getGap(int column)
Gets the size of the gap left of column.

Parameters:
column - the column whose gap to its predecessor is requested
Returns:
the size of the gap

getGap

public int getGap(int column,
                  int cell)
Gets the size of the gap between cell and its predecessor.

Parameters:
column - the column in which to search
cell - the cell to search
Returns:
the gap before cell

getSize

protected int getSize(bibliothek.gui.dock.station.span.Span span)
Gets the current size of span. May be overriden by subclasses to influence the size of a span.

Parameters:
span - the size of span
Returns:
the size of the span

getGap

public int getGap(bibliothek.gui.dock.station.split.Node node,
                  WizardNodeMap map)
Gets the size of the gap that is currently to be used by node

Parameters:
node - the node whose inner gap is requested
map - detailed information about the layout of this station
Returns:
the size of the inner gap