Changes between Version 23 and Version 24 of TEXT_VIEW_MODEL


Ignore:
Timestamp:
04/21/10 11:15:00 (15 years ago)
Author:
kyli
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TEXT_VIEW_MODEL

    v23 v24  
    3939  
    4040= Design = 
     41 
    4142 * Make interface '''TextProcessor'''.  
    4243  * Usage: Gets a text on its input and gives another text as a result. Processors get the model text of an element and make it ready for drawing, that is, they may put decorations, colors, may even change the text itself.   
     
    5960   * TextLinkOptions - contains a map of strings to ImmColors. Nothing special here. 
    6061 
    61 * In org.sophie2.base.model.text.mvc package add new class public static class '''SelectionOptions<T>''' implements TextProcessor.Options - a class representing the options of the selection processor. This class has private final  HotAttr<T> attribute, private final T value, private final HotTextInterval selectionInterval. The first one holds the attribute of the selection (CommonAttr.BACKGROUND_COLOR), the second one holds it's value (Ex: ImmColor.Blue) and the third one holds the selection interval. 
     62 * In org.sophie2.base.model.text.mvc package add new class public static class '''SelectionOptions<T>''' implements TextProcessor.Options - a class representing the options of the selection processor. This class has private final  HotAttr<T> attribute, private final T value, private final HotTextInterval selectionInterval. The first one holds the attribute of the selection (CommonAttr.BACKGROUND_COLOR), the second one holds it's value (Ex: ImmColor.Blue) and the third one holds the selection interval. 
    6263 * In org.sophie2.base.model.text.mvc package add new class '''SelectionProcessor''' implements TextProcessor<SelectionOptions, DefaultTextEffect> - Processes text selection and caret.Its work consists of modifying some of the the color attributes for the selected chars, as well as to put a LayoutAttr#CARET_ATTR somewhere.  
    6364 
    6465 
    65  -----------------------TEXT_VIEW part--------------------------------------- 
     66 === TEXT_VIEW part === 
     67 
    6668 * In org.sophie2.base.model.text package add new abstract class '''TextChange''' that represents  
    6769 the base model of a text change (applying styles ot text, replacing existing text in some interval). 
     
    9496 * In HotLayout, HotTextLayout, HotAreaLayout, HotLineLayout, HotSegmentLayout:draw method add another parameter : isEditable that is true if the book is not preview mode (this is used to show if the caret should be drawn). 
    9597 
     98 
     99Tests : [browser:branches/private/diana/2384/modules/org.sophie2.base.model.text/src/test/java/org/sophie2/base/model/text/mvc/SelectionProcessorTest.java SelectionProcessorTest], [browser: branches/private/diana/2384/modules/org.sophie2.main.func.text/src/test/java/org/sophie2/main/func/text/links/TextLinkProcessorTest.java LinkProcessorTest] 
     100 
     101 
     102 
    96103= Implementation = 
    97104^(Describe and link the implementation results here (from the wiki or the repository).)^