wiki:GROUP_BASE_MODEL_TEXT_R0

Version 2 (modified by nenko, 16 years ago) (diff)

--

Error: Macro BackLinksMenu(None) failed
compressed data is corrupt

Error: Macro TicketQuery(summary=TASK_NAME_HERE, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|) failed
current transaction is aborted, commands ignored until end of transaction block

Analysis

Overview

In this group 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. The task consists of two logical parts

  • a model for the text itself
  • a model for the view components.
  1. Text model
  • The model for the text consist of styled text and contains information about the attributes of the text itself

o font o size o color o opacity o modifiers (bold, italic, underline, strikethrough) o attached actions o other attributes that may appear

  • The chained view components will share a common text model and each will display only part of it.
  1. Individual text component model
  • The model of the individual text component should contain additional information for the rendering of the text in the particular view – transparency

o rotation o wrapping mode o other attributes that may appear

  • The view component model should 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 include

o insert/remove/replace text o change the size of the view component o changes in the size of some part of the text inside the component o change the wrapping mode of the component o maybe other

A mechanism for persisting both models should be designed and it should be consistent with the overall persistent strategy in Sophie (BASE_PERSISTENCE_INTERMEDIATE_STORAGE_R0, BASE_PERSISTENCE_COMMONS_R0)

In both models a undo/redo mechanism should be designed in a way that will allow it so seamlessly integrate with the properties oriented undo/redo mechanism used in Sophie (PRO_CHANGE_UNDO_MANAGER_R0).

Considering the complexity of this task it is probable that parts of it will have to be moved to separate tasks and, in addition, unplanned related tasks can emerge. Such tasks have to be identified and described, during the work. Such tasks may be, for example, the persistence mechanism, the undo/redo mechanism, the attachment of actions (hyperlink style) to the text, and others.

Task requirements

Focus on following requirements:

  • The model should support chaining of views.
  • The model should support styling of the text.
  • The model 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 only a prove of concept prototype implementation code.

Implementation idea

Currently the text support presented in JDK is not sufficient for our requirements. So we need to design our own such one.

BASE_PERSISTENCE_INTERMEDIATE_STORAGE_R0
BASE_PERSISTENCE_COMMONS_R0
WRAPPING_TEXT_RENDERING_R0
PRO_CHANGE_UNDO_MANAGER_R0

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

(Describe your design here.)

Implementation

(Describe and link the implementation results here (from the wiki or the repository).)

Testing

(Place the testing results here.)

Comments

(Write comments for this or later revisions here.)