java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.inductiveautomation.factorypmi.application.components.PasswordEditor
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class PasswordEditor extends JPanel
A panel that allows for editing of a password in the following way:

  • In "add" mode, you get two password fields that must match.
  • In "edit" mode, you get a link to start editing the password, after that it's like add mode.
  • You can listen for property changes of the property name "password". Changes only fire when the password is valid.
  • By default "valid" means non empty and matching. You can override this if you want by overriding isPasswordValid
See Also:
  • Field Details

  • Constructor Details

    • PasswordEditor

      public PasswordEditor(boolean expand)
  • Method Details

    • setText

      public void setText(String txt)
    • setTouchscreenMode

      public void setTouchscreenMode(int touchscreenMode)
    • setForeground

      public void setForeground(Color color)
      Overrides:
      setForeground in class JComponent
    • setEnabled

      public void setEnabled(boolean enabled)
      Overrides:
      setEnabled in class JComponent
    • setExpanded

      public void setExpanded(boolean expanded)
    • isExpanded

      public boolean isExpanded()
      Whether or not this password editor is expanded for editing
    • isPasswordValid

      public boolean isPasswordValid()
      Returns true if the the password is non-empty and both passwords match
    • getPassword

      public String getPassword()
    • setPassword

      public void setPassword(String password)