Package com.biglybt.ui.swt.utils
Class DragDropUtils
java.lang.Object
com.biglybt.ui.swt.utils.DragDropUtils
While dragging over an widget, we don't get the data that will be dropped.
This utility class overcomes this by monitoring drag start events and
storing it for retrieval in drop events.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
private static class
private static class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.eclipse.swt.dnd.DragSource
createDragSource
(org.eclipse.swt.widgets.Control control, int style) static void
createDropTarget
(org.eclipse.swt.widgets.Composite composite, boolean bAllowShareAdd, org.eclipse.swt.widgets.Text url) private static void
createDropTarget
(org.eclipse.swt.widgets.Composite composite, org.eclipse.swt.dnd.DropTargetListener dropTargetListener) static void
createTorrentDropTarget
(org.eclipse.swt.widgets.Composite composite, boolean bAllowShareAdd) static void
createURLDropTarget
(org.eclipse.swt.widgets.Composite composite, org.eclipse.swt.widgets.Text url) static List<DownloadManager>
getDownloadsFromDropData
(Object dropData, boolean includeFileDrops) static Object
getTagsFromDroppedData
(Object dropData)
-
Field Details
-
DROPDATA_PREFIX_TAG_UID
- See Also:
-
lastDraggedObject
-
-
Constructor Details
-
DragDropUtils
public DragDropUtils()
-
-
Method Details
-
createDragSource
public static org.eclipse.swt.dnd.DragSource createDragSource(org.eclipse.swt.widgets.Control control, int style) -
getLastDraggedObject
-
getDownloadsFromDropData
public static List<DownloadManager> getDownloadsFromDropData(Object dropData, boolean includeFileDrops) -
getTagsFromDroppedData
-
createDropTarget
private static void createDropTarget(org.eclipse.swt.widgets.Composite composite, org.eclipse.swt.dnd.DropTargetListener dropTargetListener) -
createDropTarget
public static void createDropTarget(org.eclipse.swt.widgets.Composite composite, boolean bAllowShareAdd, org.eclipse.swt.widgets.Text url) -
createTorrentDropTarget
public static void createTorrentDropTarget(org.eclipse.swt.widgets.Composite composite, boolean bAllowShareAdd) -
createURLDropTarget
public static void createURLDropTarget(org.eclipse.swt.widgets.Composite composite, org.eclipse.swt.widgets.Text url) - Parameters:
composite
- the control (usually a Shell) to add the DropTargeturl
- the Text control where to set the link text
-