Changes between Version 10 and Version 11 of TEXT_CHAINING_BEHAVIOUR_R1


Ignore:
Timestamp:
09/15/09 18:10:20 (16 years ago)
Author:
boyan
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TEXT_CHAINING_BEHAVIOUR_R1

    v10 v11  
    44 
    55= Analysis = 
    6 ^(Give as much as possible of the needed information for designing and implementing the task in the following sections.)^ 
    76 
    87== Overview == 
     
    6261 
    6362= Design = 
    64 ^(Describe your design here.)^ 
     63The new resource design has already taken in mind text chaining by having two kinds of text frames - head and tail. Here's a more detailed description of the idea plus additional things that are needed. 
     64 
     65 * HeadTextFrameR4 extends FrameR4 implements ResourceFrame 
     66  * It contains the text of the chain as its main resource (in ResourceFrame.KEY_MAIN_RESOURCE) and the mode of the chaining (auto/manual/none) (in KEY_CHAIN_MODE). 
     67 * TailTextFrameR4 extends FrameR4 
     68  * It contains a reference to the head of the frame (KEY_CHAIN_HEAD) and a String key used to determine the chain order (KEY_CHAIN_ORDER). 
     69 * There is a corresponding hierarchy of helpers that have methods for getting these keys. 
     70 
     71When a user inserts a text frame, a HeadTextFrame is inserted with a default chaining mode of None. When a user clicks the chain halo button, a hud appears that allows the user to select a frame to be chained or to turn on auto chaining. A frame that is chained is changed to TailTextFrame and its keys for chain head and order are set. The view is responsible for taking information about chaining from the model and redirecting the areas for text displaying to the text layout. 
     72 
     73The existing text chain halo button and hud will be used as a GUI for the chaining. They will be improved by adding a label for the previous/next frame chained and options for auto-chaining and no chaining. 
     74 
     75TextChainingLogic class will be rewritten to provide the expected behaviour for chaining/unchaining frames. It should also be responsible for taking the appropriate action when a chained frame is deleted (this should be done in an operation with a sort key lower than that of the remove frame operation). The same is true for deleting a page that contains head text frames. 
     76 
     77The hierarchy of the views follows the hierarchy of the resources and helpers. Each text view holds a TextViewFlow that is used by the layout to display the text. For the layout to display the text correspondingly it is enough to track the chained frames in the getAreas method. 
     78 
     79Here follows a class diagram of text classes related to chaining: 
     80 
     81An initial version of the system test for the chaining can be found here: 
    6582 
    6683= Implementation =