public class TextLayoutResult extends MinMaxWidthLayoutResult
layout
.Modifier and Type | Field and Description |
---|---|
protected boolean |
containsPossibleBreak |
protected boolean |
endsWithSplitCharacter |
protected float |
leftMinWidth |
protected float |
rightMinWidth |
protected boolean |
splitForcedByNewline
Indicates whether split was forced by new line symbol in text or not.
|
protected boolean |
startsWithSplitCharacterWhiteSpace |
protected boolean |
wordHasBeenSplit
Indicates whether some word was split during
layout . |
minMaxWidth
areaBreak, causeOfNothing, FULL, NOTHING, occupiedArea, overflowRenderer, PARTIAL, splitRenderer, status
Constructor and Description |
---|
TextLayoutResult(int status,
LayoutArea occupiedArea,
IRenderer splitRenderer,
IRenderer overflowRenderer)
|
TextLayoutResult(int status,
LayoutArea occupiedArea,
IRenderer splitRenderer,
IRenderer overflowRenderer,
IRenderer cause)
|
Modifier and Type | Method and Description |
---|---|
float |
getLeftMinWidth()
Gets min width of the leftmost unbreakable part of the TextRenderer#line after layout.
|
float |
getRightMinWidth()
Gets min width of the rightmost unbreakable part of the TextRenderer#line after layout.
|
boolean |
isContainsPossibleBreak()
Indicates whether split renderer contains possible break.
|
boolean |
isEndsWithSplitCharacter()
Indicates whether TextRenderer#line ends with a splitCharacter.
|
boolean |
isSplitForcedByNewline()
Indicates whether split was forced by new line symbol in rendered text.
|
boolean |
isStartsWithSplitCharacterWhiteSpace()
Indicates whether TextRenderer#line starts with a whitespace.
|
boolean |
isWordHasBeenSplit()
Indicates whether some word in a rendered text was split during
layout . |
TextLayoutResult |
setContainsPossibleBreak(boolean containsPossibleBreak)
|
TextLayoutResult |
setEndsWithSplitCharacter(boolean endsWithSplitCharacter)
|
TextLayoutResult |
setLeftMinWidth(float leftMinWidth)
Sets min width of the leftmost unbreakable part of the TextRenderer#line after layout.
|
TextLayoutResult |
setRightMinWidth(float rightMinWidth)
Sets min width of the rightmost unbreakable part of the TextRenderer#line after layout.
|
TextLayoutResult |
setSplitForcedByNewline(boolean isSplitForcedByNewline)
|
TextLayoutResult |
setStartsWithSplitCharacterWhiteSpace(boolean startsWithSplitCharacterWhiteSpace)
|
TextLayoutResult |
setWordHasBeenSplit(boolean wordHasBeenSplit)
Sets
wordHasBeenSplit |
getMinMaxWidth, setMinMaxWidth
getAreaBreak, getCauseOfNothing, getOccupiedArea, getOverflowRenderer, getSplitRenderer, getStatus, setAreaBreak, setOverflowRenderer, setSplitRenderer, setStatus, toString
protected boolean wordHasBeenSplit
layout
.protected boolean splitForcedByNewline
protected boolean containsPossibleBreak
protected boolean startsWithSplitCharacterWhiteSpace
protected boolean endsWithSplitCharacter
protected float leftMinWidth
protected float rightMinWidth
public TextLayoutResult(int status, LayoutArea occupiedArea, IRenderer splitRenderer, IRenderer overflowRenderer)
result of {@link com.itextpdf.layout.renderer.TextRenderer#layout(LayoutContext) layouting}
.
The LayoutResult.causeOfNothing
will be set as null.status
- the status of TextRenderer.layout(LayoutContext)
occupiedArea
- the area occupied by the contentsplitRenderer
- the renderer to draw the split part of the contentoverflowRenderer
- the renderer to draw the overflowed part of the contentpublic TextLayoutResult(int status, LayoutArea occupiedArea, IRenderer splitRenderer, IRenderer overflowRenderer, IRenderer cause)
result of {@link com.itextpdf.layout.renderer.TextRenderer#layout(LayoutContext) layouting}
.status
- the status of TextRenderer.layout(LayoutContext)
occupiedArea
- the area occupied by the contentsplitRenderer
- the renderer to draw the split part of the contentoverflowRenderer
- the renderer to draw the overflowed part of the contentcause
- the first renderer to produce LayoutResult.NOTHING
public boolean isWordHasBeenSplit()
layout
.
The value will be set as true if, for example, the rendered words width is bigger than the width of layout area.public TextLayoutResult setWordHasBeenSplit(boolean wordHasBeenSplit)
wordHasBeenSplit
wordHasBeenSplit
- indicates that some word was split during layout
.this layout result
the setting was applied onwordHasBeenSplit
public boolean isSplitForcedByNewline()
public TextLayoutResult setSplitForcedByNewline(boolean isSplitForcedByNewline)
isSplitForcedByNewline
- indicates that split was forced by new line symbol in rendered text.this layout result
the setting was applied on.setSplitForcedByNewline(boolean)
public boolean isContainsPossibleBreak()
ISplitCharacters
public TextLayoutResult setContainsPossibleBreak(boolean containsPossibleBreak)
containsPossibleBreak
- indicates that split renderer contains possible break.this layout result
the setting was applied on.isContainsPossibleBreak()
public TextLayoutResult setStartsWithSplitCharacterWhiteSpace(boolean startsWithSplitCharacterWhiteSpace)
startsWithSplitCharacterWhiteSpace
- indicates if TextRenderer#line starts with a split character that is
also a whitespace.this layout result
the setting was applied on.isStartsWithSplitCharacterWhiteSpace()
public boolean isStartsWithSplitCharacterWhiteSpace()
public TextLayoutResult setEndsWithSplitCharacter(boolean endsWithSplitCharacter)
endsWithSplitCharacter
- indicates if TextRenderer#line ends with a splitCharacter.this layout result
the setting was applied on.isEndsWithSplitCharacter()
public boolean isEndsWithSplitCharacter()
ISplitCharacters
public TextLayoutResult setLeftMinWidth(float leftMinWidth)
leftMinWidth
- min width of the leftmost unbreakable part of the TextRenderer#line after layout.this layout result
the setting was applied on.public float getLeftMinWidth()
public TextLayoutResult setRightMinWidth(float rightMinWidth)
rightMinWidth
- min width of the rightmost unbreakable part of the TextRenderer#line after layout.this layout result
the setting was applied on.public float getRightMinWidth()
Copyright © 1998–2021 iText Group NV. All rights reserved.