com.vlsolutions.swing.docking

Class BorderSplitter

public class BorderSplitter extends Object

An utility class used to delegate the border drag/drop scanning for docking ( since the same code is used in many DockDropReceivers).

This class is only meant for API Extenders.

Taking a DockDragEvent or DockDropEvent, check if mouse is near of one border. If so, accepts the drag or drop operation.

UNKNOWN: 2005/10/21 Lilian Chamontin : updated the shape to show real size of drop (and not 20 pixeles width/height) 2005/11/14 Lilian Chamontin : added support for drag and drop of a whole tabbed container 2005/12/08 Lilian Chamontin : fixed a bug when dropping into itself

Constructor Summary
BorderSplitter(Component delegator)
Method Summary
voidprocessDockableDrag(DockDragEvent e)
voidprocessDockableDrop(DockDropEvent e)
voidsplit(DockDropEvent event, Container draggedContainer, DockingConstants.Split position)
This method should be overriden if the delegator doesn't belong to the docking containment hierarchy after drop acceptance.

Constructor Detail

BorderSplitter

public BorderSplitter(Component delegator)

Method Detail

processDockableDrag

public void processDockableDrag(DockDragEvent e)

processDockableDrop

public void processDockableDrop(DockDropEvent e)

split

public void split(DockDropEvent event, Container draggedContainer, DockingConstants.Split position)
This method should be overriden if the delegator doesn't belong to the docking containment hierarchy after drop acceptance.

Here is a case :

Then, tabpane will be replaced by a simple DockableContainer on drop acceptance (because only one tab left).

And DockingDesktop.splitContainer(Component base, Split position) cannot be called with tabpane as "base" (instead, it should be called with the replacer of tabpane, or use the other split method which takes a dockable as base.

© Copyright 2004-2007 VLSolutions. All Rights Reserved.
www.vlsolutions.com : Java Components - Smart Client Applications