Class EditBox
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.EditBox
- All Implemented Interfaces:
- GuiEventListener,- Renderable,- TabOrderedElement,- LayoutElement,- NarratableEntry,- NarrationSupplier
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntryNarratableEntry.NarrationPriority
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intprivate booleanprivate booleanprivate static final Stringprivate static final intprivate static final intprivate static final intprivate intstatic final intprivate intprivate longprivate final Fontprivate BiFunction<String,Integer, FormattedCharSequence> static final intprivate intprivate Componentprivate booleanprivate intprivate static final WidgetSpritesprivate Stringprivate intprivate intprivate StringFields inherited from class net.minecraft.client.gui.components.AbstractWidgetactive, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListenerDOUBLE_CLICK_THRESHOLD_MS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanbooleancharTyped(char p_94122_, int p_94123_) protected MutableComponentvoiddeleteChars(int p_94181_) private voiddeleteText(int p_94218_) voiddeleteWords(int p_94177_) private intgetCursorPos(int p_94221_) intintprivate intintgetScreenX(int p_94212_) getValue()intgetWordPosition(int p_94185_) private intgetWordPosition(int p_94129_, int p_94130_) private intgetWordPosition(int p_94141_, int p_94142_, boolean p_94143_) voidinsertText(String p_94165_) booleanprivate booleanbooleanisMouseOver(double p_94157_, double p_94158_) booleanbooleankeyPressed(int p_94132_, int p_94133_, int p_94134_) voidmoveCursor(int p_94189_, boolean p_297286_) voidmoveCursorTo(int p_94193_, boolean p_300521_) voidmoveCursorToEnd(boolean p_297711_) voidmoveCursorToStart(boolean p_299543_) nextFocusPath(FocusNavigationEvent p_265216_) voidonClick(double p_279417_, double p_279437_) private voidonValueChange(String p_94175_) voidplayDownSound(SoundManager p_279245_) private voidrenderHighlight(GuiGraphics p_281400_, int p_265338_, int p_265693_, int p_265618_, int p_265584_) voidrenderWidget(GuiGraphics p_283252_, int p_281594_, int p_282100_, float p_283101_) private voidscrollTo(int p_299591_) voidsetBordered(boolean p_94183_) voidsetCanLoseFocus(boolean p_94191_) voidsetCursorPosition(int p_94197_) voidsetEditable(boolean p_94187_) voidvoidsetFocused(boolean p_265520_) voidsetFormatter(BiFunction<String, Integer, FormattedCharSequence> p_94150_) voidsetHighlightPos(int p_94209_) voidvoidsetMaxLength(int p_94200_) voidsetResponder(Consumer<String> p_94152_) voidsetSuggestion(String p_94168_) voidsetTextColor(int p_94203_) voidsetTextColorUneditable(int p_94206_) voidvoidsetVisible(boolean p_94195_) voidupdateWidgetNarration(NarrationElementOutput p_259237_) Methods inherited from class net.minecraft.client.gui.components.AbstractWidgetclearFGColor, clicked, createTooltipPositioner, defaultButtonNarrationText, getFGColor, getHeight, getMessage, getRectangle, getTabOrderGroup, getTooltip, getWidth, getX, getY, isActive, isFocused, isHovered, isHoveredOrFocused, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, onDrag, onRelease, render, renderScrollingString, renderScrollingString, renderScrollingString, setAlpha, setFGColor, setHeight, setMessage, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessageMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListenergetCurrentFocusPath, keyReleased, mouseMoved, mouseScrolledMethods inherited from interface net.minecraft.client.gui.layouts.LayoutElementsetPositionMethods inherited from interface net.minecraft.client.gui.components.Renderablerender
- 
Field Details- 
SPRITES
- 
BACKWARDSpublic static final int BACKWARDS- See Also:
 
- 
FORWARDSpublic static final int FORWARDS- See Also:
 
- 
CURSOR_INSERT_WIDTHprivate static final int CURSOR_INSERT_WIDTH- See Also:
 
- 
CURSOR_INSERT_COLORprivate static final int CURSOR_INSERT_COLOR- See Also:
 
- 
CURSOR_APPEND_CHARACTER- See Also:
 
- 
DEFAULT_TEXT_COLORpublic static final int DEFAULT_TEXT_COLOR- See Also:
 
- 
CURSOR_BLINK_INTERVAL_MSprivate static final int CURSOR_BLINK_INTERVAL_MS- See Also:
 
