mercredi 25 février 2015

How to abort a drop event??

Hello, I want to abort a drag & drop when users try to drop to an invalid target in a tree.

I am using GXT3.1, but I think the APIs are the same. How can I achieve it? Thanks.

Here is my attempt, but it does not work.



Code:



target.addDropHandler(new DndDropHandler(){
@Override
public void onDrop(DndDropEvent event) {
// what can I do with a DragEndEvent ?
DragEndEvent endEvent = event.getDragEndEvent();

event.getStatusProxy().setStatus(false);
System.out.println("drop!");
}
});





How to abort a drop event??

Aucun commentaire:

Enregistrer un commentaire