Version 1 (modified by htomov, 16 years ago) (diff) |
---|
Analysis
Overview
In BASE_MODEL_TEXT task the model and the controller for the text elements should be defined.
Task requirements
- The model/controller should support chaining of views.
- The model/controller should support styling of the text.
- The model/controller should support selection split over more than one view. (selection of text starting in one view and continuing in another)
Task result
The result of this task should be design description and prototype implementation code.
Implementation idea
- Extend the StyledEditKit or RtfEditKit.
- Implement a DocumentFilter subclass to achieve the requested behavior.
Related
How to demo
- Create a frame containing more than one text views over the same model, prefilled with text, with at least two different styles.
- Observe the different styles
- Type some text in the views and observe the splitting of the text on different views.
- Select some text with part of the selection at the end of the first view and part – at the beginning of the second.
- Copy and paste the selected text to ensure the selection is correct
Design
Implementation
(Implementation results should be described and linked here (from the wiki or the repository))
Testing
Comments
In future releases the model will probably have to support also the following functionality: undo/redo, custom styles, attaching actions to text ( hyperlinks style), pagination, search/replace, spell check, read/write to stream/reader/writer (serialize)