Class UITextField

All Implemented Interfaces:
UIKeyHandler, Textable, Hintable, Savable
Direct Known Subclasses:
UIPasswordField

public class UITextField extends AbstractUITextEntryComponent
  • Field Details

    • _caretLoc

      protected final Vector2 _caretLoc
  • Constructor Details

    • UITextField

      public UITextField()
  • Method Details

    • setCaretPosition

      public int setCaretPosition(int index)
      Description copied from class: AbstractUITextEntryComponent
      Set the position of the text caret as an index to the current set text string. If the specified position is after the last possible index, it is set to the last possible index.
      Overrides:
      setCaretPosition in class AbstractUITextEntryComponent
      Parameters:
      index - the new position
      Returns:
      the new caret position
    • deleteSelectedText

      public void deleteSelectedText()
      Delete any currently selected text.
    • getKeyHandler

      protected UIKeyHandler getKeyHandler()
      Specified by:
      getKeyHandler in class AbstractUITextEntryComponent
    • setKeyHandler

      public void setKeyHandler(UIKeyHandler handler)
    • addActionListener

      public void addActionListener(ActionListener listener)
      Add the specified listener to this button's list of listeners notified when pressed.
      Parameters:
      listener - the listener
    • removeActionListener

      public boolean removeActionListener(ActionListener listener)
      Remove the given listener from the notification list.
      Parameters:
      listener - the listener
      Returns:
      true if the listener has been effectively removed
    • removeAllListeners

      public void removeAllListeners()
      Removes all of this field's listeners from notification list.
    • fireActionEvent

      public void fireActionEvent()
      Notifies all of this field's registered listeners
    • updateGeometricState

      public void updateGeometricState(double time, boolean initiator)
      Description copied from class: Spatial
      updateGeometricState updates all the geometry information for the node.
      Overrides:
      updateGeometricState in class Spatial
      Parameters:
      time - The time in seconds between the last two consecutive frames (time per frame). See ReadOnlyTimer.getTimePerFrame()
      initiator - true if this node started the update process.
    • drawComponent

      protected void drawComponent(Renderer r)
      Description copied from class: UIComponent
      Draw this component's contents using the given renderer.
      Overrides:
      drawComponent in class UIComponent
      Parameters:
      r - the renderer