/** * Returns the password strength checker for the specified password field. * * @param jpf * Password field. * @return Password strength checker for the specified password field. The * result can be <code>null</code>. */ public static PasswordStrengthChecker getPasswordStrengthChecker( JPasswordField jpf) { Object obj = jpf.getClientProperty(LafWidget.PASSWORD_STRENGTH_CHECKER); if ((obj != null) && (obj instanceof PasswordStrengthChecker)) return (PasswordStrengthChecker) obj; return null; } }
/** * Returns the number of echo characters per each password chanaracter. * * @param jpf * Password field. * @return The number of echo characters per each password chanaracter. * @see SubstanceLookAndFeel#PASSWORD_ECHO_PER_CHAR */ public static int getEchoPerChar(JPasswordField jpf) { Object obj = jpf .getClientProperty(SubstanceLookAndFeel.PASSWORD_ECHO_PER_CHAR); if ((obj != null) && (obj instanceof Integer)) { int result = (Integer) obj; if (result >= 1) return result; } obj = UIManager.get(SubstanceLookAndFeel.PASSWORD_ECHO_PER_CHAR); if ((obj != null) && (obj instanceof Integer)) { int result = (Integer) obj; if (result >= 1) return result; } return 1; }
/** * Returns the number of echo characters per each password chanaracter. * * @param jpf * Password field. * @return The number of echo characters per each password chanaracter. * @see SubstanceLookAndFeel#PASSWORD_ECHO_PER_CHAR */ public static int getEchoPerChar(JPasswordField jpf) { Object obj = jpf .getClientProperty(SubstanceLookAndFeel.PASSWORD_ECHO_PER_CHAR); if ((obj != null) && (obj instanceof Integer)) { int result = (Integer) obj; if (result >= 1) return result; } obj = UIManager.get(SubstanceLookAndFeel.PASSWORD_ECHO_PER_CHAR); if ((obj != null) && (obj instanceof Integer)) { int result = (Integer) obj; if (result >= 1) return result; } return 1; }
Object invalid = c.getClientProperty("Invalid"); return Boolean.TRUE.equals(invalid);
@Override public void installDefaults() { super.installDefaults(); // check if the property is already set - can happen on LAF change Object checker = this.jcomp .getClientProperty(LafWidget.PASSWORD_STRENGTH_CHECKER); if ((checker != null) && (checker instanceof PasswordStrengthChecker)) { this.jcomp.setBorder(new BorderUIResource.CompoundBorderUIResource( this.jcomp.getBorder(), new StrengthCheckedBorder())); } }
JLabel lbl = (JLabel) passwordField.getClientProperty("labeledBy"); if (lbl != null) { lbl.setText(UIManagerExt.getString(CLASS_NAME + ".passwordString", getLocale()));
JLabel lbl = (JLabel) passwordField.getClientProperty("labeledBy"); if (lbl != null) { lbl.setText(UIManagerExt.getString(CLASS_NAME + ".passwordString", getLocale()));
JLabel lbl = (JLabel) passwordField.getClientProperty("labeledBy"); if (lbl != null) { lbl.setText(UIManagerExt.getString(CLASS_NAME + ".passwordString", getLocale()));
JLabel lbl = (JLabel) passwordField.getClientProperty("labeledBy"); if (lbl != null) { lbl.setText(UIManagerExt.getString(CLASS_NAME + ".passwordString", getLocale()));
JLabel lbl = (JLabel) passwordField.getClientProperty("labeledBy"); if (lbl != null) { lbl.setText(UIManagerExt.getString(CLASS_NAME + ".passwordString", getLocale()));