Package com.openhtmltopdf.bidi.support
Class ICUBidiSplitter
- java.lang.Object
-
- com.openhtmltopdf.bidi.support.ICUBidiSplitter
-
- All Implemented Interfaces:
BidiSplitter
public class ICUBidiSplitter extends java.lang.Object implements BidiSplitter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classICUBidiSplitter.ICUBidiSplitterFactory
-
Field Summary
Fields Modifier and Type Field Description private com.ibm.icu.text.Bidibidi-
Fields inherited from interface com.openhtmltopdf.bidi.BidiSplitter
LTR, NEUTRAL, RTL
-
-
Constructor Summary
Constructors Constructor Description ICUBidiSplitter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcountTextRuns()Count the number of runs, each of which contains text in one visual order only.bytegetBaseDirection(java.lang.String paragraph)Get the base direction of a paragraph.BidiTextRungetVisualRun(int runIndex)voidsetParagraph(java.lang.String paragraph, byte defaultDirection)Sets the text which is to be split on visual ordering.
-
-
-
Method Detail
-
setParagraph
public void setParagraph(java.lang.String paragraph, byte defaultDirection)Description copied from interface:BidiSplitterSets the text which is to be split on visual ordering.- Specified by:
setParagraphin interfaceBidiSplitterdefaultDirection- either LTR or RTL
-
countTextRuns
public int countTextRuns()
Description copied from interface:BidiSplitterCount the number of runs, each of which contains text in one visual order only. Can only be called after setParagraph has run the BIDI algorithm.- Specified by:
countTextRunsin interfaceBidiSplitter
-
getVisualRun
public BidiTextRun getVisualRun(int runIndex)
- Specified by:
getVisualRunin interfaceBidiSplitter- Parameters:
runIndex- from zero to countTextRuns.- Returns:
- information about a visual run.
-
getBaseDirection
public byte getBaseDirection(java.lang.String paragraph)
Description copied from interface:BidiSplitterGet the base direction of a paragraph. Defined as the first character that has strong directionality or neutral if they are all neutral characters.- Specified by:
getBaseDirectionin interfaceBidiSplitter
-
-