40 |
|
|
41 |
import java.awt.Point; |
import java.awt.Point; |
42 |
import java.awt.Rectangle; |
import java.awt.Rectangle; |
43 |
|
import java.awt.Shape; |
44 |
|
|
45 |
import javax.swing.text.BadLocationException; |
import javax.swing.text.BadLocationException; |
46 |
import javax.swing.text.EditorKit; |
import javax.swing.text.EditorKit; |
84 |
* @throws BadLocationException if <code>pos</code> does not |
* @throws BadLocationException if <code>pos</code> does not |
85 |
* designate a valid position in the document model. |
* designate a valid position in the document model. |
86 |
* |
* |
87 |
* @see javax.swing.text.View#modelToView(int, |
* @see javax.swing.text.ComponentView#modelToView(int, Shape, Position.Bias) |
|
* javax.swing.text.Position.Bias, int, |
|
|
* javax.swing.text.position.Bias, java.awt.Shape) |
|
88 |
*/ |
*/ |
89 |
public abstract Rectangle modelToView(JTextComponent tc, int pos) |
public abstract Rectangle modelToView(JTextComponent tc, int pos) |
90 |
throws BadLocationException; |
throws BadLocationException; |
112 |
* @throws BadLocationException if <code>pos</code> does not |
* @throws BadLocationException if <code>pos</code> does not |
113 |
* designate a valid position in the document model. |
* designate a valid position in the document model. |
114 |
* |
* |
115 |
* @see javax.swing.text.View#modelToView(int, |
* @see javax.swing.text.ComponentView#modelToView(int, Shape, Position.Bias) |
|
* javax.swing.text.Position.Bias, int, |
|
|
* javax.swing.text.position.Bias, java.awt.Shape) |
|
116 |
*/ |
*/ |
117 |
public abstract Rectangle modelToView(JTextComponent tc, int pos, |
public abstract Rectangle modelToView(JTextComponent tc, int pos, |
118 |
Position.Bias bias) |
Position.Bias bias) |
123 |
* Finds the caret position which is closest to the specified visual |
* Finds the caret position which is closest to the specified visual |
124 |
* location. |
* location. |
125 |
* |
* |
126 |
* @param tc the <code>JTextComponent</code> for which this |
* @param t the <code>JTextComponent</code> for which this |
127 |
* delegate object provides the user interface. |
* delegate object provides the user interface. |
128 |
* |
* |
129 |
* @param loc the position in view coordinates. |
* @param pt the position in view coordinates. |
130 |
* |
* |
131 |
* @return the caret position which is closest to <code>loc</code>. |
* @return the caret position which is closest to <code>loc</code>. |
132 |
* |
* |
188 |
* |
* |
189 |
* @throws IllegalArgumentException if <code>direction</code> |
* @throws IllegalArgumentException if <code>direction</code> |
190 |
* is not one of <code>Position.Bias.Forward</code> |
* is not one of <code>Position.Bias.Forward</code> |
191 |
* or <code>Position.Biad.Backward</code>. |
* or <code>Position.Bias.Backward</code>. |
192 |
*/ |
*/ |
193 |
public abstract int getNextVisualPositionFrom(JTextComponent tc, |
public abstract int getNextVisualPositionFrom(JTextComponent tc, |
194 |
int pos, |
int pos, |