- java.lang.Object
-
- util.ui.CaretPositionCorrector
-
public class CaretPositionCorrector extends java.lang.Object
A class for correction of the caret position of a JFormattedTextField.- Author:
- René Mach
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
createCorrector(javax.swing.JFormattedTextField field, char[] jumpCharacters, char startIndexChar)
Creates an instance of the JSpinnerCaretPositionCorrector.static void
createCorrector(javax.swing.JFormattedTextField field, char[] jumpCharacters, int startPosition)
Creates an instance of the JSpinnerCaretPositionCorrector.
-
-
-
Method Detail
-
createCorrector
public static void createCorrector(javax.swing.JFormattedTextField field, char[] jumpCharacters, char startIndexChar)
Creates an instance of the JSpinnerCaretPositionCorrector. Usenull
for jumpCharacters if you only want to let the position set to the click position.- Parameters:
field
- The JFormattedTextField to correct the caret position of.jumpCharacters
- The character to jump from if the caret is in front of it.startIndexChar
- The character that is used to find the start position of the caret.
-
createCorrector
public static void createCorrector(javax.swing.JFormattedTextField field, char[] jumpCharacters, int startPosition)
Creates an instance of the JSpinnerCaretPositionCorrector. Usenull
for jumpCharacters if you only want to let the position set to the click position.- Parameters:
field
- The JFormattedTextField to correct the caret position of.jumpCharacters
- The character to jump from if the caret is in front of it.startPosition
- The start position for the caret.
-
-