| ListFormatter provides completion while text is being input
into the JFormattedTextField.Completion is only done if the
user is inserting text at the end of the document.Completion
is done by way of the SpinnerListModel method findNextMatch.
This is largely a copy of the SpinnerListFormatter found in
JDK 1.5 sources. A new version was written because the JDK
version was not extensible and did not allow for the ability
to ehance the stringToValue.
The stringToValue was enhanced to iterate through the model
list and compare the String values of the list objects and
the string value passed to the formatter. The first equal
will return. So, if multiple objects have the same toString
value, only the first will be returned.
|