574 |
ComponentOrientation or = getComponentOrientation(); |
ComponentOrientation or = getComponentOrientation(); |
575 |
Rectangle r = getVisibleRect(); |
Rectangle r = getVisibleRect(); |
576 |
if (or == ComponentOrientation.RIGHT_TO_LEFT) |
if (or == ComponentOrientation.RIGHT_TO_LEFT) |
577 |
r.translate((int) r.getWidth(), 0); |
r.translate((int) r.getWidth() - 1, 0); |
578 |
return getUI().locationToIndex(this, r.getLocation()); |
return getUI().locationToIndex(this, r.getLocation()); |
579 |
} |
} |
580 |
|
|
612 |
{ |
{ |
613 |
ComponentOrientation or = getComponentOrientation(); |
ComponentOrientation or = getComponentOrientation(); |
614 |
Rectangle r = getVisibleRect(); |
Rectangle r = getVisibleRect(); |
615 |
r.translate(0, (int) r.getHeight()); |
r.translate(0, (int) r.getHeight() - 1); |
616 |
if (or == ComponentOrientation.LEFT_TO_RIGHT) |
if (or == ComponentOrientation.LEFT_TO_RIGHT) |
617 |
r.translate((int) r.getWidth(), 0); |
r.translate((int) r.getWidth() - 1, 0); |
618 |
return getUI().locationToIndex(this, r.getLocation()); |
return getUI().locationToIndex(this, r.getLocation()); |
619 |
} |
} |
620 |
|
|