public class SingleGroupMovement extends java.lang.Object implements CGroupMovement
CGroupMovement
is the most basic movement as it represents the movement of one
lonely Dockable
.Constructor and Description |
---|
SingleGroupMovement(Dockable dockable,
ExtendedMode target)
Creates a new movement object.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(CGroupBehaviorCallback callback)
Executes this movement.
|
boolean |
forceAccept(DockStation parent,
Dockable child)
Tells some
DockAcceptance s whether a check for child becoming a child of
parent needs to be performed. |
public SingleGroupMovement(Dockable dockable, ExtendedMode target)
dockable
- the element whose location will be changedtarget
- the new mode for dockable
public void apply(CGroupBehaviorCallback callback)
CGroupMovement
Dockable
once this method finished.apply
-methods of LocationModeManager
only take one argument, more than one Dockable
might be moved because of the
internal logic of some LocationMode
s. Implementations should assume that any
cached information about any Dockable
is invalid once a Dockable
has been
moved.apply
in interface CGroupMovement
callback
- can be used by this object to freely move around any
Dockable
public boolean forceAccept(DockStation parent, Dockable child)
CGroupMovement
DockAcceptance
s 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 DockAcceptance
s from preventing the
operation.forceAccept
in interface CGroupMovement
parent
- the future parent of child
child
- the future child of parent
true
if this relation can be allowed without further checks