Interface FlattenerListener

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface
public interface FlattenerListener
A listener accepting styled information from flattened components.
Since:
4.7.0
  • Method Summary

    Modifier and Type Method Description
    void component​(@NonNull String text)
    Accept the plain-text content of a single component.
    default void popStyle​(@NonNull Style style)
    Pop a pushed style.
    default void pushStyle​(@NonNull Style style)
    Begin a region of style in the component.
  • Method Details

    • pushStyle

      default void pushStyle​(@NonNull Style style)
      Begin a region of style in the component.
      Parameters:
      style - the style to push
      Since:
      4.7.0
    • component

      void component​(@NonNull String text)
      Accept the plain-text content of a single component.
      Parameters:
      text - the component text
      Since:
      4.7.0
    • popStyle

      default void popStyle​(@NonNull Style style)
      Pop a pushed style.

      The popped style will always be the most recent un-popped style that has been pushed.

      Parameters:
      style - the style popped, as passed to pushStyle(Style)
      Since:
      4.7.0