2 Copyright (C) 2002, 2004 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
41 import java.awt.Component;
42 import java.io.IOException;
43 import java.io.ObjectOutputStream;
45 import javax.swing.text.AttributeSet;
46 import javax.swing.text.Document;
47 import javax.swing.text.EditorKit;
48 import javax.swing.text.MutableAttributeSet;
49 import javax.swing.text.Style;
50 import javax.swing.text.StyledDocument;
51 import javax.swing.text.StyledEditorKit;
55 * @author Andrew Selkirk
58 public class JTextPane extends JEditorPane {
60 //-------------------------------------------------------------
61 // Variables --------------------------------------------------
62 //-------------------------------------------------------------
67 private static final String uiClassID = "TextPaneUI";
70 //-------------------------------------------------------------
71 // Initialization ---------------------------------------------
72 //-------------------------------------------------------------
75 * Constructor JTextPane
82 * Constructor JTextPane
83 * @param document TODO
85 public JTextPane(StyledDocument document) {
90 //-------------------------------------------------------------
91 // Methods ----------------------------------------------------
92 //-------------------------------------------------------------
97 * @exception IOException TODO
99 private void writeObject(ObjectOutputStream stream) throws IOException {
107 public String getUIClassID() {
113 * @param document TODO
115 public void setDocument(Document document) {
121 * @returns StyledDocument
123 public StyledDocument getStyledDocument() {
125 } // getStyledDocument()
129 * @param document TODO
131 public void setStyledDocument(StyledDocument document) {
133 } // setStyledDocument()
137 * @param content TODO
139 public void replaceSelection(String content) {
141 } // replaceSelection()
145 * @param component TODO
147 public void insertComponent(Component component) {
149 } // insertComponent()
155 public void insertIcon(Icon icon) {
165 public Style addStyle(String nm, Style parent) {
173 public void removeStyle(String nm) {
182 public Style getStyle(String nm) {
190 public Style getLogicalStyle() {
192 } // getLogicalStyle()
198 public void setLogicalStyle(Style style) {
200 } // setLogicalStyle()
203 * getCharacterAttributes
204 * @returns AttributeSet
206 public AttributeSet getCharacterAttributes() {
208 } // getCharacterAttributes()
211 * setCharacterAttributes
212 * @param attribute TODO
213 * @param replace TODO
215 public void setCharacterAttributes(AttributeSet attribute,
218 } // setCharacterAttributes()
221 * getParagraphAttributes
222 * @returns AttributeSet
224 public AttributeSet getParagraphAttributes() {
226 } // getParagraphAttributes()
229 * setParagraphAttributes
230 * @param attribute TODO
231 * @param replace TODO
233 public void setParagraphAttributes(AttributeSet attribute,
236 } // setParagraphAttributes()
240 * @returns MutableAttributeSet
242 public MutableAttributeSet getInputAttributes() {
244 } // getInputAttributes()
248 * @returns StyledEditorKit
250 protected final StyledEditorKit getStyledEditorKit() {
252 } // getStyledEditorKit()
255 * createDefaultEditorKit
258 protected EditorKit createDefaultEditorKit() {
260 } // createDefaultEditorKit()
266 public final void setEditorKit(EditorKit editor) {
274 protected String paramString() {