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(@NotNull String text)
    Accept the plain-text content of a single component.
    default void
    popStyle(@NotNull Style style)
    Pop a pushed style.
    default void
    pushStyle(@NotNull Style style)
    Begin a region of style in the component.
    default boolean
    Determine if the flattener should continue running.
  • Method Details

    • pushStyle

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

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

      default boolean shouldContinue()
      Determine if the flattener should continue running.
      Returns:
      true if the flattener should continue or false if it should stop
      Since:
      4.15.0
    • popStyle

      default void popStyle(@NotNull @NotNull 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