javax.swing.text

Class NavigationFilter

public class NavigationFilter extends Object

Nested Class Summary
abstract static classNavigationFilter.FilterBypass
Constructor Summary
NavigationFilter()
Method Summary
intgetNextVisualPositionFrom(JTextComponent c, int pos, Position.Bias bias, int dir, Position.Bias[] retBias)
Returns the next visual position in the specified direction at which one would place a caret.
voidmoveDot(NavigationFilter.FilterBypass fb, int dot, Position.Bias bias)
voidsetDot(NavigationFilter.FilterBypass fb, int dot, Position.Bias bias)

Constructor Detail

NavigationFilter

public NavigationFilter()

Method Detail

getNextVisualPositionFrom

public int getNextVisualPositionFrom(JTextComponent c, int pos, Position.Bias bias, int dir, Position.Bias[] retBias)
Returns the next visual position in the specified direction at which one would place a caret. The default implementation forwards to the text component's root view. Subclasses may wish to restrict that more.

Parameters: c the text component pos the current model position bias the bias of pos dir the direction, one of {@link javax.swing.SwingConstants#NORTH}, {@link javax.swing.SwingConstants#SOUTH}, {@link javax.swing.SwingConstants#WEST} or {@link javax.swing.SwingConstants#EAST} retBias the bias of the returned position

Returns: the next model location to place the caret

Throws: BadLocationException when pos is not a valid model position

moveDot

public void moveDot(NavigationFilter.FilterBypass fb, int dot, Position.Bias bias)

setDot

public void setDot(NavigationFilter.FilterBypass fb, int dot, Position.Bias bias)