else { setCursor(null); }
int xDelta = Math.abs(click.x - event.x), yDelta = Math.abs(click.y - event.y); if (xDelta <= CLICK_DISTANCE && yDelta <= CLICK_DISTANCE) { Point location = findItem(target); int row = location.y; int index = location.x; if (items[row].length > 1) { Point size = target.getSize(); int maxSize = getSize().x - (items[row].length - 1) * CoolItem.MINIMUM_WIDTH; if (size.x == maxSize) {  int distance = size.x - CoolItem.MINIMUM_WIDTH; if (index + 1 < items[row].length) {  CoolItem right = items[row][index + 1]; moveLeft(right, distance); } else {  moveRight(target, distance); } } else if (size.x < target.preferredWidth) {  int distance = target.preferredWidth - size.x; if (index + 1 < items[row].length) { CoolItem right = items[row][index + 1]; moveRight(right, distance); distance = target.preferredWidth - target.getSize().x; } if (distance > 0) { moveLeft(target, distance); } } else {  for (int i = 0; i < items[row].length; i++) { if (i != index) items[row][i].requestedWidth = CoolItem.MINIMUM_WIDTH; } target.requestedWidth = getDisplay().getBounds().width; layoutItems(); } target = getGrabbedItem(event.x, event.y); if (target != null) setCursor(hoverCursor); else setCursor(null); } }
void onMouseUp(Event event) {	dragging = null;	if (getGrabbedItem(event.x, event.y) != null) {		setCursor(hoverCursor);	}	else {		setCursor(null);		}	}