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
| 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 |
Creates a plain text styled input with StyleAttributeMap.EMPTY. |
static StyledInput |
of |
Creates a plain text styled input with the specified style. |
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
© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.