26
27 import java.beans.*;
28 import java.awt.*;
29 import java.awt.event.KeyEvent;
30 import java.awt.event.InputEvent;
31 import javax.swing.*;
32 import javax.swing.event.DocumentEvent;
33 import javax.swing.text.*;
34 import javax.swing.plaf.*;
35
36 /**
37 * Provides the look and feel for a plain text editor. In this
38 * implementation the default UI is extended to act as a simple
39 * view factory.
40 * <p>
41 * <strong>Warning:</strong>
42 * Serialized objects of this class will not be compatible with
43 * future Swing releases. The current serialization support is
44 * appropriate for short term storage or RMI between applications running
45 * the same version of Swing. As of 1.4, support for long term storage
46 * of all JavaBeans™
47 * has been added to the <code>java.beans</code> package.
48 * Please see {@link java.beans.XMLEncoder}.
49 *
50 * @author Timothy Prinzing
51 */
52 @SuppressWarnings("serial") // Same-version serialization only
53 public class BasicTextAreaUI extends BasicTextUI {
54
55 /**
56 * Creates a UI for a JTextArea.
57 *
58 * @param ta a text area
59 * @return the UI
60 */
61 public static ComponentUI createUI(JComponent ta) {
62 return new BasicTextAreaUI();
63 }
64
65 /**
66 * Constructs a new BasicTextAreaUI object.
|
26
27 import java.beans.*;
28 import java.awt.*;
29 import java.awt.event.KeyEvent;
30 import java.awt.event.InputEvent;
31 import javax.swing.*;
32 import javax.swing.event.DocumentEvent;
33 import javax.swing.text.*;
34 import javax.swing.plaf.*;
35
36 /**
37 * Provides the look and feel for a plain text editor. In this
38 * implementation the default UI is extended to act as a simple
39 * view factory.
40 * <p>
41 * <strong>Warning:</strong>
42 * Serialized objects of this class will not be compatible with
43 * future Swing releases. The current serialization support is
44 * appropriate for short term storage or RMI between applications running
45 * the same version of Swing. As of 1.4, support for long term storage
46 * of all JavaBeans
47 * has been added to the <code>java.beans</code> package.
48 * Please see {@link java.beans.XMLEncoder}.
49 *
50 * @author Timothy Prinzing
51 */
52 @SuppressWarnings("serial") // Same-version serialization only
53 public class BasicTextAreaUI extends BasicTextUI {
54
55 /**
56 * Creates a UI for a JTextArea.
57 *
58 * @param ta a text area
59 * @return the UI
60 */
61 public static ComponentUI createUI(JComponent ta) {
62 return new BasicTextAreaUI();
63 }
64
65 /**
66 * Constructs a new BasicTextAreaUI object.
|