A text node (PCDATA) in the formatting object tree.
Unfortunately the BufferManager implementatation holds
onto references to the character data in this object
longer than the lifetime of the object itself, causing
excessive memory consumption and OOM errors.
createBlockPointers
protected void createBlockPointers(Block ancestorBlock)
This method is run as part of the ancestor Block's flushText(), to
create xref pointers to the previous FOText objects within the same Block
getAncestorBlock
public Block getAncestorBlock()
- The nearest ancestor block object which contains this FOText.
getBaseLineShift
public Length getBaseLineShift()
- the baseline-shift property
getColor
public Color getColor()
getCommonFont
public CommonFont getCommonFont()
- the Common Font Properties.
getCommonHyphenation
public CommonHyphenation getCommonHyphenation()
- the Common Hyphenation Properties.
getKeepTogether
public KeepProperty getKeepTogether()
- the "keep-together" property.
getLetterSpacing
public Property getLetterSpacing()
- the "letter-spacing" property.
getLineHeight
public SpaceProperty getLineHeight()
- the "line-height" property.
getNextFOTextThisBlock
public FOText getNextFOTextThisBlock()
- The next FOText node in this Block; null if this is the last
FOText in this Block; null if subsequent FOText nodes have not yet been
processed.
getPrevFOTextThisBlock
public FOText getPrevFOTextThisBlock()
- The previous FOText node in this Block; null, if this is the
first FOText in this Block.
getWhitespaceTreatment
public int getWhitespaceTreatment()
- the "white-space-treatment" property
getWordSpacing
public Property getWordSpacing()
- the "word-spacing" property.
getWrapOption
public int getWrapOption()
- the "wrap-option" property.
isWordChar
public static int isWordChar(char inputChar)
Determines whether the input char should be considered part of a
"word". This is used primarily to determine whether the character
immediately following starts a new word, but may have other uses.
We have not found a definition of "word" in the standard (1.0), so the
logic used here is based on the programmer's best guess.
inputChar
- the character to be tested.
- int IS_WORD_CHAR_TRUE, IS_WORD_CHAR_FALSE, or IS_WORD_CHAR_MAYBE,
depending on whether the character should be considered part of a word
or not.
toString
public String toString()
willCreateArea
public boolean willCreateArea()
Check if this text node will create an area.
This means either there is non-whitespace or it is
preserved whitespace.
Maybe this just needs to check length > 0, since char iterators
handle whitespace.
- true if this will create an area in the output