Changes between Version 2 and Version 3 of TEXT_LAYOUT_COMMONS


Ignore:
Timestamp:
03/09/10 10:04:06 (15 years ago)
Author:
kyli
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TabularUnified TEXT_LAYOUT_COMMONS

    v2 v3  
    4646 
    4747= Design = 
    48 ^(Describe your design here.)^ 
     48 * The current usage of '''TextLayout''' in our layout could easily allow tabbed text, but it is not designed to work with hyphenation and spell check. It also needs LineBreakMeasurer usage, which is quite heavy class. According to the java doc, re-using the LBMs makes them quite faster, but changes to a text style (for example) cause a new LBM to be created. On the other side, drawing GlyphVectors is said to be the fastest way of drawing text that java.awt.font provides. So: 
     49  * Remove ImmHotText.toAci() ad the private field ImmHotText.attrString; 
     50  * Remove TextUtils.createLineBreakMeasurer() 
     51 
     52 * We define that '''text run''' is a piece of text in which all characters have the same style attributes. A TextRun object should have at least the following methods: 
     53  * Constructor from hot text; 
     54  * public String getText(); 
     55  * public Map<AttributedCharacterIterator.Attribute, Object> getAttributes(); ''Note: TextAttribute extends AttributedCharacterIterator.Attribute'' 
     56  * public Object getAttribute(AttributedCharacterIterator.Attribute attribute); 
     57  * public int getRunLength(); 
    4958 
    5059= Implementation =