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
public class StyledTextDropTargetEffect extends DropTargetEffect
This adapter class provides a default drag under effect (eg. select and scroll) when a drag occurs over aStyledText.Classes that wish to provide their own drag under effect for a
Subclasses that override any methods of this class should call the correspondingStyledTextcan extend this class, override theStyledTextDropTargetEffect.dragOvermethod and override any other applicable methods inStyledTextDropTargetEffectto display their own drag under effect.supermethod to get the default drag under effect implementation.The feedback value is either one of the FEEDBACK constants defined in class
DNDwhich is applicable to instances of this class, or it must be built by bitwise OR'ing together (that is, using theint"|" operator) two or more of thoseDNDeffect constants.- Feedback:
- FEEDBACK_SELECT, FEEDBACK_SCROLL
- Since:
- 3.3
- See Also:
DropTargetAdapter,DropTargetEvent, Sample code and further information
-
-
Constructor Summary
Constructors Constructor Description StyledTextDropTargetEffect(StyledText styledText)Creates a newStyledTextDropTargetEffectto handle the drag under effect on the specifiedStyledText.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddragEnter(DropTargetEvent event)This implementation ofdragEnterprovides a default drag under effect for the feedback specified inevent.feedback.voiddragLeave(DropTargetEvent event)This implementation ofdragLeaveprovides a default drag under effect for the feedback specified inevent.feedback.voiddragOver(DropTargetEvent event)This implementation ofdragOverprovides a default drag under effect for the feedback specified inevent.feedback.voiddropAccept(DropTargetEvent event)This implementation ofdropAcceptprovides 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 Detail
-
StyledTextDropTargetEffect
public StyledTextDropTargetEffect(StyledText styledText)
Creates a newStyledTextDropTargetEffectto handle the drag under effect on the specifiedStyledText.- Parameters:
styledText- theStyledTextover which the user positions the cursor to drop the data
-
-
Method Detail
-
dragEnter
public void dragEnter(DropTargetEvent event)
This implementation ofdragEnterprovides 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:
dragEnterin interfaceDropTargetListener- Overrides:
dragEnterin classDropTargetAdapter- Parameters:
event- the information associated with the drag start event- See Also:
DropTargetAdapter,DropTargetEvent
-
dragLeave
public void dragLeave(DropTargetEvent event)
This implementation ofdragLeaveprovides 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:
dragLeavein interfaceDropTargetListener- Overrides:
dragLeavein classDropTargetAdapter- Parameters:
event- the information associated with the drag leave event- See Also:
DropTargetAdapter,DropTargetEvent
-
dragOver
public void dragOver(DropTargetEvent event)
This implementation ofdragOverprovides 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:
dragOverin interfaceDropTargetListener- Overrides:
dragOverin classDropTargetAdapter- Parameters:
event- the information associated with the drag over event- See Also:
DropTargetAdapter,DropTargetEvent,DND.FEEDBACK_SELECT,DND.FEEDBACK_SCROLL
-
dropAccept
public void dropAccept(DropTargetEvent event)
This implementation ofdropAcceptprovides 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:
dropAcceptin interfaceDropTargetListener- Overrides:
dropAcceptin classDropTargetAdapter- Parameters:
event- the information associated with the drop accept event- See Also:
DropTargetAdapter,DropTargetEvent
-
-