drag-and-drop

Enable stringFlavor of Transfersupport in Java Swing

风流意气都作罢 提交于 2019-12-18 06:55:27
问题 I am implementing a functionality to Drag and Drop the Textattribute of JLabels into the cells of a JTable. So I've created a custom TransferHandler for the table. But every call of support.isDataFlavorSupported(DataFlavor.stringFlavor) returns false How can I make sure that my TransferHandler is able to import Strings? Here is the source public class TableHandler extends TransferHandler { private static final long serialVersionUID = 1L; @Override public boolean canImport(TransferSupport

How to simulate a drag and drop action in protractor in angular2?

丶灬走出姿态 提交于 2019-12-18 05:21:30
问题 I have two divs. var e1 = element(by.id('draggable-0')); var e2 = element(by.id('dropContainer-0')); I want to drop e1 in e2 .i.e. implementing drag & drop in e2e test case for angular2. I tried below code: var e1 = element(by.id('draggable-0')); var e2 = element(by.id('dropContainer-0')); browser.driver.actions().dragAndDrop(e1.getWebElement(),e2.getWebElement()).perform(); browser.sleep(2000); but its not working.My chrome gets opened but nothing happens. any inputs? thanks. 回答1: Your page

Enable dropping a file onto a Ruby script

痴心易碎 提交于 2019-12-18 05:12:32
问题 I'm creating a small ruby script to resize images and save them in a specified directory. I'd like the application to be as transparent as possible. Is it possible to allow file dropping onto my Ruby script in all platforms? For instance, the user drags a file onto the script, which then takes the file path as an argument and resizes the image accordingly -- No GUI, no console, etc.. 回答1: The behavior of drag & drop is dependent on the OS (and in case of Linux of the Window Manager), so no.

Drag & Drop directly from Outlook in web app [duplicate]

孤街醉人 提交于 2019-12-18 04:59:06
问题 This question already has answers here : Drag-and-drop Outlook message into browser (3 answers) Closed 2 years ago . I know this question is relating the same problem as mine : Upload fails when user drags and drops attachment from email client but I'm looking for a workaround to achieve a drop from Outlook message into my webapp (currently only HTML5 / JS code). Is it possible, with some activeX, to copy the message in a temp filesystem folder and then use this file reference ? I would like

Can't drop jquery ui helper on droppable

一曲冷凌霜 提交于 2019-12-18 04:54:26
问题 Why will this code not let me drop the helper onto the droppable region? $(".product").draggable({ revert: 'invalid', cursorAt: { top: -12, left: -20 }, helper: function(event) { return $('<div class="product_helper"></div>'); } }); $(".droppable").droppable({ accept: '.product_helper', drop: function(event, ui) { $(this).append( ui.helper ); } }); Is it even possible to drop a helper onto a droppable? 回答1: It's completely possible to drop a clone of the helper however the helper itself (as

Stop OnLongClickListener from firing while dragging

孤人 提交于 2019-12-18 04:46:12
问题 I have a custom View with bitmaps on it that the user can drag about. I want to make it so when they long click one of them I can pop up a context menu with options such as reset position etc. In the custom View I add my OnLongClickListener: this.setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean onLongClick(View v) { // show context menu.. return true; } }); And override onTouchEvent to look something like this: public boolean onTouchEvent(MotionEvent event) {

Make Inno Setup WizardForm moveable if titlebar is disabled

血红的双手。 提交于 2019-12-18 04:23:17
问题 I want to make an installer with a custom look and disabled the titlebar by setting the BorderStyle to bsNone . Now I cannot move the window anymore. I have looked around and found a solution for Delphi: http://www.chami.com/tips/delphi/010397D.html Can this be accomplished in Inno Setup? I have already looked up the WM_NCHITTEST thing on MSDN but I cannot figure out if and how I can make this work. Edit: After looking around and compiling it using the advanced compiler advanced compiler I

File upload using HTML5's drag and drop in Asp.net

笑着哭i 提交于 2019-12-18 04:19:13
问题 Am trying to upload a file using HTML5's DnD and File API. Am not to sure how to send form data to the server, i tried to send using XMLHttpRequest but was not successful. This what i have so far. <body> <form id="form1" runat="server" enctype="multipart/form-data"> <br /> <div id="drop_area">Drop files here</div> <br /> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button"/> </form> </body> <script> if (window.File && window.FileList && window.FileReader) { var

C# Drag and Drop From listBox

早过忘川 提交于 2019-12-18 03:48:21
问题 I'm trying to build a simple interface that allows users to drop files into a listBox to add them to a process, and to drag them out to remove them. Everything is working fine, but I'd like to add one feature to make it just a tad more sophisticated. Right now, I have the removal of the item tied to the DragLeave event, which means that as soon as the mouse leaves the box, the item is removed. But I'd like for users to be able to change their minds. In other words, if they realize they're

WPF drag and drop from a ListBox that has SelectionMode=Extended

爱⌒轻易说出口 提交于 2019-12-18 03:42:31
问题 I have a ListBox and want the selection-mode to be extended. Also I want have to implement drag and drop functionality. The problem now is, that if the mouse is clicked on a selected item, it will be immediately be selected as single selection instead of waiting to the mouse-up-event for doing this. Due to this behaviour, start dragging multiple items is for the user quasi impossible because always he clicks on the selection to start dragging, the selection changes to the item that is under