Login Register

Drag and Drop with copyOnly and unique drop

I'm trying to create a DnD environment that has the following features:
1. Reorder a list.
2. Drag a copy from one list to another.
3. Drop only if it's a unique item to the target drop list.

I played around with copyOnly and accept but can only get 1 and 2 to work. Does anyone have an example or hint on how to check the drop target drop list for duplicate before dropping, or to cancel/remove drop on duplicate?

Thanks.

For #3 you can override

For #3 you can override checkAcceptance() method of a source (actually it is used on targets) to return true or false if items carried items satisfy your criteria.