public interface DockDropReceiver
This interface is used by API Extenders to create new kind of drop receivers.
The DockDropReceiver is responsible for the Drag and Drop gesture recognition of
a docking movement. When a user starts a drag gesture over a DockableDragSource
,
the DockingDesktop scans its containment hierarchy (under the mouse pointer), looking
for DockDropReceivers. If one is found, it is asked for drag or drop processing.
The receiver can reject a drag, or display a shape explaining to the user how a drop of the component would affect the global layout.
DockableDragSource
Modifier and Type | Method and Description |
---|---|
void |
processDockableDrag(DockDragEvent event)
The component is notified of a drag operation.
|
void |
processDockableDrop(DockDropEvent event)
The component is requested to perform a docking drop action.
|
void processDockableDrag(DockDragEvent event)
This method is used to give a visual clue of dropping capability (for example, mouse cursor change, painting a shadow of future component position)
These clues are transmitted via the event's methods.
DockDragEvent
,
DockDropEvent
void processDockableDrop(DockDropEvent event)
This method is called only after a successful processDockableDrag(DockDragEvent)
The parameters provided for the drop are the same than those of the last drag (in order to avoid an allowed last drag followed by a rejected drop).
On event acceptation ( DockDropEvent.acceptDrop()
, the source component
will be removed from its container, so the DropReceiver must add the
component to its own hierarchy otherwise
the component would be lost (from a user's point of view).
Copyright © 2010-2014 Pacific Biosciences. All Rights Reserved.