Drag and Drop to Change Order in a List

Does anyone know of an example where there is the ability to drag and drop elements in a list and thus change their order? (I.E. drag item one below item two and then item one and two change locations)
Thanks!

Check out http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html
There's an example towards the end of the page for drag-and-drop between 2 JLists. Might be a good starting point.

Similar Messages

  • Drag and Drop to Change Order of a Collection

    I have created a collection and now want to change the order of the photos in the collection. I try to select a photo to drag and drop it to the correct position.
    Sometimes I can do this, other times I can't.
    If I exit and reenter Lightroom, the problem of not being able to drag and drop is corrected.
    Any ideas about a workaround for this bug without exiting and restarting Lightroom?
    Thanks,
    Harry

    Harry,
    You have to be at the lowest level of a folder/collection to get drag and drop to work.
    If you have 'Include Photos from Subitems' unticked then you can sort in higher up folders/collections, but this only shows items in the actual collection/folder.
    If you have images in multiple collections that you want to sort in order, select them and then Ctrl N (Cmd N on Mac ) to create a new collection. Tick the use selected photos box and name the new collection. Make sure it's at the bottom of a collection tree (or on it's own) and then sort inside the new collection.
    When dragging, drag from the image itself, not from the border around it.

  • Drag and drop songs in order?

    I want to organise the order of songs in a playlist but can't seem to drag and drop anymore since updating?

    I can still drag and drop - from within the playlist.

  • Drag and Drop Cursor changes - not working

    I have fully implemented a working drag and drop Swing application, but I am running into problems with the cursor.
    My application has some drop targets that set the cursor to DragSource.DefaultCopyNoDrop, and some that set it to DragSource.DefaultCopyDrop. The problem is once I change the cursor DefaultCopyDrop, I can never change it to NoDrop. I can however change it from NoDrop to Drop. I have tried it with jdk1.4 beta3 and rc.
    An example of this cursor behavior can be found at:
    http://www.javaworld.com/javaworld/jw-03-1999/jw-03-dragndrop.html
    I found some information related to this at:
    http://developer.java.sun.com/developer/bugParade/bugs/4407521.html
    I have tried using a null cursor in the startDrag method.
    Does anyone have a DND example where the cursor consistantly changes to give drop feedback that works with the DND in JDK1.4?
    Dave

    Hi, I also want to implement DND. I am using JRE1.3.1
    I am also facing the cursor change problem. i have passed null in the startDrag method. This problem get solved to some extent, but still many times cursor is not changing. I have created my dragSource and drag Target
    in the Constructor of my tree in a separate thread like
    // IN CONSTRUCTO OF TREE
    SwingUtilities.invokeLater( new Tree_DropTarget(this) );
    SwingUtilities.invokeLater( new TreeDragSource(this,
    DnDConstants.ACTION_MOVE) );
    Than in the target and source class
    publi clas Tree_DropTarget implements DropTargetListener,Runnable
    public Tree_DropTarget(JTree tree)
    m_dropTarget = tree;
    public void run ()
    try
    Thread.sleep(2000);
    catch (InterruptedException e)
    m_dropTarget = new DropTarget (m_targetTree, this);
    Same Way I have done for DragSource.
    Is anything wrong there???
    I am also facing 1 more proble, sometiems DND events are getting fired on navigating through the nodes, even though i am not dragging the node. And getting the Below exception some times
    java.lang.NullPointerExceptionat sun.awt.dnd.SunDropTargetContextPeer.handleMotionMessage(Unknown Source)
         at sun.awt.windows.WToolkit.eventLoop(Native Method)
         at sun.awt.windows.WToolkit.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    This exception I am not able to get who is throwing as all exceptions i am catching.
    Please help me, if u had any idea about these problems.

  • ICal alarm won't "drag and drop" with changed dates?

    I frequently change appointments on my calendar from one date to the next, but the alarm time stays with the original date and time (so it never alarms or chimes on the new appointment date).
    Any ideas on how to get it to change along with my drag and drop. In other calendar systems, if you have an appointment on the 14th with a 15 minute warning alarm, and then change the date to the 17th, the alarm would then chime 15 minutes ahead of your appointment on the 17th. I know I can manually change it, but this should be automatic.
    Help?

    I just set an event for the 24th with a "2 minute before" alarm. I then dragged it to today 11/19 and the alarm went off 2 minutes before the new event time. I.e., the alarm time was automatically updated. Now if the alarm were set with the "on date" option, I wouldn't expect that to be updated. I'm using iCal Version 4.0.3 (1388).

  • How can I drag and drop a song from my "Purchased" list on to my i-Pod?

    I've recently updated the apple software on my PC and the new version of i-Tunes won't let me drag and drop songs from my "Purchased" list directly to my i-Pod.  I don't want to sync my i-Pod.  It will erase all the songs on my i-Pod and sync with the playlist from my PC.  I want to select just one song from my "Purchased" list and put that on my i-Pod.

    I got my own answer !!   I saw it on another post.  Select "View" and then toggle down to "View Sidebar".
    Now I can drag and drop like before. 

  • How so I drag and drop a card from my email list into a group?

    Hi, when I try to drag and drop a card into a group folder it will not accept it. What am I doing wrong? Thank you.
    Jim

    Are trying to do this from an email message?

  • Cant drag and drop music from my iphones music list?

    Well what a nightmare..... brought a new laptop with Windows 8...... installed itunes....... couldnt find the menu or anything on there, there was no left hand column where all the lists or anything so i deleted everything (big mistake) off my phone to start again, added a heap of music to itunes but couldnt see it anywhere, finally found the music and menu so i added a couple of playlists but all of a sudden this stopped and i can only add the music to my playlists on my iphone as it wont let me drag and drop in itunes...... im so confused cos my other itunes on my other laptop does everything..... HALP!!!!

    Hey Urban Angel,
    Thanks for the question. I understand you wish to configure the iTunes window to better resemble previous versions, the following resource may be handy:
    iTunes 11: Frequently used features
    http://support.apple.com/kb/HT5649
    You can quickly toggle the sidebar on by choosing View > Show Sidebar. You'll then have a familiar view:
    As for drag & drop, it sounds like you previously had your iPhone setup for manually managing music and videos. You may want to make sure it is still configured this way:
    Managing content manually on iPhone, iPad, and iPod
    http://support.apple.com/kb/HT1535
    Thanks,
    Matt M.

  • Drag and drop image from local files site list to page.

    Not working on all my documents. Must be some setting. Any ideas what is wrong?

    To be honest, I never drag & drop in DW.  I always use Insert > Image, Select image source...
    Nancy O.

  • How to drag and drop item from list to another item in list and change their positions

    I have a list field with multiple items. I want to select one item from list and drag and drop to another item in the list
     after drop item on another item the position of items should be change. (Example:- if I select 1st item from list and drag and drop this item to 4th item in list after drop that item position of both item should be changed 1st item on 4th position and 4th item on 1st position)
    I don't know how to do this.Please help me to find the solution.

    Hello Zoltan,
    I do not believe that kind of option is built into the listboxes, but I was able to have similiar functionalities using property nodes. I have included an example program that I put together.
    The big difference is that instead of dragging, you double click on the item you want to transfer. To highlight items as you go down the list, all you need to do is set the value to that list number.
    Hope this helps you out!
    Attachments:
    Temp.vi ‏33 KB

  • Drag and drop functionality in CM25

    Hello Experts,
         I am trying to configure CM25 so that when you drag and drop to change the start and end times on an operation within a process order, but to block the work centre being changed.  Ideally I like the user to be prompted to ensure they intended to change the work centre, but could live with a hard stop.  I have drag drop function set to AV09 (Function "Operation at time&work centre") at the moment.  I see there is a user exit defined on AV10 but haven't been able to establish what code this exit triggers and would like to get to the AV09 code as it pretty much does what I want.  I don't want to limit the screen to a single work centre as I want to see all related operations as need to see the work centre utilization for whole order across multiple processes, to ensure end times of one operation corresponds to start of the next.
    I am also looking to prevent capacities being moved at all once the process order has been started as effectively this process is locked in at this point and you cannot physically reschedule the remaining time.  (I know I am only supposed to pose one question at a time, but I believe this will be controlled within same configuration)
    Any suggestions / advice welcome,
    Regards,
    Jez

    Hello Jez,
    AV10 calls, from what I have been able to find out, the same exit that menu option Functions -> User (so enhancement CY190001). However, I could not as yet find a way to know where the user has dropped the object (to do the check, and to be able to continue with AV09 afterwards). The enhancement documentation only mentions how to get more information about the object, but not about where it was dropped.
    I am trying to use this to solve http://scn.sap.com/thread/3534956.
    Have you managed to find anything else on your side?
    Regards,
    Rui

  • Resetting a drag and drop interaction

    Hi
    How do I reset a successfully completed drag and drop
    interaction, so I can redo the drag and drop interaction?
    If I try and move the objects back to their original location
    it just snaps back to the completed location
    Currently I have to move to a different page, then go back to
    the page containing the drag and drop interaction in order to reset
    the interaction
    Thanks in advance
    Jon

    Try this:
    Put all the daggable objects in one map. I'll call it
    "Container."
    Now, in your "Reset" button, put this code:
    repeat with x := 1 to IconNumChildren(@"Container")
    EraseIcon(ChildNumToID(@"Container", x)
    DisplayIcon(ChildNumToID(@"Container", x)
    end repeat
    HTH;
    Amy
    "webacity" <[email protected]> wrote in
    message
    news:e68vbf$cpe$[email protected]..
    > Hi
    > How do I reset a successfully completed drag and drop
    interaction, so I
    > can
    > redo the drag and drop interaction?
    > If I try and move the objects back to their original
    location it just
    > snaps
    > back to the completed location
    > Currently I have to move to a different page, then go
    back to the page
    > containing the drag and drop interaction in order to
    reset the interaction
    > Thanks in advance
    > Jon
    >

  • Drag And Drop Element Of Array Of Clusters

    I have a project that includes an array of "tests", each of which is a cluster containing an array of "part numbers", a regular expression matching string and an array of "test tasks" (each of which, is in turn, a cluster of elements).
    That is:
    Tests (array of):
    Cluster:
    Part Numbers (array of strings)
    Regex (string)
    Tasks (array of):
    Cluster:
    Task type
    Base Channel,
    Measurement Channel
    Other Channels
    I'd like to be able to drag and drop to re-order the task array within an individual test.  (It's a nice-to-have rather than an urgent request - more for my own learning than anything).  For now, I've implemented "Move Up" and "Move Down" buttons.
    The examples are fine for a single cluster that includes an array, or for an array of objects.  As soon as we have an array of clusters, it's hard to access the individual elements within a specific cluster.
    Has anybody successfully implemented drag and drop within such a setup?
    Curiously,
    Geoff
    Geoff Field, BE, CLAD, MIEAust
    Professional geek, amateur stage-levelling gauge
    Solved!
    Go to Solution.

    Hello GeoffF,
    This is definitely doable, and you can even use the standard start drag and drop methods/events, the tricky part is determining the array elements that are being selected on mouse up/mouse down and handling the swap manually.  Luckily, there are a couple decent examples of how to do this out there already, I'd suggest you take a look at this one:
    Community Example: Determine Clicked Array Element Index in LabVIEW
    https://decibel.ni.com/content/docs/DOC-22434
    That should give you the selected array indices, and then all you have to do is switch the elements around around in the drop event.  I've attached a very basic demonstrative example that uses that code I just linked (you'll need to download that as well) and the events mentioned to swap two array elements.   The attached code is just thrown together, you'll want to design something more robust and scalable for any sort of real use.
    Regards,
    Tom L.
    Attachments:
    array drag.vi ‏21 KB

  • Drag and drop data object  not working in jdev 11.1.1.7

    I am trying to do quote process lab and faced this issue.
    When defining the user task parameter in jdev 11.1.1.7 i am not able to drag and drop the data object in parameter list section.

    Infact i am trying to create a simple BPMN projoect but it doesn't allow the data object to be drag and dropped in the parameter list.
    This same thing was working fine for me in Jdev 11.1.1.6,Is there a bug in jdeve 11.1.1.7 ? Has anyone tested with the latest release?

  • Cant drag and drop from file-roller to nautilus when using List View

    Hi, im using file-roller and i can only use drag and drop feature from file-roller when i use Icon View. If i select List View i cant drag and drop.
    Is that an expected behavior or its a bug? Is there a patch or work around? (File Roller 2.20.1 and Gnome 2.20.2)
    I think its a problem with file-roller cause in my other box, running ubuntu 7.10 i have the same problem, but i can drag and drop from ark even when using List View.
    Thx!

    Well, sorry for the double post, but after a little research i found this is a bug, actually a not yet implemented feature. There is a patch and probably its going to be merged in next version.
    Ill try to apply the patch myself, if it works could the maintainer Jan de Groot put it on the repository?
    Here is the bug: http://bugzilla.gnome.org/show_bug.cgi?id=171655
    Here is the patch: http://bugzilla.gnome.org/attachment.cg … ction=view
    Cya

Maybe you are looking for

  • Can i get a number of rows in the select list??

    Hello~ I am studying the "oracle call interface". but i don't know much about oci. Anyway i want to know that how can i get a number of rows. for example, there is a source code of the number of colums in the select list. The following is a list of D

  • T61 Screen issues

    I'm hoping someone can help me with this issue. I have a T61 8891-CTO. Two days ago when I woke the computer from sleep mode, the screen never came on. I restarted thinking it was having a problem and the screen lights up for a minute but displays no

  • Apex_workspaces

    Is there a standard pratice for setting up a development and reporting environment in APEX? For example, if i have one database schema with 200 tables and 5 developers want to develop web pages and reports against the database schema, does the admin

  • I need to help

    I have to install Microsoft products for class on to my MacBook Pro. I already have the Microsoft Office for Mac on my MacBook but it will not suffice for the class. The instructor is telling me to use Bootcamp or Parallels and I don't know if I did

  • Frame-relay packet fragmenting on a 2611

    I have a 2611 router that I am prioritizing voice traffic over frame-relay. The traffic is converted to ip by a siemens phone system. I am just prioritizing the specified udp ports. I want to fragment the frame-relay packets but under the map-class s