public void onDrop(DragContext context) {
FileIcon f = (FileIcon) context.draggable;
f.delete(false);
AppController.getService().deleteBlob(f.fileDetail.getBlobKey(), ignoredCallback);
new OneTimeCssAnimator(mainPanel.trashButton, "shakes", 1000);
}
};
IconPanel.dragController.registerDropController(deleteDropController);
SimpleDropController downloadDropController = new SimpleDropController(mainPanel.downloadButton) {
public void onDrop(DragContext context) {
((FileIcon) context.draggable).download();
new OneTimeCssAnimator(mainPanel.downloadButton, "shakes", 1000);
}
};
IconPanel.dragController.registerDropController(downloadDropController);
SimpleDropController helpDropController = new SimpleDropController(mainPanel.helpButton) {
public void onDrop(DragContext context) {
((FileIcon) context.draggable).showDetail();
new OneTimeCssAnimator(mainPanel.helpButton, "shakes", 1000);
}
};
IconPanel.dragController.registerDropController(helpDropController);
}