Class LineBreaker

java.lang.Object
icyllis.modernui.graphics.text.LineBreaker

public class LineBreaker extends Object
Provides automatic line breaking for a single paragraph.
  • Constructor Details

  • Method Details

    • isLineEndSpace

      public static boolean isLineEndSpace(char c)
    • computeLineBreaks

      @Nonnull public static LineBreaker.Result computeLineBreaks(@Nullable MeasuredText measuredText, @Nonnull LineBreaker.ParagraphConstraints constraints, @Nullable int[] indents, int lineNumber)
      Break paragraph into lines.

      The result is filled to out param.

      Parameters:
      measuredText - a result of the text measurement
      constraints - constraints for a single paragraph
      indents - the supplied array provides the total amount of indentation per line, in pixel. This amount is the sum of both left and right indentations. For lines past the last element in the array, the indentation amount of the last element is used.
      lineNumber - a line number (index offset) of this paragraph
      Returns:
      the result of line break
    • getLocaleWithLineBreakOption

      @NonNull public static com.ibm.icu.util.ULocale getLocaleWithLineBreakOption(@NonNull Locale locale, int lbStyle, int lbWordStyle)