56 |
import javax.swing.InputMap; |
import javax.swing.InputMap; |
57 |
import javax.swing.JComponent; |
import javax.swing.JComponent; |
58 |
import javax.swing.LookAndFeel; |
import javax.swing.LookAndFeel; |
59 |
|
import javax.swing.SwingConstants; |
60 |
import javax.swing.SwingUtilities; |
import javax.swing.SwingUtilities; |
61 |
import javax.swing.UIDefaults; |
import javax.swing.UIDefaults; |
62 |
import javax.swing.UIManager; |
import javax.swing.UIManager; |
330 |
{ |
{ |
331 |
view.changedUpdate(ev, shape, vf); |
view.changedUpdate(ev, shape, vf); |
332 |
} |
} |
333 |
|
|
334 |
|
/** |
335 |
|
* Returns the document position that is (visually) nearest to the given |
336 |
|
* document position <code>pos</code> in the given direction <code>d</code>. |
337 |
|
* |
338 |
|
* @param c the text component |
339 |
|
* @param pos the document position |
340 |
|
* @param b the bias for <code>pos</code> |
341 |
|
* @param d the direction, must be either {@link SwingConstants#NORTH}, |
342 |
|
* {@link SwingConstants#SOUTH}, {@link SwingConstants#WEST} or |
343 |
|
* {@link SwingConstants#EAST} |
344 |
|
* @param biasRet an array of {@link Position.Bias} that can hold at least |
345 |
|
* one element, which is filled with the bias of the return position |
346 |
|
* on method exit |
347 |
|
* |
348 |
|
* @return the document position that is (visually) nearest to the given |
349 |
|
* document position <code>pos</code> in the given direction |
350 |
|
* <code>d</code> |
351 |
|
* |
352 |
|
* @throws BadLocationException if <code>pos</code> is not a valid offset in |
353 |
|
* the document model |
354 |
|
*/ |
355 |
|
public int getNextVisualPositionFrom(JTextComponent c, int pos, |
356 |
|
Position.Bias b, int d, |
357 |
|
Position.Bias[] biasRet) |
358 |
|
throws BadLocationException |
359 |
|
{ |
360 |
|
return view.getNextVisualPositionFrom(c, pos, b, d, biasRet); |
361 |
|
} |
362 |
} |
} |
363 |
|
|
364 |
/** |
/** |