KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > java > swing > plaf > windows > WindowsEditorPaneUI


1 /*
2  * @(#)WindowsEditorPaneUI.java 1.15 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
8 package com.sun.java.swing.plaf.windows;
9
10 import javax.swing.plaf.*;
11 import javax.swing.plaf.basic.*;
12 import javax.swing.*;
13 import javax.swing.text.Caret JavaDoc;
14
15
16 /**
17  * Windows rendition of the component.
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 public class WindowsEditorPaneUI extends BasicEditorPaneUI
27 {
28
29     /**
30      * Creates a UI for a JEditorPane.
31      *
32      * @param c the configurable text component
33      * @return the UI
34      */

35     public static ComponentUI createUI(JComponent c) {
36         return new WindowsEditorPaneUI();
37     }
38
39     /**
40      * Creates the object to use for a caret. By default an
41      * instance of WindowsCaret is created. This method
42      * can be redefined to provide something else that implements
43      * the InputPosition interface or a subclass of DefaultCaret.
44      *
45      * @return the caret object
46      */

47     protected Caret JavaDoc createCaret() {
48         return new WindowsTextUI.WindowsCaret();
49     }
50 }
51
52
Popular Tags