Package net.sf.jasperreports.engine.fill
Class SimpleTextLineWrapper
java.lang.Object
net.sf.jasperreports.engine.fill.SimpleTextLineWrapper
- All Implemented Interfaces:
TextLineWrapper
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
protected static class
protected static class
protected static class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbaseTextLine
(int index) char
charAt
(int index) protected void
createFontInfo
(Map<AttributedCharacterIterator.Attribute, Object> textAttributes) protected boolean
determineComplexLayout
(Font font) protected float
determineLeading
(Font font) protected int
estimateBreakIndex
(float width, int endLimit) protected SimpleTextLineWrapper.FontInfo
getGeneralFontInfo
(Map<AttributedCharacterIterator.Attribute, Object> textAttributes) getLineText
(int start, int end) protected boolean
hasComplexLayout
(char[] chars) void
init
(TextMeasureContext context) protected boolean
isLeftToRight
(char[] chars) protected boolean
isParagraphMeasureExact
(char[] chars) lastLineWrapper
(String lineText, int start, int textLength, boolean truncateAtChar) protected Font
loadFont
(Map<AttributedCharacterIterator.Attribute, Object> textAttributes) float
maxFontsize
(int start, int end) 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 Rectangle2D
measureParagraphFragment
(int measureIndex) nextLine
(float width, int endLimit, boolean requireWord) int
int
boolean
start
(JRStyledText styledText) void
startEmptyParagraph
(int paragraphStart) void
startParagraph
(int paragraphStart, int paragraphEnd, boolean truncateAtChar) protected void
startParagraph
(String text, int start, boolean truncateAtChar) protected TextLine
toTextLine
(int measureIndex, Rectangle2D measuredBounds) protected boolean
-
Field Details
-
PROPERTY_MEASURE_EXACT
- See Also:
-
PROPERTY_ELEMENT_CACHE_SIZE
- See Also:
-
MEASURE_EXACT_ALWAYS
- See Also:
-
MEASURE_EXACT_MULTILINE
- See Also:
-
FONT_MIN_COUNT
protected static final int FONT_MIN_COUNT- See Also:
-
FONT_SIZE_MIN_FACTOR
protected static final double FONT_SIZE_MIN_FACTOR- See Also:
-
FONT_WIDTH_CHECK_FACTOR
protected static final double FONT_WIDTH_CHECK_FACTOR- See Also:
-
NEXT_BREAK_INDEX_THRESHOLD
protected static final int NEXT_BREAK_INDEX_THRESHOLD- See Also:
-
FILL_CACHE_KEY_ELEMENT_FONT_INFOS
-
FILL_CACHE_KEY_GENERAL_FONT_INFOS
-
-
Constructor Details
-
SimpleTextLineWrapper
public SimpleTextLineWrapper() -
SimpleTextLineWrapper
-
-
Method Details
-
init
- Specified by:
init
in interfaceTextLineWrapper
-
start
- Specified by:
start
in interfaceTextLineWrapper
-
createFontInfo
-
createElementFontInfosFillCache
protected HashMap<Pair<UUID,SimpleTextLineWrapper.FontKey>, createElementFontInfosFillCache()SimpleTextLineWrapper.ElementFontInfo> -
getGeneralFontInfo
protected SimpleTextLineWrapper.FontInfo getGeneralFontInfo(Map<AttributedCharacterIterator.Attribute, Object> textAttributes) -
loadFont
-
determineComplexLayout
-
determineLeading
-
startParagraph
public void startParagraph(int paragraphStart, int paragraphEnd, boolean truncateAtChar) - Specified by:
startParagraph
in interfaceTextLineWrapper
-
startEmptyParagraph
public void startEmptyParagraph(int paragraphStart) - Specified by:
startEmptyParagraph
in interfaceTextLineWrapper
-
startParagraph
-
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 interfaceTextLineWrapper
-
paragraphEnd
public int paragraphEnd()- Specified by:
paragraphEnd
in interfaceTextLineWrapper
-
nextLine
- Specified by:
nextLine
in interfaceTextLineWrapper
-
useExactLineMeasurement
protected boolean useExactLineMeasurement() -
measureExactLine
-
measureExactLineBreakIndex
protected int measureExactLineBreakIndex(float width, int endLimit, boolean requireWord) -
measureLine
-
estimateBreakIndex
protected int estimateBreakIndex(float width, int endLimit) -
measureParagraphFragment
-
toTextLine
-
baseTextLine
- Specified by:
baseTextLine
in interfaceTextLineWrapper
-
maxFontsize
public float maxFontsize(int start, int end) - Specified by:
maxFontsize
in interfaceTextLineWrapper
-
getLineText
- Specified by:
getLineText
in interfaceTextLineWrapper
-
charAt
public char charAt(int index) - Specified by:
charAt
in interfaceTextLineWrapper
-
lastLineWrapper
public TextLineWrapper lastLineWrapper(String lineText, int start, int textLength, boolean truncateAtChar) - Specified by:
lastLineWrapper
in interfaceTextLineWrapper
-