StyledInput (JavaFX 25)
Description: declaration: module: jfx.incubator.richtext, package: jfx.incubator.scene.control.richtext.model, interface: StyledInput

# Interface StyledInput

All Superinterfaces:
  `AutoCloseable, Closeable`

public interface StyledInput extends Closeable
This interface represents a source of styled text segments for the purposes of pasting, importing, or loading from an input stream.

Since:
  24

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final StyledInput`
  `EMPTY`
  An empty StyledInput.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `StyledSegment`
  `nextSegment()`
  Returns the next segment, or null if no more segments.
  `static StyledInput`
  `of(String text)`
  Creates a plain text styled input with `StyleAttributeMap.EMPTY`.
  `static StyledInput`
  `of(String text, StyleAttributeMap attrs)`
  Creates a plain text styled input with the specified style.

  ### Methods declared in interface Closeable

  `close`

- ## Field Details

  - ### EMPTY

    static final StyledInput EMPTY
    An empty StyledInput.

- ## Method Details

  - ### nextSegment

    StyledSegment nextSegment()
    Returns the next segment, or null if no more segments.
    Returns:
      the next segment, or null if no more segments

  - ### of

    static StyledInput of(String text, StyleAttributeMap attrs)
    Creates a plain text styled input with the specified style.
    Parameters:
      `text` - the source text
      `attrs` - the source style attributes
    Returns:
      the StyledInput instance

  - ### of

    static StyledInput of(String text)
    Creates a plain text styled input with `StyleAttributeMap.EMPTY`.
    Parameters:
      `text` - the source text
    Returns:
      the StyledInput instance