Interface AuthorDnDListener
-
- All Superinterfaces:
AWTExtension
,Extension
@API(type=EXTENDABLE, src=PUBLIC) public interface AuthorDnDListener extends AWTExtension
Author Drag and Drop listener interface for the AWT implementation. TheAuthorDnDListener
interface is the callback interface used by the author editor page to provide notification of DnD operations that involve it.Create a listener object by implementing the interface and then when the drag enters, moves over, or exits the author editor page, when the drop action changes, and when the drop occurs, the relevant method in the listener object is invoked, and the
DropTargetEvent
is passed to it.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
authorDragEnter(java.awt.dnd.DropTargetDragEvent event)
Called while a drag operation is ongoing, when the mouse pointer enters the author editor page where this listener is registered.boolean
authorDragExit(java.awt.dnd.DropTargetEvent event)
Called while a drag operation is ongoing, when the mouse pointer has exited the author editor page where this listener is registered.boolean
authorDragOver(java.awt.dnd.DropTargetDragEvent event)
Called when a drag operation is ongoing, while the mouse pointer is still over the author editor page where this listener is registered.boolean
authorDrop(java.awt.datatransfer.Transferable transferable, java.awt.dnd.DropTargetDropEvent event)
Called when the drag operation has terminated with a drop on the author editor page where this listener is registered.boolean
authorSupportsFlavor(java.awt.datatransfer.DataFlavor flavor)
Check if the data flavor can be handled by the listener.void
init(AuthorAccess authorAccess)
Initialize the DnD listener.-
Methods inherited from interface ro.sync.ecss.extensions.api.Extension
getDescription
-
-
-
-
Method Detail
-
authorDragOver
boolean authorDragOver(java.awt.dnd.DropTargetDragEvent event)
Called when a drag operation is ongoing, while the mouse pointer is still over the author editor page where this listener is registered.- Parameters:
event
- TheDropTargetDropEvent
event.- Returns:
true
if the listener handled the event.
-
authorDrop
boolean authorDrop(java.awt.datatransfer.Transferable transferable, java.awt.dnd.DropTargetDropEvent event)
Called when the drag operation has terminated with a drop on the author editor page where this listener is registered.This method is responsible for undertaking the transfer of the data associated with the gesture. The
DropTargetDropEvent
provides a means to obtain aTransferable
object that represents the data object(s) to be transfered.- Parameters:
transferable
- TheTransferable
object.event
- TheDropTargetDragEvent
event.- Returns:
true
if the listener handled the event.
-
authorSupportsFlavor
boolean authorSupportsFlavor(java.awt.datatransfer.DataFlavor flavor)
Check if the data flavor can be handled by the listener.- Parameters:
flavor
- TheDataFlavor
flavor.- Returns:
true
if the flavor is supported.
-
authorDragExit
boolean authorDragExit(java.awt.dnd.DropTargetEvent event)
Called while a drag operation is ongoing, when the mouse pointer has exited the author editor page where this listener is registered.- Parameters:
event
- TheDropTargetEvent
event.- Returns:
true
if the listener consumed the drag exit event.
-
authorDragEnter
boolean authorDragEnter(java.awt.dnd.DropTargetDragEvent event)
Called while a drag operation is ongoing, when the mouse pointer enters the author editor page where this listener is registered.- Parameters:
event
- TheDropTargetDragEvent
event.- Returns:
true
if the listener consumed the drag enter event.
-
init
void init(AuthorAccess authorAccess)
Initialize the DnD listener.- Parameters:
authorAccess
- TheAuthorAccess
providing access to specific components corresponding to editor, document, workspace, tables, change tracking and utility informations and actions.
-
-