Interface TextComponent
- All Superinterfaces:
Component, ComponentBuilderApplicable, ComponentLike, HoverEventSource<Component>, ScopedComponent<TextComponent>, StyleGetter, StyleSetter<Component>
- All Known Subinterfaces:
VirtualComponent
public sealed interface TextComponent
extends ScopedComponent<TextComponent>
permits VirtualComponent (not exhaustive)
A component that displays a string.
This component consists of:
- content
- string to be displayed
- Since:
- 4.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA text component builder. -
Field Summary
Fields inherited from interface Component
EQUALS, EQUALS_IDENTITY, IS_NOT_EMPTY -
Method Summary
Modifier and TypeMethodDescriptioncontent()Gets the plain text content.Sets the plain text content.Returns a builder for this component.Methods inherited from interface Component
asHoverEvent, children, clickEvent, color, compact, compact, componentBuilderApply, contains, contains, decoration, decorations, font, hasDecoration, hasStyling, hoverEvent, insertion, iterable, iterable, iterator, iterator, replaceText, replaceText, shadowColor, spliterator, spliterator, styleMethods inherited from interface HoverEventSource
asHoverEventMethods inherited from interface ScopedComponent
append, append, append, append, append, appendNewline, appendSpace, applyFallbackStyle, applyFallbackStyle, asComponent, children, clickEvent, color, colorIfAbsent, decorate, decoration, decoration, decorationIfAbsent, decorations, font, hoverEvent, insertion, mergeStyle, mergeStyle, mergeStyle, shadowColor, shadowColorIfAbsent, style, style, style, styleMethods inherited from interface StyleSetter
decorate, decorations
-
Method Details
-
content
-
content
Sets the plain text content.- Parameters:
content- the plain text content- Returns:
- a copy of this component
- Since:
- 4.0.0
-
toBuilder
TextComponent.Builder toBuilder()Description copied from interface:ComponentReturns a builder for this component.- Specified by:
toBuilderin interfaceComponent- Specified by:
toBuilderin interfaceScopedComponent<TextComponent>- Returns:
- the builder
-