com.vlsolutions.swing.docking.event
public class DockDragEvent extends DockEvent
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.
Standard processing of dragging is (ignoring DockableStateChange events) :
Constructor Summary | |
---|---|
DockDragEvent(DockingDesktop desktop, DockableDragSource source, MouseEvent event) Creates an event based on a drag source and a mouse event.
|
Method Summary | |
---|---|
void | acceptDrag(Shape dropShape) Used by a DockDropReceiver to indicate that the drag operation is accepted
(mouse is over a droppable zone).
|
void | delegateDrag() Rejects the drag, but allows the docking system to search for othet drop receiver
in ancestors.
|
Shape | getDropShape() Returns the shape to display if drag is accepted.
|
boolean | isDragAccepted() returns true if drag is accepted.
|
boolean | isDragDelegated() If drag is not accepted, this method will be invoked to evaluate
a delegating event processing.
|
void | rejectDrag() Used to reject the drag (e.g. when trying to drop a component onto itself) |
The mouse coordinates are converted into the receiver's coordinates.
Parameters: dropShape the shape (in drop component coordinates) showing the drop zone, which will be displayed on the glasspane of the DockingPanel.
for example, a TabbedDockableContainer that doesn't allow drops on its borders can delegates this management to its container.
This method will be invoked only if isDragAccepted
returns true
As this method can be called on every mouse drag over a component, it is a good practice to reuse the same shape as lond a possible (do not create a new Shape at every invocation).
Returns: true if drag is accepted
This is useful for nested DropReceivers (like TabbedDockableContainers)