28 import java.awt.event.KeyEvent;
29 import java.awt.event.FocusEvent;
30 import java.awt.event.InputEvent;
31 import java.beans.PropertyChangeEvent;
32 import java.io.Reader;
33 import javax.swing.*;
34 import javax.swing.border.*;
35 import javax.swing.event.*;
36 import javax.swing.text.*;
37 import javax.swing.plaf.*;
38 import sun.swing.DefaultLookup;
39
40 /**
41 * Basis of a look and feel for a JTextField.
42 * <p>
43 * <strong>Warning:</strong>
44 * Serialized objects of this class will not be compatible with
45 * future Swing releases. The current serialization support is
46 * appropriate for short term storage or RMI between applications running
47 * the same version of Swing. As of 1.4, support for long term storage
48 * of all JavaBeans™
49 * has been added to the <code>java.beans</code> package.
50 * Please see {@link java.beans.XMLEncoder}.
51 *
52 * @author Timothy Prinzing
53 */
54 @SuppressWarnings("serial") // Same-version serialization only
55 public class BasicTextFieldUI extends BasicTextUI {
56
57 /**
58 * Creates a UI for a JTextField.
59 *
60 * @param c the text field
61 * @return the UI
62 */
63 public static ComponentUI createUI(JComponent c) {
64 return new BasicTextFieldUI();
65 }
66
67 /**
68 * Creates a new BasicTextFieldUI.
|
28 import java.awt.event.KeyEvent;
29 import java.awt.event.FocusEvent;
30 import java.awt.event.InputEvent;
31 import java.beans.PropertyChangeEvent;
32 import java.io.Reader;
33 import javax.swing.*;
34 import javax.swing.border.*;
35 import javax.swing.event.*;
36 import javax.swing.text.*;
37 import javax.swing.plaf.*;
38 import sun.swing.DefaultLookup;
39
40 /**
41 * Basis of a look and feel for a JTextField.
42 * <p>
43 * <strong>Warning:</strong>
44 * Serialized objects of this class will not be compatible with
45 * future Swing releases. The current serialization support is
46 * appropriate for short term storage or RMI between applications running
47 * the same version of Swing. As of 1.4, support for long term storage
48 * of all JavaBeans
49 * has been added to the <code>java.beans</code> package.
50 * Please see {@link java.beans.XMLEncoder}.
51 *
52 * @author Timothy Prinzing
53 */
54 @SuppressWarnings("serial") // Same-version serialization only
55 public class BasicTextFieldUI extends BasicTextUI {
56
57 /**
58 * Creates a UI for a JTextField.
59 *
60 * @param c the text field
61 * @return the UI
62 */
63 public static ComponentUI createUI(JComponent c) {
64 return new BasicTextFieldUI();
65 }
66
67 /**
68 * Creates a new BasicTextFieldUI.
|