|
||||||||||
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.DockDropEvent
public class DockDropEvent
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).
Field Summary |
---|
Fields inherited from class com.vlsolutions.swing.docking.event.DockEvent |
---|
action, desktop, event, source |
Constructor Summary | |
---|---|
DockDropEvent(DockingDesktop desk,
DockableDragSource source,
java.awt.event.MouseEvent event)
|
Method Summary | |
---|---|
void |
acceptDrop()
shortcut for acceptDrop(true). |
void |
acceptDrop(boolean remove)
notifies the event manager that docking is accepted. |
boolean |
isDropAccepted()
Indicates if the drop operation is accepted. |
void |
rejectDrop()
It is still time to reject a drop, although the standard way is by denying the previous drag operation. |
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 DockDropEvent(DockingDesktop desk, DockableDragSource source, java.awt.event.MouseEvent event)
Method Detail |
---|
public void acceptDrop()
If the drop is accepted, the receiver must process the docking operation, (usually by invoking a docking method on the desktop).
As of version 2.1, a DockingActionEvent has been added to the DockEvent class, adding a "semantic" description of the docking operation. The DropReceiver must call setDockingAction() before acceptDrop().
It is still the responsability of the drop receiver to process the docking operation.
public void acceptDrop(boolean remove)
If the drop is accepted, the receiver must process the docking operation, (usually by invoking a docking method on the desktop).
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.
public void rejectDrop()
public boolean isDropAccepted()
Once rejected (with rejectDrop
, it is not possible to re-accept it
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |