|
Oxygen XML Editor 11.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TextDnDListener
Text Drag and Drop listener interface for the SWT implementation.
The TextDnDListener
class provides event notification to the Oxygen
extension for DropTarget events occurring in the Text page.
As the user moves the cursor into, over and out of the text 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 text 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 | |
---|---|
Transfer[] |
getTextTransfers()
Get the data transfers of interest for the listener. |
void |
init(StyledText text,
IDocument document,
String systemID)
Initialize the DnD listener. |
boolean |
isTextEventOfInterest(DropTargetEvent event)
Returns true if the DropTargetEvent is
relevant for the listener and its information
will be used in the other methods of this listener. |
void |
textDragEnter(DropTargetEvent event)
The cursor has entered the text editor page boundaries while dragging. |
void |
textDragLeave(DropTargetEvent event)
The cursor has leaved the text editor page boundaries while dragging. |
void |
textDragOperationChanged(DropTargetEvent event)
The drag operation being performed has changed (usually due to the user changing the selected modifier key(s) while dragging). |
void |
textDragOver(DropTargetEvent event)
The cursor is moving over the text editor page while dragging. |
void |
textDrop(DropTargetEvent event)
The data is being dropped in the text editor page. |
void |
textDropAccept(DropTargetEvent event)
The drop is about to be performed. |
Methods inherited from interface ro.sync.ecss.extensions.api.Extension |
---|
getDescription |
Method Detail |
---|
boolean isTextEventOfInterest(DropTargetEvent event)
true
if the DropTargetEvent
is
relevant for the listener and its information
will be used in the other methods of this listener.
event
- The DropTargetEvent
to check
true
if the given event is of interest for the listener.Transfer[] getTextTransfers()
Transfer
objects representing the
data transfers this listener is interested in.void textDragEnter(DropTargetEvent event)
org.eclipse.swt.dnd.DropTargetListener#dragEnter(DropTargetEvent)
and
DropTargetEvent
javadoc.
event
- The information associated with the drag enter event.void textDragLeave(DropTargetEvent event)
org.eclipse.swt.dnd.DropTargetListener#dragLeave(DropTargetEvent)
and
DropTargetEvent
javadoc.
event
- The information associated with the drag leave event.void textDragOperationChanged(DropTargetEvent event)
org.eclipse.swt.dnd.DropTargetListener#dragOperationChanged(DropTargetEvent)
and DropTargetEvent
javadoc.
event
- The information associated with the drag operation changed event.void textDragOver(DropTargetEvent event)
org.eclipse.swt.dnd.DropTargetListener#dragOver(DropTargetEvent)
and
DropTargetEvent
javadoc.
event
- The information associated with the drag over event.void textDrop(DropTargetEvent event)
Transfer
subclass
specified in event.currentDataType.
org.eclipse.swt.dnd.DropTargetListener#drop(DropTargetEvent)
and
DropTargetEvent
javadoc.
event
- The information associated with the drop event.void textDropAccept(DropTargetEvent event)
org.eclipse.swt.dnd.DropTargetListener#dropAccept(DropTargetEvent)
and DropTargetEvent
javadoc.
event
- The information associated with the drop accept event.void init(StyledText text, IDocument document, String systemID)
text
- The text component from the text editor page.document
- The document from the text editor page.systemID
- The system ID of the document.
|
Oxygen XML Editor 11.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |