45 |
import java.text.BreakIterator; |
import java.text.BreakIterator; |
46 |
|
|
47 |
import javax.swing.SwingConstants; |
import javax.swing.SwingConstants; |
48 |
|
import javax.swing.SwingUtilities; |
49 |
|
|
50 |
/** |
/** |
51 |
* A set of utilities to deal with text. This is used by several other classes |
* A set of utilities to deal with text. This is used by several other classes |
574 |
View rootView = c.getUI().getRootView(c); |
View rootView = c.getUI().getRootView(c); |
575 |
Rectangle r = c.modelToView(offset); |
Rectangle r = c.modelToView(offset); |
576 |
int offs = c.viewToModel(new Point(x, r.y)); |
int offs = c.viewToModel(new Point(x, r.y)); |
577 |
int pos = rootView.getNextVisualPositionFrom(c, offs, |
int pos = rootView.getNextVisualPositionFrom(offs, |
578 |
Position.Bias.Forward, |
Position.Bias.Forward, |
579 |
SwingConstants.NORTH, |
SwingUtilities.calculateInnerArea(c, null), |
580 |
new Position.Bias[1]); |
SwingConstants.NORTH, |
581 |
|
new Position.Bias[1]); |
582 |
return pos; |
return pos; |
583 |
} |
} |
584 |
|
|
601 |
View rootView = c.getUI().getRootView(c); |
View rootView = c.getUI().getRootView(c); |
602 |
Rectangle r = c.modelToView(offset); |
Rectangle r = c.modelToView(offset); |
603 |
int offs = c.viewToModel(new Point(x, r.y)); |
int offs = c.viewToModel(new Point(x, r.y)); |
604 |
int pos = rootView.getNextVisualPositionFrom(c, offs, |
int pos = rootView.getNextVisualPositionFrom(offs, |
605 |
Position.Bias.Forward, |
Position.Bias.Forward, |
606 |
SwingConstants.SOUTH, |
SwingUtilities.calculateInnerArea(c, null), |
607 |
new Position.Bias[1]); |
SwingConstants.SOUTH, |
608 |
|
new Position.Bias[1]); |
609 |
return pos; |
return pos; |
610 |
} |
} |
611 |
} |
} |