Class ScrollContainerComponent


public final class ScrollContainerComponent extends ContainerComponent
Retained two-axis scrolling container with independent overflow, overscroll, scrollbar, and snap policies. Changing either effective scroll offset invalidates descendant arrangement so content, input geometry, and indicators advance together on the next retained frame.
  • Constructor Details

    • ScrollContainerComponent

      public ScrollContainerComponent()
  • Method Details

    • scrollStep

      public ScrollContainerComponent scrollStep(float scrollStep)
      Sets the amount of scroll applied per mouse-wheel step.
      Parameters:
      scrollStep - scroll amount in design-space pixels
      Returns:
      this component
    • horizontalScrollStep

      public ScrollContainerComponent horizontalScrollStep(float scrollStep)
    • scrollBehavior

      public ScrollContainerComponent scrollBehavior(GuiScrollBehavior behavior)
      Selects immediate or retained smooth movement for wheel, keyboard, snap, and programmatic scrollTo(float, float) requests.
      Parameters:
      behavior - scrolling behavior
      Returns:
      this component
    • smoothScroll

      public ScrollContainerComponent smoothScroll(double durationSeconds, GuiEasing easing)
      Configures retained smooth-scroll timing.
      Parameters:
      durationSeconds - positive duration
      easing - progress easing
      Returns:
      this component
    • smoothScrollDurationSeconds

      public double smoothScrollDurationSeconds()
      Returns the configured smooth-scroll duration.
      Returns:
      duration in seconds
    • smoothScrollEasing

      public GuiEasing smoothScrollEasing()
      Returns the configured smooth-scroll easing.
      Returns:
      easing function
    • pageMovementFactor

      public ScrollContainerComponent pageMovementFactor(float factor)
      Sets the fraction of a viewport moved by Page Up or Page Down.
      Parameters:
      factor - fraction in the range 0..1
      Returns:
      this component
    • scrollPadding

      public ScrollContainerComponent scrollPadding(GuiScrollInsets insets)
      Insets the effective snap viewport without changing laid-out content.
      Parameters:
      insets - snap viewport insets
      Returns:
      this component
    • scrollPadding

      public ScrollContainerComponent scrollPadding(float all)
    • scrollbarGutter

      public ScrollContainerComponent scrollbarGutter(GuiScrollbarGutter gutter)
      Selects persistent scrollbar layout-space reservation.
      Parameters:
      gutter - gutter policy
      Returns:
      this component
    • scrollbarGutter

      public GuiScrollbarGutter scrollbarGutter()
      Returns the gutter policy.
      Returns:
      gutter policy
    • scrollMarkerGroup

      public ScrollContainerComponent scrollMarkerGroup(GuiScrollMarkerGroup group)
      Enables retained marker navigation for registered snap children.
      Parameters:
      group - marker group, or null to disable it
      Returns:
      this component
    • scrollMarkerGroup

      public GuiScrollMarkerGroup scrollMarkerGroup()
      Returns a detached marker-group configuration.
      Returns:
      marker group, or null
    • scrollMarkerIdentities

      public Map<GuiComponent<?>, Long> scrollMarkerIdentities()
      Returns stable marker identities keyed by their retained snap target.
      Returns:
      immutable target-to-identity map
    • overflow

      Sets independent horizontal and vertical overflow behavior.
      Parameters:
      x - horizontal overflow behavior
      y - vertical overflow behavior
      Returns:
      this component
    • overflowX

      public ScrollContainerComponent overflowX(GuiOverflowMode mode)
    • overflowY

      public ScrollContainerComponent overflowY(GuiOverflowMode mode)
    • overflowX

      public GuiOverflowMode overflowX()
    • overflowY

      public GuiOverflowMode overflowY()
    • overscrollBehavior

      Controls whether unconsumed scrolling may chain to an ancestor.
      Parameters:
      x - horizontal boundary behavior
      y - vertical boundary behavior
      Returns:
      this component
    • scrollSnapType

      public ScrollContainerComponent scrollSnapType(GuiScrollSnapType value)
    • snapChild

      Registers one direct child as a snap target on either axis.
      Parameters:
      child - direct child target
      x - horizontal alignment
      y - vertical alignment
      Returns:
      this component
    • scrollStartTarget

      public ScrollContainerComponent scrollStartTarget(GuiComponent<?> child, GuiScrollSnapAlign x, GuiScrollSnapAlign y)
      Selects a direct child that is aligned once after the first usable layout.
      Parameters:
      child - direct child target
      x - horizontal alignment
      y - vertical alignment
      Returns:
      this component
    • scrollAnchor

      public ScrollContainerComponent scrollAnchor(GuiComponent<?> child)
      Keeps an explicitly selected direct child visually stable when content before it changes size.
      Parameters:
      child - anchor child, or null to disable anchoring
      Returns:
      this component
    • layout

      public ScrollContainerComponent layout(ContainerLayout childLayout)
      Sets the layout mode used for child placement.
      Overrides:
      layout in class ContainerComponent
      Parameters:
      childLayout - child layout mode
      Returns:
      this component
    • gap

      public ScrollContainerComponent gap(float gap)
      Sets the spacing between flowed children in design-space pixels.
      Overrides:
      gap in class ContainerComponent
      Parameters:
      gap - child gap
      Returns:
      this component
    • position

      public ScrollContainerComponent position(float x, float y)
      Sets the component position in design-space pixels.
      Parameters:
      x - x position
      y - y position
      Returns:
      this component
    • translateX

      public ScrollContainerComponent translateX(float translateX)
    • translateY

      public ScrollContainerComponent translateY(float translateY)
    • translate

      public ScrollContainerComponent translate(float translateX, float translateY)
    • size

      public ScrollContainerComponent size(float width, float height)
      Sets the component size in design-space pixels.
      Parameters:
      width - component width
      height - component height
      Returns:
      this component
    • autoWidth

      public ScrollContainerComponent autoWidth()
    • autoHeight

      public ScrollContainerComponent autoHeight()
    • autoSize

      public ScrollContainerComponent autoSize()
    • padding

      public ScrollContainerComponent padding(float all)
      Sets uniform inner padding in design-space pixels.
      Parameters:
      all - padding for every side
      Returns:
      this component
    • padding

      public ScrollContainerComponent padding(float vertical, float horizontal)
      Sets symmetric inner padding in design-space pixels.
      Parameters:
      vertical - top and bottom padding
      horizontal - left and right padding
      Returns:
      this component
    • padding

      public ScrollContainerComponent padding(float top, float right, float bottom, float left)
      Sets per-side inner padding in design-space pixels.
      Parameters:
      top - top padding
      right - right padding
      bottom - bottom padding
      left - left padding
      Returns:
      this component
    • backgroundColor

      public ScrollContainerComponent backgroundColor(RenderColor color)
      Sets the background color in ARGB format.
      Parameters:
      color - background color
      Returns:
      this component
    • width

      public ScrollContainerComponent 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 ScrollContainerComponent height(GuiLength height)
      Sets a typed modern height.
      Parameters:
      height - typed height
      Returns:
      this component
    • size

      public ScrollContainerComponent size(GuiLength width, GuiLength height)
    • shadow

      public ScrollContainerComponent shadow(GuiShadow shadow)
      Sets the component shadow effect.
      Parameters:
      shadow - shadow configuration, or null to clear it
      Returns:
      this component
    • glow

      public ScrollContainerComponent glow(GuiGlow glow)
      Sets the component glow effect.
      Parameters:
      glow - glow configuration, or null to clear it
      Returns:
      this component
    • gradient

      public ScrollContainerComponent gradient(GuiGradient gradient)
      Sets the background gradient.
      Parameters:
      gradient - gradient configuration, or null to clear it
      Returns:
      this component
    • animatedBorder

      public ScrollContainerComponent animatedBorder(GuiAnimatedBorder animatedBorder)
      Sets the animated border effect.
      Parameters:
      animatedBorder - animated border configuration, or null to clear it
      Returns:
      this component
    • transitionAll

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

      public ScrollContainerComponent transitionAll(double durationSeconds, double delaySeconds, GuiEasing easing)
    • transition

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

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

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

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

    • pressed

    • focused

    • disabled

    • animation

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

      public ScrollContainerComponent play(String name)
    • pause

      public ScrollContainerComponent pause(String name)
    • resume

      public ScrollContainerComponent resume(String name)
    • cancel

      public ScrollContainerComponent cancel(String name)
    • borderColor

      public ScrollContainerComponent borderColor(RenderColor color)
      Sets the border color in ARGB format.
      Parameters:
      color - border color
      Returns:
      this component
    • borderWidth

      public ScrollContainerComponent borderWidth(float borderWidth)
      Sets the border width in design-space pixels.
      Parameters:
      borderWidth - border width
      Returns:
      this component
    • cornerRadius

      public ScrollContainerComponent cornerRadius(float cornerRadius)
      Sets the border corner radius in design-space pixels.
      Parameters:
      cornerRadius - corner radius
      Returns:
      this component
    • scrollIndicator

      public ScrollContainerComponent scrollIndicator(GuiScrollIndicator scrollIndicator)
      Sets the scrollbar style.
      Parameters:
      scrollIndicator - scrollbar configuration, or null to disable it
      Returns:
      this component
    • horizontalScrollIndicator

      public ScrollContainerComponent horizontalScrollIndicator(GuiScrollIndicator scrollIndicator)
    • showScrollIndicator

      public ScrollContainerComponent showScrollIndicator(boolean enabled)
      Enables or disables the scrollbar, creating a default one if needed.
      Parameters:
      enabled - true to render the scrollbar when scrolling is possible
      Returns:
      this component
    • showHorizontalScrollIndicator

      public ScrollContainerComponent showHorizontalScrollIndicator(boolean enabled)
    • scrollOffset

      public float scrollOffset()
      Returns the current vertical scroll offset in design-space pixels.
      Returns:
      current scroll offset
    • scrollOffsetX

      public float scrollOffsetX()
    • scrollOffset

      public ScrollContainerComponent scrollOffset(float scrollOffset)
      Sets the target vertical scroll offset in design-space pixels.
      Parameters:
      scrollOffset - scroll offset
      Returns:
      this component
    • scrollOffsetX

      public ScrollContainerComponent scrollOffsetX(float scrollOffset)
    • scrollPosition

      public ScrollContainerComponent scrollPosition(float x, float y)
    • scrollTo

      public ScrollContainerComponent scrollTo(float x, float y)
      Requests a position using the configured scroll behavior.
      Parameters:
      x - horizontal offset
      y - vertical offset
      Returns:
      this component
    • scrollTo

      public ScrollContainerComponent scrollTo(float x, float y, GuiScrollBehavior behavior)
      Requests a position with an explicit behavior.
      Parameters:
      x - horizontal offset
      y - vertical offset
      behavior - movement behavior
      Returns:
      this component
    • scrollBy

      public ScrollContainerComponent scrollBy(float x, float y)
      Requests movement relative to the current retained target.
      Parameters:
      x - horizontal delta
      y - vertical delta
      Returns:
      this component
    • scrollToChild

      Aligns a direct child within the effective snap viewport.
      Parameters:
      child - direct child
      x - horizontal alignment
      y - vertical alignment
      Returns:
      this component
    • maxScrollOffset

      public float maxScrollOffset()
      Returns the maximum vertical scroll offset in design-space pixels.
      Returns:
      maximum scroll offset
    • maxScrollOffsetX

      public float maxScrollOffsetX()
    • snapToNearest

      public ScrollContainerComponent snapToNearest()
      Moves enabled axes to their nearest registered snap target.
      Returns:
      this component
    • handlesMouseClick

      protected boolean handlesMouseClick(float mouseX, float mouseY, int button)
      Overrides:
      handlesMouseClick in class GuiComponent<ContainerComponent>
    • onMouseClicked

      protected boolean onMouseClicked(com.render.api.gui.GuiRenderContext context, float mouseX, float mouseY, int button)
      Overrides:
      onMouseClicked in class GuiComponent<ContainerComponent>
    • onMouseDragged

      protected boolean onMouseDragged(com.render.api.gui.GuiRenderContext context, float mouseX, float mouseY, int button, double dragX, double dragY)
      Overrides:
      onMouseDragged in class GuiComponent<ContainerComponent>
    • onMouseReleased

      protected boolean onMouseReleased(com.render.api.gui.GuiRenderContext context, float mouseX, float mouseY, int button)
      Overrides:
      onMouseReleased in class GuiComponent<ContainerComponent>
    • renderOverlay

      protected void renderOverlay(com.render.api.gui.GuiRenderContext context)
      Overrides:
      renderOverlay in class GuiComponent<ContainerComponent>
    • childLayoutViewport

      protected com.render.api.gui.GuiBox childLayoutViewport()
      Description copied from class: GuiComponent
      Returns the box used to arrange descendants. Scroll containers override this to reserve persistent scrollbar gutters.
      Overrides:
      childLayoutViewport in class GuiComponent<ContainerComponent>
    • clipsChildren

      protected boolean clipsChildren()
      Overrides:
      clipsChildren in class GuiComponent<ContainerComponent>
    • renderClippedChildren

      protected void renderClippedChildren(com.render.api.gui.GuiRenderContext context)
      Description copied from class: GuiComponent
      Paints descendants through this component's overflow clip.
      Overrides:
      renderClippedChildren in class GuiComponent<ContainerComponent>
    • shouldRouteToChildren

      protected boolean shouldRouteToChildren(float mouseX, float mouseY)
      Overrides:
      shouldRouteToChildren in class GuiComponent<ContainerComponent>
    • containsChildClipPoint

      protected boolean containsChildClipPoint(float mouseX, float mouseY)
      Overrides:
      containsChildClipPoint in class GuiComponent<ContainerComponent>
    • childOffsetX

      protected float childOffsetX()
      Overrides:
      childOffsetX in class GuiComponent<ContainerComponent>
    • childOffsetY

      protected float childOffsetY()
      Overrides:
      childOffsetY in class GuiComponent<ContainerComponent>
    • framePreparationRequired

      protected boolean framePreparationRequired()
      Overrides:
      framePreparationRequired in class GuiComponent<ContainerComponent>
    • resolveBaseProperties

      protected void resolveBaseProperties(com.render.api.gui.GuiPropertyValues properties)
      Overrides:
      resolveBaseProperties in class ContainerComponent
    • layoutChildren

      protected void layoutChildren(com.render.api.gui.GuiRenderContext context)
      Overrides:
      layoutChildren in class GuiComponent<ContainerComponent>
    • onModernLayoutComplete

      protected void onModernLayoutComplete()
      Description copied from class: GuiComponent
      Invoked after this component's descendants have been arranged by the modern layout engine.
      Overrides:
      onModernLayoutComplete in class GuiComponent<ContainerComponent>
    • handlesMouseScroll

      protected boolean handlesMouseScroll(float mouseX, float mouseY)
      Overrides:
      handlesMouseScroll in class GuiComponent<ContainerComponent>
    • onMouseScrolled

      protected boolean onMouseScrolled(com.render.api.gui.GuiRenderContext context, float mouseX, float mouseY, double horizontalAmount, double verticalAmount)
      Overrides:
      onMouseScrolled in class GuiComponent<ContainerComponent>
    • isFocusable

      protected boolean isFocusable()
      Overrides:
      isFocusable in class GuiComponent<ContainerComponent>
    • onKeyPressed

      protected boolean onKeyPressed(com.render.api.gui.GuiRenderContext context, int keyCode, int scanCode, int modifiers)
      Overrides:
      onKeyPressed in class GuiComponent<ContainerComponent>
    • tick

      protected void tick()
      Overrides:
      tick in class GuiComponent<ContainerComponent>
    • add

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

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

      public ContainerComponent clearChildren()
    • replaceChildren

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

      public ContainerComponent updateWhenChanged(String channel, Object snapshot, Consumer<ContainerComponent> 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 ContainerComponent updateWhenChanged(String channel, long revision, Consumer<ContainerComponent> 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 ContainerComponent 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 ContainerComponent 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 ContainerComponent 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 ContainerComponent 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 ContainerComponent 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 ContainerComponent margin(float all)
    • margin

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

      public ContainerComponent margin(float top, float right, float bottom, float left)
    • color

      public ContainerComponent color(RenderColor color)
    • opacity

      public ContainerComponent opacity(float opacity)
    • boxShadow

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

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

      public ContainerComponent visible(boolean visible)
    • caretStyle

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

      public ContainerComponent 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 ContainerComponent backgroundLayers(GuiBackgroundLayer... layers)
    • backgroundLayer

      public ContainerComponent backgroundLayer(GuiBackgroundLayer layer)
    • border

      public ContainerComponent 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 ContainerComponent outline(GuiOutline outline)
    • boxDecorationBreak

      public ContainerComponent boxDecorationBreak(GuiBoxDecorationBreak behavior)
    • boxShadows

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

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

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

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

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

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

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

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

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

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

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

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

      public ContainerComponent 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 ContainerComponent enabled(boolean enabled)
    • clipChildren

      public ContainerComponent 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 ContainerComponent requestFocus()
    • tooltip

      public ContainerComponent tooltip(TooltipComponent tooltip)
    • contextMenu

      public ContainerComponent contextMenu(ContextMenuComponent contextMenu)
    • applyStyle

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

      public ContainerComponent 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 ContainerComponent 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 ContainerComponent 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 ContainerComponent transition(double durationSeconds, GuiEasing easing, GuiTransitionBehavior behavior, GuiStyleProperty<?>... properties)
    • startingStyle

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

      public ContainerComponent 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 ContainerComponent 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 ContainerComponent styleClass(String... classes)
      Adds one or more selector-visible style classes.
      Parameters:
      classes - class names
      Returns:
      this component
    • removeStyleClass

      public ContainerComponent 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> ContainerComponent 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 ContainerComponent 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 ContainerComponent styleState(String state, boolean active)
      Sets a component-defined selector state.
      Parameters:
      state - state name
      active - active flag
      Returns:
      this component
    • stateProvider

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

      public ContainerComponent x(float x)
    • y

      public ContainerComponent y(float y)
    • width

      public ContainerComponent width(float width)
    • height

      public ContainerComponent height(float height)
    • minWidth

      public ContainerComponent minWidth(GuiLength width)
    • maxWidth

      public ContainerComponent maxWidth(GuiLength width)
    • minHeight

      public ContainerComponent minHeight(GuiLength height)
    • maxHeight

      public ContainerComponent maxHeight(GuiLength height)
    • boxSizing

      public ContainerComponent boxSizing(GuiBoxSizing boxSizing)
    • aspectRatio

      public ContainerComponent aspectRatio(GuiAspectRatio aspectRatio)
    • display

      public ContainerComponent 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 ContainerComponent listStyleType(GuiCounterStyle style)
      Selects the list counter style used by an automatic ::marker.
      Parameters:
      style - counter style
      Returns:
      this component
    • listStylePosition

      public ContainerComponent 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 ContainerComponent 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 ContainerComponent markerSide(GuiMarkerSide side)
      Selects which writing direction determines the outside marker side.
      Parameters:
      side - marker-side policy
      Returns:
      this component
    • markerGap

      public ContainerComponent 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 ContainerComponent quotes(GuiQuotePairs quotes)
      Selects generated open/close quote pairs.
      Parameters:
      quotes - quote pairs
      Returns:
      this component
    • scrollMargin

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

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

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

      public ContainerComponent position(GuiPositionType positionType)
    • inset

      public ContainerComponent inset(GuiLength all)
    • inset

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

      public ContainerComponent verticalAlign(GuiVerticalAlign verticalAlign)
    • flexDirection

      public ContainerComponent flexDirection(GuiFlexDirection direction)
    • flexWrap

      public ContainerComponent flexWrap(GuiFlexWrap wrap)
    • flexGrow

      public ContainerComponent flexGrow(float grow)
    • flexShrink

      public ContainerComponent flexShrink(float shrink)
    • flexBasis

      public ContainerComponent flexBasis(GuiLength basis)
    • order

      public ContainerComponent order(int order)
    • justifyContent

      public ContainerComponent justifyContent(GuiAlignment alignment)
    • alignItems

      public ContainerComponent alignItems(GuiAlignment alignment)
    • alignSelf

      public ContainerComponent alignSelf(GuiAlignment alignment)
    • alignContent

      public ContainerComponent alignContent(GuiAlignment alignment)
    • rowGap

      public ContainerComponent rowGap(GuiLength gap)
    • columnGap

      public ContainerComponent columnGap(GuiLength gap)
    • gridTemplate

      public ContainerComponent gridTemplate(GuiGridTemplate template)
    • gridPlacement

      public ContainerComponent gridPlacement(GuiGridPlacement placement)
    • gridAutoFlow

      public ContainerComponent gridAutoFlow(GuiGridAutoFlow flow)
    • justifyItems

      public ContainerComponent justifyItems(GuiAlignment alignment)
    • justifySelf

      public ContainerComponent justifySelf(GuiAlignment alignment)
    • tableLayout

      public ContainerComponent tableLayout(GuiTableLayout layout)
    • borderCollapse

      public ContainerComponent borderCollapse(GuiBorderCollapse collapse)
    • borderSpacing

      public ContainerComponent borderSpacing(float spacing)
    • captionSide

      public ContainerComponent captionSide(GuiCaptionSide side)
    • emptyCells

      public ContainerComponent emptyCells(GuiEmptyCells value)
    • columnCount

      public ContainerComponent columnCount(int count)
    • columnWidth

      public ContainerComponent columnWidth(GuiLength width)
    • columnFill

      public ContainerComponent columnFill(GuiColumnFill fill)
    • columnRule

      public ContainerComponent columnRule(GuiBorderSide rule)
    • columnSpan

      public ContainerComponent columnSpan(GuiColumnSpan span)
    • breakBefore

      public ContainerComponent breakBefore(GuiBreakValue value)
    • breakAfter

      public ContainerComponent breakAfter(GuiBreakValue value)
    • breakInside

      public ContainerComponent breakInside(GuiBreakValue value)
    • widows

      public ContainerComponent widows(int lines)
    • orphans

      public ContainerComponent orphans(int lines)
    • marginBreak

      public ContainerComponent marginBreak(GuiMarginBreak value)
    • pageName

      public ContainerComponent pageName(String name)
    • anchorName

      public ContainerComponent anchorName(String name)
    • anchorPlacement

      public ContainerComponent anchorPlacement(GuiAnchorPlacement placement)
    • anchor

      public ContainerComponent anchor(GuiAnchor anchor)
    • centered

      public ContainerComponent centered()
    • zIndex

      public ContainerComponent zIndex(int zIndex)
    • tabIndex

      public ContainerComponent 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 ContainerComponent self()
    • renderChildren

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