net.sf.jasperreports.engine.fill

## Class TextMeasurer.TextMeasuredState

- java.lang.Object
- - net.sf.jasperreports.engine.fill.TextMeasurer.TextMeasuredState

- All Implemented Interfaces:
    java.lang.Cloneable, JRMeasuredText
  Enclosing class:
    TextMeasurer

      protected static class TextMeasurer.TextMeasuredState
      extends java.lang.Object
      implements JRMeasuredText, java.lang.Cloneable

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected float` | `firstLineLeading`
    `protected int` | `firstLineMaxFontSize`
    `protected int` | `fontSizeSum`
    `protected boolean` | `isLeftToRight`
    `protected boolean` | `isMeasured`
    `protected int` | `lastOffset`
    `protected java.util.ArrayList<java.lang.Integer>` | `lineBreakOffsets`
    `protected int` | `lines`
    `protected int` | `paragraphStartLine`
    `protected float` | `textHeight`
    `protected int` | `textOffset`
    `protected java.lang.String` | `textSuffix`
    `protected float` | `textWidth`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TextMeasurer.TextMeasuredState(boolean saveLineBreakOffsets)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addLineBreak()`
    `TextMeasurer.TextMeasuredState` | `cloneState()`
    `float` | `getLeadingOffset()` Returns the text leading offset.
    `short[]` | `getLineBreakOffsets()` Returns the line break offsets as required for `JRPrintText.getLineBreakOffsets()`.
    `float` | `getLineSpacingFactor()` Return the line spacing factor for the text.
    `float` | `getTextHeight()` Returns the text's measure height.
    `int` | `getTextOffset()` Returns the offset up to which text fitted.
    `java.lang.String` | `getTextSuffix()` Returns the suffix that was appended to the text (after `JRMeasuredText.getTextOffset()`).
    `float` | `getTextWidth()` Returns the text's measure width.
    `boolean` | `isLeftToRight()` Returns whether the text was determined to be left to right or not.

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

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

- - ### Field Detail

    - #### textOffset

          protected int textOffset

    - #### lines

          protected int lines

    - #### fontSizeSum

          protected int fontSizeSum

    - #### firstLineMaxFontSize

          protected int firstLineMaxFontSize

    - #### paragraphStartLine

          protected int paragraphStartLine

    - #### textWidth

          protected float textWidth

    - #### textHeight

          protected float textHeight

    - #### firstLineLeading

          protected float firstLineLeading

    - #### isLeftToRight

          protected boolean isLeftToRight

    - #### textSuffix

          protected java.lang.String textSuffix

    - #### isMeasured

          protected boolean isMeasured

    - #### lastOffset

          protected int lastOffset

    - #### lineBreakOffsets

          protected java.util.ArrayList<java.lang.Integer> lineBreakOffsets

  - ### Constructor Detail

    - #### TextMeasurer.TextMeasuredState

          public TextMeasurer.TextMeasuredState(boolean saveLineBreakOffsets)

  - ### Method Detail

    - #### isLeftToRight

          public boolean isLeftToRight()

      Description copied from interface: `JRMeasuredText`
      Returns whether the text was determined to be left to right or not.
      Specified by:
        `isLeftToRight` in interface `JRMeasuredText`
      Returns:
        whether the text was determined to be left to right

    - #### getTextOffset

          public int getTextOffset()

      Description copied from interface: `JRMeasuredText`
      Returns the offset up to which text fitted.
      Specified by:
        `getTextOffset` in interface `JRMeasuredText`
      Returns:
        the offset up to which text fitted

    - #### getTextWidth

          public float getTextWidth()

      Description copied from interface: `JRMeasuredText`
      Returns the text's measure width.
      Specified by:
        `getTextWidth` in interface `JRMeasuredText`
      Returns:
        the text's measure width

    - #### getTextHeight

          public float getTextHeight()

      Description copied from interface: `JRMeasuredText`
      Returns the text's measure height.
      Specified by:
        `getTextHeight` in interface `JRMeasuredText`
      Returns:
        the text's measure height

    - #### getLineSpacingFactor

          public float getLineSpacingFactor()

      Description copied from interface: `JRMeasuredText`
      Return the line spacing factor for the text.
      Specified by:
        `getLineSpacingFactor` in interface `JRMeasuredText`
      Returns:
        the line spacing factor

    - #### getLeadingOffset

          public float getLeadingOffset()

      Description copied from interface: `JRMeasuredText`
      Returns the text leading offset.
      Specified by:
        `getLeadingOffset` in interface `JRMeasuredText`
      Returns:
        the text leading offset

    - #### getTextSuffix

          public java.lang.String getTextSuffix()

      Description copied from interface: `JRMeasuredText`
      Returns the suffix that was appended to the text (after `JRMeasuredText.getTextOffset()`).
      Specified by:
        `getTextSuffix` in interface `JRMeasuredText`
      Returns:
        the suffix that was appended to the text

    - #### cloneState

          public TextMeasurer.TextMeasuredState cloneState()

    - #### addLineBreak

          protected void addLineBreak()

    - #### getLineBreakOffsets

          public short[] getLineBreakOffsets()

      Description copied from interface: `JRMeasuredText`
      Returns the line break offsets as required for `JRPrintText.getLineBreakOffsets()`.
      Specified by:
        `getLineBreakOffsets` in interface `JRMeasuredText`
      Returns:
        the line break offsets for the measured text

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com