Class AbstractContainerWidget
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractScrollArea
net.minecraft.client.gui.components.AbstractContainerWidget
- All Implemented Interfaces:
ContainerEventHandler,GuiEventListener,Renderable,TabOrderedElement,LayoutElement,NarratableEntry,NarrationSupplier
- Direct Known Subclasses:
AbstractSelectionList,ConfigurationScreen.ConfigurationListScreen.ListLabelWidget,ScrollableLayout.Container
public abstract class AbstractContainerWidget
extends AbstractScrollArea
implements ContainerEventHandler
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority -
Field Summary
FieldsFields inherited from class net.minecraft.client.gui.components.AbstractScrollArea
SCROLLBAR_WIDTHFields inherited from class net.minecraft.client.gui.components.AbstractWidget
active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, width -
Constructor Summary
ConstructorsConstructorDescriptionAbstractContainerWidget(int p_313730_, int p_313819_, int p_313847_, int p_313718_, Component p_313894_) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanbooleanbooleanmouseClicked(MouseButtonEvent p_446698_, boolean p_435133_) booleanmouseDragged(MouseButtonEvent p_446509_, double p_313749_, double p_313887_) booleanmouseReleased(MouseButtonEvent p_446281_) nextFocusPath(FocusNavigationEvent p_313949_) Retrieves the next focus path based on the given focus navigation event.final voidsetDragging(boolean p_313698_) Sets if the GUI element is dragging or not.voidsetFocused(boolean p_313936_) Sets the focus state of the GUI element.voidsetFocused(GuiEventListener p_313725_) Sets the focus state of the GUI element.Methods inherited from class net.minecraft.client.gui.components.AbstractScrollArea
contentHeight, isOverScrollbar, maxScrollAmount, mouseScrolled, onRelease, refreshScrollAmount, renderScrollbar, scrollAmount, scrollbarVisible, scrollBarX, scrollBarY, scrollerHeight, scrollRate, setScrollAmount, updateScrollingMethods inherited from class net.minecraft.client.gui.components.AbstractWidget
clearFGColor, createNarrationMessage, defaultButtonNarrationText, getBottom, getFGColor, getHeight, getMessage, getRectangle, getRight, getTabOrderGroup, getWidth, getX, getY, isActive, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, narrationPriority, onClick, onDrag, playButtonClickSound, playDownSound, render, renderScrollingString, renderScrollingString, renderScrollingString, renderWidget, setAlpha, setFGColor, setHeight, setMessage, setRectangle, setSize, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, updateWidgetNarration, visitWidgets, wrapDefaultNarrationMessageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, children, getChildAt, getCurrentFocusPath, keyPressed, keyReleased, mouseScrolledMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getBorderForArrowNavigation, getRectangle, isMouseOver, mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPositionMethods inherited from interface net.minecraft.client.gui.narration.NarratableEntry
getNarratablesMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
focused
-
isDragging
private boolean isDragging
-
-
Constructor Details
-
AbstractContainerWidget
public AbstractContainerWidget(int p_313730_, int p_313819_, int p_313847_, int p_313718_, Component p_313894_)
-
-
Method Details
-
isDragging
public final boolean isDragging()- Specified by:
isDraggingin interfaceContainerEventHandler
-
setDragging
public final void setDragging(boolean p_313698_) Description copied from interface:ContainerEventHandlerSets if the GUI element is dragging or not.- Specified by:
setDraggingin interfaceContainerEventHandler- Parameters:
p_313698_- the dragging state of the GUI element.
-
getFocused
- Specified by:
getFocusedin interfaceContainerEventHandler
-
setFocused
Description copied from interface:ContainerEventHandlerSets the focus state of the GUI element.- Specified by:
setFocusedin interfaceContainerEventHandler- Parameters:
p_313725_- the focused GUI element.
-
mouseClicked
- Specified by:
mouseClickedin interfaceContainerEventHandler- Specified by:
mouseClickedin interfaceGuiEventListener- Overrides:
mouseClickedin classAbstractWidget
-
mouseReleased
- Specified by:
mouseReleasedin interfaceContainerEventHandler- Specified by:
mouseReleasedin interfaceGuiEventListener- Overrides:
mouseReleasedin classAbstractWidget
-
mouseDragged
- Specified by:
mouseDraggedin interfaceContainerEventHandler- Specified by:
mouseDraggedin interfaceGuiEventListener- Overrides:
mouseDraggedin classAbstractScrollArea
-
isFocused
public boolean isFocused()- Specified by:
isFocusedin interfaceContainerEventHandler- Specified by:
isFocusedin interfaceGuiEventListener- Overrides:
isFocusedin classAbstractWidget
-
setFocused
public void setFocused(boolean p_313936_) Description copied from interface:GuiEventListenerSets the focus state of the GUI element.- Specified by:
setFocusedin interfaceContainerEventHandler- Specified by:
setFocusedin interfaceGuiEventListener- Overrides:
setFocusedin classAbstractWidget- Parameters:
p_313936_-trueto apply focus,falseto remove focus
-