Interface AuthorDnDListener
-
- All Superinterfaces:
Extension
,SWTExtension
@API(type=EXTENDABLE, src=PUBLIC) public interface AuthorDnDListener extends SWTExtension
Author Drag and Drop listener interface for the SWT implementation. TheAuthorDnDListener
class provides event notification to the author extension for DropTarget events.As the user moves the cursor into, over and out of the author editor page, events indicate what operation can be performed and what data can be transferred if a drop where to occur at that point. The listener can respond to these events and change the type of data that will be dropped by modifying event.currentDataType, or change the operation that will be performed by modifying the event.detail field or stop any drop from happening on the current target by setting the event.detail field to DND_DROP_NONE.
When the user causes a drop to happen by releasing the mouse over the author editor page, the listener has one last chance to change the data type of the drop through the DropAccept event. If the drop is still allowed, the DropAccept event is immediately followed by the Drop event. In the Drop event, the listener can still change the operation that is performed but the data type is fixed.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
authorDragEnter(org.eclipse.swt.dnd.DropTargetEvent event)
The cursor has entered the author editor page boundaries while dragging.void
authorDragLeave(org.eclipse.swt.dnd.DropTargetEvent event)
The cursor has leaved the author editor page boundaries while dragging.void
authorDragOperationChanged(org.eclipse.swt.dnd.DropTargetEvent event)
The drag operation being performed has changed (usually due to the user changing the selected modifier key(s) while dragging).void
authorDragOver(org.eclipse.swt.dnd.DropTargetEvent event)
The cursor is moving over the author editor page while dragging.void
authorDrop(org.eclipse.swt.dnd.DropTargetEvent event)
The data is being dropped in the author editor page.void
authorDropAccept(org.eclipse.swt.dnd.DropTargetEvent event)
The drop is about to be performed.org.eclipse.swt.dnd.Transfer[]
getAuthorTransfers()
Get the data transfers of interest for the listener.void
init(AuthorAccess access)
Initialize the DnD listener.boolean
isAuthorEventOfInterest(org.eclipse.swt.dnd.DropTargetEvent event)
Returnstrue
if theDropTargetEvent
is relevant for the listener and its information will be used in the other methods of this listener.-
Methods inherited from interface ro.sync.ecss.extensions.api.Extension
getDescription
-
-
-
-
Method Detail
-
isAuthorEventOfInterest
boolean isAuthorEventOfInterest(org.eclipse.swt.dnd.DropTargetEvent event)
Returnstrue
if theDropTargetEvent
is relevant for the listener and its information will be used in the other methods of this listener.- Parameters:
event
- TheDropTargetEvent
to check.- Returns:
true
if the given event is of interest for the listener.
-
getAuthorTransfers
org.eclipse.swt.dnd.Transfer[] getAuthorTransfers()
Get the data transfers of interest for the listener.- Returns:
- An array of
Transfer
objects representing the data transfers this listener is interested in.
-
authorDragEnter
void authorDragEnter(org.eclipse.swt.dnd.DropTargetEvent event)
The cursor has entered the author editor page boundaries while dragging.
For more details seeDropTargetListener.dragEnter(DropTargetEvent)
andDropTargetEvent
javadoc.- Parameters:
event
- The information associated with the drag enter event.
-
authorDragLeave
void authorDragLeave(org.eclipse.swt.dnd.DropTargetEvent event)
The cursor has leaved the author editor page boundaries while dragging.
For more details seeDropTargetListener.dragLeave(DropTargetEvent)
andDropTargetEvent
javadoc.- Parameters:
event
- The information associated with the drag leave event.
-
authorDragOperationChanged
void authorDragOperationChanged(org.eclipse.swt.dnd.DropTargetEvent event)
The drag operation being performed has changed (usually due to the user changing the selected modifier key(s) while dragging).
For more details seeDropTargetListener.dragOperationChanged(DropTargetEvent)
andDropTargetEvent
javadoc.- Parameters:
event
- The information associated with the drag operation changed event.
-
authorDragOver
void authorDragOver(org.eclipse.swt.dnd.DropTargetEvent event)
The cursor is moving over the author editor page while dragging.
For more details seeDropTargetListener.dragOver(DropTargetEvent)
andDropTargetEvent
javadoc.- Parameters:
event
- The information associated with the drag over event.
-
authorDrop
void authorDrop(org.eclipse.swt.dnd.DropTargetEvent event)
The data is being dropped in the author editor page. The data field contains java format of the data being dropped. To determine the type of the data object, refer to the documentation for theTransfer
subclass specified in event.currentDataType.
For more details seeDropTargetListener.drop(DropTargetEvent)
andDropTargetEvent
javadoc.- Parameters:
event
- The information associated with the drop event.
-
authorDropAccept
void authorDropAccept(org.eclipse.swt.dnd.DropTargetEvent event)
The drop is about to be performed. The listener is given a last chance to change the nature of the drop.
For more details seeDropTargetListener.dropAccept(DropTargetEvent)
andDropTargetEvent
javadoc.- Parameters:
event
- The information associated with the drop accept event.
-
init
void init(AuthorAccess access)
Initialize the DnD listener. TheAuthorAccess
can be used to access specific informations and actions for editor, document, workspace, tables, change tracking, utility a.s.o.- Parameters:
access
- The author access.
-
-