bibliothek.gui.dock.common.group
Class StackGroupMovement

java.lang.Object
  extended by bibliothek.gui.dock.common.group.StackGroupMovement
All Implemented Interfaces:
CGroupMovement

public class StackGroupMovement
extends java.lang.Object
implements CGroupMovement

This movement moves an entire StackDockStation to the place indicated by one of its children.

Author:
Benjamin Sigg

Constructor Summary
StackGroupMovement(StackDockStation dockParent, Dockable dockable, ExtendedMode target)
          Creates a new movement object.
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StackGroupMovement

public StackGroupMovement(StackDockStation dockParent,
                          Dockable dockable,
                          ExtendedMode target)
Creates a new movement object.

Parameters:
dockParent - the station that should be moved
dockable - the dockable that indicates the target location
target - the mode that dockable should have after the movemenet
Method Detail

apply

public void apply(CGroupBehaviorCallback callback)
Description copied from interface: CGroupMovement
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.

Specified by:
apply in interface CGroupMovement
Parameters:
callback - can be used by this object to freely move around any Dockable

forceAccept

public boolean forceAccept(DockStation parent,
                           Dockable child)
Description copied from interface: CGroupMovement
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.

Specified by:
forceAccept in interface CGroupMovement
Parameters:
parent - the future parent of child
child - the future child of parent
Returns:
true if this relation can be allowed without further checks