public class RegExpFormatter
extends javax.swing.text.DefaultFormatter
AbstractFormatter.| Constructor and Description | 
|---|
RegExpFormatter()  | 
RegExpFormatter(java.util.regex.Pattern pattern)
Creates a regular expression based  
AbstractFormatter. | 
RegExpFormatter(java.lang.String pattern)
Creates a regular expression based  
AbstractFormatter. | 
| Modifier and Type | Method and Description | 
|---|---|
protected java.util.regex.Matcher | 
getMatcher()
Returns the  
Matcher from the most test. | 
java.util.regex.Pattern | 
getPattern()
Returns the  
Pattern used to determine if a value is
 legal. | 
protected void | 
setMatcher(java.util.regex.Matcher matcher)
Sets the  
Matcher used in the most recent test
 if a value is legal. | 
void | 
setPattern(java.util.regex.Pattern pattern)
Sets the pattern that will be used to determine if a value is
 legal. 
 | 
java.lang.Object | 
stringToValue(java.lang.String text)
Parses  
text returning an arbitrary Object. | 
clone, getAllowsInvalid, getCommitsOnValidEdit, getDocumentFilter, getNavigationFilter, getOverwriteMode, getValueClass, install, setAllowsInvalid, setCommitsOnValidEdit, setOverwriteMode, setValueClass, valueToStringpublic RegExpFormatter()
public RegExpFormatter(java.lang.String pattern)
                throws java.util.regex.PatternSyntaxException
AbstractFormatter.
 pattern specifies the regular expression that will
 be used to determine if a value is legal.java.util.regex.PatternSyntaxExceptionpublic RegExpFormatter(java.util.regex.Pattern pattern)
AbstractFormatter.
 pattern specifies the regular expression that will
 be used to determine if a value is legal.public void setPattern(java.util.regex.Pattern pattern)
public java.util.regex.Pattern getPattern()
Pattern used to determine if a value is
 legal.protected void setMatcher(java.util.regex.Matcher matcher)
Matcher used in the most recent test
 if a value is legal.protected java.util.regex.Matcher getMatcher()
Matcher from the most test.public java.lang.Object stringToValue(java.lang.String text)
                               throws java.text.ParseException
text returning an arbitrary Object. Some
 formatters may return null.
 
 If a Pattern has been specified and the text
 completely matches the regular expression this will invoke
 setMatcher.
stringToValue in class javax.swing.text.DefaultFormattertext - String to convertjava.text.ParseException - if there is an error in the conversion