Class MultilineTextField
java.lang.Object
net.minecraft.client.gui.components.MultilineTextField
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate intprivate Runnableprivate final List<MultilineTextField.StringView> private final Fontprivate static final intstatic final intprivate intprivate booleanprivate Stringprivate final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintcursor()voiddeleteText(int length) private MultilineTextField.StringViewprivate MultilineTextField.StringViewgetCursorLineView(int offset) intintgetLineView(int lineNumber) private intgetWordEndPosition(int cursor) booleanbooleanvoidinsertText(String text) booleankeyPressed(int keyCode) private voidprivate voidvoidseekCursor(Whence whence, int position) voidseekCursorLine(int offset) voidseekCursorToPoint(double x, double y) voidsetCharacterLimit(int characterLimit) voidsetCursorListener(Runnable cursorListener) voidsetSelecting(boolean selecting) voidvoidsetValueListener(Consumer<String> valueListener) private StringtruncateFullText(String fullText) private StringtruncateInsertionText(String text) value()
-
Field Details
-
NO_CHARACTER_LIMIT
public static final int NO_CHARACTER_LIMIT- See Also:
-
LINE_SEEK_PIXEL_BIAS
private static final int LINE_SEEK_PIXEL_BIAS- See Also:
-
font
-
displayLines
-
value
-
cursor
private int cursor -
selectCursor
private int selectCursor -
selecting
private boolean selecting -
characterLimit
private int characterLimit -
width
private final int width -
valueListener
-
cursorListener
-
-
Constructor Details
-
MultilineTextField
-
-
Method Details
-
characterLimit
public int characterLimit() -
setCharacterLimit
public void setCharacterLimit(int characterLimit) -
hasCharacterLimit
public boolean hasCharacterLimit() -
setValueListener
-
setCursorListener
-
setValue
-
value
-
insertText
-
deleteText
public void deleteText(int length) -
cursor
public int cursor() -
setSelecting
public void setSelecting(boolean selecting) -
getSelected
-
getLineCount
public int getLineCount() -
getLineAtCursor
public int getLineAtCursor() -
getLineView
-
seekCursor
-
seekCursorLine
public void seekCursorLine(int offset) -
seekCursorToPoint
public void seekCursorToPoint(double x, double y) -
keyPressed
public boolean keyPressed(int keyCode) -
iterateLines
-
hasSelection
public boolean hasSelection() -
getSelectedText
-
getCursorLineView
-
getCursorLineView
-
getPreviousWord
-
getNextWord
-
getWordEndPosition
private int getWordEndPosition(int cursor) -
onValueChange
private void onValueChange() -
reflowDisplayLines
private void reflowDisplayLines() -
truncateFullText
-
truncateInsertionText
-