Once I've called DragManager.acceptDrag
is there any way to "unaccept" the drag? Say that I have a view which can accept drag and drop, but only in certain areas. Once the user drags over one of these areas I call DragManager.acceptDrag(this)
(from a DragEvent.DRAG_OVER
handler), but if the user then moves out of this area I'd like to change the status of the drag to not accepted and show the DragManager.NONE
feedback. However, neither calling DragManager.acceptDrag(null)
nor DragManager.showFeedback(DragManager.NONE)
seems to have any effect. Once I've accepted the drag an set the feedback type I can't seem to change it.
Just to make it clear: the areas where the user should be able to drop are not components or even display objects, in fact they are just ranges in the text of a text field (like the selection). Had they been components of their own I could have solved it by making each of them accept drag events individually. I guess I could create proxy components that float over the text to emulate it, but I'd rather not if it isn't necessary.