-
getNextVisualPositionFrom
public abstract int getNextVisualPositionFrom(JTextComponent t,
int pos,
Position.Bias b,
int direction,
Position.Bias[] biasRet)
throws BadLocationException
Provides a way to determine the next visually represented model location that one might place a caret. Some views may not be visible, they might not be in the same order found in the model, or they just might not allow access to some of the locations in the model.
-
Parameters:
-
t - the text component for which this UI is installed
-
pos - the position to convert >= 0
-
b - the bias for the position
-
direction - the direction from the current position that can be thought of as the arrow keys typically found on a keyboard. This may be SwingConstants.WEST, SwingConstants.EAST, SwingConstants.NORTH, or SwingConstants.SOUTH
-
biasRet - an array to contain the bias for the returned position
-
Returns:
- the location within the model that best represents the next location visual position
-
Throws:
-
BadLocationException - for a bad location within a document model
-
IllegalArgumentException - for an invalid direction
|
|