|
From: | Roman Kennke |
Subject: | [cp-patches] FYI: RTFEditorKit & friends |
Date: | Fri, 04 Mar 2005 15:12:13 +0100 |
Hi there, I have put together a rudimentary scanner/parser for RTF, so that RTFEditorKit can be implemented. At the moment this does only strip off all the tags and stuff from the plain text. This is not really useful, since also the RTF header contains pieces of plain text. But now the 'framework' is in place and the rest is 'only' implementing the rest of the RTF grammar in the RTFParser class. Since the DefaultStyledDocument and StyledEditorKit are not yet ready, the RTFEditorKit is not yet of much use. I have testet it with a little hack, where a PlainDocument must be set on the JEditorPane, after the RTFEditorKit is installed. This way the textual content (including header informations) can be viewed inside a JEditorPane. I committed the attached new files. 2005-03-04 Roman Kennke <address@hidden> * javax/swing/text/rtf/ControlWordToken.java: New file. * javax/swing/text/rtf/RTFEditorKit.java: New file. * javax/swing/text/rtf/RTFParseException.java: New file. * javax/swing/text/rtf/RTFParser.java: New file. * javax/swing/text/rtf/RTFScanner.java: New file. * javax/swing/text/rtf/TextToken.java: New file. * javax/swing/text/rtf/Token.java: New file. /Roman
ControlWordToken.java
Description: Text Data
RTFEditorKit.java
Description: Text Data
RTFParseException.java
Description: Text Data
RTFParser.java
Description: Text Data
RTFScanner.java
Description: Text Data
TextToken.java
Description: Text Data
Token.java
Description: Text Data
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
[Prev in Thread] | Current Thread | [Next in Thread] |