|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vlsolutions.swing.docking.event.DockEvent
com.vlsolutions.swing.docking.event.DockDragEvent
public class DockDragEvent
An event describing a drag operation occuring for docking purpose.
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) :
acceptDrag(Shape)
Field Summary |
---|
Fields inherited from class com.vlsolutions.swing.docking.event.DockEvent |
---|
action, desktop, event, source |
Constructor Summary | |
---|---|
DockDragEvent(DockingDesktop desktop,
DockableDragSource source,
java.awt.event.MouseEvent event)
Creates an event based on a drag source and a mouse event. |
Method Summary | |
---|---|
void |
acceptDrag(java.awt.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. |
java.awt.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. |
Methods inherited from class com.vlsolutions.swing.docking.event.DockEvent |
---|
getDesktop, getDockingAction, getDragSource, getMouseEvent, setDockingAction |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DockDragEvent(DockingDesktop desktop, DockableDragSource source, java.awt.event.MouseEvent event)
The mouse coordinates are converted into the receiver's coordinates.
Method Detail |
---|
public boolean isDragAccepted()
public boolean isDragDelegated()
This is useful for nested DropReceivers (like TabbedDockableContainers)
public java.awt.Shape getDropShape()
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).
public void acceptDrag(java.awt.Shape dropShape)
As of version 2.1, please note that you also have to invoke #setDockingAction() to specify the action associated with the drag shape.
dropShape
- the shape (in drop component coordinates) showing the drop zone,
which will be displayed on the glasspane of the DockingPanel.public void rejectDrag()
public void delegateDrag()
for example, a TabbedDockableContainer that doesn't allow drops on its borders can delegates this management to its container.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |