Package net.minecraft.client.gui.font
Class TextFieldHelper
java.lang.Object
net.minecraft.client.gui.font.TextFieldHelper
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancharTyped(CharacterEvent pEvent) private intclampToMsgLength(int pTextIndex) voidcopy()createClipboardGetter(Minecraft pMinecraft) createClipboardSetter(Minecraft pMinecraft) voidcut()private StringdeleteSelection(String pText) static StringgetClipboardContents(Minecraft pMinecraft) intprivate StringgetSelected(String pText) intvoidinsertText(String pText) private voidinsertText(String pText, String pClipboardText) booleanbooleankeyPressed(KeyEvent pEvent) voidmoveBy(int pDirection, boolean pKeepSelection, TextFieldHelper.CursorStep pCursorStep) voidmoveByChars(int pDirection) voidmoveByChars(int pDirection, boolean pKeepSelection) voidmoveByWords(int pDirection) voidmoveByWords(int pDirection, boolean pKeepSelection) voidpaste()voidremoveCharsFromCursor(int pDirection) voidremoveFromCursor(int pDirection, TextFieldHelper.CursorStep pStep) voidremoveWordsFromCursor(int pDirection) private voidresetSelectionIfNeeded(boolean pKeepSelection) voidstatic voidsetClipboardContents(Minecraft pMinecraft, String pText) voidsetCursorPos(int pTextIndex) voidsetCursorPos(int pTextIndex, boolean pKeepSelection) voidvoidsetCursorToEnd(boolean pKeepSelection) voidvoidsetCursorToStart(boolean pKeepSelection) voidsetSelectionPos(int pTextIndex) voidsetSelectionRange(int pSelectionStart, int pSelectionEnd)
-
Field Details
-
getMessageFn
-
setMessageFn
-
getClipboardFn
-
setClipboardFn
-
stringValidator
-
cursorPos
private int cursorPos -
selectionPos
private int selectionPos
-
-
Constructor Details
-
TextFieldHelper
-
-
Method Details
-
createClipboardGetter
-
getClipboardContents
-
createClipboardSetter
-
setClipboardContents
-
charTyped
-
keyPressed
-
clampToMsgLength
private int clampToMsgLength(int pTextIndex) -
insertText
-
insertText
-
resetSelectionIfNeeded
private void resetSelectionIfNeeded(boolean pKeepSelection) -
moveBy
-
moveByChars
public void moveByChars(int pDirection) -
moveByChars
public void moveByChars(int pDirection, boolean pKeepSelection) -
moveByWords
public void moveByWords(int pDirection) -
moveByWords
public void moveByWords(int pDirection, boolean pKeepSelection) -
removeFromCursor
-
removeWordsFromCursor
public void removeWordsFromCursor(int pDirection) -
removeCharsFromCursor
public void removeCharsFromCursor(int pDirection) -
cut
public void cut() -
paste
public void paste() -
copy
public void copy() -
selectAll
public void selectAll() -
getSelected
-
deleteSelection
-
setCursorToStart
public void setCursorToStart() -
setCursorToStart
public void setCursorToStart(boolean pKeepSelection) -
setCursorToEnd
public void setCursorToEnd() -
setCursorToEnd
public void setCursorToEnd(boolean pKeepSelection) -
getCursorPos
public int getCursorPos() -
setCursorPos
public void setCursorPos(int pTextIndex) -
setCursorPos
public void setCursorPos(int pTextIndex, boolean pKeepSelection) -
getSelectionPos
public int getSelectionPos() -
setSelectionPos
public void setSelectionPos(int pTextIndex) -
setSelectionRange
public void setSelectionRange(int pSelectionStart, int pSelectionEnd) -
isSelecting
public boolean isSelecting()
-