bibliothek.gui.dock.common.group
Class StackGroupBehavior

java.lang.Object
  extended by bibliothek.gui.dock.common.group.StackGroupBehavior
All Implemented Interfaces:
CGroupBehavior

public class StackGroupBehavior
extends Object
implements CGroupBehavior

This CGroupBehavior assumes that all Dockables which share a common StackDockStation as parent belong to the same group. This behavior also assumes that all Combiners will create new StackDockStations and that StackDockStations cannot be put into each other. All these assumptions hold true with the default settings of a CControl.
This behavior does not move around entire StackDockStations, it moves around each Dockable indiviually. This has the benefit that StackDockStations cannot accidentally be put into each other.

Author:
Benjamin Sigg

Constructor Summary
StackGroupBehavior()
           
 
Method Summary
 void forward(Dockable dockable, ExtendedMode target, CGroupBehaviorCallback callback)
          Changes the mode of dockable such that it matches target.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StackGroupBehavior

public StackGroupBehavior()
Method Detail

forward

public void forward(Dockable dockable,
                    ExtendedMode target,
                    CGroupBehaviorCallback callback)
Description copied from interface: CGroupBehavior
Changes the mode of dockable such that it matches target. This method may also change the ExtendedMode or location of other Dockables to keep the group together. While this method runs, focus management is disabled. The focus will be transfered to dockable if target represents a LocationMode that requires focus transfer. Dockables to change their mode.

Specified by:
forward in interface CGroupBehavior
Parameters:
dockable - the element that was clicked by the user
target - the extended mode intended for dockable
callback - a set of information and methods that may be needed to apply all the necessary changes to dockable and maybe other Dockables as well