com.vlsolutions.swing.docking.event

Class DockDropEvent

public class DockDropEvent extends DockEvent

An event send to a dockDropReceiver to complete a drop operation

This event is used by API extenders to manage drag and drop action related to docking. This is not meant to be used by User Applications.

The dockDropReceiver can accept or reject the drop.

If the drop is accepted, the receiver must process the docking operation, (usually by invoking a docking method on the desktop).

Constructor Summary
DockDropEvent(DockingDesktop desk, DockableDragSource source, MouseEvent event)
Method Summary
voidacceptDrop()
shortcut for acceptDrop(true).
voidacceptDrop(boolean remove)
notifies the event manager that docking is accepted.
booleanisDropAccepted()
Indicates if the drop operation is accepted.
voidrejectDrop()
It is still time to reject a drop, although the standard way is by denying the previous drag operation.

Constructor Detail

DockDropEvent

public DockDropEvent(DockingDesktop desk, DockableDragSource source, MouseEvent event)

Method Detail

acceptDrop

public void acceptDrop()
shortcut for acceptDrop(true).

If the drop is accepted, the receiver must process the docking operation, (usually by invoking a docking method on the desktop).

acceptDrop

public void acceptDrop(boolean remove)
notifies the event manager that docking is accepted.

If the drop is accepted, the receiver must process the docking operation, (usually by invoking a docking method on the desktop).

Parameters: remove if true, the docking desktop will remove the dragged dockable from its containment hierarchy. If false, it is the responsibility of the DockDropReceiver to remove (or simply move) the dragged dockable.

for example, accepting drop without removing the component is saving a lot of processing for TabbedDockableContainers when the dragged component already belongs to their tabs.

isDropAccepted

public boolean isDropAccepted()
Indicates if the drop operation is accepted.

Once rejected (with rejectDrop, it is not possible to re-accept it

rejectDrop

public void rejectDrop()
It is still time to reject a drop, although the standard way is by denying the previous drag operation.
© Copyright 2004-2005 VLSolutions. All Rights Reserved.
www.vlsolutions.com : Java Components - Smart Client Applications