- 
font
- 
value
- 
maxLengthprivate int maxLength
- 
borderedprivate boolean bordered
- 
canLoseFocusprivate boolean canLoseFocus
- 
isEditableprivate boolean isEditable
- 
displayPosprivate int displayPos
- 
cursorPosprivate int cursorPos
- 
highlightPosprivate int highlightPos
- 
textColorprivate int textColor
- 
textColorUneditableprivate int textColorUneditable
- 
suggestion
- 
responder
- 
filter
- 
formatter
- 
hint
- 
focusedTimeprivate long focusedTime
 
- 
- 
Constructor Details- 
EditBox
- 
EditBox
- 
EditBox
 
- 
- 
Method Details- 
setResponder
- 
setFormatter
- 
createNarrationMessage- Overrides:
- createNarrationMessagein class- AbstractWidget
 
- 
setValue
- 
getValue
- 
getHighlighted
- 
setFilter
- 
insertText
- 
onValueChange
- 
deleteTextprivate void deleteText(int p_94218_) 
- 
deleteWordspublic void deleteWords(int p_94177_) 
- 
deleteCharspublic void deleteChars(int p_94181_) 
- 
getWordPositionpublic int getWordPosition(int p_94185_) 
- 
getWordPositionprivate int getWordPosition(int p_94129_, int p_94130_) 
- 
getWordPositionprivate int getWordPosition(int p_94141_, int p_94142_, boolean p_94143_) 
- 
moveCursorpublic void moveCursor(int p_94189_, boolean p_297286_) 
- 
getCursorPosprivate int getCursorPos(int p_94221_) 
- 
moveCursorTopublic void moveCursorTo(int p_94193_, boolean p_300521_) 
- 
setCursorPositionpublic void setCursorPosition(int p_94197_) 
- 
moveCursorToStartpublic void moveCursorToStart(boolean p_299543_) 
- 
moveCursorToEndpublic void moveCursorToEnd(boolean p_297711_) 
- 
keyPressedpublic boolean keyPressed(int p_94132_, int p_94133_, int p_94134_) - Specified by:
- keyPressedin interface- GuiEventListener
 
- 
canConsumeInputpublic boolean canConsumeInput()
- 
charTypedpublic boolean charTyped(char p_94122_, int p_94123_) - Specified by:
- charTypedin interface- GuiEventListener
 
- 
onClickpublic void onClick(double p_279417_, double p_279437_) - Overrides:
- onClickin class- AbstractWidget
 
- 
playDownSound- Overrides:
- playDownSoundin class- AbstractWidget
 
- 
renderWidget- Specified by:
- renderWidgetin class- AbstractWidget
 
- 
renderHighlightprivate void renderHighlight(GuiGraphics p_281400_, int p_265338_, int p_265693_, int p_265618_, int p_265584_) 
- 
setMaxLengthpublic void setMaxLength(int p_94200_) 
- 
getMaxLengthprivate int getMaxLength()
- 
getCursorPositionpublic int getCursorPosition()
- 
isBorderedpublic boolean isBordered()
- 
setBorderedpublic void setBordered(boolean p_94183_) 
- 
setTextColorpublic void setTextColor(int p_94203_) 
- 
setTextColorUneditablepublic void setTextColorUneditable(int p_94206_) 
- 
isMouseOverpublic boolean isMouseOver(double p_94157_, double p_94158_) - Specified by:
- isMouseOverin interface- GuiEventListener
- Overrides:
- isMouseOverin class- AbstractWidget
 
- 
setFocusedpublic void setFocused(boolean p_265520_) - Specified by:
- setFocusedin interface- GuiEventListener
- Overrides:
- setFocusedin class- AbstractWidget
 
- 
isEditableprivate boolean isEditable()
- 
setEditablepublic void setEditable(boolean p_94187_) 
- 
getInnerWidthpublic int getInnerWidth()
- 
setHighlightPospublic void setHighlightPos(int p_94209_) 
- 
scrollToprivate void scrollTo(int p_299591_) 
- 
setCanLoseFocuspublic void setCanLoseFocus(boolean p_94191_) 
- 
isVisiblepublic boolean isVisible()
- 
setVisiblepublic void setVisible(boolean p_94195_) 
- 
setSuggestion
- 
getScreenXpublic int getScreenX(int p_94212_) 
- 
updateWidgetNarration- Specified by:
- updateWidgetNarrationin class- AbstractWidget
 
- 
setHint
 
-