Class AbstractTextAreaWidget
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractScrollArea
net.minecraft.client.gui.components.AbstractTextAreaWidget
- All Implemented Interfaces:
GuiEventListener, Renderable, TabOrderedElement, LayoutElement, NarratableEntry, NarrationSupplier
- Direct Known Subclasses:
FittingMultiLineTextWidget, MultiLineEditBox, TelemetryEventWidget
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractScrollArea
AbstractScrollArea.ScrollbarSettingsNested classes/interfaces inherited from class AbstractWidget
AbstractWidget.WithInactiveMessageNested classes/interfaces inherited from interface NarratableEntry
NarratableEntry.NarrationPriority -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final WidgetSpritesstatic final intprivate static final intprivate booleanprivate booleanFields inherited from class AbstractScrollArea
SCROLLBAR_WIDTHFields inherited from class AbstractWidget
active, alpha, height, isHovered, message, packedFGColor, UNSET_FG_COLOR, visible, width -
Constructor Summary
ConstructorsConstructorDescriptionAbstractTextAreaWidget(int x, int y, int width, int height, Component narration, AbstractScrollArea.ScrollbarSettings scrollbarSettings) AbstractTextAreaWidget(int x, int y, int width, int height, Component narration, AbstractScrollArea.ScrollbarSettings scrollbarSettings, boolean showBackground, boolean showDecorations) -
Method Summary
Modifier and TypeMethodDescriptionprotected intprotected abstract intprotected intprotected intprotected intbooleanisMouseOver(double mouseX, double mouseY) Checks if the given mouse coordinates are over the GUI element.booleankeyPressed(KeyEvent event) booleanmouseClicked(MouseButtonEvent event, boolean doubleClick) voidplayDownSound(SoundManager soundManager) protected voidrenderBackground(GuiGraphics graphics) protected voidrenderBorder(GuiGraphics graphics, int x, int y, int width, int height) protected abstract voidrenderContents(GuiGraphics graphics, int mouseX, int mouseY, float a) protected voidrenderDecorations(GuiGraphics graphics) voidrenderWidget(GuiGraphics graphics, int mouseX, int mouseY, float a) protected intprotected intprotected booleanwithinContentAreaTopBottom(int top, int bottom) Methods inherited from class AbstractScrollArea
defaultSettings, isOverScrollbar, maxScrollAmount, mouseDragged, mouseScrolled, onRelease, refreshScrollAmount, renderScrollbar, scrollable, scrollAmount, scrollbarWidth, scrollBarY, scrollerHeight, scrollRate, setScrollAmount, updateScrollingMethods inherited from class AbstractWidget
clearFGColor, createNarrationMessage, defaultButtonNarrationText, getAlpha, getBottom, getFGColor, getHeight, getMessage, getRectangle, getRight, getTabOrderGroup, getWidth, getX, getY, handleCursor, isActive, isFocused, isHovered, isHoveredOrFocused, isValidClickButton, mouseReleased, narrationPriority, nextFocusPath, onClick, onDrag, playButtonClickSound, render, renderScrollingStringOverContents, setAlpha, setFGColor, setFocused, setHeight, setMessage, setRectangle, setSize, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, updateWidgetNarration, visitWidgets, wrapDefaultNarrationMessageMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GuiEventListener
charTyped, getBorderForArrowNavigation, getCurrentFocusPath, keyReleased, mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface LayoutElement
setPositionMethods inherited from interface NarratableEntry
getNarratables
-
Field Details
-
BACKGROUND_SPRITES
-
INNER_PADDING
private static final int INNER_PADDING- See Also:
-
DEFAULT_TOTAL_PADDING
public static final int DEFAULT_TOTAL_PADDING- See Also:
-
showBackground
private boolean showBackground -
showDecorations
private boolean showDecorations
-
-
Constructor Details
-
AbstractTextAreaWidget
public AbstractTextAreaWidget(int x, int y, int width, int height, Component narration, AbstractScrollArea.ScrollbarSettings scrollbarSettings) -
AbstractTextAreaWidget
public AbstractTextAreaWidget(int x, int y, int width, int height, Component narration, AbstractScrollArea.ScrollbarSettings scrollbarSettings, boolean showBackground, boolean showDecorations)
-
-
Method Details
-
mouseClicked
- Specified by:
mouseClickedin interfaceGuiEventListener- Overrides:
mouseClickedin classAbstractWidget
-
keyPressed
-
renderWidget
- Specified by:
renderWidgetin classAbstractWidget
-
renderDecorations
-
innerPadding
protected int innerPadding() -
totalInnerPadding
protected int totalInnerPadding() -
isMouseOver
public boolean isMouseOver(double mouseX, double mouseY) Description copied from interface:GuiEventListenerChecks if the given mouse coordinates are over the GUI element.- Specified by:
isMouseOverin interfaceGuiEventListener- Overrides:
isMouseOverin classAbstractWidget- Parameters:
mouseX- the X coordinate of the mouse.mouseY- the Y coordinate of the mouse.- Returns:
trueif the mouse is over the GUI element,falseotherwise.
-
scrollBarX
protected int scrollBarX()- Overrides:
scrollBarXin classAbstractScrollArea
-
contentHeight
protected int contentHeight()- Specified by:
contentHeightin classAbstractScrollArea
-
renderBackground
-
renderBorder
-
withinContentAreaTopBottom
protected boolean withinContentAreaTopBottom(int top, int bottom) -
getInnerHeight
protected abstract int getInnerHeight() -
renderContents
-
getInnerLeft
protected int getInnerLeft() -
getInnerTop
protected int getInnerTop() -
playDownSound
- Overrides:
playDownSoundin classAbstractWidget
-