Class ICUBidiSplitter

  • All Implemented Interfaces:
    BidiSplitter

    public class ICUBidiSplitter
    extends java.lang.Object
    implements BidiSplitter
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private com.ibm.icu.text.Bidi bidi  
    • Constructor Summary

      Constructors 
      Constructor Description
      ICUBidiSplitter()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int countTextRuns()
      Count the number of runs, each of which contains text in one visual order only.
      byte getBaseDirection​(java.lang.String paragraph)
      Get the base direction of a paragraph.
      BidiTextRun getVisualRun​(int runIndex)  
      void setParagraph​(java.lang.String paragraph, byte defaultDirection)
      Sets the text which is to be split on visual ordering.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • bidi

        private com.ibm.icu.text.Bidi bidi
    • Constructor Detail

      • ICUBidiSplitter

        public ICUBidiSplitter()
    • Method Detail

      • setParagraph

        public void setParagraph​(java.lang.String paragraph,
                                 byte defaultDirection)
        Description copied from interface: BidiSplitter
        Sets the text which is to be split on visual ordering.
        Specified by:
        setParagraph in interface BidiSplitter
        defaultDirection - either LTR or RTL
      • countTextRuns

        public int countTextRuns()
        Description copied from interface: BidiSplitter
        Count 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:
        countTextRuns in interface BidiSplitter
      • getVisualRun

        public BidiTextRun getVisualRun​(int runIndex)
        Specified by:
        getVisualRun in interface BidiSplitter
        Parameters:
        runIndex - from zero to countTextRuns.
        Returns:
        information about a visual run.
      • getBaseDirection

        public byte getBaseDirection​(java.lang.String paragraph)
        Description copied from interface: BidiSplitter
        Get 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:
        getBaseDirection in interface BidiSplitter