bibliothek.gui.dock.common.intern.ui
Class ExtendedModeAcceptance

java.lang.Object
  extended by bibliothek.gui.dock.common.intern.ui.ExtendedModeAcceptance
All Implemented Interfaces:
DockAcceptance

@FrameworkOnly
public class ExtendedModeAcceptance
extends Object
implements DockAcceptance

A DockAcceptance ensuring that the extended mode property of CDockable is respected on drag and drop operations.

Author:
Benjamin Sigg

Constructor Summary
ExtendedModeAcceptance(CControlAccess control)
          Creates a new acceptance.
 
Method Summary
 boolean accept(DockStation parent, Dockable child)
          Tells whether or not child is allowed to become a real child of parent.
 boolean accept(DockStation parent, Dockable child, Dockable next)
          Tells whether child, which may be already a child of parent, and next are allowed to be combined.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendedModeAcceptance

public ExtendedModeAcceptance(CControlAccess control)
Creates a new acceptance.

Parameters:
control - access to the CControl
Method Detail

accept

public boolean accept(DockStation parent,
                      Dockable child)
Description copied from interface: DockAcceptance
Tells whether or not child is allowed to become a real child of parent.

Specified by:
accept in interface DockAcceptance
Parameters:
parent - the future parent
child - the future child
Returns:
whether or not child and parent are allowed to be combined

accept

public boolean accept(DockStation parent,
                      Dockable child,
                      Dockable next)
Description copied from interface: DockAcceptance
Tells whether child, which may be already a child of parent, and next are allowed to be combined. The result of this combination would replace child on parent.

Specified by:
accept in interface DockAcceptance
Parameters:
parent - the future parent of the combination
child - a Dockable which may be a child of parent
next - a new Dockable
Returns:
whether the combination is allowed or not