Class ParagraphSplitter.Paragraph

java.lang.Object
com.openhtmltopdf.bidi.ParagraphSplitter.Paragraph
Direct Known Subclasses:
ParagraphSplitter.FakeParagraph
Enclosing class:
ParagraphSplitter

public static class ParagraphSplitter.Paragraph
extends Object
A paragraph object collects the text of one paragraph. That is the text in a block element wiht possible holes from BIDI isolation tags. This text is then used to run the Unicode BIDI algorithm splitting text up into runs of LTR and RTL text.
  • Field Details

  • Method Details

    • add

      protected void add​(String text, Text textNode)
      Here we add a textnode and its postion to a list. We also build the paragraph string.
    • runBidiSplitter

      protected void runBidiSplitter​(BidiSplitter splitter, LayoutContext c)
      Here we call out to the actual BIDI algorithm.
    • getFirstCharIndexInParagraph

      public int getFirstCharIndexInParagraph​(Text text)
      Returns:
      the first char index into this paragraph from a Text node or -1 if not available.
    • nextSplit

      public BidiTextRun nextSplit​(int startIndexInParagraph)
      Returns:
      the BidiTextRun that starts at or above startIndexInPararagraph.
    • prevSplit

      public BidiTextRun prevSplit​(int startIndexInParagraph)
      Returns:
      the BidiTextRun that starts at or before startIndexInParagraph.
    • getActualDirection

      public byte getActualDirection()
    • getCSSDirection

      public IdentValue getCSSDirection()