com.groupdocs.viewer.results

Class Line



  • public class Line
    extends TextElement<String>

    Represents relatively positioned rectangle which contains single line.

    • Constructor Detail

      • Line

        public Line(String line,
            double x,
            double y,
            double width,
            double height,
            List<Word> words)

        Initializes new instance of Line class.

        Parameters:
        line - The line.
        x - The X coordinate of the highest left point on the page layout where the rectangle that contains line begins.
        y - The Y coordinate of the highest left point on the page layout where the rectangle that contains line begins.
        width - The width of the rectangle which contains the line (in pixels).
        height - The height of the rectangle which contains the line (in pixels).
        words - The words contained by the line.
        Throws:
        IllegalArgumentException - Thrown when line is null or empty.
        IllegalArgumentException - Thrown when words is null.
    • Method Detail

      • getWords

        public final List<Word> getWords()
        The words contained by the line.
        Returns:
        The words contained by the line.
      • toString

        public String toString()

        Returns a string that represents the current object.

        Overrides:
        toString in class TextElement<String>
        Returns:
        A string that represents the current object.