Class BoxText


  • public class BoxText
    extends Object
    A parto of text with connection to source boxes
    Author:
    burgetr
    • Method Detail

      • getBoxes

        public List<Box> getBoxes()
      • getBoxCount

        public int getBoxCount()
      • getText

        public String getText()
      • getOffsets

        public int[] getOffsets()
      • length

        public int length()
      • getIndexForPosition

        public int getIndexForPosition​(int pos)
        Finds the index of the box that contains the given text position.
        Parameters:
        pos - The position within the complete text
        Returns:
        The box index for the text positions within the complete text. Otherwise, -1 is returned.
      • getBoxForPosition

        public Box getBoxForPosition​(int pos)
      • getSubstringBounds

        public Rectangular getSubstringBounds​(int spos,
                                              int epos)