Class TextComponent


public final class TextComponent extends GuiComponent<TextComponent>
Component-rendering component with optional background and text effects.
  • Constructor Details

    • TextComponent

      public TextComponent()
  • Method Details

    • text

      public TextComponent text(String text)
      Sets literal text content.
      Parameters:
      text - literal text to render
      Returns:
      this component
    • text

      public net.minecraft.network.chat.Component text()
      Returns the current component text.
      Returns:
      current text
    • text

      public TextComponent text(net.minecraft.network.chat.Component text)
      Sets rich text content.
      Parameters:
      text - component to render
      Returns:
      this component
    • text

      public TextComponent text(GuiRichText text)
      Sets typed per-span browser-grade text.
    • textStyle

      public TextComponent textStyle(GuiTextStyle style)
      Sets the immutable browser-grade base style. Component spans are adapted over this style when no explicit GuiRichText is present.
    • font

      public TextComponent font(GuiFont font)
      Sets the font used to render the text.
      Parameters:
      font - font configuration
      Returns:
      this component
    • textAlignment

      public TextComponent textAlignment(GuiTextAlignment alignment)
      Sets horizontal text alignment within this component's content bounds.
      Parameters:
      alignment - horizontal text alignment
      Returns:
      this component
    • centerText

      public TextComponent centerText()
    • rightAlignText

      public TextComponent rightAlignText()
    • verticalTextAlignment

      public TextComponent verticalTextAlignment(GuiTextVerticalAlignment alignment)
    • centerTextVertically

      public TextComponent centerTextVertically()
    • centered

      public TextComponent centered()
    • textScalePixels

      public TextComponent textScalePixels(float pixels)
      Sets the text size in design-space pixels.
      Parameters:
      pixels - text size
      Returns:
      this component
    • letterSpacing

      public TextComponent letterSpacing(float pixels)
    • lineHeight

      public TextComponent lineHeight(float multiplier)
    • highlights

      public GuiHighlightRegistry highlights()
      Returns the retained named-highlight registry for this text.
      Returns:
      highlight registry
    • highlight

      public TextComponent highlight(String name, int startUtf16, int endUtf16)
      Adds one named UTF-16 highlight range.
      Parameters:
      name - highlight name matched by HIGHLIGHT(name)
      startUtf16 - inclusive start
      endUtf16 - exclusive end
      Returns:
      this component
    • textPaint

      public TextComponent textPaint(GuiTextPaint paint)
    • shadow

      public TextComponent shadow(boolean shadow)
      Enables or disables the standard text shadow.
      Parameters:
      shadow - true to render the vanilla-style text shadow
      Returns:
      this component
    • shadow

      public TextComponent shadow(GuiShadow shadow)
      Sets a custom shadow effect for the text glyphs.
      Parameters:
      shadow - text shadow configuration, or null to clear it
      Returns:
      this component
    • textShadow

      public TextComponent textShadow(GuiShadow shadow)
      Sets a custom shadow effect for the text glyphs.
      Parameters:
      shadow - text shadow configuration, or null to clear it
      Returns:
      this component
    • glow

      public TextComponent glow(GuiGlow glow)
      Sets a glow effect for the text glyphs.
      Parameters:
      glow - text glow configuration, or null to clear it
      Returns:
      this component
    • textGlow

      public TextComponent textGlow(GuiGlow glow)
      Sets a glow effect for the text glyphs.
      Parameters:
      glow - text glow configuration, or null to clear it
      Returns:
      this component
    • preferredWidth

      protected float preferredWidth(com.render.api.gui.GuiRenderContext context)
      Overrides:
      preferredWidth in class GuiComponent<TextComponent>
    • preferredHeight

      protected float preferredHeight(com.render.api.gui.GuiRenderContext context)
      Overrides:
      preferredHeight in class GuiComponent<TextComponent>
    • preferredHeightForWidth

      protected float preferredHeightForWidth(com.render.api.gui.GuiRenderContext context, float resolvedWidth)
      Overrides:
      preferredHeightForWidth in class GuiComponent<TextComponent>
    • renderSelf

      protected void renderSelf(com.render.api.gui.GuiRenderContext context)
      Overrides:
      renderSelf in class GuiComponent<TextComponent>
    • add

      public TextComponent add(GuiComponent<?> child)
    • remove

      public TextComponent remove(GuiComponent<?> child)
    • clearChildren

      public TextComponent clearChildren()
    • replaceChildren

      public TextComponent replaceChildren(List<? extends GuiComponent<?>> replacements)
      Replaces source children while treating an identical retained identity/order sequence as a no-op.

      Reuse component instances. Newly allocated look-alikes are intentionally considered different because callbacks, focus, animation, and resource ownership cannot be compared safely.

      Parameters:
      replacements - desired source children in paint order
      Returns:
      this component
    • replaceChildren

      public TextComponent replaceChildren(GuiComponent<?>... replacements)
      Varargs form of replaceChildren(List).
      Parameters:
      replacements - desired source children in paint order
      Returns:
      this component
    • updateWhenChanged

      public TextComponent updateWhenChanged(String channel, Object snapshot, Consumer<TextComponent> updater)
      Runs a retained update only when its immutable equality snapshot changes.

      Use this around coarse synchronization code that would otherwise clear/rebuild a subtree every tick. Prefer direct setters for individual values. Channels are component-local and limited to 32 retained snapshots; the oldest is discarded when the limit is exceeded. Snapshots should be immutable scalars, strings, records, or immutable lists.

      Parameters:
      channel - stable name for this update source
      snapshot - immutable equality value representing the input state
      updater - update executed only after a changed snapshot
      Returns:
      this component
    • updateWhenChanged

      public TextComponent updateWhenChanged(String channel, long revision, Consumer<TextComponent> updater)
      Allocation-free steady-state revision overload of updateWhenChanged(String, Object, Consumer).
      Parameters:
      channel - stable name for this update source
      revision - monotonically changing model or content revision
      updater - update executed only after a changed revision
      Returns:
      this component
    • children

      public List<GuiComponent<?>> children()
    • parent

      public GuiComponent<?> parent()
    • x

      public float x()
    • y

      public float y()
    • width

      public float width()
    • height

      public float height()
    • visible

      public boolean visible()
    • enabled

      public boolean enabled()
    • focused

      public boolean focused()
      Returns whether this component currently owns keyboard focus.
      Returns:
      true when focused
    • readOnly

      public TextComponent readOnly(boolean readOnly)
      Makes this control read-only for selector and interaction semantics.
      Parameters:
      readOnly - read-only state
      Returns:
      this component
    • readOnly

      public final boolean readOnly()
    • required

      public TextComponent required(boolean required)
      Sets whether this component participates in required/optional form styling.
      Parameters:
      required - required state
      Returns:
      this component
    • required

      public final boolean required()
    • validity

      public TextComponent validity(GuiValidity validity)
      Sets semantic validity independently of edit-time input filtering.
      Parameters:
      validity - validation state
      Returns:
      this component
    • validity

      public final GuiValidity validity()
    • rangeState

      public TextComponent rangeState(GuiRangeState rangeState)
      Sets the optional range pseudo-state for numeric and custom controls.
      Parameters:
      rangeState - range state
      Returns:
      this component
    • rangeState

      public final GuiRangeState rangeState()
    • indeterminate

      public TextComponent indeterminate(boolean indeterminate)
      Sets the mixed/indeterminate state used by tri-state controls.
      Parameters:
      indeterminate - mixed state
      Returns:
      this component
    • indeterminate

      public final boolean indeterminate()
    • matchesStyleState

      public final boolean matchesStyleState(GuiStyleState state)
      Tests a standard or custom modern selector state.
      Parameters:
      state - state query
      Returns:
      active flag
    • computedStyle

      public final Optional<GuiComputedStyle> computedStyle()
      Returns the latest computed modern style.
      Returns:
      computed style when this component has been resolved by a modern host
    • intrinsicSize

      public final GuiIntrinsicSize intrinsicSize()
      Returns intrinsic contributions from the latest modern measure pass.
      Returns:
      immutable intrinsic metrics
    • layoutFragments

      public final List<GuiLayoutFragment> layoutFragments()
      Returns final modern layout fragments. Modern layout normally produces one fragment per box; display:contents and display:none produce none.
      Returns:
      immutable fragment list
    • fragmentTree

      public final GuiFragmentTree fragmentTree()
      Returns the latest page/column fragment projection rooted at this component.
      Returns:
      immutable fragment tree, or an empty tree outside fragmentation
    • pseudoElementStyle

      public final Optional<GuiComputedStyle> pseudoElementStyle(GuiPseudoElement pseudoElement)
      Returns a paint-only or generated pseudo-element's computed style.
      Parameters:
      pseudoElement - pseudo-element
      Returns:
      computed style when a matching rule exists
    • styledPseudoElements

      public final Set<GuiPseudoElement> styledPseudoElements()
      Returns pseudo-elements with a currently matched modern rule.
      Returns:
      immutable pseudo-element set
    • pseudoElementBox

      public final Optional<GuiPseudoElementComponent> pseudoElementBox(GuiPseudoElement pseudoElement)
      Returns a stable generated pseudo-element box for BEFORE, AFTER, or MARKER after a matching modern rule has resolved.
      Parameters:
      pseudoElement - tree-abiding pseudo-element
      Returns:
      generated box when present
    • dirtyCategories

      public final Set<GuiDirtyCategory> dirtyCategories()
      Returns current modern invalidation categories.
      Returns:
      immutable dirty-category set
    • lastInvalidationReason

      public final String lastInvalidationReason()
      Returns the latest invalidation reason for devtools.
      Returns:
      reason
    • margin

      public TextComponent margin(float all)
    • margin

      public TextComponent margin(float vertical, float horizontal)
    • margin

      public TextComponent margin(float top, float right, float bottom, float left)
    • padding

      public TextComponent padding(float all)
    • padding

      public TextComponent padding(float vertical, float horizontal)
    • padding

      public TextComponent padding(float top, float right, float bottom, float left)
    • color

      public TextComponent color(RenderColor color)
    • backgroundColor

      public TextComponent backgroundColor(RenderColor color)
    • borderColor

      public TextComponent borderColor(RenderColor color)
    • borderWidth

      public TextComponent borderWidth(float borderWidth)
    • cornerRadius

      public TextComponent cornerRadius(float cornerRadius)
    • opacity

      public TextComponent opacity(float opacity)
    • boxShadow

      public TextComponent boxShadow(GuiShadow shadow)
      Sets the drop shadow painted behind this component's box.
      Parameters:
      shadow - box shadow, or null
      Returns:
      this component
    • boxGlow

      public TextComponent boxGlow(GuiGlow glow)
      Sets the glow painted around this component's box.
      Parameters:
      glow - box glow, or null
      Returns:
      this component
    • gradient

      public TextComponent gradient(GuiGradient gradient)
    • animatedBorder

      public TextComponent animatedBorder(GuiAnimatedBorder animatedBorder)
      Sets the animated border decoration.

      The moving ring follows the border edge and its glow may extend outside this component's own clip path. Ancestor clips still constrain the decoration.

      Parameters:
      animatedBorder - animated border, or null
      Returns:
      this component
    • visible

      public TextComponent visible(boolean visible)
    • caretStyle

      public TextComponent caretStyle(GuiCaretStyle caretStyle)
      Sets the editable-text caret appearance inherited by the CARET pseudo-element.
      Parameters:
      caretStyle - caret appearance
      Returns:
      this component
    • backgroundLayers

      public TextComponent backgroundLayers(List<GuiBackgroundLayer> layers)
      Replaces the ordered modern background-image layer list. The background color is painted below every layer.
      Parameters:
      layers - ordered bottom-to-top layers
      Returns:
      this component
    • backgroundLayers

      public TextComponent backgroundLayers(GuiBackgroundLayer... layers)
    • backgroundLayer

      public TextComponent backgroundLayer(GuiBackgroundLayer layer)
    • border

      public TextComponent border(GuiBorder border)
      Sets the typed per-side border. Later legacy border setters clear this value.
      Parameters:
      border - border value, or null
      Returns:
      this component
    • outline

      public TextComponent outline(GuiOutline outline)
    • boxDecorationBreak

      public TextComponent boxDecorationBreak(GuiBoxDecorationBreak behavior)
    • boxShadows

      public TextComponent boxShadows(List<GuiBoxShadow> shadows)
    • boxShadows

      public TextComponent boxShadows(GuiBoxShadow... shadows)
    • transform

      public TextComponent transform(GuiTransform transform)
      Sets the immutable post-layout transform list for this component subtree.
      Parameters:
      transform - ordered transform list
      Returns:
      this component
    • transformOrigin

      public TextComponent transformOrigin(GuiTransformOrigin origin)
      Sets the normalized origin around which transforms are applied.
      Parameters:
      origin - transform origin
      Returns:
      this component
    • transformBox

      public TextComponent transformBox(GuiTransformBox box)
      Selects the component box used to resolve transforms.
      Parameters:
      box - transform reference box
      Returns:
      this component
    • transformStyle

      public TextComponent transformStyle(GuiTransformStyle transformStyle)
      Selects flat or preserve-3D descendant transform behavior.
      Parameters:
      transformStyle - descendant transform behavior
      Returns:
      this component
    • backfaceVisibility

      public TextComponent backfaceVisibility(GuiBackfaceVisibility visibility)
      Selects whether a transformed back face remains visible.
      Parameters:
      visibility - back-face behavior
      Returns:
      this component
    • motionPath

      public TextComponent motionPath(GuiMotionPath path)
      Sets the post-layout path followed by this component.
      Parameters:
      path - motion-path declaration
      Returns:
      this component
    • clipPath

      public TextComponent clipPath(GuiClipPath path)
      Sets the component clip path, or null to remove it.
      Parameters:
      path - clip path
      Returns:
      this component
    • maskLayers

      public TextComponent maskLayers(List<GuiMaskLayer> layers)
      Replaces the ordered mask-layer list.
      Parameters:
      layers - mask layers in paint order
      Returns:
      this component
    • maskLayers

      public TextComponent maskLayers(GuiMaskLayer... layers)
      Replaces the ordered mask-layer list.
      Parameters:
      layers - mask layers in paint order
      Returns:
      this component
    • filters

      public TextComponent filters(GuiFilterChain filters)
      Sets the ordered foreground filter chain.
      Parameters:
      filters - foreground filters
      Returns:
      this component
    • backdropFilters

      public TextComponent backdropFilters(GuiFilterChain filters)
      Sets filters applied to the game and retained GUI content already painted behind this component. The component's own fill, border, and descendants are painted sharply after the clipped backdrop pass.
      Parameters:
      filters - backdrop filters
      Returns:
      this component
    • enabled

      public TextComponent enabled(boolean enabled)
    • clipChildren

      public TextComponent clipChildren(boolean clipChildren)
      Sets whether child content is clipped to this component's content bounds.
      Parameters:
      clipChildren - whether to clip child content
      Returns:
      this component
    • isClippingChildren

      public boolean isClippingChildren()
      Returns whether child content is clipped to this component's content bounds.
      Returns:
      whether child content is clipped
    • requestFocus

      public TextComponent requestFocus()
    • tooltip

      public TextComponent tooltip(TooltipComponent tooltip)
    • contextMenu

      public TextComponent contextMenu(ContextMenuComponent contextMenu)
    • applyStyle

      public TextComponent applyStyle(GuiStylePreset preset)
      Applies a reusable sparse style preset.
      Parameters:
      preset - preset to apply
      Returns:
      this component
    • inlineStyle

      public TextComponent inlineStyle(Consumer<GuiStyleBuilder> declarations)
      Adds typed high-priority inline declarations for modern mode.

      Existing fluent setters write to the same precedence level. Cascade-wide INITIAL, INHERIT, and UNSET values are available through GuiStyleBuilder.set(GuiStyleProperty, T).

      Parameters:
      declarations - declaration callback
      Returns:
      this component
    • transitionAll

      public TextComponent transitionAll(double durationSeconds, GuiEasing easing)
    • transitionAll

      public TextComponent transitionAll(double durationSeconds, double delaySeconds, GuiEasing easing)
    • transitionAll

      public TextComponent transitionAll(double durationSeconds, double delaySeconds, GuiEasing easing, GuiTransitionBehavior behavior)
      Transitions every modern property, optionally including discrete values.
      Parameters:
      durationSeconds - duration in seconds
      delaySeconds - non-negative delay
      easing - timing function
      behavior - discrete transition policy
      Returns:
      this component
    • transition

      public TextComponent transition(double durationSeconds, double delaySeconds, GuiEasing easing, GuiTransitionBehavior behavior, GuiStyleProperty<?>... properties)
      Transitions selected typed modern properties.
      Parameters:
      durationSeconds - duration in seconds
      delaySeconds - non-negative delay
      easing - timing function
      behavior - discrete transition policy
      properties - modern properties
      Returns:
      this component
    • transition

      public TextComponent transition(double durationSeconds, GuiEasing easing, GuiTransitionBehavior behavior, GuiStyleProperty<?>... properties)
    • startingStyle

      public TextComponent startingStyle(Consumer<GuiStyleBuilder> declarations)
      Defines typed values used when this component first enters the styled tree.
      Parameters:
      declarations - starting declaration callback
      Returns:
      this component
    • transition

      public TextComponent transition(double durationSeconds, GuiEasing easing, GuiProperty<?>... properties)
    • transition

      public TextComponent transition(double durationSeconds, double delaySeconds, GuiEasing easing, GuiProperty<?>... properties)
    • transition

      public TextComponent transition(double durationSeconds, GuiEasing easing, GuiPropertyGroup... groups)
    • transition

      public TextComponent transition(double durationSeconds, double delaySeconds, GuiEasing easing, GuiPropertyGroup... groups)
    • hovered

      public TextComponent hovered(Consumer<TextComponent> consumer)
    • pressed

      public TextComponent pressed(Consumer<TextComponent> consumer)
    • focused

      public TextComponent focused(Consumer<TextComponent> consumer)
    • disabled

      public TextComponent disabled(Consumer<TextComponent> consumer)
    • animation

      public TextComponent animation(String name, GuiKeyframes keyframes)
    • play

      public TextComponent play(String name)
    • pause

      public TextComponent pause(String name)
    • resume

      public TextComponent resume(String name)
    • cancel

      public TextComponent cancel(String name)
    • id

      public TextComponent id(String id)
      Assigns this component's optional stable identifier.

      The identifier is visible to typed ID selectors, retained-tree lookup, devtools, and view-transition pairing. Recreating a component with the same ID morphs it from the old bounds to the new bounds. A null or blank value removes the identifier.

      Parameters:
      id - stable identifier, or null
      Returns:
      this component
    • id

      public String id()
      Returns this component's optional stable identifier.
      Returns:
      identifier, or null
    • findById

      public final Optional<GuiComponent<?>> findById(String id)
      Finds the uniquely identified component in this retained subtree.

      The search includes this component. Duplicate IDs are rejected because lookup and morph-transition ownership would otherwise be ambiguous.

      Parameters:
      id - identifier to find
      Returns:
      matching component, when present
      Throws:
      IllegalStateException - when the subtree contains the ID more than once
    • findById

      public final <C extends GuiComponent<?>> Optional<C> findById(String id, Class<C> componentType)
      Finds and type-checks a uniquely identified component in this retained subtree.
      Type Parameters:
      C - component type
      Parameters:
      id - identifier to find
      componentType - required component type
      Returns:
      matching typed component, when present
      Throws:
      IllegalStateException - when the ID is duplicated
      ClassCastException - when the matching component has another type
    • viewTransitionName

      public TextComponent viewTransitionName(String name)
      Assigns the stable name used to pair this component's old and new view-transition snapshots. This overrides the component ID for transition pairing. A null or blank name returns pairing to retained identity or ID.
      Parameters:
      name - transition name
      Returns:
      this component
    • viewTransitionName

      public final String viewTransitionName()
      Returns this component's explicit view-transition name.
      Returns:
      transition name, or null
    • styleClass

      public TextComponent styleClass(String... classes)
      Adds one or more selector-visible style classes.
      Parameters:
      classes - class names
      Returns:
      this component
    • removeStyleClass

      public TextComponent removeStyleClass(String styleClass)
      Removes a selector-visible style class.
      Parameters:
      styleClass - class name
      Returns:
      this component
    • styleClasses

      public Set<String> styleClasses()
      Returns immutable selector-visible style classes.
      Returns:
      style classes
    • styleAttribute

      public <V> TextComponent styleAttribute(GuiStyleAttribute<V> attribute, V value)
      Sets a typed selector-visible component attribute.
      Type Parameters:
      V - value type
      Parameters:
      attribute - attribute key
      value - value, or null to remove
      Returns:
      this component
    • styleAttribute

      public <V> Optional<V> styleAttribute(GuiStyleAttribute<V> attribute)
      Reads a typed style attribute.
      Type Parameters:
      V - value type
      Parameters:
      attribute - attribute key
      Returns:
      value when present
    • styleState

      public TextComponent styleState(GuiPseudoClass pseudoClass, boolean active)
      Sets an explicit standard pseudo-class value.

      Use this for semantic states such as checked, required, valid, or open. Pointer, focus, enabled, root, empty, and structural states are maintained by the runtime.

      Parameters:
      pseudoClass - pseudo-class
      active - active flag
      Returns:
      this component
    • styleState

      public TextComponent styleState(String state, boolean active)
      Sets a component-defined selector state.
      Parameters:
      state - state name
      active - active flag
      Returns:
      this component
    • stateProvider

      public TextComponent stateProvider(GuiStateProvider provider)
      Adds a dynamic state provider.
      Parameters:
      provider - provider
      Returns:
      this component
    • x

      public TextComponent x(float x)
    • y

      public TextComponent y(float y)
    • position

      public TextComponent position(float x, float y)
    • translateX

      public TextComponent translateX(float translateX)
    • translateY

      public TextComponent translateY(float translateY)
    • translate

      public TextComponent translate(float translateX, float translateY)
    • width

      public TextComponent width(float width)
    • height

      public TextComponent height(float height)
    • size

      public TextComponent size(float width, float height)
    • autoWidth

      public TextComponent autoWidth()
    • autoHeight

      public TextComponent autoHeight()
    • autoSize

      public TextComponent autoSize()
    • width

      public TextComponent width(GuiLength width)
      Sets a typed modern width. This declaration is used only by a modern host.
      Parameters:
      width - typed width
      Returns:
      this component
    • height

      public TextComponent height(GuiLength height)
      Sets a typed modern height.
      Parameters:
      height - typed height
      Returns:
      this component
    • size

      public TextComponent size(GuiLength width, GuiLength height)
    • minWidth

      public TextComponent minWidth(GuiLength width)
    • maxWidth

      public TextComponent maxWidth(GuiLength width)
    • minHeight

      public TextComponent minHeight(GuiLength height)
    • maxHeight

      public TextComponent maxHeight(GuiLength height)
    • boxSizing

      public TextComponent boxSizing(GuiBoxSizing boxSizing)
    • aspectRatio

      public TextComponent aspectRatio(GuiAspectRatio aspectRatio)
    • display

      public TextComponent display(GuiDisplay display)
    • defaultDisplay

      protected final void defaultDisplay(GuiDisplay display)
      Defines the formatting role supplied by a component type before authored styles and fluent inline declarations are applied.

      This is intended for component constructors. Calling display(GuiDisplay) after construction still creates the higher-priority inline declaration.

      Parameters:
      display - default formatting role
    • defineModernDefaults

      protected void defineModernDefaults(GuiStyleBuilder defaults)
      Adds stylesheet-overridable defaults for this component type.

      Fluent setters, including calls made by constructors, are inline declarations. Subclasses should override this hook when a value is a component default rather than an authored inline value.

      Parameters:
      defaults - builder receiving component defaults
    • invalidateModernDefaults

      protected final void invalidateModernDefaults()
      Invalidates cached declarations after state used by defineModernDefaults(GuiStyleBuilder) changes.
    • listStyleType

      public TextComponent listStyleType(GuiCounterStyle style)
      Selects the list counter style used by an automatic ::marker.
      Parameters:
      style - counter style
      Returns:
      this component
    • listStylePosition

      public TextComponent listStylePosition(GuiListStylePosition position)
      Places the automatic marker inside the first line or in an outside marker column.
      Parameters:
      position - marker position
      Returns:
      this component
    • listStyleImage

      public TextComponent listStyleImage(GuiListMarkerImage image)
      Replaces the automatic text marker with an explicitly sized image.
      Parameters:
      image - marker image, or null for generated counter text
      Returns:
      this component
    • markerSide

      public TextComponent markerSide(GuiMarkerSide side)
      Selects which writing direction determines the outside marker side.
      Parameters:
      side - marker-side policy
      Returns:
      this component
    • markerGap

      public TextComponent markerGap(float gap)
      Sets the space between an outside marker and the principal box.
      Parameters:
      gap - non-negative design-space gap
      Returns:
      this component
    • quotes

      public TextComponent quotes(GuiQuotePairs quotes)
      Selects generated open/close quote pairs.
      Parameters:
      quotes - quote pairs
      Returns:
      this component
    • scrollMargin

      public TextComponent scrollMargin(GuiScrollInsets margin)
      Sets the target's snap-area expansion.
      Parameters:
      margin - scroll margin
      Returns:
      this component
    • scrollMargin

      public TextComponent scrollMargin(float all)
      Sets a uniform snap-area expansion.
      Parameters:
      all - margin on every side
      Returns:
      this component
    • scrollSnapStop

      public TextComponent scrollSnapStop(GuiScrollSnapStop stop)
      Selects whether a snap operation may pass this target.
      Parameters:
      stop - stop policy
      Returns:
      this component
    • position

      public TextComponent position(GuiPositionType positionType)
    • inset

      public TextComponent inset(GuiLength all)
    • inset

      public TextComponent inset(GuiLength top, GuiLength right, GuiLength bottom, GuiLength left)
    • verticalAlign

      public TextComponent verticalAlign(GuiVerticalAlign verticalAlign)
    • flexDirection

      public TextComponent flexDirection(GuiFlexDirection direction)
    • flexWrap

      public TextComponent flexWrap(GuiFlexWrap wrap)
    • flexGrow

      public TextComponent flexGrow(float grow)
    • flexShrink

      public TextComponent flexShrink(float shrink)
    • flexBasis

      public TextComponent flexBasis(GuiLength basis)
    • order

      public TextComponent order(int order)
    • justifyContent

      public TextComponent justifyContent(GuiAlignment alignment)
    • alignItems

      public TextComponent alignItems(GuiAlignment alignment)
    • alignSelf

      public TextComponent alignSelf(GuiAlignment alignment)
    • alignContent

      public TextComponent alignContent(GuiAlignment alignment)
    • rowGap

      public TextComponent rowGap(GuiLength gap)
    • columnGap

      public TextComponent columnGap(GuiLength gap)
    • gridTemplate

      public TextComponent gridTemplate(GuiGridTemplate template)
    • gridPlacement

      public TextComponent gridPlacement(GuiGridPlacement placement)
    • gridAutoFlow

      public TextComponent gridAutoFlow(GuiGridAutoFlow flow)
    • justifyItems

      public TextComponent justifyItems(GuiAlignment alignment)
    • justifySelf

      public TextComponent justifySelf(GuiAlignment alignment)
    • tableLayout

      public TextComponent tableLayout(GuiTableLayout layout)
    • borderCollapse

      public TextComponent borderCollapse(GuiBorderCollapse collapse)
    • borderSpacing

      public TextComponent borderSpacing(float spacing)
    • captionSide

      public TextComponent captionSide(GuiCaptionSide side)
    • emptyCells

      public TextComponent emptyCells(GuiEmptyCells value)
    • columnCount

      public TextComponent columnCount(int count)
    • columnWidth

      public TextComponent columnWidth(GuiLength width)
    • columnFill

      public TextComponent columnFill(GuiColumnFill fill)
    • columnRule

      public TextComponent columnRule(GuiBorderSide rule)
    • columnSpan

      public TextComponent columnSpan(GuiColumnSpan span)
    • breakBefore

      public TextComponent breakBefore(GuiBreakValue value)
    • breakAfter

      public TextComponent breakAfter(GuiBreakValue value)
    • breakInside

      public TextComponent breakInside(GuiBreakValue value)
    • widows

      public TextComponent widows(int lines)
    • orphans

      public TextComponent orphans(int lines)
    • marginBreak

      public TextComponent marginBreak(GuiMarginBreak value)
    • pageName

      public TextComponent pageName(String name)
    • anchorName

      public TextComponent anchorName(String name)
    • anchorPlacement

      public TextComponent anchorPlacement(GuiAnchorPlacement placement)
    • anchor

      public TextComponent anchor(GuiAnchor anchor)
    • zIndex

      public TextComponent zIndex(int zIndex)
    • tabIndex

      public TextComponent tabIndex(int tabIndex)
      Sets this component's sequential keyboard-focus order.

      Positive values are visited first in ascending order, zero follows retained-tree order, and negative values opt out of Tab traversal while preserving mouse and programmatic focus.

      Parameters:
      tabIndex - sequential focus index
      Returns:
      this component
    • tabIndex

      public int tabIndex()
      Returns this component's sequential focus index.
      Returns:
      focus index
    • writeModernInline

      protected final <V> void writeModernInline(GuiStyleProperty<V> property, V value)
    • invalidateModernLayout

      protected final void invalidateModernLayout(String reason)
    • styleOpen

      protected boolean styleOpen()
      Allows controls with retained popup/expansion state to implement :open.
    • self

      protected final TextComponent self()
    • renderChildren

      protected final void renderChildren(com.render.api.gui.GuiRenderContext context)