Package com.openhtmltopdf.render
Class InlineText
java.lang.Object
com.openhtmltopdf.render.InlineText
A lightweight object which contains a chunk of text from an inline element.
It will never extend across a line break nor will it extend across an element
nested within its inline element.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private CharCounts
private int
private String
private InlineLayoutBox
private InlineText.InlineTextRareData
private int
private boolean
private boolean
private int
private int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
void
countJustifiableChars
(CharCounts counts) private void
int
getEnd()
float
int
getStart()
byte
int
getWidth()
int
getX()
boolean
boolean
isEmpty()
boolean
static boolean
isJustifySpaceCodePoint
(int cp) boolean
private boolean
void
void
void
setEndsOnSoftHyphen
(boolean endsOnSoftHyphen) void
setFunctionData
(FunctionData functionData) void
setLetterSpacing
(float letterSpacing) void
setMasterText
(String masterText) void
setParent
(InlineLayoutBox parent) void
setSubstring
(int start, int end) void
setTextDirection
(byte direction) void
setTrimmedLeadingSpace
(boolean trimmedLeadingSpace) private void
setTrimmedTrailingSpace
(boolean trimmedTrailingSpace) void
setWidth
(int width) void
setX
(int x) toString()
void
void
-
Field Details
-
_parent
-
_x
private int _x -
_width
private int _width -
_masterText
-
_start
private int _start -
_end
private int _end -
_containedLF
private boolean _containedLF -
_trimmedLeadingSpace
private boolean _trimmedLeadingSpace -
_trimmedTrailingSpace
private boolean _trimmedTrailingSpace -
_counts
-
_rareData
-
-
Constructor Details
-
InlineText
public InlineText()
-
-
Method Details
-
ensureRareData
private void ensureRareData() -
setTextDirection
public void setTextDirection(byte direction) - Parameters:
direction
- either LTR or RTL from BidiSplitter interface.
-
getTextDirection
public byte getTextDirection()- Returns:
- either LTR or RTL from BidiSplitter interface.
-
setLetterSpacing
public void setLetterSpacing(float letterSpacing) -
getLetterSpacing
public float getLetterSpacing() -
trimTrailingSpace
-
isEmpty
public boolean isEmpty() -
getSubstring
-
setSubstring
public void setSubstring(int start, int end) -
getMasterText
-
setMasterText
-
getX
public int getX() -
setX
public void setX(int x) -
getWidth
public int getWidth() -
setWidth
public void setWidth(int width) -
paint
-
paintSelection
-
getParent
-
setParent
-
isDynamicFunction
public boolean isDynamicFunction() -
getFunctionData
-
setFunctionData
-
updateDynamicValue
-
toString
-
getTextExportText
-
isTrimmedLeadingSpace
public boolean isTrimmedLeadingSpace() -
setTrimmedLeadingSpace
public void setTrimmedLeadingSpace(boolean trimmedLeadingSpace) -
setTrimmedTrailingSpace
private void setTrimmedTrailingSpace(boolean trimmedTrailingSpace) -
isTrimmedTrailingSpace
private boolean isTrimmedTrailingSpace() -
isJustifySpaceCodePoint
public static boolean isJustifySpaceCodePoint(int cp) -
countJustifiableChars
-
calcTotalAdjustment
-
getStart
public int getStart() -
getEnd
public int getEnd() -
setEndsOnSoftHyphen
public void setEndsOnSoftHyphen(boolean endsOnSoftHyphen) -
isEndsOnSoftHyphen
public boolean isEndsOnSoftHyphen()
-