Package 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 Description protected floatfirstLineLeadingprotected floatfirstLineMaxFontSizeprotected floatfontSizeSumprotected booleanisLeftToRightprotected booleanisMeasuredprotected booleanisParagraphCutprotected intlastOffsetprotected java.util.ArrayList<java.lang.Integer>lineBreakOffsetsprotected intlinesprotected intspacingBeforeprotected floattextHeightprotected inttextOffsetprotected java.lang.StringtextSuffixprotected floattextWidth
-
Constructor Summary
Constructors Constructor Description TextMeasuredState(boolean saveLineBreakOffsets)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddLineBreak()TextMeasurer.TextMeasuredStatecloneState()floatgetLeadingOffset()Returns the text leading offset.short[]getLineBreakOffsets()Returns the line break offsets as required forJRPrintText.getLineBreakOffsets().floatgetLineSpacingFactor()Return the line spacing factor for the text.floatgetTextHeight()Returns the text's measure height.intgetTextOffset()Returns the offset up to which text fitted.java.lang.StringgetTextSuffix()Returns the suffix that was appended to the text (afterJRMeasuredText.getTextOffset()).floatgetTextWidth()Returns the text's measure width.booleanisLeftToRight()Returns whether the text was determined to be left to right or not.booleanisParagraphCut()Returns whether the text was cut during a paragraph or the last paragraph was complete.
-
-
-
Field Detail
-
textOffset
protected int textOffset
-
lines
protected int lines
-
fontSizeSum
protected float fontSizeSum
-
firstLineMaxFontSize
protected float firstLineMaxFontSize
-
spacingBefore
protected int spacingBefore
-
textWidth
protected float textWidth
-
textHeight
protected float textHeight
-
firstLineLeading
protected float firstLineLeading
-
isLeftToRight
protected boolean isLeftToRight
-
isParagraphCut
protected boolean isParagraphCut
-
textSuffix
protected java.lang.String textSuffix
-
isMeasured
protected boolean isMeasured
-
lastOffset
protected int lastOffset
-
lineBreakOffsets
protected java.util.ArrayList<java.lang.Integer> lineBreakOffsets
-
-
Method Detail
-
isLeftToRight
public boolean isLeftToRight()
Description copied from interface:JRMeasuredTextReturns whether the text was determined to be left to right or not.- Specified by:
isLeftToRightin interfaceJRMeasuredText- Returns:
- whether the text was determined to be left to right
-
getTextOffset
public int getTextOffset()
Description copied from interface:JRMeasuredTextReturns the offset up to which text fitted.- Specified by:
getTextOffsetin interfaceJRMeasuredText- Returns:
- the offset up to which text fitted
-
getTextWidth
public float getTextWidth()
Description copied from interface:JRMeasuredTextReturns the text's measure width.- Specified by:
getTextWidthin interfaceJRMeasuredText- Returns:
- the text's measure width
-
getTextHeight
public float getTextHeight()
Description copied from interface:JRMeasuredTextReturns the text's measure height.- Specified by:
getTextHeightin interfaceJRMeasuredText- Returns:
- the text's measure height
-
getLineSpacingFactor
public float getLineSpacingFactor()
Description copied from interface:JRMeasuredTextReturn the line spacing factor for the text.- Specified by:
getLineSpacingFactorin interfaceJRMeasuredText- Returns:
- the line spacing factor
-
getLeadingOffset
public float getLeadingOffset()
Description copied from interface:JRMeasuredTextReturns the text leading offset.- Specified by:
getLeadingOffsetin interfaceJRMeasuredText- Returns:
- the text leading offset
-
isParagraphCut
public boolean isParagraphCut()
Description copied from interface:JRMeasuredTextReturns whether the text was cut during a paragraph or the last paragraph was complete.- Specified by:
isParagraphCutin interfaceJRMeasuredText- Returns:
- whether the last paragraph was cut
-
getTextSuffix
public java.lang.String getTextSuffix()
Description copied from interface:JRMeasuredTextReturns the suffix that was appended to the text (afterJRMeasuredText.getTextOffset()).- Specified by:
getTextSuffixin interfaceJRMeasuredText- 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:JRMeasuredTextReturns the line break offsets as required forJRPrintText.getLineBreakOffsets().- Specified by:
getLineBreakOffsetsin interfaceJRMeasuredText- Returns:
- the line break offsets for the measured text
-
-