KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > swing > plaf > basic > BasicTextPaneUI


1 /*
2  * @(#)BasicTextPaneUI.java 1.69 04/07/23
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7 package javax.swing.plaf.basic;
8
9 import java.awt.*;
10 import java.awt.event.*;
11 import java.beans.*;
12 import javax.swing.*;
13 import javax.swing.text.*;
14 import javax.swing.plaf.*;
15 import javax.swing.border.*;
16
17
18 /**
19  * Provides the look and feel for a styled text editor.
20  * <p>
21  * <strong>Warning:</strong>
22  * Serialized objects of this class will not be compatible with
23  * future Swing releases. The current serialization support is
24  * appropriate for short term storage or RMI between applications running
25  * the same version of Swing. As of 1.4, support for long term storage
26  * of all JavaBeans<sup><font size="-2">TM</font></sup>
27  * has been added to the <code>java.beans</code> package.
28  * Please see {@link java.beans.XMLEncoder}.
29  *
30  * @author Timothy Prinzing
31  * @version 1.69 07/23/04
32  */

33 public class BasicTextPaneUI extends BasicEditorPaneUI JavaDoc {
34
35     /**
36      * Creates a UI for the JTextPane.
37      *
38      * @param c the JTextPane object
39      * @return the UI
40      */

41     public static ComponentUI createUI(JComponent c) {
42         return new BasicTextPaneUI JavaDoc();
43     }
44
45     /**
46      * Creates a new BasicTextPaneUI.
47      */

48     public BasicTextPaneUI() {
49     super();
50     }
51
52     /**
53      * Fetches the name used as a key to lookup properties through the
54      * UIManager. This is used as a prefix to all the standard
55      * text properties.
56      *
57      * @return the name ("TextPane")
58      */

59     protected String JavaDoc getPropertyPrefix() {
60     return "TextPane";
61     }
62
63     public void installUI(JComponent c) {
64         super.installUI(c);
65     }
66
67     /**
68      * This method gets called when a bound property is changed
69      * on the associated JTextComponent. This is a hook
70      * which UI implementations may change to reflect how the
71      * UI displays bound properties of JTextComponent subclasses.
72      * If the font, foreground or document has changed, the
73      * the appropriate property is set in the default style of
74      * the document.
75      *
76      * @param evt the property change event
77      */

78     protected void propertyChange(PropertyChangeEvent evt) {
79     super.propertyChange(evt);
80     }
81 }
82
Popular Tags