public class Line extends TextElement<String>
Represents relatively positioned rectangle which contains single line.
Constructor and Description |
---|
Line(String line,
double x,
double y,
double width,
double height,
List<Word> words)
Initializes new instance of
Line class. |
Modifier and Type | Method and Description |
---|---|
List<Word> |
getWords()
The words contained by the line.
|
String |
toString()
Returns a string that represents the current object.
|
public Line(String line, double x, double y, double width, double height, List<Word> words)
Initializes new instance of Line
class.
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.IllegalArgumentException
- Thrown when line
is null or empty.IllegalArgumentException
- Thrown when words
is null.public final List<Word> getWords()
public String toString()
Returns a string that represents the current object.
toString
in class TextElement<String>