26
27 import sun.swing.SwingUtilities2;
28
29 import java.awt.*;
30 import java.awt.event.*;
31 import java.lang.reflect.*;
32 import java.net.*;
33 import java.util.*;
34 import java.io.*;
35 import java.util.*;
36
37 import javax.swing.plaf.*;
38 import javax.swing.text.*;
39 import javax.swing.event.*;
40 import javax.swing.text.html.*;
41 import javax.accessibility.*;
42
43 /**
44 * A text component to edit various kinds of content.
45 * You can find how-to information and examples of using editor panes in
46 * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/text.html">Using Text Components</a>,
47 * a section in <em>The Java Tutorial.</em>
48 *
49 * <p>
50 * This component uses implementations of the
51 * <code>EditorKit</code> to accomplish its behavior. It effectively
52 * morphs into the proper kind of text editor for the kind
53 * of content it is given. The content type that editor is bound
54 * to at any given time is determined by the <code>EditorKit</code> currently
55 * installed. If the content is set to a new URL, its type is used
56 * to determine the <code>EditorKit</code> that should be used to
57 * load the content.
58 * <p>
59 * By default, the following types of content are known:
60 * <dl>
61 * <dt><b>text/plain</b>
62 * <dd>Plain text, which is the default the type given isn't
63 * recognized. The kit used in this case is an extension of
64 * <code>DefaultEditorKit</code> that produces a wrapped plain text view.
65 * <dt><b>text/html</b>
66 * <dd>HTML text. The kit used in this case is the class
|
26
27 import sun.swing.SwingUtilities2;
28
29 import java.awt.*;
30 import java.awt.event.*;
31 import java.lang.reflect.*;
32 import java.net.*;
33 import java.util.*;
34 import java.io.*;
35 import java.util.*;
36
37 import javax.swing.plaf.*;
38 import javax.swing.text.*;
39 import javax.swing.event.*;
40 import javax.swing.text.html.*;
41 import javax.accessibility.*;
42
43 /**
44 * A text component to edit various kinds of content.
45 * You can find how-to information and examples of using editor panes in
46 * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/text.html">Using Text Components</a>,
47 * a section in <em>The Java Tutorial.</em>
48 *
49 * <p>
50 * This component uses implementations of the
51 * <code>EditorKit</code> to accomplish its behavior. It effectively
52 * morphs into the proper kind of text editor for the kind
53 * of content it is given. The content type that editor is bound
54 * to at any given time is determined by the <code>EditorKit</code> currently
55 * installed. If the content is set to a new URL, its type is used
56 * to determine the <code>EditorKit</code> that should be used to
57 * load the content.
58 * <p>
59 * By default, the following types of content are known:
60 * <dl>
61 * <dt><b>text/plain</b>
62 * <dd>Plain text, which is the default the type given isn't
63 * recognized. The kit used in this case is an extension of
64 * <code>DefaultEditorKit</code> that produces a wrapped plain text view.
65 * <dt><b>text/html</b>
66 * <dd>HTML text. The kit used in this case is the class
|