public final class RenderableText extends RenderNode implements SplittableRenderNode
RenderNode.CacheState
CACHE_CLEAN, CACHE_DEEP_DIRTY, CACHE_DIRTY, HORIZONTAL_AXIS, VERTICAL_AXIS
Constructor and Description |
---|
RenderableText(StyleSheet layoutContext,
ElementType elementType,
InstanceID instanceID,
ReportAttributeMap<Object> attributes,
ExtendedBaselineInfo baselineInfo,
GlyphList glyphs,
int offset,
int length,
int script,
boolean forceLinebreak) |
Modifier and Type | Method and Description |
---|---|
int |
computeMaximumTextSize(long contentX2) |
static long |
convert(long fontMetricsValue) |
ExtendedBaselineInfo |
getBaselineInfo()
Returns the baseline info for the given node.
|
GlyphList |
getGlyphs() |
int |
getLength() |
long |
getMinimumWidth()
Returns the component's minimum width.
|
int |
getNodeType() |
int |
getOffset() |
long |
getPreferredWidth() |
String |
getRawText() |
int |
getScript() |
boolean |
isDiscardable() |
boolean |
isEmpty() |
boolean |
isForceLinebreak() |
boolean |
isNormalTextSpacing() |
RenderableText[] |
splitBy(long widthOfFirst)
Splits the component into two children.
|
String |
toString() |
apply, clone, derive, deriveFrozen, findNodeById, freeze, getApplyState, getAttributes, getCachedAge, getCachedHeight, getCachedWidth, getCachedX, getCachedX2, getCachedY, getCachedY2, getCacheState, getChangeTracker, getChildCount, getContentRefCount, getDescendantCount, getEffectiveMarginBottom, getEffectiveMarginTop, getEffectiveMinimumChunkSize, getElementType, getHeight, getInstanceId, getLayoutNodeType, getLayoutParent, getLinebreakAge, getLogicalPage, getMajorAxis, getMaximumBoxWidth, getMinimumChunkWidth, getMinorAxis, getName, getNext, getNodeLayoutProperties, getOrphanLeafCount, getOverflowAreaHeight, getOverflowAreaWidth, getParent, getPrev, getRestrictFinishedClearOut, getRowIndex, getStateKey, getStyleSheet, getTableRefCount, getValidateModelAge, getVerticalTextAlignment, getWidowLeafCount, getWidth, getX, getY, getY2, isBoxOverflowX, isBoxOverflowY, isBoxVisible, isBoxVisible, isBreakAfter, isCacheValid, isContainsReservedContent, isDeepFinishedTable, isFinishedPaginate, isFinishedTable, isFrozen, isIgnorableForRendering, isLinebreakCacheValid, isNodeVisible, isNodeVisible, isNodeVisible, isNodeVisible, isOpen, isOrphanLeaf, isParanoidModelChecks, isRenderBox, isSizeSpecifiesBorderBox, isValidateModelCacheValid, isValidateModelResult, isVirtualNode, isVisible, isWidowBox, markApplyStateDirty, setCachedHeight, setCachedWidth, setCachedX, setCachedY, setFinishedPaginate, setFinishedTable, setHeight, setLinebreakAge, setMaximumBoxWidth, setValidateModelResult, setVirtualNode, setWidowBox, setWidth, setX, setY, shift, shiftCached
public RenderableText(StyleSheet layoutContext, ElementType elementType, InstanceID instanceID, ReportAttributeMap<Object> attributes, ExtendedBaselineInfo baselineInfo, GlyphList glyphs, int offset, int length, int script, boolean forceLinebreak)
public int getNodeType()
getNodeType
in class RenderNode
public boolean isNormalTextSpacing()
public boolean isForceLinebreak()
public GlyphList getGlyphs()
public int getOffset()
public int getLength()
public String getRawText()
public boolean isEmpty()
isEmpty
in class RenderNode
public boolean isDiscardable()
isDiscardable
in class RenderNode
public ExtendedBaselineInfo getBaselineInfo()
public int getScript()
public long getMinimumWidth()
SplittableRenderNode
getMinimumWidth
in interface SplittableRenderNode
public long getPreferredWidth()
public static long convert(long fontMetricsValue)
public int computeMaximumTextSize(long contentX2)
public RenderableText[] splitBy(long widthOfFirst)
widthOfFirst
. If the separation is
impossible null
is returned.
Note, there is no guarantee that the first kid has width equal to widthOfFirst
.
Important! The separation is allowed only if
.TextStyleKeys#WORDBREAK TextStyleKeys.WORDBREAK
property is true
splitBy
in interface SplittableRenderNode
widthOfFirst
- the maximum width of the first componentnull
IllegalArgumentException
- if widthOfFirst <= 0
IllegalStateException
- if widthOfFirst >= getMinimumWidth()