Class TextraField.TextFieldClickListener

java.lang.Object
com.badlogic.gdx.scenes.scene2d.InputListener
com.badlogic.gdx.scenes.scene2d.utils.ClickListener
com.github.tommyettinger.textra.TextraField.TextFieldClickListener
All Implemented Interfaces:
com.badlogic.gdx.scenes.scene2d.EventListener
Enclosing class:
TextraField

public class TextraField.TextFieldClickListener extends com.badlogic.gdx.scenes.scene2d.utils.ClickListener
Basic input listener for the text field
  • Field Summary

    Fields inherited from class com.badlogic.gdx.scenes.scene2d.utils.ClickListener

    visualPressedDuration
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    checkFocusTraversal(char character)
    Checks if focus traversal should be triggered.
    void
    clicked(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y)
     
    protected void
    goEnd(boolean jump)
     
    protected void
    goHome(boolean jump)
     
    boolean
    keyDown(com.badlogic.gdx.scenes.scene2d.InputEvent event, int keycode)
     
    boolean
    keyTyped(com.badlogic.gdx.scenes.scene2d.InputEvent event, char character)
     
    boolean
    keyUp(com.badlogic.gdx.scenes.scene2d.InputEvent event, int keycode)
     
    protected void
    scheduleKeyRepeatTask(int keycode)
     
    protected void
    setCursorPosition(float x, float y)
     
    boolean
    touchDown(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer, int button)
     
    void
    touchDragged(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer)
     
    void
    touchUp(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer, int button)
     

    Methods inherited from class com.badlogic.gdx.scenes.scene2d.utils.ClickListener

    cancel, enter, exit, getButton, getPressedButton, getPressedPointer, getTapCount, getTapSquareSize, getTouchDownX, getTouchDownY, inTapSquare, inTapSquare, invalidateTapSquare, isOver, isOver, isPressed, isVisualPressed, setButton, setTapCount, setTapCountInterval, setTapSquareSize, setVisualPressed

    Methods inherited from class com.badlogic.gdx.scenes.scene2d.InputListener

    handle, mouseMoved, scrolled

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TextFieldClickListener

      public TextFieldClickListener()
  • Method Details

    • clicked

      public void clicked(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y)
      Overrides:
      clicked in class com.badlogic.gdx.scenes.scene2d.utils.ClickListener
    • touchDown

      public boolean touchDown(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer, int button)
      Overrides:
      touchDown in class com.badlogic.gdx.scenes.scene2d.utils.ClickListener
    • touchDragged

      public void touchDragged(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer)
      Overrides:
      touchDragged in class com.badlogic.gdx.scenes.scene2d.utils.ClickListener
    • touchUp

      public void touchUp(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer, int button)
      Overrides:
      touchUp in class com.badlogic.gdx.scenes.scene2d.utils.ClickListener
    • setCursorPosition

      protected void setCursorPosition(float x, float y)
    • goHome

      protected void goHome(boolean jump)
    • goEnd

      protected void goEnd(boolean jump)
    • keyDown

      public boolean keyDown(com.badlogic.gdx.scenes.scene2d.InputEvent event, int keycode)
      Overrides:
      keyDown in class com.badlogic.gdx.scenes.scene2d.InputListener
    • scheduleKeyRepeatTask

      protected void scheduleKeyRepeatTask(int keycode)
    • keyUp

      public boolean keyUp(com.badlogic.gdx.scenes.scene2d.InputEvent event, int keycode)
      Overrides:
      keyUp in class com.badlogic.gdx.scenes.scene2d.InputListener
    • checkFocusTraversal

      protected boolean checkFocusTraversal(char character)
      Checks if focus traversal should be triggered. The default implementation uses TextraField.focusTraversal and the typed character, depending on the OS.
      Parameters:
      character - The character that triggered a possible focus traversal.
      Returns:
      true if the focus should change to the next input field.
    • keyTyped

      public boolean keyTyped(com.badlogic.gdx.scenes.scene2d.InputEvent event, char character)
      Overrides:
      keyTyped in class com.badlogic.gdx.scenes.scene2d.InputListener