KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > java > swing > plaf > motif > MotifTextAreaUI


1 /*
2  * @(#)MotifTextAreaUI.java 1.22 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7 package com.sun.java.swing.plaf.motif;
8
9 import javax.swing.*;
10 import javax.swing.text.*;
11 import javax.swing.plaf.*;
12 import javax.swing.plaf.basic.BasicTextAreaUI JavaDoc;
13
14 /**
15  * Provides the look and feel for a plain text editor. In this
16  * implementation the default UI is extended to act as a simple
17  * view factory.
18  * <p>
19  * <strong>Warning:</strong>
20  * Serialized objects of this class will not be compatible with
21  * future Swing releases. The current serialization support is appropriate
22  * for short term storage or RMI between applications running the same
23  * version of Swing. A future release of Swing will provide support for
24  * long term persistence.
25  *
26  * @author Timothy Prinzing
27  * @version 1.22 12/19/03
28  */

29 public class MotifTextAreaUI extends BasicTextAreaUI JavaDoc {
30
31     /**
32      * Creates a UI for a JTextArea.
33      *
34      * @param ta a text area
35      * @return the UI
36      */

37     public static ComponentUI createUI(JComponent ta) {
38         return new MotifTextAreaUI();
39     }
40
41     /**
42      * Creates the object to use for a caret. By default an
43      * instance of MotifTextUI.MotifCaret is created. This method
44      * can be redefined to provide something else that implements
45      * the Caret interface.
46      *
47      * @return the caret object
48      */

49     protected Caret createCaret() {
50     return MotifTextUI.createCaret();
51     }
52
53 }
54
Popular Tags