void (final MouseEvent e) { if (myCancelled) { myCancelled = false; return; } if (myDraggingNow && !canFinishDragging(e)) { cancelDragging(); e.consume(); myPressedOnScreenPoint = null; myCancelled = false; return; } boolean wasDragging = myDraggingNow; myPressPointScreen = null; myDraggingNow = false; myDragJustStarted = false; if (wasDragging) { try { if (myDetachingMode) { processDragOutFinish(e); } else { processDragFinish(e, false); } } finally { myPressedOnScreenPoint = null; resetDragState(); e.consume(); if (myDetachPostponed) { myDetachPostponed = false; detach(false); } } } }