Changes between Version 1 and Version 2 of BASE_MODEL_TEXTS_R0
- Timestamp:
- 01/07/09 13:29:42 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BASE_MODEL_TEXTS_R0
v1 v2 8 8 9 9 == Overview == 10 In BASE_MODEL_TEXT task the model and the controller for the text elements should be defined. 10 In BASE_MODEL_TEXTS task the model and the functionality for the text elements should be defined. The model should allow the creation of chained views, styling of text, rotation, transparency and different modes of wrapping . It should allow persisting of texts along with all the applied attributes. 11 The task consists of two logical parts -a model for the text itself and a model for the view components. 12 The model for the text consist of styled text and contains information about the font, size, color, opacity, modifiers (bold, italic, underline, strikethrough), attached actions - attributes of the text itself. The chained view components will share a common text model and each will display only part of it. 13 14 The model of the individual text component should contain additional information for the rendering of the text in the particular view – transparency, rotation, wrapping. The view component model should also contain information what part of the text model it should display, in the case of chained views. A mechanism should exist that will trigger recalculation of the ranges of the texts displayed in different chained views if some change is made in one of them, causing its range to change. Among this kind of changes are insert/remove/replace text, change the size of the view component, changes in the size of some part if the text inside the component, change the wrapping mode of the component and others. 15 16 A mechanism for persisting both models should be designed and it should be consistent with the overall persistent strategy in Sophie ([wiki:BASE_PERSISTENCE_INTERMEDIATE_STORAGE_R0], [wiki:BASE_PERSISTENCE_COMMONS_R0]) 17 11 18 12 19 == Task requirements == 13 * The model/controller should support chaining of views. 14 * The model/controller should support styling of the text. 15 * The model/controller should support selection split over more than one view. (selection of text starting in one view and continuing in another) 20 For the R_0 focus on following requirements: 21 * The model should support chaining of views. 22 * The model should support styling of the text. 23 * The model should support selection split over more than one view. (selection of text starting in one view and continuing in another) 16 24 17 25 18 26 == Task result == 19 The result of this task should be design description and prototype implementation code.27 The result of this task should be design description and only a prove of concept prototype implementation code. 20 28 21 29 == Implementation idea == 22 * Extend the StyledEditKit or RtfEditKit. 23 * Implement a DocumentFilter subclass to achieve the requested behavior. 30 * Create EditorKit ( probably extend the StyledEditKit or RtfEditKit) to support the coordination of multiple chained views, split selection, and persistence 31 * Create DocumentModel (probably extend StyledDocument) to contain appropriate element structure that will support the required functionality. Eventually create a MasterDocument containing all the text and ChainedDocument to represent only part of it displayed in a single component view, using the MasterDocument as a backend. 32 * Define the attributes that will describe the text and will be acceptable in the AttributesSets of the elements in the document. 24 33 25 34 == Related == 26 35 [wiki:BASE_PERSISTENCE_INTERMEDIATE_STORAGE_R0][[BR]] 36 [wiki:BASE_PERSISTENCE_COMMONS_R0][[BR]] 37 [wiki:WRAPPING_TEXT_RENDERING_R0] 27 38 28 39 == How to demo ==