Clear Drag and Drop On Enter

Does anyone know if there is a way to reset a drag and drop interaction through an On Enter action?
Here's the need:
The learner does the drag and drop interaction.
They continue through the rest of the module.
They choose to restart the module with everything cleared out.
Right Now:  They get to the slide with the drag and drop interaction and the previous answers are there.
What I Need: They get to the slide and the drag and drop interaction is back to its original state.
Is this possible? If so, does anyone know how to do it (without the learner having to click Reset?)
Any help would be appreciated.
Thanks!

Thanx. I tried with the different overloaded startDrag() which allows an image to be set.
As my requirement is such that I do not want any image to be shown aruond next to cursor, so I set Image field to null.
On windows it does not show any block (Image) but on Mac it does :(.

Similar Messages

  • Drag and Drop fails with JDK 7u6 in Linux

    Hi,
    I'm face with a strange bug on JavaFX 2.2 (JDK 7u6, Ubuntu 12); I implemented drag & drop feature of labels in a stage; first time, I open the stage, the drag & drop works well; when I close the stage and reopen it, it fails : I can drag the label but I cannot drop it on the target (the target events are not fired); I can reproduce the bug easily with the class below, you have just to instantiate the class TestDragAndDrop in an application class.
    On window 7, it works well, I cannot reproduce the bug.
    Thank you for your help,
    David
    public class TestDragAndDrop {
        public TestDragAndDrop() {
            Stage stage = new Stage();
            stage.setTitle("Hello Drag And Drop");
            Group root = new Group();
            Scene scene = new Scene(root, 400, 200);
            scene.setFill(Color.LIGHTGREEN);
            final Text source = new Text(50, 100, "DRAG ME");
            source.setScaleX(2.0);
            source.setScaleY(2.0);
            final Text target = new Text(250, 100, "DROP HERE");
            target.setScaleX(2.0);
            target.setScaleY(2.0);
            source.setOnDragDetected(new EventHandler <MouseEvent>() {
                public void handle(MouseEvent event) {
                    /* drag was detected, start drag-and-drop gesture*/
                    System.out.println("onDragDetected");
                    /* allow any transfer mode */
                    Dragboard db = source.startDragAndDrop(TransferMode.ANY);
                    /* put a string on dragboard */
                    ClipboardContent content = new ClipboardContent();
                    content.putString(source.getText());
                    db.setContent(content);
                    event.consume();
            target.setOnDragOver(new EventHandler <DragEvent>() {
                public void handle(DragEvent event) {
                    /* data is dragged over the target */
                    System.out.println("onDragOver");
                    /* accept it only if it is  not dragged from the same node
                     * and if it has a string data */
                    if (event.getGestureSource() != target &&
                            event.getDragboard().hasString()) {
                        /* allow for both copying and moving, whatever user chooses */
                        event.acceptTransferModes(TransferMode.COPY_OR_MOVE);
                    event.consume();
            target.setOnDragEntered(new EventHandler <DragEvent>() {
                public void handle(DragEvent event) {
                    /* the drag-and-drop gesture entered the target */
                    System.out.println("onDragEntered");
                    /* show to the user that it is an actual gesture target */
                    if (event.getGestureSource() != target &&
                            event.getDragboard().hasString()) {
                        target.setFill(Color.GREEN);
                    event.consume();
            target.setOnDragExited(new EventHandler <DragEvent>() {
                public void handle(DragEvent event) {
                    /* mouse moved away, remove the graphical cues */
                    target.setFill(Color.BLACK);
                    event.consume();
            target.setOnDragDropped(new EventHandler <DragEvent>() {
                public void handle(DragEvent event) {
                    /* data dropped */
                    System.out.println("onDragDropped");
                    /* if there is a string data on dragboard, read it and use it */
                    Dragboard db = event.getDragboard();
                    boolean success = false;
                    if (db.hasString()) {
                        target.setText(db.getString());
                        success = true;
                    /* let the source know whether the string was successfully
                     * transferred and used */
                    event.setDropCompleted(success);
                    event.consume();
            source.setOnDragDone(new EventHandler <DragEvent>() {
                public void handle(DragEvent event) {
                    /* the drag-and-drop gesture ended */
                    System.out.println("onDragDone");
                    /* if the data was successfully moved, clear it */
                    if (event.getTransferMode() == TransferMode.MOVE) {
                        source.setText("");
                    event.consume();
            root.getChildren().add(source);
            root.getChildren().add(target);
            stage.setScene(scene);
            stage.show();
        public static void main(String[] args) {
            Application.launch(args);

    DUUUUUUUDE! IT'S WORKING NOW!!!!
    When you originally asked, "What happens if you click on an image and move it to another folder?", I didn't really understand what you were talking about because I almost never have my workspace set up in a way that the folders are showing. I always hide them. So I didn't really understand what you were saying. Just a few minutes ago, I realized that that is what you were asking so I opened up the folder area and tried dragging thumbs into different folders and saw that it does work.
    So then, because of you mentioning that blue line and me know that I did see the blue line on occasion. I went back over into the thumbnails to find out if I always got the blue line or if it was a hit or miss thing. I couldn't believe my eyes when all of the sudden I saw that I no longer was getting that circle with the line through it, and low and behold, the thumbnail dropped right into position like it is supposed to!!!!
    The thing is, I don't know what I've learned from this. I thought, "well, what is different?" The only thing that I can think of is that I now have the folders showing in my workspace so I wondered if that was the secret but I just now hid the folders again like I usually do and the drag and drop into position is STILL WORKING!!!
    All I can figure is that somehow, dragging and dropping a thumbnail into a folder like that for the first time, triggered something so that I can now drag and drop among the thumbnail positions? Not sure. All I know is that for some reason, IT'S WORKING NOW!
    Now, for the second important part, I wonder if I drag and drop everything into the order that I want and then select all of the files and drag them into a new folder, will they stay in that order? I need to go experiment with that.
    If you hadn't kept at it and in turn had me keep trying stuff, it would have never happened because I had pretty much given up.
    Thanks Curt!
    You da man!!!

  • Drag and Drop Problem, Drag Enter not getting called - Need Help

    While doing drag and drop on the nodes of JTRee dragGestureRecognized method is getting called,
    but after that no method is getting called, not even dragEnter.
    I am using TreePath as the Transferrable Object.
    public void dragGestureRecognized(DragGestureEvent gestureEvent)
               Point point=gestureEvent.getDragOrigin();
              TreePath path=sourceTree.getPathForLocation((int)point.getX(),(int)point.getY());
               transferable = new TransferableTreePath( path );
              source.startDrag(gestureEvent,DragSource.DefaultMoveNoDrop, transferable, this);
              System.out.println("Drag Gesture Recognized method over");
         }

    you're most welcome, Jon, and it's this board, which 'animates' me to do it that way and this way, and find out the differences..
    but, indeed: the 'settings' of a photo should be 'accessible' in both ways..
    ' cause, in MY workflow in iMHD6 or FCE, I FIRST import the video, and more important: the audio-track, which I 'spice up' with additional footage, as stills...
    .. but I've never done that in iM08, which is for my projects still in 'experimental use'...- (I LOVE those picture settings, de-saturating clips etc....), I get used to the many audio-layers in FCE ...
    ... and: lately, tought some iMovie-beginners (a photographer and a print-designer), with zil background knowledge of any iMovie version, the first steps with iM08... they want to use it to 'glue' some impressions together, they shoot while doing their photo-jobs.. and they were very impressed and excited!... +sooooo easy+ ... yepp, the User Experience IS breathtaking, awesome, groundbraking

  • Illustrator Default PDF, if open in Acro Pro, drag and drop other .ai files, will they also....

    Hi! I'm trying to archive (for myself and others for easy access) about 50 fairly complex .ai files in a single Illustrator Default PDF and maintain editability and preserve layer and grouping integrity for every separate file, and, i'm probably going to have to do this hundreds of times (at least!) in the future. Once i save the initial first pdf file through Illustrator (wish didn't even have to do this, but seems no way to do in Bridge), then open the resulting pdf w Acrobat Pro, can i then just select an entire folder's worth of ai files in Bridge, drag and drop them into the pages panel and still have the dragged and dropped files also preserve all their AI info and layer/ group integrity? An if not, thinking if not based on 20 similar experiments, what's a fast way to do this. Doing this manually each time: opening each file in AI then saving as AI pdf, then combining and arranging them all after the fact, would be, well, fairly effed in terms of time, carpal tunnel, arthritis etc. Experimented w Bridge PDF Output batching (terrible rasterized lo-res results, but great for its intended purpose) and just dragging and dropping into Acrobat (lose complicated layer names and info, all flattened to single layer). Any help most appreciated, and as i do not have regular access to das interwebs  (i live on a boat) would appreciate and heed gentle admonishment if i've misposted or broached any community etiquette here. I've researched this as well as i can but can't find anything efficient/ elegant not involving InDesign, and even then the details are skimpy. Thank You! Getting mentally exhausted and not a little loopy. Keep in mind had to teach myself both Illustrator, Acrobat etc with access to the very limited offline help menus (the boat), so a complex answer involving learning InDesign would be learning curve can't even imagine with everything else struggling to do. But if you're willing to babystep diagram it out for me or can find me a link that does i will not only be eternally grateful but will do my durndest to master it and pass it on....Thanks Again! lil mc szpf
    PS If it helps I'm running the diligent dogged dusty beloved workhorse CS4 Design Premium on 27" monitor 2010 Mac (OS X 10.6.8), and took advantage of rare housesitting net access to install all most recent updates of everything, i'm barely competent w AI, PS, BR and been tackling Acrobat for past couple of months now....

    im glad that somebody is atleast trying. perhaps i need to be more clear.
    i will step by step describe the issue in detail.
    1) i open an email that contains an attachment .dxf or .pdf
    2) i click on the attachment shown in the email and aprompt comes up asking if i want to open or save the attachment.
    3) i select save. (by default it saves to a downloads folder. but i have also chosen to use other folders (when i did that it wouldnt save them)
    4) i highlight the downloads arrow on the right top side of my browser and click it
    5) it pulls down a list of the files that i USED to be able to click and drag onto my destop, or anyplace i chose
    6) used to be when i clicked and held the left mouse button down on top of a file of my choosing it would highlight and as i began to drag, a ghost image would appear of the file i was dragging. showing a (/) symbol next to it showing i couldnt drop the file within the browser and a + simbol showing that i could drop the file when the file was hovering over a place where i could drop the file such as my desktop or other folder. now, when i click and hold on the file.... I DONT get anything. when i drag. nothing follows. while i am "dragging" in the area that is my browser, i get the pointy finger icon. as soon as i enter an area where i could have dropped the file as before, i get my standard cursor arrow.
    its really as if the drag and drop feature just dosent work IN FIREFOX.
    i can drag and drop files all day long everyplace else.

  • I am no longer able to drag and drop my downloaded files

    in yahoo. i, on a daily basis receive about 10 pdf documents and several .dxf files. also autocad .dwg files and jpg files. pretty much any file i have to work with comes to me in my email.
    i used to be able to select the file, then download it. after i was done downloading it i could open my download library, and drag and drop the file onto my desktop or other open folder on my pc.
    suddenly. i cannot.
    i have changed browsers for the time being and will not be able to continue with firefox until this is solved.
    i am running firefox 20.0.1 and windows vista sp1

    im glad that somebody is atleast trying. perhaps i need to be more clear.
    i will step by step describe the issue in detail.
    1) i open an email that contains an attachment .dxf or .pdf
    2) i click on the attachment shown in the email and aprompt comes up asking if i want to open or save the attachment.
    3) i select save. (by default it saves to a downloads folder. but i have also chosen to use other folders (when i did that it wouldnt save them)
    4) i highlight the downloads arrow on the right top side of my browser and click it
    5) it pulls down a list of the files that i USED to be able to click and drag onto my destop, or anyplace i chose
    6) used to be when i clicked and held the left mouse button down on top of a file of my choosing it would highlight and as i began to drag, a ghost image would appear of the file i was dragging. showing a (/) symbol next to it showing i couldnt drop the file within the browser and a + simbol showing that i could drop the file when the file was hovering over a place where i could drop the file such as my desktop or other folder. now, when i click and hold on the file.... I DONT get anything. when i drag. nothing follows. while i am "dragging" in the area that is my browser, i get the pointy finger icon. as soon as i enter an area where i could have dropped the file as before, i get my standard cursor arrow.
    its really as if the drag and drop feature just dosent work IN FIREFOX.
    i can drag and drop files all day long everyplace else.

  • Dojo drag-and-drop functionality - how to record?

    Hello,
    I am preparing some e-Tester scripts for our project. On one of the pages, the user has to choose some people as team members. This process is dynamic, and is developed and written using dojo (dojotoolkit.org) drag-and drop capabilities. Basically, the following happens:
    1) Initially, user has an empty "Search" form on the left and an empty "Team members" form on the right
    2) User enters some search string in the "Search" field on the left and presses the "Search now" button. The "Search" form will be filled with matching employees from the database.
    3) User moves some of the employees to the "Team members" field via drag and drop
    At the moment, I am having troubles recording the drag and drop part of the process. I tried recording all the events for the draggable sources and their targets, but it did not work (it seemed that the needed onmouse* events were recorded, but it still did not work). I also tried taking a snapshot of the needed page state, but it did not work since the drag and drop had nothing to do with the forms (dojo cuts parts of the html and pastes it elsewhere when drag and drop occurs). I even tried to fire the (not sure here) right events on the affected elements through PI, but it still did not work. Do you have any solutions, or maybe a suggestion I could try?
    You can download the dojo toolkit from http://dojotoolkit.org/downloads and do some testing on a standalone example (dojo/tests/dnd/test_dnd.html) there, it is using the same mechanics.

    That was the last thing I tried. I used FindElement to get access to the html elements dojo is "using" for drag and dropping. Then I FireEvent 'ed on those, trying to replicate the steps important for dojo DnD (drag and drop) - mostly onmouse* - but it just didn't work.
    It might have failed either because I played a wrong sequence of events (dojo has practically no information available on the event sequence needed for DnD, though it is clearly written which events are actually used) or e-Tester failing to keep its control on the elements properly (since dojo is actually changing those elements className a lot during DnD).
    So if anyone was able to steer dojos DnD like that successfully, maybe they could post a right sequence of events needed (should be something like: mousedown on the DnD item, mouseover on DnD target and mouseup on DnD item with - maybe - something inbetween).
    I would really appreciate it if someone could also explain me how exactly the the whole FindElement/get Object/do stuff with that Object business works. For example in my PI program I have:
    Set DnDSource = RSWApp.om.FindElement("DojoUnique12", "div", "id")
    So what I get is actually an object DnDSource - and abstraction - which is somehow tied to the html source the browser is looking at. How is this object connected to the html source? If I start FireEvent ing the DnDSource, what is actually happening every time? e-Tester searches the current html source each time we access DnDSource in some way, using the provided " it is a div with id=DojoUnique12" information? Or does it work in some other way? If some other property (e.g. className) of that div changes after some event, will DnDSource still reference it properly? What if its id changes? What if the element is cut and pasted elsewhere in the html source by the JavaScript at some point?
    Thanks for the help )

  • Cannot drag and drop CERTAIN photos from iPhoto 9.5.1

    I cannot drag and drop certain photos to the desktop (Mac OS X 10.9.3) from iPhoto 9.5.1
    When I encounter this problem the pointer has a circle with a slash as I drag the photo to the desktop and the file will not copy over.  I'd say 25% of my photos suffer from this problem.
    Some things of note:
    - photos that are affected have been taken by variety of devices: iPhone, DSLR camera, or scanned in from film (no device is specific to this problem)
    - a photo that cannot be copied is located in the same subfolder as one that can be copied so it's not folder specific
    - I have trashed the iPhoto prefs files as well as the cache file in Mac OS X 10.9.3
    - I have repaired permissions and the database as well as rebuilt the database in iPhoto all to no avail
    Help!

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    The title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen.Click the Clear Display icon in the toolbar. Then try the action that you're having trouble with again. Select any messages that appear in the Console window. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    The log contains a vast amount of information, almost all of which is irrelevant to solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    Some private information, such as your name, may appear in the log. Anonymize before posting.

  • Drag and Drop Interactive Game

    I am creating a drag and drop interactive game. I cannot post
    the file because it is for work and is business sensitive. Here is
    the problem I am having. I have multiple frames in the game. I have
    correctly entered the actionscript that allows for the drag and
    drop feature and to go to the next frame. However when the game
    goes to the next frame, the last drag and drop item stays on the
    screen. Is there a further actionscript I need to enter that clears
    the screen before the next frame?

    can u use the as like this:
    mcname_mc._visible = false;

  • How to add Two incorrect feedbacks in Drag and drop in captivate 7.

    Hi
    I want to show two different incorrect feedback in drag and drop interaction in Captivate 7. Currently we can show only one even though i have increased the drag and drop attempts to 2. I want to show a try again feedback and incorrect feedback with correct options and this should not be there when the learner re-visits this slide.
    Note: I am already using a success caption and have executed the action - "On Enter"  to "Hide" this success caption.
    Please help me with this.

    Hi Sreekanth,
    You understanding is correct.  But,it is not even necessary to show the correct sources on correct targets along with the feedback... the correct option numbers in  incorrect feedback will do.
    reg point number 3, if I revisit the slide, the feedback are still displayed. For example, in this case, I added a correct feedback, but when I revisit the slide, the feedback was still appearing. So I added this action "On Enter"  to "Hide" this success caption. So that is why i told specifically that none of the feed backs should be there when i revisit the slide.
    Sorry Srikanth - I am not familiar with the advanced actions or variables. I have just used some from referring the examples from net. that's all

  • Reg Drag and Drop Feedback in Captivate 7

    Hi,
    I have a drag and drop in a slide (Captivate 7) as a knowledge check.
    Problem: I need a drag and drop interaction's correct feedback to reset when the learner returns to the drag and drop slide later or clicks the back button from the next slide. Currently the correct feedback is present.
    Background: The learner completes the drag and drop and gets the 'Correct!' feedback from show action and 'Incorrect' feedback from the existing captivate failure feedback. The learner then continues the lesson by going to the next slide. The problem is that, if the learner returns to the drag and drop, the 'Correct!' feedback still shows even though the drag source items have reset to their original locations and the learner can redo the drag and drop interaction. Clicking the 'Reset' button does not remove the existing 'Correct!' feedback. Even if the learner redoes the interaction and does the opposite (e.g. if the learner got it wrong the first time, but then gets it correct this second time), the existing feedback does not change from 'Correct.'
    Any ideas on how to fix this? I understand we have to create advanced actions. Please tell me the exact steps in this instance and whether i have to execute the actions on enter or exit.
    Note: I tired to read the posts related to this. But creating the advanced options step was not given.
    Thank you.

    OK.  Just asking because I saw one of the Adobe people chime in on a similar question a day or two back.
    Unlike quiz questions, the Success and Failure Captions for drag and drop interactions appear to have Item Names which suggests they can be hidden via Advanced Actions.  You should try setting an On Slide Enter action to hide them and see if that resolves your issue.

  • How to drag and drop a file with its Systemfile icon to a Jtext area

    I want to drag and drop a file to a JText area with its system file icon , but the problem is I cant show the file icon.
    Anyone knows this.
    this is my code.
    import java.awt.*;
    import java.awt.image.BufferedImage;
    import java.awt.datatransfer.DataFlavor;
    import java.awt.datatransfer.Transferable;
    import java.awt.dnd.DnDConstants;
    import java.awt.dnd.DropTarget;
    import java.awt.dnd.DropTargetDragEvent;
    import java.awt.dnd.DropTargetDropEvent;
    import java.awt.dnd.DropTargetEvent;
    import java.awt.dnd.DropTargetListener;
    import java.io.File;
    import javax.swing.*;
    import javax.swing.filechooser.FileSystemView;
    public class FileDrag extends JFrame implements DropTargetListener {
    DropTarget dt;
    File file;
    JTextArea ta;
    JLabel lbl;
    Graphics g;
    ImageIcon tmpIcon;
    public FileDrag() {
    super("Drop Test");
    setSize(300, 300);
    getContentPane().add(
    new JLabel("Drop a list from your file chooser here:"),
    BorderLayout.NORTH);
    ta = new JTextArea();
    ta.setBackground(Color.white);
    getContentPane().add(ta);
    dt = new DropTarget(ta, this);
    setVisible(true);
    public void dragEnter(DropTargetDragEvent dtde) {
    System.out.println("Drag Enter");
    public void dragExit(DropTargetEvent dte) {
    System.out.println("Source: " + dte.getSource());
    System.out.println("Drag Exit");
    public void dragOver(DropTargetDragEvent dtde) {
    System.out.println("Drag Over");
    public void dropActionChanged(DropTargetDragEvent dtde) {
    System.out.println("Drop Action Changed");
    public void drop(DropTargetDropEvent dtde) {
    FileSystemView view = FileSystemView.getFileSystemView();
    JLabel testb;
    Icon icon = null;
    Toolkit tk;
    Dimension dim;
    BufferedImage buff = null;
    try {
    Transferable tr = dtde.getTransferable();
    DataFlavor[] flavors = tr.getTransferDataFlavors();
    for (int i = 0; i < flavors.length; i++) {
    System.out.println("Possible flavor: " + flavors.getMimeType());
    if (flavors[i].isFlavorJavaFileListType()) {
    dtde.acceptDrop(DnDConstants.ACTION_COPY);
    ta.setText("Successful file list drop.\n\n");
    java.util.List list = (java.util.List) tr.getTransferData(flavors[i]);
    for (int j = 0; j < list.size(); j++) {
    System.out.println(list.get(j));
    file = (File) list.get(j);
    icon = view.getSystemIcon(file);
    ta.append(list.get(j) + "\n");
    ta.append("\n");
    tk = Toolkit.getDefaultToolkit();
    dim = tk.getBestCursorSize(icon.getIconWidth(), icon.getIconHeight());
    buff = new BufferedImage(dim.width, dim.height, BufferedImage.TYPE_INT_ARGB);
    icon.paintIcon(ta, buff.getGraphics(), 10, 10);
    repaint();
    dtde.dropComplete(true);
    return;
    System.out.println("Drop failed: " + dtde);
    dtde.rejectDrop();
    } catch (Exception e) {
    e.printStackTrace();
    dtde.rejectDrop();
    public static void main(String args[]) {
    new FileDrag();

    I want to drag and drop a file to a JText area with its system file icon , but the problem is I cant show the file icon.
    Anyone knows this.
    this is my code.
    import java.awt.*;
    import java.awt.image.BufferedImage;
    import java.awt.datatransfer.DataFlavor;
    import java.awt.datatransfer.Transferable;
    import java.awt.dnd.DnDConstants;
    import java.awt.dnd.DropTarget;
    import java.awt.dnd.DropTargetDragEvent;
    import java.awt.dnd.DropTargetDropEvent;
    import java.awt.dnd.DropTargetEvent;
    import java.awt.dnd.DropTargetListener;
    import java.io.File;
    import javax.swing.*;
    import javax.swing.filechooser.FileSystemView;
    public class FileDrag extends JFrame implements DropTargetListener {
    DropTarget dt;
    File file;
    JTextArea ta;
    JLabel lbl;
    Graphics g;
    ImageIcon tmpIcon;
    public FileDrag() {
    super("Drop Test");
    setSize(300, 300);
    getContentPane().add(
    new JLabel("Drop a list from your file chooser here:"),
    BorderLayout.NORTH);
    ta = new JTextArea();
    ta.setBackground(Color.white);
    getContentPane().add(ta);
    dt = new DropTarget(ta, this);
    setVisible(true);
    public void dragEnter(DropTargetDragEvent dtde) {
    System.out.println("Drag Enter");
    public void dragExit(DropTargetEvent dte) {
    System.out.println("Source: " + dte.getSource());
    System.out.println("Drag Exit");
    public void dragOver(DropTargetDragEvent dtde) {
    System.out.println("Drag Over");
    public void dropActionChanged(DropTargetDragEvent dtde) {
    System.out.println("Drop Action Changed");
    public void drop(DropTargetDropEvent dtde) {
    FileSystemView view = FileSystemView.getFileSystemView();
    JLabel testb;
    Icon icon = null;
    Toolkit tk;
    Dimension dim;
    BufferedImage buff = null;
    try {
    Transferable tr = dtde.getTransferable();
    DataFlavor[] flavors = tr.getTransferDataFlavors();
    for (int i = 0; i < flavors.length; i++) {
    System.out.println("Possible flavor: " + flavors.getMimeType());
    if (flavors[i].isFlavorJavaFileListType()) {
    dtde.acceptDrop(DnDConstants.ACTION_COPY);
    ta.setText("Successful file list drop.\n\n");
    java.util.List list = (java.util.List) tr.getTransferData(flavors[i]);
    for (int j = 0; j < list.size(); j++) {
    System.out.println(list.get(j));
    file = (File) list.get(j);
    icon = view.getSystemIcon(file);
    ta.append(list.get(j) + "\n");
    ta.append("\n");
    tk = Toolkit.getDefaultToolkit();
    dim = tk.getBestCursorSize(icon.getIconWidth(), icon.getIconHeight());
    buff = new BufferedImage(dim.width, dim.height, BufferedImage.TYPE_INT_ARGB);
    icon.paintIcon(ta, buff.getGraphics(), 10, 10);
    repaint();
    dtde.dropComplete(true);
    return;
    System.out.println("Drop failed: " + dtde);
    dtde.rejectDrop();
    } catch (Exception e) {
    e.printStackTrace();
    dtde.rejectDrop();
    public static void main(String args[]) {
    new FileDrag();

  • Why can't I drag and drop music from a folder on my PC into my iTunes window?

        Why can't I drag and drop music from a folder on my PC into my iTunes window?
    I have not found any article that has answered this question. They have come up with things like open the side bar and it will work, or you are using wrong format of music. Now this all happened when I upgraded to iTunes 10 and has not worked since and it worked fine before. Music format is correct, I have even gone as far as copying a file already in iTunes and trying to add it again. As soon as the files enters the frame of iTunes the music files icon the pointer is carrying turns into a circle with a slash through it.
    ITunes Ver. is 11.1.5.5  Windows Ver. is Windows 8.1 Pro with Media Center
    Files I have tried adding are standard MP3, 256 kbps purchased AAC Audio file, MP3 converted by iTunes into a 256 or 320 kbps AAC Audio file. None can be draged and droped but all can added by going to File/Add File to Library...  or File/Add Folder to Library...
    Add items from your computer to your iTunes library
    Do either of the following:
    1. Drag a file or folder from the desktop to the iTunes window.If you add a folder, all the files it contains are added to your library.
    2. In iTunes, choose File > Add to Library, locate a file or folder, and click Open.
         I can add files and folders by doing number 2 above but can not doing number 1
    I have gone as far as uninstalling iTunes and reinstalling per apple procedures below.
    Steps
    1. Remove iTunes and its related components from the Control Panel
    Use the Control Panel to uninstall iTunes and related software components in the following order and restart your computer:
    iTunes
    Apple Software Update
    Apple Mobile Device Support
    Bonjour
    Apple Application Support (iTunes 9 or later)
    Important: Uninstalling these components in a different order or only uninstalling some of these components may have unintended effects.

    I had this problem on Windows 8.1.1 and iTunes 11.2.2.3
    To resolve it from within Itunes I did :  Edit, Preferences, Sharing.
    I took the tick out of "Share my library on my local network"
    Click OK.
    Closed iTunes/
    Reopened iTunes and I can drag and drop.
    I went back into Edit, Preferences, Sharing and put the tick back and clicked OK.
    Works fine now.

  • How to auto close finder window after drag and drop?

    In Tiger, I would file away items on my desktop my dragging them to the hard drive and then digging down to the appropriate folder. The finder window would then close automatically after dropping the file. Is there a setting in Snow Leopard that will enable similar functionality? Whenever I complete a drag and drop now the finder window just stays open, which isn't a huge issue, but I'd still like to change it. Thanks!

    Here is the test code:
         lo_nd_table_data_source = wd_context->get_child_node( name = wd_this->wdctx_table_data_source ).
          lo_nd_table_data_source->get_static_attributes_table( IMPORTING table = lt_table_data_source ).
          "Read Dummy Table
          lo_nd_table_data_source->get_static_attributes_table( IMPORTING table = it_table_data_source ).
        CONCATENATE ls_airline_info-carrid ls_airline_info-connid ls_airline_info-fldate INTO ls_table_data_source-row_key.
          ls_table_data_source-parent_row_key = ls_airline_info-carrid.
          ls_table_data_source-is_leaf   = abap_false.
          ls_table_data_source-expanded  = abap_true.
            SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE it_table_data_source.
         LOOP AT it_table_data_source INTO wa_table_data_source WHERE carrid = ls_airline_info-carrid
                                                                and   connid = ls_airline_info-connid
                                                                and   fldate = ls_airline_info-fldate.
          ls_table_data_source-connid    = ls_airline_info-connid.
          ls_table_data_source-fldate    = ls_airline_info-fldate.
          ls_table_data_source-PRICE     = wa_table_data_source-PRICE.
          ls_table_data_source-CURRENCY  = wa_table_data_source-CURRENCY.
          "Select all data to the new dummy table structure.
          "Move one row of the table to ls_table_data_cource correspondingle.
          APPEND ls_table_data_source TO lt_table_data_source.
          DELETE ADJACENT DUPLICATES FROM lt_table_data_source.
       ENDLOOP.
          lo_nd_table_data_source->invalidate( ). "Clear the table data
          lo_nd_table_data_source->bind_table( lt_table_data_source ). "Refresh new data
    Thanks,
    Kiran

  • Desktop drag and drop icon for my "other" computer

    i really need an icon for my MacBookPro desktop to reside on my Mac Pro desktop (and vice versa) so that I can just drag and drop copy (or move) data from one volume to another. sort of like what I have with my dropbox icon in the sense that I can just keep this on my desktop and in the View Pane of Finder and drag and drop items or open the volume etc.
    is this possible and i am just not getting it to work because i don't have things set to mount automatically or is there a restriction that does not allow this that I don't understand?
    i am on snow leopard and the connection is via wi, but I could plug in via ethernet when i know i will need to do this sort of moving of data a lot.
    thanks for clearing any of this up for me.
    - jon

    if as3, create a sprite or movieclip and use:
    image1.addEventListener(MouseEvent.MOUSE_DOWN,downF);
    image1.addEventListener(MouseEvent.MOUSE_UP,upF);
    function downF(e:MouseEvent):void{
    Sprite(e.currentTarget).startDrag();
    function upF(e:MouseEvent):void{
    Sprite(e.currentTarget).stopDrag();

  • Drag and drop a URL from IE's address bar

    I have a Processing application written (by others) that uses [Andreas Schlagel's sDrop library|http://www.sojamo.de/libraries/drop/] to accept URLs dragged and dropped from the users' browsers' address bar. The application works fine for Chrome and for Firefox and for old versions of IE but not for IE 9 or IE 10. I'm investigating how to fix this.
    In the sDrop library [the Java code to handle the drop|http://code.google.com/p/sojamo/source/browse/trunk/src/sojamo/drop/DropHandler.java] uses the Java class DataFlavor which in turn defines a number of flavours:
    imageFlavor
    javaFileListFlavor
    javaSerializedObjectMimeType
    plainTextFlavor (deprecated)
    stringFlavor
    Over on StackOverflow one questioner enumerates the data formats offered by the different browsers when they drop and for IE he lists:
    UntrustedDragDrop
    msSourceUrl
    FileGroupDescriptor
    FileGroupDescriptorW
    FileContents
    UniformResourceLocator
    Effects: Link
    The URL format does not seem to match the DataFlavors given by the class. Is this where the two additional DataFlavors, javaJVMLocalObjectMimeType and javaRemoteObjectMimeType come into there own? If so, then can someone point me at any samples, examples, tutorials, or code snippets where a Java application is the successful drop target for a URL dragged from IE's address bar?

    Dragging an URL '''OR''' the 'favicon' does '''NOT''' work when you want to drag this to a sub 'folder' in your bookmarks. e.g. I drag an URL or favicon to Bookmarks, I have a sub-folder called 'Recipes' where I want to drop the dragged object. I position the mouse over 'Recipes' and the sub-menu appears. I move the dragged object to drop this on the recipe list in the sub-menu and the sub-menu simply disappears. Equally, I CAN drop this on the top level BM menu but it does not drop in the place needed (I want this (e.g.) NOT at the bottom but two up from there. What happens is that the dropped URL appears to locate it self in a random position. Easy to replicate by dragging the same URL to the BM menu and it drops wherever it feels like. FF team have clearly failed to do some basic testing on this and there are many (correction MANY) other annoying things like this that show there has been poor or insufficient testing. I have been a fan of FF for a long time and recommended it to others. Now I cannot do this with confidence and am seriously thinking of switching back to an old version. However, I might simply go to Chrome. Are you listening FF team? A simple look at the forums will show the groundswell of annoyed people. You have altered the way many things work, seemingly focusing on prettifying things rather than ensuring stability and ensuring basic features continue to work...

Maybe you are looking for