Index: javax/swing/plaf/basic/BasicTextUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTextUI.java,v
retrieving revision 1.49
diff -u -r1.49 BasicTextUI.java
--- javax/swing/plaf/basic/BasicTextUI.java 31 Oct 2005 21:29:52 -0000 1.49
+++ javax/swing/plaf/basic/BasicTextUI.java 3 Nov 2005 16:04:03 -0000
@@ -56,6 +56,7 @@
import javax.swing.InputMap;
import javax.swing.JComponent;
import javax.swing.LookAndFeel;
+import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
@@ -328,6 +329,35 @@
public void changedUpdate(DocumentEvent ev, Shape shape, ViewFactory vf)
{
view.changedUpdate(ev, shape, vf);
+ }
+
+ /**
+ * Returns the document position that is (visually) nearest to the given
+ * document position pos
in the given direction d
.
+ *
+ * @param c the text component
+ * @param pos the document position
+ * @param b the bias for pos
+ * @param d the direction, must be either address@hidden SwingConstants#NORTH},
+ * address@hidden SwingConstants#SOUTH}, address@hidden SwingConstants#WEST} or
+ * address@hidden SwingConstants#EAST}
+ * @param biasRet an array of address@hidden Position.Bias} that can hold at least
+ * one element, which is filled with the bias of the return position
+ * on method exit
+ *
+ * @return the document position that is (visually) nearest to the given
+ * document position pos
in the given direction
+ * d
+ *
+ * @throws BadLocationException if pos
is not a valid offset in
+ * the document model
+ */
+ public int getNextVisualPositionFrom(JTextComponent c, int pos,
+ Position.Bias b, int d,
+ Position.Bias[] biasRet)
+ throws BadLocationException
+ {
+ return view.getNextVisualPositionFrom(c, pos, b, d, biasRet);
}
}