Changes between Version 4 and Version 5 of GROUP_PLAIN_AND_RTF_RESOURCES_R0
- Timestamp:
- 07/03/09 18:00:40 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TabularUnified GROUP_PLAIN_AND_RTF_RESOURCES_R0
v4 v5 36 36 Each module has RtfImportUtil/HtmlImportUtil/PlainTextImportUtil which extends this class and cretes appropriate content for the 37 37 newly added HotTextBookResource. 38 A new abstract class is added ApplyStyles with the following functions: 38 The module for importing rtf documents and the module for importing html documents have the following class: 39 * ApplyRtfStyles/ApplyHtmlStyles - use AttributedPair class to get the corresponding CommonAttr for each 40 pair tag/attribute.Each one has the following methods: 39 41 * applyStyles - apply styles recurselively to its HotText parameter according to the html/rtf tags. 40 * abstract method getCorrespondingVal - returns the corresponding CommonAttr with value for each tag in html/rtf document.41 The module for importing rtf documents and the module for importing html documents have the following class:42 * ApplyRtfStyles/ApplyHtmlStyles - extends ApplyStyles and use AttributedPair class to get the corresponding CommonAttr for each43 pair tag/attribute.44 42 Each of the modules for importing rtf/html uses RTFEditorKit/HTMLEditorKit to get the attributes from the html/rtf document. 45 46 Tests can be found here: [] 43 * getCorrespondingVal - returns the corresponding CommonAttr with value for each tag in html/rtf document. 44 ApplyRtfStyles uses the root element of the created StyledDocument and javax.swing.text.rtf.RTFEditorKit to obtain the attributes of the StyledDocument. 45 ApplyHtmlStyles uses the root view of the created HTMLDocument and javax.swing.text.html.HTMLEditorKit to obtain the attributes of the HTMLDocument. 46 Tests can be found here: [3990][3975][3989][3991][3993][3984][3983] 47 47 = Implementation = 48 48 Done according to the design. 49 Source code: []49 Source code:[3990][3975][3989][3991][3993][3984][3983] 50 50 = Testing = 51 51 ^(Place the testing results here.)^