Get the item in the SWT list on Mouse Up
I wanted to know if its possible to get the item in the list on mouse up? I searched online and found many examples for SWT table using the X and the Y coordinate but none using a list. What I am basically doing is implementing a list in which the order of the items can be changed by drag and drop. For this I need to be able to get the item under the drop location so that I can swap that item with the dragged item. List#getItemHeight() returns the height of the area one item occupies. With that information and getTopIndex() you should be able to compute the item at a given x and y coordinate.