Interface NativeTextField

All Superinterfaces:
NativeOverlay

public interface NativeTextField extends NativeOverlay
Provides access to a platform-native text field, which can be overlaid onto a PlayN game. A TP Field is required for integration. See TPPlatform.createNativeTextField(tripleplay.ui.Field.Native).
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Request focus for the native text field
    boolean
    insert(String text)
    Inserts the given text at the current caret position, or if there is a selected region, replaces the region with the given text.
    void
    setEnabled(boolean enabled)
    Sets the enabled state of the field.

    Methods inherited from interface tripleplay.platform.NativeOverlay

    add, remove, setBounds
  • Method Details

    • setEnabled

      void setEnabled(boolean enabled)
      Sets the enabled state of the field.
    • focus

      void focus()
      Request focus for the native text field
    • insert

      boolean insert(String text)
      Inserts the given text at the current caret position, or if there is a selected region, replaces the region with the given text.
      Returns:
      true if the operation was successful