Class StringWidget
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractStringWidget
net.minecraft.client.gui.components.StringWidget
- All Implemented Interfaces:
GuiEventListener, Renderable, TabOrderedElement, LayoutElement, NarratableEntry, NarrationSupplier
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class AbstractWidget
AbstractWidget.WithInactiveMessageNested classes/interfaces inherited from interface NarratableEntry
NarratableEntry.NarrationPriority -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate booleanprivate intprivate static final intprivate StringWidget.TextOverflowFields inherited from class AbstractWidget
active, alpha, height, isHovered, message, packedFGColor, UNSET_FG_COLOR, visible, width -
Constructor Summary
ConstructorsConstructorDescriptionStringWidget(int x, int y, int width, int height, Component message, Font font) StringWidget(int width, int height, Component message, Font font) StringWidget(Component message, Font font) -
Method Summary
Modifier and TypeMethodDescriptionstatic FormattedCharSequenceintgetWidth()setMaxWidth(int maxWidth) setMaxWidth(int maxWidth, StringWidget.TextOverflow textOverflow) voidsetMessage(Component message) voidvisitLines(ActiveTextCollector output) Methods inherited from class AbstractStringWidget
getFont, onClick, renderWidget, setComponentClickHandler, updateWidgetNarrationMethods inherited from class AbstractWidget
clearFGColor, createNarrationMessage, defaultButtonNarrationText, getAlpha, getBottom, getFGColor, getHeight, getMessage, getRectangle, getRight, getTabOrderGroup, getX, getY, handleCursor, isActive, isFocused, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, nextFocusPath, onDrag, onRelease, playButtonClickSound, playDownSound, render, renderScrollingStringOverContents, setAlpha, setFGColor, setFocused, setHeight, setRectangle, setSize, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessageMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GuiEventListener
charTyped, getBorderForArrowNavigation, getCurrentFocusPath, keyPressed, keyReleased, mouseMoved, mouseScrolled, shouldTakeFocusAfterInteractionMethods inherited from interface LayoutElement
setPositionMethods inherited from interface NarratableEntry
getNarratables
-
Field Details
-
TEXT_MARGIN
private static final int TEXT_MARGIN- See Also:
-
maxWidth
private int maxWidth -
cachedWidth
private int cachedWidth -
cachedWidthDirty
private boolean cachedWidthDirty -
textOverflow
-
-
Constructor Details
-
StringWidget
-
StringWidget
-
StringWidget
-
-
Method Details
-
setMessage
- Overrides:
setMessagein classAbstractStringWidget
-
setMaxWidth
-
setMaxWidth
-
getWidth
public int getWidth()- Specified by:
getWidthin interfaceLayoutElement- Overrides:
getWidthin classAbstractWidget
-
visitLines
- Specified by:
visitLinesin classAbstractStringWidget
-
clipText
-