Package net.runelite.client.game.chatbox
Class ChatboxTextInput
- java.lang.Object
-
- net.runelite.client.game.chatbox.ChatboxInput
-
- net.runelite.client.game.chatbox.ChatboxTextInput
-
- All Implemented Interfaces:
KeyListener
,EventListener
,KeyListener
,MouseListener
- Direct Known Subclasses:
ChatboxItemSearch
,WikiSearchChatboxTextInput
public class ChatboxTextInput extends ChatboxInput implements KeyListener, MouseListener
-
-
Field Summary
Fields Modifier and Type Field Description protected ClientThread
clientThread
-
Constructor Summary
Constructors Modifier Constructor Description protected
ChatboxTextInput(ChatboxPanelManager chatboxPanelManager, ClientThread clientThread)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.runelite.client.input.KeyListener
focusLost, isEnabledOnLoginScreen
-
-
-
-
Field Detail
-
clientThread
protected final ClientThread clientThread
-
-
Constructor Detail
-
ChatboxTextInput
@Inject protected ChatboxTextInput(ChatboxPanelManager chatboxPanelManager, ClientThread clientThread)
-
-
Method Detail
-
addCharValidator
public ChatboxTextInput addCharValidator(IntPredicate validator)
-
lines
public ChatboxTextInput lines(int lines)
-
prompt
public ChatboxTextInput prompt(String prompt)
-
value
public ChatboxTextInput value(String value)
-
cursorAt
public ChatboxTextInput cursorAt(int index)
-
cursorAt
public ChatboxTextInput cursorAt(int indexA, int indexB)
-
getValue
public String getValue()
-
charValidator
public ChatboxTextInput charValidator(IntPredicate val)
-
onClose
public ChatboxTextInput onClose(Runnable onClose)
-
onDone
public ChatboxTextInput onDone(Consumer<String> onDone)
-
onDone
public ChatboxTextInput onDone(Predicate<String> onDone)
Called when the user attempts to close the input by pressing enter Return false to cancel the close
-
onChanged
public ChatboxTextInput onChanged(Consumer<String> onChanged)
-
fontID
public ChatboxTextInput fontID(int fontID)
-
update
protected void update()
-
buildEdit
protected void buildEdit(int x, int y, int w, int h)
-
open
protected void open()
- Overrides:
open
in classChatboxInput
-
close
protected void close()
- Overrides:
close
in classChatboxInput
-
build
public ChatboxTextInput build()
-
keyTyped
public void keyTyped(KeyEvent e)
- Specified by:
keyTyped
in interfaceKeyListener
-
keyPressed
public void keyPressed(KeyEvent ev)
- Specified by:
keyPressed
in interfaceKeyListener
-
keyReleased
public void keyReleased(KeyEvent e)
- Specified by:
keyReleased
in interfaceKeyListener
-
mouseClicked
public MouseEvent mouseClicked(MouseEvent mouseEvent)
- Specified by:
mouseClicked
in interfaceMouseListener
-
mousePressed
public MouseEvent mousePressed(MouseEvent mouseEvent)
- Specified by:
mousePressed
in interfaceMouseListener
-
mouseReleased
public MouseEvent mouseReleased(MouseEvent mouseEvent)
- Specified by:
mouseReleased
in interfaceMouseListener
-
mouseEntered
public MouseEvent mouseEntered(MouseEvent mouseEvent)
- Specified by:
mouseEntered
in interfaceMouseListener
-
mouseExited
public MouseEvent mouseExited(MouseEvent mouseEvent)
- Specified by:
mouseExited
in interfaceMouseListener
-
mouseDragged
public MouseEvent mouseDragged(MouseEvent mouseEvent)
- Specified by:
mouseDragged
in interfaceMouseListener
-
mouseMoved
public MouseEvent mouseMoved(MouseEvent mouseEvent)
- Specified by:
mouseMoved
in interfaceMouseListener
-
getPrompt
public String getPrompt()
-
getLines
public int getLines()
-
getCursorStart
public int getCursorStart()
-
getCursorEnd
public int getCursorEnd()
-
getCharValidator
public IntPredicate getCharValidator()
-
getOnClose
public Runnable getOnClose()
-
getFontID
public int getFontID()
-
isBuilt
public boolean isBuilt()
-
-