@Override
public void dragOver(final VDragEvent currentDrag) {
final Object oldIdOver = currentDrag.getDropDetails().get(
"itemIdOver");
final VerticalDropLocation oldDetail = (VerticalDropLocation) currentDrag
.getDropDetails().get("detail");
updateTreeRelatedDragData(currentDrag);
final VerticalDropLocation detail = (VerticalDropLocation) currentDrag
.getDropDetails().get("detail");
boolean nodeHasChanged = (currentMouseOverKey != null && currentMouseOverKey != oldIdOver)
|| (currentMouseOverKey == null && oldIdOver != null);
boolean detailHasChanded = (detail != null && detail != oldDetail)
|| (detail == null && oldDetail != null);
if (nodeHasChanged || detailHasChanded) {
final String newKey = currentMouseOverKey;
TreeNode treeNode = keyToNode.get(oldIdOver);
if (treeNode != null) {
// clear old styles
treeNode.emphasis(null);
}
if (newKey != null) {
validate(new VAcceptCallback() {
public void accepted(VDragEvent event) {
VerticalDropLocation curDetail = (VerticalDropLocation) event
.getDropDetails().get("detail");
if (curDetail == detail
&& newKey.equals(currentMouseOverKey)) {
keyToNode.get(newKey).emphasis(detail);
}