drag-and-drop

What printable element is better to use than linear-gradient?

青春壹個敷衍的年華 提交于 2019-12-11 17:23:31
问题 I have this DnD application where i use CSS "linear-gradient" to show the user where a blind spot is. It looks like this: https://jsfiddle.net/y03q0zmn/1/ <div class="elementsDiv ui-draggable ui-draggable-handle" id="29065-1_104" data-weight="945" data-nr="104" style="width: 159.5px; height: 20px; background: linear-gradient(to right, rgb(194, 194, 214) 0%, 24.2px, rgba(0, 0, 0, 0) 24.2px, rgba(0, 0, 0, 0) 115.2px, rgb(194, 194, 214) 115.2px, rgb(194, 194, 214) 100%); position: absolute; left

Selenium HTML5 Drag-and-drop workaround in java using javascript shows an error

十年热恋 提交于 2019-12-11 17:11:03
问题 I am trying to use java script workaround using https://github.com/vikramvi/Selenium-Java/commit/a1354ca5854315fded8fc80ba24a4717927d08c7 to get Drag and Drop in HTML5 working with selenium Webdriver with java on Chrome. The application I'm trying to test just has drag and drop function and I need to make this working but I keep getting error. Please help! Here is my code: @Then("^I drag element having css from \"([^\"]*)\" to element having css \"([^\"]*)\"$") public void i_drag_element

Moving a Node within its parent pane, and dropping it to another

十年热恋 提交于 2019-12-11 17:07:24
问题 Moving a node ( Label in this case) within its parent Pane (lets call it moving), works as expected by adding appropriate handlers for MouseEvent : node.setOnMousePressed(new EventHandler<MouseEvent>() { @Override public void handle(MouseEvent mouseEvent) { x = node.getLayoutX() - mouseEvent.getSceneX(); y = node.getLayoutY() - mouseEvent.getSceneY(); } }); node.setOnMouseDragged(new EventHandler<MouseEvent>() { @Override public void handle(MouseEvent mouseEvent) { node.setLayoutX(mouseEvent

UWP TreeView DragEnter and DragOver events do not execute

独自空忆成欢 提交于 2019-12-11 17:06:25
问题 It is very important that I can track which item is dragged in UWP TreeView and onto which item it is dropped. For now, I can get only item that is dragged. But I can not detect over which item it is dragged over or over which item it is dropped. Also it would be also good to know as preview which item is dropped onto so I can do more actions (for example cancel dropping on certain items). Here is my extended control: public class MyTreeView : TreeView { public MyTreeView() { this

Java: How to drag JTable rows without usage of TransferHandler?

旧城冷巷雨未停 提交于 2019-12-11 17:00:58
问题 In Java, JTable by default does not offer the functionality to drag JTable rows for reordering the table. Many of the answers I see online, suggest that you should use a custom TransferHandler implementation to achieve this behaviour. However, I find that that highly overcomplicates things and there needs to be an easier way to do so. Can anyone give suggestions on how to more efficiently drag & drop table rows for reordering the table? 回答1: In order to achieve this behavior, you can use a

How to update ObservableCollection in codeBehind after drag and drop on listview - WPF MVVM

☆樱花仙子☆ 提交于 2019-12-11 16:21:32
问题 I am having some difficulty when I use the Josh Smith's issue for DnD on listView. I have an ObservableCollection of "DetailTable" that I initialize in the ViewModel when I create the view : (ListeTables is CollectionViewSource where I initialize and use my data) public ObservableCollection<DetailTable> ListeTablesDisplay { get { var l = ListeTables.View.Cast<DetailTable>().ToList(); return new ObservableCollection<DetailTable>(l); } } The listView in the Xaml file : <ListView Name=

Move and Reorder JLabels in JPanel using DnD

ぐ巨炮叔叔 提交于 2019-12-11 16:19:41
问题 I have a program I'm working on that takes input names and creates JLabels and populates them into an ArrayList. When the user clicks the Begin button, the JLabels populate in the left JPanel. What I've been trying to do it use DnD to allow the user to drag and re-order the labels in the left panel. So far, I've only been able to get it to copy the text from one label to another. My goal is to drag a label up or down in the list, and depending on where it's dropped in the JPanel, have the

add signature or image on PDF using drag and drop android (get x and y coordinates )

只愿长相守 提交于 2019-12-11 15:29:26
问题 I am using Pdfbox https://github.com/TomRoush/PdfBox-Android to add signature(image) on pdf i want to add signature using drag and drop i have implemented some code using touch listener please see and help me i am not getting exact x and y coordinates to add it in pdfbox code from touch listener and i also try drag and drop code https://www.tutorialspoint.com/android/android_drag_and_drop.htm but it won't help. when i test the app and drop the signature(image) on pdf the result pdf won't get

How to update the graph model efficiently after certain operation in mxgraph?

天涯浪子 提交于 2019-12-11 15:28:13
问题 After consecutive drag and drop in mxgraph, the parentInfo is lost for cell. Children and Parents for cell are not getting updated after consecutive drag and drop. Drag and Drop is handled using connect, the logic behind is simple. Removing the existing parent connection and establishing new edge connection with target node. mxConnectionHandler.prototype.connect = function( source, target, evt, dropTarget ) { var sourceParentCell = getParentCell(source); if (sourceParentCell !== target) {

Swing JTextfield DnD replace the existing text with the imported text

大兔子大兔子 提交于 2019-12-11 15:09:50
问题 I have two text fields and I can drag and drop the text between them. What I want is that every time I drag the text it will replace the existing text data with the text which was dragged and dropped. import java.awt.Container; import javax.swing.BoxLayout; import javax.swing.JFrame; import javax.swing.JTextField; public class DragDropText extends JFrame { public static void main(String[] args) { new DragDropText().setVisible(true); } public DragDropText() { setDefaultCloseOperation(JFrame