|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface DropSupport.EventHandler
Handles data flavor dependent access to drag and drop events for
DropSupport
's default node and edge transfers.
Implementations of this interface may be used to leverage
DropSupport
's default node and edge transfers for
custom data flavors. I.e. for inter-process drag and drop support,
DropSupport
's default data flavors cannot be used. In that
case, a custom EventHandler
implementation for e.g. a text
flavor may be used.
Method Summary | |
---|---|
boolean |
accept(java.awt.dnd.DropTargetDragEvent e)
Determines whether the current drag and drop operation should be continued or aborted. |
boolean |
accept(java.awt.dnd.DropTargetDropEvent e)
Determines whether the current drag and drop operation should be continued or aborted. |
boolean |
canHandle(java.awt.dnd.DropTargetDragEvent e)
Determines whether or not this handler should be used for the drag and drop operation initiated by the specified drag enter event. |
java.lang.Object |
getTransferData(java.awt.dnd.DropTargetDragEvent e)
Retrieves the transfer data from the specified event. |
java.lang.Object |
getTransferData(java.awt.dnd.DropTargetDropEvent e)
Retrieves the transfer data from the specified event. |
Method Detail |
---|
boolean canHandle(java.awt.dnd.DropTargetDragEvent e)
If different data flavors are used for node and edge transfers, this
method may unconditionally return false
. Only if the same
flavor is used for both node and edge transfers (e.g. a text flavor for
inter-process drag and drop support), this check is necessary to
differentiate between node transfers and edge transfers.
e
- the drag enter event that initiates a new drag and drop
operation.
true
if this handler should be used for the
initiated drag and drop operation and false
if
DropSupport
's default mechanism for determining the
appropriate handler should be used.DropSupport.setEdgeEventHandler(y.view.DropSupport.EventHandler)
,
DropSupport.setNodeEventHandler(y.view.DropSupport.EventHandler)
boolean accept(java.awt.dnd.DropTargetDragEvent e)
e
- the currently processed event.
true
if the drag and drop operation should be
continued; false
if the drag and drop operation should be
aborted.boolean accept(java.awt.dnd.DropTargetDropEvent e)
e
- the currently processed event.
true
if the drag and drop operation should be
continued; false
if the drag and drop operation should be
aborted.java.lang.Object getTransferData(java.awt.dnd.DropTargetDragEvent e)
Depending on whether this handler is used for node or edge transfers,
this method has to return either a NodeRealizer
or an
EdgeRealizer
instance.
e
- the event from which to extract the transfer data.
NodeRealizer
or EdgeRealizer
instance representing the specified event's transfer data.DropSupport.setEdgeEventHandler(y.view.DropSupport.EventHandler)
,
DropSupport.setNodeEventHandler(y.view.DropSupport.EventHandler)
java.lang.Object getTransferData(java.awt.dnd.DropTargetDropEvent e)
Depending on whether this handler is used for node or edge transfers,
this method has to return either a NodeRealizer
or an
EdgeRealizer
instance.
e
- the event from which to extract the transfer data.
NodeRealizer
or EdgeRealizer
instance representing the specified event's transfer data.DropSupport.setEdgeEventHandler(y.view.DropSupport.EventHandler)
,
DropSupport.setNodeEventHandler(y.view.DropSupport.EventHandler)
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |