Package icyllis.modernui.text

# Class PrecomputedText.Params.Builder

java.lang.Object
icyllis.modernui.text.PrecomputedText.Params.Builder

Enclosing class:
  `PrecomputedText.Params`

public static class PrecomputedText.Params.Builder extends Object
A builder for creating `PrecomputedText.Params`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Builder(PrecomputedText.Params params)`
  Builder constructor from existing params.
  `Builder(TextPaint paint)`
  Builder constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `PrecomputedText.Params`
  `build()`
  Build the `PrecomputedText.Params`.
  `PrecomputedText.Params.Builder`
  `setLineBreakConfig(LineBreakConfig lineBreakConfig)`
  Set the line break config for the text wrapping.
  `PrecomputedText.Params.Builder`
  `setTextDirection(TextDirectionHeuristic textDir)`
  Set the text direction heuristic.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Builder

    public Builder(@NonNull TextPaint paint)
    Builder constructor.
    Parameters:
      `paint` - the paint to be used for drawing

  - ### Builder

    public Builder(@NonNull PrecomputedText.Params params)
    Builder constructor from existing params.

- ## Method Details

  - ### setTextDirection

    public PrecomputedText.Params.Builder setTextDirection(@NonNull TextDirectionHeuristic textDir)
    Set the text direction heuristic.

    The default value is `TextDirectionHeuristics.FIRSTSTRONG_LTR`.

    Parameters:
      `textDir` - the text direction heuristic for resolving bidi behavior
    Returns:
      this builder, useful for chaining
    See Also:
      - `StaticLayout.Builder.setTextDirection(icyllis.modernui.text.TextDirectionHeuristic)`

  - ### setLineBreakConfig

    @NonNull public PrecomputedText.Params.Builder setLineBreakConfig(@NonNull LineBreakConfig lineBreakConfig)
    Set the line break config for the text wrapping.
    Parameters:
      `lineBreakConfig` - the newly line break configuration.
    Returns:
      this builder, useful for chaining.
    See Also:
      - `StaticLayout.Builder.setLineBreakConfig(icyllis.modernui.graphics.text.LineBreakConfig)`

  - ### build

    @NonNull public PrecomputedText.Params build()
    Build the `PrecomputedText.Params`.
    Returns:
      the layout parameter