int newUserAction = getUserAction(modifiers, newTargetActions);
if (!newLocation.equals(mouseLocation)) {
mouseLocation.setLocation(newLocation);
if (newTargetActions != 0) {
DragSourceEventProxy r = new DragSourceEventProxy(
context,
DragSourceEventProxy.DRAG_MOUSE_MOVED,
newUserAction, newTargetActions,
mouseLocation, modifiers);
EventQueue.invokeLater(r);
}
}
if (newUserAction != userAction || newTargetActions != targetActions) {
int type = 0;
if (targetActions == 0 && newTargetActions != 0) {
type = DragSourceEventProxy.DRAG_ENTER;
} else if (targetActions != 0 && newTargetActions == 0) {
type = DragSourceEventProxy.DRAG_EXIT;
} else {
type = DragSourceEventProxy.DRAG_ACTION_CHANGED;
}
userAction = newUserAction;
targetActions = newTargetActions;
if (type != 0) {
DragSourceEventProxy r = new DragSourceEventProxy(
context,
type, newUserAction, newTargetActions,
mouseLocation, modifiers);
EventQueue.invokeLater(r);
}