Class DropReceiverComponent<T>
java.lang.Object
com.render.api.gui.GuiComponent<ContainerComponent>
com.render.api.gui.ContainerComponent
com.render.api.gui.DropReceiverComponent<T>
- Type Parameters:
T- payload type
Drop target used with
DragSourceComponent.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionacceptChild(Function<T, GuiComponent<?>> childFactory) Sets a helper that mounts a component generated from the dropped payload.Sets the payload acceptance predicate.dragHoverBackgroundColor(RenderColor dragHoverBackgroundColor) Sets the hover background color used while a compatible payload is over the receiver.dragHoverBorderColor(RenderColor dragHoverBorderColor) Sets the hover border color used while a compatible payload is over the receiver.onDrop(BiConsumer<DropReceiverComponent<T>, T> onDrop) Sets the drop callback invoked when a compatible payload is released over this receiver.protected voidrenderSelf(com.render.api.gui.GuiRenderContext context) Methods inherited from class ContainerComponent
childLayout, flowColumn, flowRow, gap, layout, preferredHeight, preferredWidth, 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
-
DropReceiverComponent
public DropReceiverComponent()
-
-
Method Details
-
accepts
Sets the payload acceptance predicate.- Parameters:
accepts- acceptance predicate- Returns:
- this component
-
onDrop
Sets the drop callback invoked when a compatible payload is released over this receiver.- Parameters:
onDrop- drop callback- Returns:
- this component
-
acceptChild
Sets a helper that mounts a component generated from the dropped payload.- Parameters:
childFactory- component factory- Returns:
- this component
-
dragHoverBackgroundColor
Sets the hover background color used while a compatible payload is over the receiver.- Parameters:
dragHoverBackgroundColor- hover background color- Returns:
- this component
-
dragHoverBorderColor
Sets the hover border color used while a compatible payload is over the receiver.- Parameters:
dragHoverBorderColor- hover border color- Returns:
- this component
-
renderSelf
protected void renderSelf(com.render.api.gui.GuiRenderContext context) - Overrides:
renderSelfin classContainerComponent
-