public class TextMeasurer extends java.lang.Object implements JRTextMeasurer
Modifier and Type | Class and Description |
---|---|
protected static class |
TextMeasurer.TextMeasuredState |
Constructor and Description |
---|
TextMeasurer(JRCommonText textElement) |
Modifier and Type | Method and Description |
---|---|
protected void |
appendTruncateSuffix(java.text.AttributedCharacterIterator allParagraphs) |
protected JRPropertiesHolder |
getTextPropertiesHolder() |
protected java.lang.String |
getTruncateSuffix() |
protected void |
initialize(JRStyledText styledText,
int remainingTextStart,
int availableStretchHeight,
boolean canOverflow) |
protected boolean |
isToTruncateAtChar() |
JRMeasuredText |
measure(JRStyledText styledText,
int remainingTextStart,
int availableStretchHeight,
boolean canOverflow)
Fit a text chunk in a given space.
|
protected void |
processLastTruncatedRow(java.text.AttributedCharacterIterator allParagraphs,
java.lang.String paragraphText,
int paragraphOffset,
boolean lineTruncated) |
protected boolean |
renderNextLine(java.awt.font.LineBreakMeasurer lineMeasurer,
java.text.AttributedCharacterIterator paragraph) |
protected boolean |
renderParagraph(java.text.AttributedCharacterIterator allParagraphs,
int lastParagraphStart,
java.lang.String lastParagraphText) |
protected void |
setAttributes(java.text.AttributedString string,
java.text.AttributedCharacterIterator attributes,
int stringOffset) |
protected void |
setAttributes(java.text.AttributedString string,
java.util.Map attributes,
int startIndex,
int endIndex) |
protected void |
truncateLastLineAtChar(java.text.AttributedCharacterIterator allParagraphs,
java.lang.String paragraphText,
int paragraphOffset) |
public TextMeasurer(JRCommonText textElement)
protected void initialize(JRStyledText styledText, int remainingTextStart, int availableStretchHeight, boolean canOverflow)
public JRMeasuredText measure(JRStyledText styledText, int remainingTextStart, int availableStretchHeight, boolean canOverflow)
JRTextMeasurer
measure
in interface JRTextMeasurer
styledText
- the full textremainingTextStart
- the start index of the remaining textavailableStretchHeight
- the available stretch heightcanOverflow
- whether the text element is able to overflowprotected boolean renderParagraph(java.text.AttributedCharacterIterator allParagraphs, int lastParagraphStart, java.lang.String lastParagraphText)
protected void processLastTruncatedRow(java.text.AttributedCharacterIterator allParagraphs, java.lang.String paragraphText, int paragraphOffset, boolean lineTruncated)
protected void truncateLastLineAtChar(java.text.AttributedCharacterIterator allParagraphs, java.lang.String paragraphText, int paragraphOffset)
protected void appendTruncateSuffix(java.text.AttributedCharacterIterator allParagraphs)
protected boolean isToTruncateAtChar()
protected java.lang.String getTruncateSuffix()
protected boolean renderNextLine(java.awt.font.LineBreakMeasurer lineMeasurer, java.text.AttributedCharacterIterator paragraph)
protected JRPropertiesHolder getTextPropertiesHolder()
protected void setAttributes(java.text.AttributedString string, java.text.AttributedCharacterIterator attributes, int stringOffset)
protected void setAttributes(java.text.AttributedString string, java.util.Map attributes, int startIndex, int endIndex)
© 2001-2010 Jaspersoft Corporation www.jaspersoft.com