Class WrappedLine
java.lang.Object
de.xima.fc.common.text.wrap.WrappedLine
- All Implemented Interfaces:
Serializable
Represents a single line of text that has been wrapped. Usually part of multiple lines, see
WrappedText.- Since:
- 8.4.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionWrappedLine(String text, double width, double height, boolean endsOnForcedLineBreak) Creates a new wrapped line. -
Method Summary
-
Constructor Details
-
WrappedLine
Creates a new wrapped line.- Parameters:
text- The text of the line.width- The width of the line.height- The height of the line.endsOnForcedLineBreak- Whether this line was created due to forced line break. If true, this line was ended due to a forced line break in the original text, such as LF or CRLF. If false, this line was ended due the layout settings, i.e. the maximum width of the line.
-
-
Method Details
-
endsOnForcedLineBreak
public boolean endsOnForcedLineBreak()Whether this line was created due to forced line break. If true, this line was ended due to a forced line break in the original text, such as LF or CRLF. If false, this line was ended due the layout settings, i.e. the maximum width of the line.- Returns:
- True if this line was ended due to a forced line break, false otherwise.
-
height
public double height()Gets the height of this line.- Returns:
- The height of the line.
-
text
-
toString
-
width
public double width()Gets the width of this line.- Returns:
- The width of the line.
-