Class ToastComponent
java.lang.Object
com.render.api.gui.GuiComponent<ContainerComponent>
com.render.api.gui.ContainerComponent
com.render.api.gui.ToastComponent
Passive toast surface managed by the GUI or HUD toast runtime.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondurationSeconds(double durationSeconds) Sets the toast lifetime before automatic dismissal.enterDurationSeconds(double enterDurationSeconds) Sets the enter animation duration in seconds.enterOffsetX(float enterOffsetX) Sets the horizontal enter offset used by the default toast animation.exitDurationSeconds(double exitDurationSeconds) Sets the exit animation duration in seconds.exitOffsetX(float exitOffsetX) Sets the horizontal exit offset used by the default toast animation.onDismissed(Runnable onDismissed) Sets a callback invoked once the toast has fully dismissed.Sets a callback invoked once the toast has entered the visible stack.Methods inherited from class ContainerComponent
childLayout, flowColumn, flowRow, gap, layout, preferredHeight, preferredWidth, renderSelf, resolveBaseProperties, stackMethods inherited from class GuiComponent
activeStateStyle, add, alignContent, alignItems, alignSelf, anchor, anchorName, anchorPlacement, animatedBorder, animation, applyStyle, aspectRatio, autoHeight, autoSize, autoWidth, backdropFilters, backfaceVisibility, backgroundColor, backgroundColor, backgroundLayer, backgroundLayers, backgroundLayers, border, borderCollapse, borderColor, borderColor, borderSpacing, borderWidth, boxDecorationBreak, boxGlow, boxShadow, boxShadows, boxShadows, boxSizing, breakAfter, breakBefore, breakInside, cancel, captionSide, caretStyle, centered, childGap, childLayoutViewport, childOffsetX, childOffsetY, children, clearChildren, clipChildren, clipPath, clipsChildren, color, color, columnCount, columnFill, columnGap, columnRule, columnSpan, columnWidth, computedStyle, containsChildClipPoint, contextMenu, cornerRadius, defaultDisplay, dirtyCategories, disabled, display, emptyCells, enabled, enabled, filters, findById, findById, flexBasis, flexDirection, flexGrow, flexShrink, flexWrap, focused, focused, fragmentTree, glow, gradient, gridAutoFlow, gridPlacement, gridTemplate, handlesMouseClick, handlesMouseScroll, height, height, height, hovered, id, id, indeterminate, indeterminate, inlineStyle, inset, inset, intrinsicSize, invalidateModernLayout, isClippingChildren, isFocusable, justifyContent, justifyItems, justifySelf, lastInvalidationReason, layoutChildren, layoutFragments, listStyleImage, listStylePosition, listStyleType, margin, margin, margin, marginBreak, markerGap, markerSide, maskLayers, maskLayers, matchesStyleState, maxHeight, maxWidth, minHeight, minWidth, motionPath, onCharTyped, onFocusChanged, onKeyPressed, onModernLayoutComplete, onMouseClicked, onMouseDragged, onMouseReleased, onMouseScrolled, opacity, order, orphans, outline, padding, padding, padding, pageName, paint, parent, pause, play, position, position, preferredHeightForWidth, pressed, pseudoElementBox, pseudoElementStyle, quotes, rangeState, rangeState, readOnly, readOnly, remove, removeStyleClass, renderChildren, renderClippedChildren, renderOverlay, requestFocus, required, required, resume, rowGap, scrollMargin, scrollMargin, scrollSnapStop, self, shadow, shouldRouteToChildren, size, size, startingStyle, stateProvider, styleAttribute, styleAttribute, styleClass, styleClasses, styledPseudoElements, styleOpen, styleState, styleState, tabIndex, tabIndex, tableLayout, tick, tooltip, transform, transformBox, transformOrigin, transformStyle, transition, transition, transition, transition, transition, transition, transitionAll, transitionAll, transitionAll, translate, translateX, translateY, validity, validity, verticalAlign, viewTransitionName, viewTransitionName, visible, visible, widows, width, width, width, writeModernInline, writeTextShadow, writingState, x, x, y, y, zIndex
-
Constructor Details
-
ToastComponent
public ToastComponent()Creates a toast with a compact default presentation.
-
-
Method Details
-
durationSeconds
Sets the toast lifetime before automatic dismissal. A value less than or equal to0disables automatic dismissal.- Parameters:
durationSeconds- lifetime in seconds- Returns:
- this component
-
enterDurationSeconds
Sets the enter animation duration in seconds.- Parameters:
enterDurationSeconds- enter animation duration- Returns:
- this component
-
exitDurationSeconds
Sets the exit animation duration in seconds.- Parameters:
exitDurationSeconds- exit animation duration- Returns:
- this component
-
enterOffsetX
Sets the horizontal enter offset used by the default toast animation.- Parameters:
enterOffsetX- enter offset in design-space pixels- Returns:
- this component
-
exitOffsetX
Sets the horizontal exit offset used by the default toast animation.- Parameters:
exitOffsetX- exit offset in design-space pixels- Returns:
- this component
-
onShown
Sets a callback invoked once the toast has entered the visible stack.- Parameters:
onShown- shown callback- Returns:
- this component
-
onDismissed
Sets a callback invoked once the toast has fully dismissed.- Parameters:
onDismissed- dismissed callback- Returns:
- this component
-