Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3) B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.jbo.uicli.jui
Class RegExpFormatter

`java.lang.Object
javax.swing.JFormattedTextField.AbstractFormatter
javax.swing.text.DefaultFormatter
oracle.jbo.uicli.jui.RegExpFormatter`

All Implemented Interfaces:
  java.lang.Cloneable, java.io.Serializable

public class RegExpFormatter
extends javax.swing.text.DefaultFormatter

A regular expression based implementation of `AbstractFormatter`.

See Also:
  Serialized Form

Constructor Summary
`RegExpFormatter()`
`RegExpFormatter(java.util.regex.Pattern pattern)` Creates a regular expression based `AbstractFormatter`.
`RegExpFormatter(java.lang.String pattern)` Creates a regular expression based `AbstractFormatter`.

Method Summary
`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.

Methods inherited from class javax.swing.text.DefaultFormatter
`clone, getAllowsInvalid, getCommitsOnValidEdit, getDocumentFilter, getNavigationFilter, getOverwriteMode, getValueClass, install, setAllowsInvalid, setCommitsOnValidEdit, setOverwriteMode, setValueClass, valueToString`

Methods inherited from class javax.swing.JFormattedTextField.AbstractFormatter
`getActions, getFormattedTextField, invalidEdit, setEditValid, uninstall`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RegExpFormatter

    public RegExpFormatter()

### RegExpFormatter

    public RegExpFormatter(java.lang.String pattern)
                    throws java.util.regex.PatternSyntaxException

  Creates a regular expression based `AbstractFormatter`. `pattern` specifies the regular expression that will be used to determine if a value is legal.

### RegExpFormatter

    public RegExpFormatter(java.util.regex.Pattern pattern)

  Creates a regular expression based `AbstractFormatter`. `pattern` specifies the regular expression that will be used to determine if a value is legal.

Method Detail

### setPattern

    public void setPattern(java.util.regex.Pattern pattern)

  Sets the pattern that will be used to determine if a value is legal.

### getPattern

    public java.util.regex.Pattern getPattern()

  Returns the `Pattern` used to determine if a value is legal.

### setMatcher

    protected void setMatcher(java.util.regex.Matcher matcher)

  Sets the `Matcher` used in the most recent test if a value is legal.

### getMatcher

    protected java.util.regex.Matcher getMatcher()

  Returns the `Matcher` from the most test.

### stringToValue

    public java.lang.Object stringToValue(java.lang.String text)
                                   throws java.text.ParseException

  Parses `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`.

  Parameters:
    `text` - String to convert
  Returns:
    Object representation of text
  Throws:
    `java.text.ParseException` - if there is an error in the conversion

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3) B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1997, 2005, Oracle. All rights reserved.