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 voidextractBackground(GuiGraphicsExtractor graphics) protected voidextractBorder(GuiGraphicsExtractor graphics, int x, int y, int width, int height) protected abstract voidextractContents(GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a) protected voidextractDecorations(GuiGraphicsExtractor graphics) voidextractWidgetRenderState(GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a) protected abstract intprotected intprotected intprotected intbooleanisMouseOver(double mouseX, double mouseY) booleankeyPressed(KeyEvent event) booleanmouseClicked(MouseButtonEvent event, boolean doubleClick) voidplayDownSound(SoundManager soundManager) protected intprotected intprotected booleanwithinContentAreaTopBottom(int top, int bottom) Methods inherited from class AbstractScrollArea
defaultSettings, extractScrollbar, isOverScrollbar, maxScrollAmount, mouseDragged, mouseScrolled, onRelease, refreshScrollAmount, scrollable, scrollAmount, scrollbarWidth, scrollBarY, scrollerHeight, scrollRate, setScrollAmount, updateScrollingMethods inherited from class AbstractWidget
clearFGColor, createNarrationMessage, defaultButtonNarrationText, extractRenderState, extractScrollingStringOverContents, getAlpha, getBottom, getFGColor, getHeight, getMessage, getRectangle, getRight, getTabOrderGroup, getWidth, getX, getY, handleCursor, isActive, isFocused, isHovered, isHoveredOrFocused, isValidClickButton, mouseReleased, narrationPriority, nextFocusPath, onClick, onDrag, playButtonClickSound, 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, preeditUpdated, 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
-
extractWidgetRenderState
public void extractWidgetRenderState(GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a) - Specified by:
extractWidgetRenderStatein classAbstractWidget
-
extractDecorations
-
innerPadding
protected int innerPadding() -
totalInnerPadding
protected int totalInnerPadding() -
isMouseOver
public boolean isMouseOver(double mouseX, double mouseY) - Specified by:
isMouseOverin interfaceGuiEventListener- Overrides:
isMouseOverin classAbstractWidget
-
scrollBarX
protected int scrollBarX()- Overrides:
scrollBarXin classAbstractScrollArea
-
contentHeight
protected int contentHeight()- Specified by:
contentHeightin classAbstractScrollArea
-
extractBackground
-
extractBorder
-
withinContentAreaTopBottom
protected boolean withinContentAreaTopBottom(int top, int bottom) -
getInnerHeight
protected abstract int getInnerHeight() -
extractContents
protected abstract void extractContents(GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a) -
getInnerLeft
protected int getInnerLeft() -
getInnerTop
protected int getInnerTop() -
playDownSound
- Overrides:
playDownSoundin classAbstractWidget
-