password.adoc 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. = password
  2. :author:
  3. :revnumber:
  4. :revdate: 2016/03/17 20:48
  5. :relfileprefix: ../../../
  6. :imagesdir: ../../..
  7. ifdef::env-github,env-browser[:outfilesuffix: .adoc]
  8. == Password Class
  9. The password class extends TextField and adds the ability to set a mask character.
  10. It uses the standard 3 constructors as shown in the <<jme3/contributions/tonegodgui/quickstart#,Quick Start Guide>>.
  11. *Constructor 1:*
  12. [source,java]
  13. ----
  14. /** Parameters:
  15. * Screen screen,
  16. * String UID,
  17. * Vector2f position
  18. */
  19. Password pw = new Password(screen, “password”, new Vector2f(15, 15));
  20. ----
  21. *Constructor 2:*
  22. [source,java]
  23. ----
  24. /** Additional Parameter:
  25. * Vector2f dimensions */
  26. Password pw = new Password(screen, “password”, new Vector2f(15, 15),
  27. new Vector2f(150, 25)
  28. );
  29. ----
  30. *Constructor 3:*
  31. [source,java]
  32. ----
  33. /** Additional Parameters:
  34. * Vector4f resizeBorders,
  35. * String defaultImg
  36. */
  37. Password pw = new Password(screen, “password”, new Vector2f(15, 15), new Vector2f(150, 25),
  38. new Vector4f(3,3,3,3),
  39. “tonegod/gui/style/def/TextField/text_field_x.png”
  40. );
  41. ----
  42. === Password specific methods:
  43. [source,java]
  44. ----
  45. pw.setMask(char mask);
  46. pw.getMask(); // Returns mask character as a String
  47. ----