36 * This is the default implementation of RTF editing
37 * functionality. The RTF support was not written by the
38 * Swing team. In the future we hope to improve the support
39 * provided.
40 *
41 * @author Timothy Prinzing (of this class, not the package!)
42 */
43 @SuppressWarnings("serial") // Same-version serialization only
44 public class RTFEditorKit extends StyledEditorKit {
45
46 /**
47 * Constructs an RTFEditorKit.
48 */
49 public RTFEditorKit() {
50 super();
51 }
52
53 /**
54 * Get the MIME type of the data that this
55 * kit represents support for. This kit supports
56 * the type <code>text/rtf</code>.
57 *
58 * @return the type
59 */
60 public String getContentType() {
61 return "text/rtf";
62 }
63
64 /**
65 * Insert content from the given stream which is expected
66 * to be in a format appropriate for this kind of content
67 * handler.
68 *
69 * @param in The stream to read from
70 * @param doc The destination for the insertion.
71 * @param pos The location in the document to place the
72 * content.
73 * @exception IOException on any I/O error
74 * @exception BadLocationException if pos represents an invalid
75 * location within the document.
76 */
|
36 * This is the default implementation of RTF editing
37 * functionality. The RTF support was not written by the
38 * Swing team. In the future we hope to improve the support
39 * provided.
40 *
41 * @author Timothy Prinzing (of this class, not the package!)
42 */
43 @SuppressWarnings("serial") // Same-version serialization only
44 public class RTFEditorKit extends StyledEditorKit {
45
46 /**
47 * Constructs an RTFEditorKit.
48 */
49 public RTFEditorKit() {
50 super();
51 }
52
53 /**
54 * Get the MIME type of the data that this
55 * kit represents support for. This kit supports
56 * the type {@code text/rtf}.
57 *
58 * @return the type
59 */
60 public String getContentType() {
61 return "text/rtf";
62 }
63
64 /**
65 * Insert content from the given stream which is expected
66 * to be in a format appropriate for this kind of content
67 * handler.
68 *
69 * @param in The stream to read from
70 * @param doc The destination for the insertion.
71 * @param pos The location in the document to place the
72 * content.
73 * @exception IOException on any I/O error
74 * @exception BadLocationException if pos represents an invalid
75 * location within the document.
76 */
|