Class DelimitedTextRange
- java.lang.Object
-
- org.apache.fop.complexscripts.bidi.DelimitedTextRange
-
public class DelimitedTextRange extends java.lang.Object
TheDelimitedTextRange
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).
-
-
Constructor Summary
Constructors Constructor Description DelimitedTextRange(FONode fn)
Primary constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
append(char c, FONode fn)
Append interval using character C.void
append(CharIterator it, FONode fn)
Append interval using characters from character iterator IT.private void
assignBlockLevel(FONode node, int defaultLevel)
private void
assignBlockLevel(Direction paragraphEmbeddingLevel)
private void
assignLevels(int[] levels)
Assign resolved levels to all text intervals of this delimited text range.private java.util.List
assignLevels(TextInterval ti, int[] levels)
private void
assignTextLevels()
Assign resolved levels for each interval to source #PCDATA in the associated FOText.FONode
getNode()
Obtain node that generated this text range.boolean
isEmpty()
Determine if range is empty.void
resolve()
Resolve bidirectional levels for this range.private void
resolve(Direction paragraphEmbeddingLevel)
java.lang.String
toString()
-
-
-
Field Detail
-
fn
private FONode fn
-
buffer
private java.lang.StringBuffer buffer
-
intervals
private java.util.List intervals
-
log
private static final org.apache.commons.logging.Log log
Assign 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 Detail
-
DelimitedTextRange
public DelimitedTextRange(FONode fn)
Primary constructor.- Parameters:
fn
- node that generates this text range
-
-
Method Detail
-
getNode
public FONode getNode()
Obtain node that generated this text range.- Returns:
- node that generated this text range
-
append
public void append(CharIterator it, FONode fn)
Append interval using characters from character iterator IT.- Parameters:
it
- character iteratorfn
- node that generates interval being appended
-
append
public void append(char c, FONode fn)
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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
resolve
private void resolve(Direction paragraphEmbeddingLevel)
-
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
private java.util.List assignLevels(TextInterval ti, int[] levels)
-
assignTextLevels
private void assignTextLevels()
Assign resolved levels for each interval to source #PCDATA in the associated FOText.
-
assignBlockLevel
private void assignBlockLevel(Direction paragraphEmbeddingLevel)
-
assignBlockLevel
private void assignBlockLevel(FONode node, int defaultLevel)
-
-