Class WrappedLine

java.lang.Object
de.xima.fc.common.text.wrap.WrappedLine
All Implemented Interfaces:
Serializable

public final class WrappedLine extends Object implements 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 Details

    • WrappedLine

      public WrappedLine(String text, double width, double height, boolean endsOnForcedLineBreak)
      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

      public String text()
      Gets the text of this line.
      Returns:
      The text of the line.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • width

      public double width()
      Gets the width of this line.
      Returns:
      The width of the line.