bibliothek.gui.dock.common.group
Interface CGroupMovement

All Known Implementing Classes:
SingleGroupMovement, StackGroupMovement

public interface CGroupMovement

A group movement describes the movement of an undefined number of Dockables by a LocationModeManager. The moved Dockables have to be somehow in a group, and that group has to be described by one Dockable. A logical choice would be that all Dockables are children of some DockStation and the DockStation represents the entire group.

Author:
Benjamin Sigg

Method Summary
 void apply(CGroupBehaviorCallback callback)
          Executes this movement.
 boolean forceAccept(DockStation parent, Dockable child)
          Tells some DockAcceptances whether a check for child becoming a child of parent needs to be performed.
 

Method Detail

apply

void apply(CGroupBehaviorCallback callback)
Executes this movement. While this operation runs, focus management is disabled. The framework will choose a new focused Dockable once this method finished.
Note: While the various apply-methods of LocationModeManager only take one argument, more than one Dockable might be moved because of the internal logic of some LocationModes. Implementations should assume that any cached information about any Dockable is invalid once a Dockable has been moved.

Parameters:
callback - can be used by this object to freely move around any Dockable

forceAccept

boolean forceAccept(DockStation parent,
                    Dockable child)
Tells some DockAcceptances whether a check for child becoming a child of parent needs to be performed. The default result of this method should be true. A value of true does not prevent custom DockAcceptances from preventing the operation.

Parameters:
parent - the future parent of child
child - the future child of parent
Returns:
true if this relation can be allowed without further checks