Changes between Version 5 and Version 6 of GROUP_PLAIN_AND_RTF_RESOURCES_R0


Ignore:
Timestamp:
07/05/09 13:51:44 (16 years ago)
Author:
diana
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GROUP_PLAIN_AND_RTF_RESOURCES_R0

    v5 v6  
    2727 * Save and reload the book 
    2828= Design = 
    29 Two new modules are created: one for importing plain text documents and the other - for importing rtf documents. 
    30 The html modole is extended with functionality for importing html documents. 
    31 A new abstract class ImportUtil is created with the following methods: 
     29Two new modules are created: one for importing plain text documents (org.sophie2.extra.func.plainText) and the other -  
     30for importing rtf documents (org.sophie2.extra.func.rtfText). 
     31The html module is extended with functionality for importing html documents. 
     32A new abstract class HotTextImportUtil is created in org.sophie2.extra.func.html.util with the following methods: 
    3233 * handleHelper - helper fo the handle function of each newly created modules. 
    3334 * insertFrame - inserts a new Frame in the current book 
     
    3738newly added HotTextBookResource. 
    3839The 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 * ApplyRtfStyles/ApplyHtmlStyles (in org.sophie2.extra.func.rtfText.util/org.sophie2.extra.func.html.util package) -  
     41use AttributedPair class (in org.sophie2.main.app.commons.frame package) to get the corresponding CommonAttr for each  
    4042pair tag/attribute.Each one has the following methods: 
    4143 * applyStyles - apply styles recurselively to its HotText parameter according to the html/rtf tags. 
     
    4446ApplyRtfStyles uses the root element of the created StyledDocument and javax.swing.text.rtf.RTFEditorKit to obtain the attributes of the StyledDocument. 
    4547ApplyHtmlStyles 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] 
     48Used library from javax.swing.text: 
     49 * javax.swing.text.StyledDocument - used in RtfImportUtil to convert the rtf document to attributed document. 
     50 * javax.swing.text.rtf.RTFEditorKit -  used in RtfImportUtil to obtain the attributes of the StyledDocument. 
     51 * javax.swing.text.View -  used in HtmlImportUtil to obtain the attributes with their values hrom the HTMLDocument. 
     52 * javax.swing.text.html.HTMLDocument - used in HtmlImportUtil to convert the html document to attributed html document. 
     53 * javax.swing.text.html.HTMLEditorKit - used in HtmlImportUtil to obtain the attributes of the StyledDocument. 
     54 
     55Tests can be found here: [3975][3983][3984][3989][3990][3991][3993][4015][4016][4017][4018][4019] 
    4756= Implementation = 
    4857Done according to the design. 
    49 Source code:[3990][3975][3989][3991][3993][3984][3983] 
     58Source code: [3975][3983][3984][3989][3990][3991][3993][4015][4016][4017][4018][4019] 
    5059= Testing = 
    5160^(Place the testing results here.)^