Class TextField

  • All Implemented Interfaces:
    Drawable, Updatable

    public class TextField
    extends Widget
    Simple text field widget with graphics and interaction entirely managed by the renderer, not using the native widget. Actually entering text is not handled by this class. Instead, it will show a dialog window so that the user can enter text using the platform's native text field.
    • Constructor Detail

      • TextField

        public TextField​(WidgetStyle style,
                         java.lang.String label,
                         java.lang.String initialValue)
      • TextField

        public TextField​(WidgetStyle style,
                         java.lang.String label)
    • Method Detail

      • setChangeHandler

        public void setChangeHandler​(InputDevice input,
                                     java.util.function.Consumer<java.lang.String> onChange)
      • update

        public void update​(float deltaTime)
        Description copied from interface: Updatable
        Updates this object for the current frame.
        Parameters:
        deltaTime - Elapsed time since the last frame, in seconds.
      • getValue

        public java.lang.String getValue()