Package org.eclipse.swt.custom
Class StyledTextDropTargetEffect
java.lang.Object
org.eclipse.swt.dnd.DropTargetAdapter
org.eclipse.swt.dnd.DropTargetEffect
org.eclipse.swt.custom.StyledTextDropTargetEffect
- All Implemented Interfaces:
EventListener
,DropTargetListener
,SWTEventListener
This adapter class provides a default drag under effect (eg. select and scroll)
when a drag occurs over a
StyledText
.
Classes that wish to provide their own drag under effect for a StyledText
can extend this class, override the StyledTextDropTargetEffect.dragOver
method and override any other applicable methods in StyledTextDropTargetEffect
to
display their own drag under effect.
super
method to get the default drag under effect implementation.
The feedback value is either one of the FEEDBACK constants defined in
class DND
which is applicable to instances of this class,
or it must be built by bitwise OR'ing together
(that is, using the int
"|" operator) two or more
of those DND
effect constants.
- Feedback:
- FEEDBACK_SELECT, FEEDBACK_SCROLL
- Since:
- 3.3
- See Also:
-
Constructor Summary
ConstructorDescriptionStyledTextDropTargetEffect
(StyledText styledText) Creates a newStyledTextDropTargetEffect
to handle the drag under effect on the specifiedStyledText
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dragEnter
(DropTargetEvent event) This implementation ofdragEnter
provides a default drag under effect for the feedback specified inevent.feedback
.void
dragLeave
(DropTargetEvent event) This implementation ofdragLeave
provides a default drag under effect for the feedback specified inevent.feedback
.void
dragOver
(DropTargetEvent event) This implementation ofdragOver
provides a default drag under effect for the feedback specified inevent.feedback
.void
dropAccept
(DropTargetEvent event) This implementation ofdropAccept
provides a default drag under effect for the feedback specified inevent.feedback
.Methods inherited from class org.eclipse.swt.dnd.DropTargetEffect
getControl, getItem
Methods inherited from class org.eclipse.swt.dnd.DropTargetAdapter
dragOperationChanged, drop
-
Constructor Details
-
StyledTextDropTargetEffect
Creates a newStyledTextDropTargetEffect
to handle the drag under effect on the specifiedStyledText
.- Parameters:
styledText
- theStyledText
over which the user positions the cursor to drop the data
-
-
Method Details
-
dragEnter
This implementation ofdragEnter
provides a default drag under effect for the feedback specified inevent.feedback
. For additional information seeDropTargetAdapter.dragEnter
. Subclasses that override this method should callsuper.dragEnter(event)
to get the default drag under effect implementation.- Specified by:
dragEnter
in interfaceDropTargetListener
- Overrides:
dragEnter
in classDropTargetAdapter
- Parameters:
event
- the information associated with the drag start event- See Also:
-
dragLeave
This implementation ofdragLeave
provides a default drag under effect for the feedback specified inevent.feedback
. For additional information seeDropTargetAdapter.dragLeave
. Subclasses that override this method should callsuper.dragLeave(event)
to get the default drag under effect implementation.- Specified by:
dragLeave
in interfaceDropTargetListener
- Overrides:
dragLeave
in classDropTargetAdapter
- Parameters:
event
- the information associated with the drag leave event- See Also:
-
dragOver
This implementation ofdragOver
provides a default drag under effect for the feedback specified inevent.feedback
. For additional information seeDropTargetAdapter.dragOver
. Subclasses that override this method should callsuper.dragOver(event)
to get the default drag under effect implementation.- Specified by:
dragOver
in interfaceDropTargetListener
- Overrides:
dragOver
in classDropTargetAdapter
- Parameters:
event
- the information associated with the drag over event- See Also:
-
dropAccept
This implementation ofdropAccept
provides a default drag under effect for the feedback specified inevent.feedback
. For additional information seeDropTargetAdapter.dropAccept
. Subclasses that override this method should callsuper.dropAccept(event)
to get the default drag under effect implementation.- Specified by:
dropAccept
in interfaceDropTargetListener
- Overrides:
dropAccept
in classDropTargetAdapter
- Parameters:
event
- the information associated with the drop accept event- See Also:
-