}
Point pt = event.getPoint();
//System.out.println("Mouse pressed: " + pt.x + "," + pt.y);
for (int i = spans.size() - 1; i >= 0; i--) {
TimeSpanInternal si = spans.get(i);
TimeSpan span = si.span;
int resize = span.checkPointResize(pt, si.rc);
if (resize != TimeSpan.NORESIZE) {
if (resize == TimeSpan.RESIZE_TOP) {
spanResizedTop = span;
spanResizedBottom = null;
} else if (resize == TimeSpan.RESIZE_BOTTOM) {
spanResizedTop = null;
spanResizedBottom = span;
}
break;
} else if (span.checkOverDragArea(pt, si.rc)) {
//System.out.println("Drag on: " + pt.x + "," + pt.y);
spanDragged = span;
dragOffsetY = si.rc.y - pt.y;
break;
}