drag-and-drop

DragNDrop from Java to Windows Explorer

南笙酒味 提交于 2019-12-10 23:46:32
问题 I want to create an application in Java that lists a directory and add drag and drop support to it for copying files from that directory to the explorer window opened and vice-versa(Windows system). While adding support to drag and drop from windows explorer to the java application is quite easy, it kind of eludes me how to do it when the action starts from the java application and ends in explorer. I tried searching google and SO, but to no avail. Any pointers, directions, snippets of codes

SWT DropTargetListener has empty event data under Mac OS X

烈酒焚心 提交于 2019-12-10 23:38:49
问题 I'm currently experiencing a weird platform inconsistency between Mac OS X and Windows/Linux. I've implemented an SWT DropTargetListener and tried to analyze the data dropped in the dragEnter method. Unfortunately, the data attribute of the TransferData contained in the DropTargetEvent parameter is always null on OS X (but becomes valid in DropTargetListener.drop method where it's too late to give user feedback). It works fine under Windows and Linux. Can anybody help me out? Or is this a

DragDrop-Support of PictureBox-Control

两盒软妹~` 提交于 2019-12-10 23:26:10
问题 After some searching i figured out how dragdrop is implemented for a picturebox. But there is one thing - the (inherited of course) allowdrop property isn't accessible from code or property window of picturebox class. So to make it work i added following line to my form-load: ((Control)pictureBox1).AllowDrop = true; Why do i have to do that? In msdn it says: "This API supports the .NET Framework infrastructure and is not intended to be used directly from your code." Any explanation

Copying file(s) with drag and drop from Qt 5.2 application to file system

和自甴很熟 提交于 2019-12-10 21:54:40
问题 How do I go about generating a file drag and drop operation in a Qt 5.2 application that performs a copy (or move) in the file system (Windows, Mac, etc.)? More specifically: Generate a drag with 1+ file paths that will perform a copy/move on those files when dropped onto the system. Is there a standard mime-type I can use for this - providing file paths as mime data? 回答1: QMimeData has a functionality to add a text/uri-list . To drag/drop a file onto the system add a QUrl that starts with

e.Data.GetData casting problem in WinForms drag-and-drop

微笑、不失礼 提交于 2019-12-10 20:57:18
问题 i'm trying to make a drag-and-drop between 2 instances of my programs, but when i try to cast data to my type it throws an Invalid Cast Exception. Here is the code: protected virtual void GetDropIEntities(DragEventArgs e) { foreach (string s in e.Data.GetFormats()) Console.WriteLine(s); Entity[] myDroppedEnts = (Entity[])e.Data.GetData(e.Data.GetFormats()[0]); } The weirdest thing is that Console.WriteLine writes "Entity[]" on the output, but when i try to cast the exception is thrown. Can

Android: After drop, editText that was being dragged disapears

£可爱£侵袭症+ 提交于 2019-12-10 20:13:02
问题 I'm trying to create a form in which the user can move inputs around. I have an editText and want it to be able to move it to a new location in my relativeLayout. I am able to pick it up and move it around, but once I let go, it disappears completely. I've tried pretty much everything. I think the onDrag method may not ever be called because my logs never show up. Also, after a let go of my editText, I get this error message in logcat: Reporting drop result: false Another issue I've been

Drag and Drop for listview of views

◇◆丶佛笑我妖孽 提交于 2019-12-10 20:04:57
问题 Hi i am having Listview where each item is having different layout.and i want to perform drag and drop on this listview.i have searched many examples and tried but all works for listview of strings or something like that,none is working on listview of views.finally i decided to go with DevBytes: ListView Cell Dragging and Rearranging this one.i implemented dynaliclistview but it is crashing as this also using strings in listview.Following is my listview adapter public class

How to drag a rotated DragShadow?

一曲冷凌霜 提交于 2019-12-10 19:55:03
问题 I rotated a TextView with ObjectAnimator like this: ObjectAnimator rotate = ObjectAnimator.ofFloat(aRotatedTextView, "rotation", 0f, someAngle); Now, I try to drag and drop the rotated(!) TextView on long click like this: public boolean onLongClick(View view) { ClipData data = ClipData.newPlainText("DragData", (String) view.getTag()); DragShadowBuilder dragShadowBuilder = new View.DragShadowBuilder(view); mDragInProgress = view.startDrag(data, dragShadowBuilder, view, 0); view.setVisibility

Droppable items not displaying hoverClass if they are shown during drag operation

蹲街弑〆低调 提交于 2019-12-10 18:53:55
问题 I know the title is confusing, but the problem is easily reproduced. I have some elements on my page that are droppable (jQueryUI), and the hoverClass shows when they are being dragged over. However, I have some hidden elements that are sometimes shown during the drag, and then do not respond with their hoverClass as they should. I have a jsFiddle here that shows this happening, however, if you continue to drag the div around eventually the listItems start to show their hoverClass. However,

HTML 5 drag events: 'dragleave' fired after 'dragenter'

◇◆丶佛笑我妖孽 提交于 2019-12-10 18:29:05
问题 I'm using html5 dragevents in a single page application. Currently, I'm listening to the dragleave and dragenter events to set the proper classes on the elements. But, when two valid target elements(A and B) are next to each other, and we drag an elment through A into B, the events are fired in the following sequance. +--------------+-------------+ | | | +-------+ | A | B | | | | | | | Elem +------------------------------------> | | | | | | +-------+ | | | +--------------+-------------+