equal
deleted
inserted
replaced
383 Rectangle alloc = a.getBounds(); |
383 Rectangle alloc = a.getBounds(); |
384 Document doc = getDocument(); |
384 Document doc = getDocument(); |
385 int x = (int) fx; |
385 int x = (int) fx; |
386 int y = (int) fy; |
386 int y = (int) fy; |
387 if (y < alloc.y) { |
387 if (y < alloc.y) { |
388 // above the area covered by this icon, so the the position |
388 // above the area covered by this icon, so the position |
389 // is assumed to be the start of the coverage for this view. |
389 // is assumed to be the start of the coverage for this view. |
390 return getStartOffset(); |
390 return getStartOffset(); |
391 } else if (y > alloc.y + alloc.height) { |
391 } else if (y > alloc.y + alloc.height) { |
392 // below the area covered by this icon, so the the position |
392 // below the area covered by this icon, so the position |
393 // is assumed to be the end of the coverage for this view. |
393 // is assumed to be the end of the coverage for this view. |
394 return getEndOffset() - 1; |
394 return getEndOffset() - 1; |
395 } else { |
395 } else { |
396 // positioned within the coverage of this view vertically, |
396 // positioned within the coverage of this view vertically, |
397 // so we figure out which line the point corresponds to. |
397 // so we figure out which line the point corresponds to. |