Package arc.scene.ui
Class TextField.TextFieldClickListener
java.lang.Object
arc.scene.event.InputListener
arc.scene.event.ClickListener
arc.scene.ui.TextField.TextFieldClickListener
- All Implemented Interfaces:
EventListener
- Direct Known Subclasses:
TextArea.TextAreaListener
- Enclosing class:
- TextField
Basic input listener for the text field
-
Field Summary
Fields inherited from class arc.scene.event.ClickListener
button, cancelled, clicked, lastTapTime, over, overAny, pressed, pressedButton, pressedPointer, stop, tapCount, tapCountInterval, tapSquareSize, touchDownX, touchDownY, visualPressedDuration, visualPressedTime
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
checkFocusTraverse
(char character) void
clicked
(InputEvent event, float x, float y) protected void
goEnd
(boolean jump) protected void
goHome
(boolean jump) boolean
keyDown
(InputEvent event, KeyCode keycode) Called when a key goes down.boolean
keyTyped
(InputEvent event, char character) Called when a key is typed.boolean
keyUp
(InputEvent event, KeyCode keycode) Called when a key goes up.protected void
scheduleKeyRepeatTask
(KeyCode keycode) protected void
setCursorPosition
(float x, float y) boolean
touchDown
(InputEvent event, float x, float y, int pointer, KeyCode button) Called when a mouse button or a finger touch goes down on the element.void
touchDragged
(InputEvent event, float x, float y, int pointer) Called when a mouse button or a finger touch is moved anywhere, but only if touchDown previously returned true for the mouse button or touch.void
touchUp
(InputEvent event, float x, float y, int pointer, KeyCode button) Called when a mouse button or a finger touch goes up anywhere, but only if touchDown previously returned true for the mouse button or touch.Methods inherited from class arc.scene.event.ClickListener
cancel, enter, exit, getButton, getPressedButton, getPressedPointer, getTapCount, getTapSquareSize, getTouchDownX, getTouchDownY, inTapSquare, inTapSquare, invalidateTapSquare, isOver, isOver, isPressed, isVisualPressed, setButton, setTapCount, setTapCountInterval, setTapSquareSize
Methods inherited from class arc.scene.event.InputListener
handle, mouseMoved, scrolled
-
Constructor Details
-
TextFieldClickListener
public TextFieldClickListener()
-
-
Method Details
-
clicked
- Overrides:
clicked
in classClickListener
-
touchDown
Description copied from class:InputListener
Called when a mouse button or a finger touch goes down on the element. If true is returned, this listener will receive all touchDragged and touchUp events, even those not over this element, until touchUp is received. Also when true is returned, the event ishandled
.- Overrides:
touchDown
in classClickListener
- See Also:
-
touchDragged
Description copied from class:InputListener
Called when a mouse button or a finger touch is moved anywhere, but only if touchDown previously returned true for the mouse button or touch. The touchDragged event is alwayshandled
.- Overrides:
touchDragged
in classClickListener
- See Also:
-
touchUp
Description copied from class:InputListener
Called when a mouse button or a finger touch goes up anywhere, but only if touchDown previously returned true for the mouse button or touch. The touchUp event is alwayshandled
.- Overrides:
touchUp
in classClickListener
- See Also:
-
setCursorPosition
protected void setCursorPosition(float x, float y) -
goHome
protected void goHome(boolean jump) -
goEnd
protected void goEnd(boolean jump) -
keyDown
Description copied from class:InputListener
Called when a key goes down. When true is returned, the event ishandled
.- Overrides:
keyDown
in classInputListener
-
scheduleKeyRepeatTask
-
keyUp
Description copied from class:InputListener
Called when a key goes up. When true is returned, the event ishandled
.- Overrides:
keyUp
in classInputListener
-
checkFocusTraverse
protected boolean checkFocusTraverse(char character) -
keyTyped
Description copied from class:InputListener
Called when a key is typed. When true is returned, the event ishandled
.- Overrides:
keyTyped
in classInputListener
-