Class DelimitedTextRange
java.lang.Object
org.apache.fop.complexscripts.bidi.DelimitedTextRange
The
DelimitedTextRange class implements the "delimited text range" as described
by XML-FO 1.1 ยง5.8, which contains a flattened sequence of characters. Any FO that generates
block areas serves as a delimiter.
This work was originally authored by Glenn Adams (gadams@apache.org).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAppend interval using character C.voidappend(CharIterator it, FONode fn) Append interval using characters from character iterator IT.private voidassignBlockLevel(FONode node, int defaultLevel) private voidassignBlockLevel(Direction paragraphEmbeddingLevel) private voidassignLevels(int[] levels) Assign resolved levels to all text intervals of this delimited text range.private ListassignLevels(TextInterval ti, int[] levels) private voidAssign resolved levels for each interval to source #PCDATA in the associated FOText.getNode()Obtain node that generated this text range.booleanisEmpty()Determine if range is empty.voidresolve()Resolve bidirectional levels for this range.private voidtoString()
-
Field Details
-
fn
-
buffer
-
intervals
-
log
private static final org.apache.commons.logging.Log logAssign resolved levels to a specified text interval over this delimited text range.
Returns a list of text intervals containing either (1) the single, input text interval or (2) two or more new text intervals obtained from sub-dividing the input text range into level runs, i.e., runs of text assigned to a single level.
-
-
Constructor Details
-
DelimitedTextRange
Primary constructor.- Parameters:
fn- node that generates this text range
-
-
Method Details
-
getNode
Obtain node that generated this text range.- Returns:
- node that generated this text range
-
append
Append interval using characters from character iterator IT.- Parameters:
it- character iteratorfn- node that generates interval being appended
-
append
Append interval using character C.- Parameters:
c- characterfn- node that generates interval being appended
-
isEmpty
public boolean isEmpty()Determine if range is empty.- Returns:
- true if range is empty
-
resolve
public void resolve()Resolve bidirectional levels for this range. -
toString
-
resolve
-
assignLevels
private void assignLevels(int[] levels) Assign resolved levels to all text intervals of this delimited text range.
Has a possible side effect of replacing the intervals array with a new array containing new text intervals, such that each text interval is associated with a single level run.
- Parameters:
levels- array of levels each corresponding to each index of the delimited text range
-
assignLevels
-
assignTextLevels
private void assignTextLevels()Assign resolved levels for each interval to source #PCDATA in the associated FOText.
-
assignBlockLevel
-
assignBlockLevel
-