168 * tf.setValue(100);
169 * </pre>
170 * <p>
171 * <strong>Warning:</strong> As the <code>AbstractFormatter</code> will
172 * typically install a <code>DocumentFilter</code> on the
173 * <code>Document</code>, and a <code>NavigationFilter</code> on the
174 * <code>JFormattedTextField</code> you should not install your own. If you do,
175 * you are likely to see odd behavior in that the editing policy of the
176 * <code>AbstractFormatter</code> will not be enforced.
177 * <p>
178 * <strong>Warning:</strong> Swing is not thread safe. For more
179 * information see <a
180 * href="package-summary.html#threading">Swing's Threading
181 * Policy</a>.
182 * <p>
183 * <strong>Warning:</strong>
184 * Serialized objects of this class will not be compatible with
185 * future Swing releases. The current serialization support is
186 * appropriate for short term storage or RMI between applications running
187 * the same version of Swing. As of 1.4, support for long term storage
188 * of all JavaBeans™
189 * has been added to the <code>java.beans</code> package.
190 * Please see {@link java.beans.XMLEncoder}.
191 *
192 * @since 1.4
193 */
194 @JavaBean
195 @SuppressWarnings("serial") // Same-version serialization only
196 public class JFormattedTextField extends JTextField {
197 private static final String uiClassID = "FormattedTextFieldUI";
198 private static final Action[] defaultActions =
199 { new CommitAction(), new CancelAction() };
200
201 /**
202 * Constant identifying that when focus is lost,
203 * <code>commitEdit</code> should be invoked. If in committing the
204 * new value a <code>ParseException</code> is thrown, the invalid
205 * value will remain.
206 *
207 * @see #setFocusLostBehavior
208 */
|
168 * tf.setValue(100);
169 * </pre>
170 * <p>
171 * <strong>Warning:</strong> As the <code>AbstractFormatter</code> will
172 * typically install a <code>DocumentFilter</code> on the
173 * <code>Document</code>, and a <code>NavigationFilter</code> on the
174 * <code>JFormattedTextField</code> you should not install your own. If you do,
175 * you are likely to see odd behavior in that the editing policy of the
176 * <code>AbstractFormatter</code> will not be enforced.
177 * <p>
178 * <strong>Warning:</strong> Swing is not thread safe. For more
179 * information see <a
180 * href="package-summary.html#threading">Swing's Threading
181 * Policy</a>.
182 * <p>
183 * <strong>Warning:</strong>
184 * Serialized objects of this class will not be compatible with
185 * future Swing releases. The current serialization support is
186 * appropriate for short term storage or RMI between applications running
187 * the same version of Swing. As of 1.4, support for long term storage
188 * of all JavaBeans
189 * has been added to the <code>java.beans</code> package.
190 * Please see {@link java.beans.XMLEncoder}.
191 *
192 * @since 1.4
193 */
194 @JavaBean
195 @SuppressWarnings("serial") // Same-version serialization only
196 public class JFormattedTextField extends JTextField {
197 private static final String uiClassID = "FormattedTextFieldUI";
198 private static final Action[] defaultActions =
199 { new CommitAction(), new CancelAction() };
200
201 /**
202 * Constant identifying that when focus is lost,
203 * <code>commitEdit</code> should be invoked. If in committing the
204 * new value a <code>ParseException</code> is thrown, the invalid
205 * value will remain.
206 *
207 * @see #setFocusLostBehavior
208 */
|