bibliothek.gui.dock.station.flap
Class FlapSpanStrategy

java.lang.Object
  extended by bibliothek.gui.dock.station.flap.FlapSpanStrategy

public class FlapSpanStrategy
extends Object

Manages the Spans of a FlapDockStation.

Author:
Benjamin Sigg

Constructor Summary
FlapSpanStrategy(FlapDockStation station, ButtonPane buttons)
          Creates a new strategy.
 
Method Summary
 int getGap(int index)
          Gets the size of the gap between button index-1 and button index.
 int getTeasing()
          Gets the current minimum size of the station.
 void reset()
          Called if the number of buttons or the orientation changed.
 void setController(DockController controller)
          Called when the DockController of the FlapDockStation changes.
 void tease(int index)
          Opens some Spans such that a Dockable could be inserted at index.
 void untease()
          Makes all Spans invisible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlapSpanStrategy

public FlapSpanStrategy(FlapDockStation station,
                        ButtonPane buttons)
Creates a new strategy.

Parameters:
station - the owner of this strategy
buttons - the panel showing all buttons
Method Detail

setController

public void setController(DockController controller)
Called when the DockController of the FlapDockStation changes.

Parameters:
controller - the new controller, can be null

reset

public void reset()
Called if the number of buttons or the orientation changed.


tease

public void tease(int index)
Opens some Spans such that a Dockable could be inserted at index.

Parameters:
index - the index of the new Dockable

untease

public void untease()
Makes all Spans invisible.


getTeasing

public int getTeasing()
Gets the current minimum size of the station.

Returns:
the current minimum size

getGap

public int getGap(int index)
Gets the size of the gap between button index-1 and button index.

Parameters:
index - the index of the gap, where 0 is the most left gap
Returns:
the size of the gap