drag-and-drop

How to drag and drop shape between two panels

柔情痞子 提交于 2019-12-11 10:57:32
问题 I have two panel, one on the left, which contains my shapes drawn on buttons, and the main panel on the left, where I drop the shapes How can I implement a drag and drop ? Edited this the code I'am using actually that produce a kind of a dragging public void mouseReleased(MouseEvent e) { CreateShapeCommand Cmd= new CreateShapeCommand(shape); Caretaker.getInstance().execute(Cmd.copy(e.getX(),e.getY())); } 回答1: You should get familiar with this tutorial. 来源: https://stackoverflow.com/questions

Dojo Uploader with Drag and Drop

倾然丶 夕夏残阳落幕 提交于 2019-12-11 10:36:20
问题 I am trying to recreate this example in my project, to add the drag and drop feature to the dojo uploader: http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/form/tests/test_Uploader.html Copying the exact same code in jsfiddle or in my application the line if(uploader.addDropTarget && uploader.uploadType=='html5'){ returns undefined for addDropTarget and iframe for the uploadType. I tried it with various browsers, and even added force: html5 in the uploader but nothing changed. Please,

Can I drag sections in tableview as I can do it with rows?

强颜欢笑 提交于 2019-12-11 10:36:05
问题 I use - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath{ } method for dragging and dropping rows within and across sections. Can I perform drags with sections as well? 回答1: It's probably conceptually (as well as technically) simpler to step back a level to a table view where each row corresponds to the sections of the table you want to re-order. Maybe you could invoke this with a "re-order sections"

How to get image if I drag and drop an Image from Google Chrome or Internet Explorer in AS3

一曲冷凌霜 提交于 2019-12-11 10:34:53
问题 I am trying to drag an Image from Google Chrome or Internet Explorer and Drop into my Flex Project but I am unable to get Image directly from temp folder like Mozilla Firefox, For Example I am using the following codes go get drag drop images from system temp folder in case of Mozilla Firefox: this.addEventListener(NativeDragEvent.NATIVE_DRAG_DROP, onNativeDragDrop); private function onNativeDragDrop(vEvent:NativeDragEvent) { var dropFiles:Array = vEvent.clipboard.getData(ClipboardFormats

How to prevent Bootstrap from making the dragged row change in width?

自闭症网瘾萝莉.ら 提交于 2019-12-11 10:25:59
问题 I would like to have a table which allows me to drag and drop to reorder its rows in it. Here is the solution offered by Trevor and the original author. A table and its rows gets changed in width when dragging and dropping to reorder its rows Here is the jsfiddle demo http://jsfiddle.net/trevordowdle/2Sg8v/ However, if I add Bootstrap class "table" to the table, the dragged row shrinks. I tried many ways to set the width of the dragged row (the row dynamically created by JQuery UI) and got no

Eclipse RCP 3.x draggable Toolbar

天大地大妈咪最大 提交于 2019-12-11 10:23:56
问题 In addition to my previous question, since there are some issues with Drag and Drop on E4: The DND addon is found in the org.eclipse.e4.ui.workbench.addons.swt plugin . However it requires the compatibility layer and is not available for native E4AP applications. Question Is it possible to create an old-style Eclipse 3.x application, that runs on the current Eclipse 4.5.1 platform and uses the nice toolbar from the Eclipse IDE with Drag and Drop functionality? Starting with a fresh

How to show custom DragShadow instead of ListViewFragment row?

谁说我不能喝 提交于 2019-12-11 10:21:24
问题 I have a ListFragment that has a custom adapter so that I could have a text view and an image view on each row. When dragging this row to my canvas (a separate fragment), it shows the whole row as the drag shadow (default behavior). I want to drag only the icon/image to the canvas. My code sample below produces the original drag shadow (whole row from list view) with the desired image drawn behind the cell (a bit stretched because of the bounds setting code). Pretty picture here. According to

is it possible to move a composite control by clicking on one of its daughter controls?

天涯浪子 提交于 2019-12-11 09:52:46
问题 What I am attempting to accomplish is to move by drag and drop method a bunch of composite controls as outlined by the following image: Currently I am able to do this by only the edge of the composite control. Is it even possible to be able to click on a child/daughter control in the composite control to be able to move the entire composite control? Here is my code for the addition of the control to panel3 of the main form: private void newPictureBox_Click(object sender, EventArgs e) {

Change cursor in JavaFx ListView during drag and drop

本小妞迷上赌 提交于 2019-12-11 09:15:52
问题 I have a listview where I made it possible to rearrange the elements via drag-and-drop and it works fine, however I want to replace the two default icons with my own custom ones. I have tried with i.e. setCursor(Cursor.HAND) setCursor(new ImageCursor(image)) on both the ListCell itself or its parents but nothing gets reflected during the drag, only after, which is not what I want. Anyone know how to go about this? Edit1: This question has nothing to do with how to create a reorder-able

Blend two images with pixastic does not work. How to get the new image?

ε祈祈猫儿з 提交于 2019-12-11 09:06:59
问题 Hey i´m trying to blend two images with pixastic. One image can be dragged an dropped on the other image (with jqueryUI) and after it has got the right position the two images shall become one. So i want to use the pixastic blend effect. I tried this so far: function BlendTheImages() { var img = new Image(); img.onload = function() { var blendImg = new Image(); blendImg.onload = function() { Pixastic.process(img, "blend", { amount : 1, mode : "multiply", image : blendImg } ); } blendImg.src =