Class PasswordInput

All Implemented Interfaces:
TextComponent, Serializable

public class PasswordInput extends TextInput
This component used to enter passwords securely by users.
See Also:
  • Constructor Details

    • PasswordInput

      public PasswordInput()
      Default constructor. Used to create component instance without any parameters.

      Also if you want to make it easy to use with Json marshaller/unmarshaller component should contain empty constructor.

    • PasswordInput

      public PasswordInput(float x, float y, float width, float height)
      Constructor with position and size parameters.
      Parameters:
      x - x position position in parent component.
      y - y position position in parent component.
      width - width of component.
      height - height of component.
    • PasswordInput

      public PasswordInput(org.joml.Vector2f position, org.joml.Vector2f size)
      Constructor with position and size parameters.
      Parameters:
      position - position position in parent component.
      size - size of component.
    • PasswordInput

      public PasswordInput(String text)
      Default constructor with text to set.

      Also if you want to make it easy to use with Json marshaller/unmarshaller component should contain empty constructor.

      Parameters:
      text - text to set.
    • PasswordInput

      public PasswordInput(String text, float x, float y, float width, float height)
      Constructor with text, position and size parameters.
      Parameters:
      text - text to set.
      x - x position position in parent component.
      y - y position position in parent component.
      width - width of component.
      height - height of component.
    • PasswordInput

      public PasswordInput(String text, org.joml.Vector2f position, org.joml.Vector2f size)
      Constructor with text, position and size parameters.
      Parameters:
      text - text to set.
      position - position position in parent component.
      size - size of component.
  • Method Details

    • getMaskCharacter

      public int getMaskCharacter()
      Returns mask character.
      Returns:
      mask character.
    • setMaskCharacter

      public void setMaskCharacter(int maskCharacter)
      Used to set mask character.
      Parameters:
      maskCharacter - mask character to set.
    • isMasked

      public boolean isMasked()
      Returns true if masking enabled.
      Returns:
      true if masking enabled.
    • setMasked

      public void setMasked(boolean masked)
      Used to enable or disable masking.
      Parameters:
      masked - true if need to mask text.
    • toString

      public String toString()
      Overrides:
      toString in class TextInput
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class TextInput
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class TextInput
    • setTextState

      public void setTextState(TextState textState)
      Description copied from interface: TextComponent
      Used to set text state
      Specified by:
      setTextState in interface TextComponent
      Overrides:
      setTextState in class AbstractTextComponent
      Parameters:
      textState - new text state to set.