com.groupdocs.viewer.results

Class TextElement<T>

  • Direct Known Subclasses:
    Character, Line, Word


    public class TextElement<T>
    extends Object

    Represents generic text element.

    T: The text element type.

    • Constructor Detail

      • TextElement

        public TextElement(T value,
                   double x,
                   double y,
                   double width,
                   double height)

        Initializes new instance of TextElement{T} class.

        Parameters:
        value - The text element value.
        x - The X coordinate of the highest left point on the page layout where the rectangle that contains element begins.
        y - The Y coordinate of the highest left point on the page layout where the rectangle that contains element begins.
        width - The width of the rectangle which contains the element (in pixels).
        height - The height of the rectangle which contains the element (in pixels).
        Throws:
        IllegalArgumentException - Thrown when value is null.
        IllegalArgumentException - Thrown when width is less or equal to zero.
        IllegalArgumentException - Thrown when height is less or equal to zero.
    • Method Detail

      • getHeight

        public final double getHeight()
      • getValue

        public final T getValue()
      • getWidth

        public final double getWidth()
      • getX

        public final double getX()
      • getY

        public final double getY()
      • toString

        public String toString()

        Returns a string that represents the current object.

        Overrides:
        toString in class Object
        Returns:
        A string that represents the current object.