org.fife.rtext
Class NumberDocumentFilter

java.lang.Object
  extended by javax.swing.text.DocumentFilter
      extended by org.fife.ui.PickyDocumentFilter
          extended by org.fife.rtext.NumberDocumentFilter

public class NumberDocumentFilter
extends PickyDocumentFilter

A document filter that only allows digits to be entered.

Version:
1.1
Author:
Robert Futrell

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.text.DocumentFilter
javax.swing.text.DocumentFilter.FilterBypass
 
Constructor Summary
NumberDocumentFilter()
           
 
Method Summary
protected  java.lang.String cleanseImpl(java.lang.String text)
          Removes any characters in a string that aren't digits.
 
Methods inherited from class org.fife.ui.PickyDocumentFilter
cleanse, insertString, remove, replace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumberDocumentFilter

public NumberDocumentFilter()
Method Detail

cleanseImpl

protected java.lang.String cleanseImpl(java.lang.String text)
Removes any characters in a string that aren't digits.

Specified by:
cleanseImpl in class PickyDocumentFilter
Parameters:
text - The string the user is trying to insert.
Returns:
The text, with any non-digit characters removed.
See Also:
PickyDocumentFilter.cleanse(String)