TV-Browser 3.3.3 API

util.ui
Class CaretPositionCorrector

java.lang.Object
  extended by 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
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createCorrector

public static void createCorrector(javax.swing.JFormattedTextField field,
                                   char[] jumpCharacters,
                                   char startIndexChar)
Creates an instance of the JSpinnerCaretPositionCorrector. Use null 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. Use null 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.

TV-Browser 3.3.3 API

TV-Browser 3.3.3, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)