net.sf.jasperreports.engine.fill

## Class SimpleTextLineWrapper

- java.lang.Object
- - net.sf.jasperreports.engine.fill.SimpleTextLineWrapper

- All Implemented Interfaces:
    TextLineWrapper

      public class SimpleTextLineWrapper
      extends java.lang.Object
      implements TextLineWrapper

  Version:
    $Id: SimpleTextLineWrapper.java 6932 2014-02-27 09:32:21Z teodord $
  Author:
    Lucian Chirita (lucianc@users.sourceforge.net)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `SimpleTextLineWrapper.ElementFontInfo`
    `protected static class` | `SimpleTextLineWrapper.FontInfo`
    `protected static class` | `SimpleTextLineWrapper.FontKey`
    `protected static class` | `SimpleTextLineWrapper.FontStatistics`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static int` | `COMPEX_LAYOUT_END_CHAR`
    `protected static int` | `COMPEX_LAYOUT_START_CHAR`
    `protected static java.lang.String` | `FILL_CACHE_KEY_ELEMENT_FONT_INFOS`
    `protected static java.lang.String` | `FILL_CACHE_KEY_GENERAL_FONT_INFOS`
    `protected static int` | `FONT_MIN_COUNT`
    `protected static double` | `FONT_SIZE_MIN_FACTOR`
    `protected static double` | `FONT_WIDTH_CHECK_FACTOR`
    `static java.lang.String` | `MEASURE_EXACT_ALWAYS`
    `static java.lang.String` | `MEASURE_EXACT_MULTILINE`
    `protected static int` | `NEXT_BREAK_INDEX_THRESHOLD`
    `static java.lang.String` | `PROPERTY_ELEMENT_CACHE_SIZE`
    `static java.lang.String` | `PROPERTY_MEASURE_EXACT`
    `protected static java.util.Set<java.lang.Character.UnicodeBlock>` | `simpleLayoutBlocks`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleTextLineWrapper()`
    `SimpleTextLineWrapper(SimpleTextLineWrapper parent)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `TextLine` | `baseTextLine(int index)`
    `char` | `charAt(int index)`
    `protected java.util.HashMap<Pair<java.util.UUID,SimpleTextLineWrapper.FontKey>,SimpleTextLineWrapper.ElementFontInfo>` | `createElementFontInfosFillCache()`
    `protected void` | `createFontInfo(java.util.Map<java.text.AttributedCharacterIterator.Attribute,java.lang.Object> textAttributes)`
    `protected boolean` | `determineComplexLayout(java.awt.Font font)`
    `protected float` | `determineLeading(java.awt.Font font)`
    `protected int` | `estimateBreakIndex(float width, int endLimit)`
    `protected SimpleTextLineWrapper.FontInfo` | `getGeneralFontInfo(java.util.Map<java.text.AttributedCharacterIterator.Attribute,java.lang.Object> textAttributes)`
    `java.lang.String` | `getLineText(int start, int end)`
    `protected boolean` | `hasComplexLayout(char[] chars)`
    `void` | `init(TextMeasureContext context)`
    `protected boolean` | `isLeftToRight(char[] chars)`
    `protected boolean` | `isParagraphMeasureExact(char[] chars)`
    `TextLineWrapper` | `lastLineWrapper(java.lang.String lineText, int start, int textLength, boolean truncateAtChar)`
    `protected java.awt.Font` | `loadFont(java.util.Map<java.text.AttributedCharacterIterator.Attribute,java.lang.Object> textAttributes)`
    `float` | `maxFontsize(int start, int end)`
    `int` | `maxFontSize(int start, int end)` Deprecated. Replaced by `maxFontsize(int, int)`.
    `protected TextLine` | `measureExactLine(float width, int endLimit, boolean requireWord)`
    `protected int` | `measureExactLineBreakIndex(float width, int endLimit, boolean requireWord)`
    `protected TextLine` | `measureLine(float width, boolean requireWord, int endLimit)`
    `protected java.awt.geom.Rectangle2D` | `measureParagraphFragment(int measureIndex)`
    `TextLine` | `nextLine(float width, int endLimit, boolean requireWord)`
    `int` | `paragraphEnd()`
    `int` | `paragraphPosition()`
    `boolean` | `start(JRStyledText styledText)`
    `void` | `startEmptyParagraph(int paragraphStart)`
    `void` | `startParagraph(int paragraphStart, int paragraphEnd, boolean truncateAtChar)`
    `protected void` | `startParagraph(java.lang.String text, int start, boolean truncateAtChar)`
    `protected TextLine` | `toTextLine(int measureIndex, java.awt.geom.Rectangle2D measuredBounds)`
    `protected boolean` | `useExactLineMeasurement()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### PROPERTY_MEASURE_EXACT

          public static final java.lang.String PROPERTY_MEASURE_EXACT

      See Also:
        Constant Field Values

    - #### PROPERTY_ELEMENT_CACHE_SIZE

          public static final java.lang.String PROPERTY_ELEMENT_CACHE_SIZE

      See Also:
        Constant Field Values

    - #### MEASURE_EXACT_ALWAYS

          public static final java.lang.String MEASURE_EXACT_ALWAYS

      See Also:
        Constant Field Values

    - #### MEASURE_EXACT_MULTILINE

          public static final java.lang.String MEASURE_EXACT_MULTILINE

      See Also:
        Constant Field Values

    - #### FONT_MIN_COUNT

          protected static final int FONT_MIN_COUNT

      See Also:
        Constant Field Values

    - #### FONT_SIZE_MIN_FACTOR

          protected static final double FONT_SIZE_MIN_FACTOR

      See Also:
        Constant Field Values

    - #### FONT_WIDTH_CHECK_FACTOR

          protected static final double FONT_WIDTH_CHECK_FACTOR

      See Also:
        Constant Field Values

    - #### NEXT_BREAK_INDEX_THRESHOLD

          protected static final int NEXT_BREAK_INDEX_THRESHOLD

      See Also:
        Constant Field Values

    - #### COMPEX_LAYOUT_START_CHAR

          protected static final int COMPEX_LAYOUT_START_CHAR

      See Also:
        Constant Field Values

    - #### COMPEX_LAYOUT_END_CHAR

          protected static final int COMPEX_LAYOUT_END_CHAR

      See Also:
        Constant Field Values

    - #### FILL_CACHE_KEY_ELEMENT_FONT_INFOS

          protected static final java.lang.String FILL_CACHE_KEY_ELEMENT_FONT_INFOS

    - #### FILL_CACHE_KEY_GENERAL_FONT_INFOS

          protected static final java.lang.String FILL_CACHE_KEY_GENERAL_FONT_INFOS

    - #### simpleLayoutBlocks

          protected static final java.util.Set<java.lang.Character.UnicodeBlock> simpleLayoutBlocks

  - ### Constructor Detail

    - #### SimpleTextLineWrapper

          public SimpleTextLineWrapper()

    - #### SimpleTextLineWrapper

          public SimpleTextLineWrapper(SimpleTextLineWrapper parent)

  - ### Method Detail

    - #### init

          public void init(TextMeasureContext context)

      Specified by:
        `init` in interface `TextLineWrapper`

    - #### start

          public boolean start(JRStyledText styledText)

      Specified by:
        `start` in interface `TextLineWrapper`

    - #### createFontInfo

          protected void createFontInfo(java.util.Map<java.text.AttributedCharacterIterator.Attribute,java.lang.Object> textAttributes)

    - #### createElementFontInfosFillCache

          protected java.util.HashMap<Pair<java.util.UUID,SimpleTextLineWrapper.FontKey>,SimpleTextLineWrapper.ElementFontInfo> createElementFontInfosFillCache()

    - #### getGeneralFontInfo

          protected SimpleTextLineWrapper.FontInfo getGeneralFontInfo(java.util.Map<java.text.AttributedCharacterIterator.Attribute,java.lang.Object> textAttributes)

    - #### loadFont

          protected java.awt.Font loadFont(java.util.Map<java.text.AttributedCharacterIterator.Attribute,java.lang.Object> textAttributes)

    - #### determineComplexLayout

          protected boolean determineComplexLayout(java.awt.Font font)

    - #### determineLeading

          protected float determineLeading(java.awt.Font font)

    - #### startParagraph

          public void startParagraph(int paragraphStart,
                            int paragraphEnd,
                            boolean truncateAtChar)

      Specified by:
        `startParagraph` in interface `TextLineWrapper`

    - #### startEmptyParagraph

          public void startEmptyParagraph(int paragraphStart)

      Specified by:
        `startEmptyParagraph` in interface `TextLineWrapper`

    - #### startParagraph

          protected void startParagraph(java.lang.String text,
                            int start,
                            boolean truncateAtChar)

    - #### isLeftToRight

          protected boolean isLeftToRight(char[] chars)

    - #### isParagraphMeasureExact

          protected boolean isParagraphMeasureExact(char[] chars)

    - #### hasComplexLayout

          protected boolean hasComplexLayout(char[] chars)

    - #### paragraphPosition

          public int paragraphPosition()

      Specified by:
        `paragraphPosition` in interface `TextLineWrapper`

    - #### paragraphEnd

          public int paragraphEnd()

      Specified by:
        `paragraphEnd` in interface `TextLineWrapper`

    - #### nextLine

          public TextLine nextLine(float width,
                          int endLimit,
                          boolean requireWord)

      Specified by:
        `nextLine` in interface `TextLineWrapper`

    - #### useExactLineMeasurement

          protected boolean useExactLineMeasurement()

    - #### measureExactLine

          protected TextLine measureExactLine(float width,
                                  int endLimit,
                                  boolean requireWord)

    - #### measureExactLineBreakIndex

          protected int measureExactLineBreakIndex(float width,
                                       int endLimit,
                                       boolean requireWord)

    - #### measureLine

          protected TextLine measureLine(float width,
                             boolean requireWord,
                             int endLimit)

    - #### estimateBreakIndex

          protected int estimateBreakIndex(float width,
                               int endLimit)

    - #### measureParagraphFragment

          protected java.awt.geom.Rectangle2D measureParagraphFragment(int measureIndex)

    - #### toTextLine

          protected TextLine toTextLine(int measureIndex,
                            java.awt.geom.Rectangle2D measuredBounds)

    - #### baseTextLine

          public TextLine baseTextLine(int index)

      Specified by:
        `baseTextLine` in interface `TextLineWrapper`

    - #### maxFontsize

          public float maxFontsize(int start,
                          int end)

      Specified by:
        `maxFontsize` in interface `TextLineWrapper`

    - #### maxFontSize

          public int maxFontSize(int start,
                        int end)

      Deprecated. Replaced by `maxFontsize(int, int)`.
      Specified by:
        `maxFontSize` in interface `TextLineWrapper`

    - #### getLineText

          public java.lang.String getLineText(int start,
                                     int end)

      Specified by:
        `getLineText` in interface `TextLineWrapper`

    - #### charAt

          public char charAt(int index)

      Specified by:
        `charAt` in interface `TextLineWrapper`

    - #### lastLineWrapper

          public TextLineWrapper lastLineWrapper(java.lang.String lineText,
                                        int start,
                                        int textLength,
                                        boolean truncateAtChar)

      Specified by:
        `lastLineWrapper` in interface `TextLineWrapper`

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com