bibliothek.gui.dock.station.split
Class SplitSpanStrategy

java.lang.Object
  extended by bibliothek.gui.dock.station.split.SplitSpanStrategy

public class SplitSpanStrategy
extends Object

This class is responsible for accessing and updating all Spans of a SplitDockStation.

Author:
Benjamin Sigg

Constructor Summary
SplitSpanStrategy(SplitDockStation station)
          Creates a new strategy
 
Method Summary
 Span[] createSpans(SpanSplitNode node)
          Creates four Spans, one for each side of leaf.
 Rectangle modifyBounds(Rectangle bounds, SpanSplitNode node)
          Creates a new Rectangle within bounds, using spans to create some insets.
 void setController(DockController controller)
          Sets the DockController which is used by the SplitDockStation.
 void setPut(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

SplitSpanStrategy

public SplitSpanStrategy(SplitDockStation station)
Creates a new strategy

Parameters:
station - the owner of this strategy, not null
Method Detail

setPut

public void setPut(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.


setController

public void setController(DockController controller)
Sets the DockController which is used by the SplitDockStation.

Parameters:
controller - the controller in whose realm this strategy works

createSpans

public Span[] createSpans(SpanSplitNode node)
Creates four Spans, one for each side of leaf.

Parameters:
node - the node which requires Spans
Returns:
the new set of Spans or null

modifyBounds

public Rectangle modifyBounds(Rectangle bounds,
                              SpanSplitNode node)
Creates a new Rectangle within bounds, using spans to create some insets.

Parameters:
bounds - the boundaries to shrink
node - the node to evaluate
Returns:
the smaller boundaries