66 * <code>DefaultTextFormatter</code>, it does the following:
67 * <ol>
68 * <li><code>parseObject</code> is invoked on the <code>Format</code>
69 * specified by <code>setFormat</code>
70 * <li>If a Class has been set for the values (<code>setValueClass</code>),
71 * supers implementation is invoked to convert the value returned
72 * from <code>parseObject</code> to the appropriate class.
73 * <li>If a <code>ParseException</code> has not been thrown, and the value
74 * is outside the min/max a <code>ParseException</code> is thrown.
75 * <li>The value is returned.
76 * </ol>
77 * <code>InternationalFormatter</code> implements <code>stringToValue</code>
78 * in this manner so that you can specify an alternate Class than
79 * <code>Format</code> may return.
80 * <p>
81 * <strong>Warning:</strong>
82 * Serialized objects of this class will not be compatible with
83 * future Swing releases. The current serialization support is
84 * appropriate for short term storage or RMI between applications running
85 * the same version of Swing. As of 1.4, support for long term storage
86 * of all JavaBeans™
87 * has been added to the <code>java.beans</code> package.
88 * Please see {@link java.beans.XMLEncoder}.
89 *
90 * @see java.text.Format
91 * @see java.lang.Comparable
92 *
93 * @since 1.4
94 */
95 @SuppressWarnings("serial") // Same-version serialization only
96 public class InternationalFormatter extends DefaultFormatter {
97 /**
98 * Used by <code>getFields</code>.
99 */
100 private static final Format.Field[] EMPTY_FIELD_ARRAY =new Format.Field[0];
101
102 /**
103 * Object used to handle the conversion.
104 */
105 private Format format;
106 /**
|
66 * <code>DefaultTextFormatter</code>, it does the following:
67 * <ol>
68 * <li><code>parseObject</code> is invoked on the <code>Format</code>
69 * specified by <code>setFormat</code>
70 * <li>If a Class has been set for the values (<code>setValueClass</code>),
71 * supers implementation is invoked to convert the value returned
72 * from <code>parseObject</code> to the appropriate class.
73 * <li>If a <code>ParseException</code> has not been thrown, and the value
74 * is outside the min/max a <code>ParseException</code> is thrown.
75 * <li>The value is returned.
76 * </ol>
77 * <code>InternationalFormatter</code> implements <code>stringToValue</code>
78 * in this manner so that you can specify an alternate Class than
79 * <code>Format</code> may return.
80 * <p>
81 * <strong>Warning:</strong>
82 * Serialized objects of this class will not be compatible with
83 * future Swing releases. The current serialization support is
84 * appropriate for short term storage or RMI between applications running
85 * the same version of Swing. As of 1.4, support for long term storage
86 * of all JavaBeans
87 * has been added to the <code>java.beans</code> package.
88 * Please see {@link java.beans.XMLEncoder}.
89 *
90 * @see java.text.Format
91 * @see java.lang.Comparable
92 *
93 * @since 1.4
94 */
95 @SuppressWarnings("serial") // Same-version serialization only
96 public class InternationalFormatter extends DefaultFormatter {
97 /**
98 * Used by <code>getFields</code>.
99 */
100 private static final Format.Field[] EMPTY_FIELD_ARRAY =new Format.Field[0];
101
102 /**
103 * Object used to handle the conversion.
104 */
105 private Format format;
106 /**
|