Package net.sf.jasperreports.engine.util
Class SimpleMeasuredText
java.lang.Object
net.sf.jasperreports.engine.util.SimpleMeasuredText
- All Implemented Interfaces:
JRMeasuredText
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the text's average character width.floatReturns the text leading offset.short[]Returns the line break offsets as required forJRPrintText.getLineBreakOffsets().floatReturn the line spacing factor for the text.floatReturns the text's measure height.intReturns the offset up to which text fitted.Returns the suffix that was appended to the text (afterJRMeasuredText.getTextOffset()).floatReturns the text's measure width.booleanReturns whether the text was determined to be left to right or not.booleanReturns whether the text was cut during a paragraph or the last paragraph was complete.voidsetAverageCharWidth(float averageCharWidth) voidsetLeadingOffset(float leadingOffset) voidsetLeftToRight(boolean leftToRight) voidsetLineBreakOffsets(short[] lineBreakOffsets) voidsetLineSpacingFactor(float lineSpacingFactor) voidsetParagraphCut(boolean paragraphCut) voidsetTextHeight(float textHeight) voidsetTextOffset(int textOffset) voidsetTextSuffix(String textSuffix) voidsetTextWidth(float textWidth)
-
Constructor Details
-
SimpleMeasuredText
public SimpleMeasuredText()
-
-
Method Details
-
setLeadingOffset
public void setLeadingOffset(float leadingOffset) -
getLeadingOffset
public float getLeadingOffset()Description copied from interface:JRMeasuredTextReturns the text leading offset.- Specified by:
getLeadingOffsetin interfaceJRMeasuredText- Returns:
- the text leading offset
-
setLineSpacingFactor
public void setLineSpacingFactor(float lineSpacingFactor) -
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
-
setTextWidth
public void setTextWidth(float textWidth) -
getTextWidth
public float getTextWidth()Description copied from interface:JRMeasuredTextReturns the text's measure width.- Specified by:
getTextWidthin interfaceJRMeasuredText- Returns:
- the text's measure width
-
getAverageCharWidth
public float getAverageCharWidth()Description copied from interface:JRMeasuredTextReturns the text's average character width.- Specified by:
getAverageCharWidthin interfaceJRMeasuredText- Returns:
- the text's average character width
-
setAverageCharWidth
public void setAverageCharWidth(float averageCharWidth) -
setTextHeight
public void setTextHeight(float textHeight) -
getTextHeight
public float getTextHeight()Description copied from interface:JRMeasuredTextReturns the text's measure height.- Specified by:
getTextHeightin interfaceJRMeasuredText- Returns:
- the text's measure height
-
setTextOffset
public void setTextOffset(int textOffset) -
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
-
setLeftToRight
public void setLeftToRight(boolean leftToRight) -
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
-
setParagraphCut
public void setParagraphCut(boolean paragraphCut) -
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
-
setTextSuffix
-
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
-
setLineBreakOffsets
public void setLineBreakOffsets(short[] lineBreakOffsets) -
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
-