java.lang.Object
javafx.scene.control.TextFormatter<String>
atlantafx.base.util.PasswordTextFormatter
An alternative to the
PasswordField class. This formatter masks
or unmasks text field content based on a boolean property.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static classNested classes/interfaces inherited from class javafx.scene.control.TextFormatter
javafx.scene.control.TextFormatter.Change -
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ReadOnlyStringPropertyAlways returns the unmasked password text regardless of therevealPasswordProperty()state.javafx.beans.property.BooleanPropertySpecifies whether the unmasked password text is revealed or not.Properties inherited from class javafx.scene.control.TextFormatter
value -
Field Summary
FieldsFields inherited from class javafx.scene.control.TextFormatter
IDENTITY_STRING_CONVERTER -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPasswordTextFormatter(javafx.util.StringConverter<String> valueConverter, UnaryOperator<javafx.scene.control.TextFormatter.Change> filter, javafx.scene.control.TextField field, char bullet) -
Method Summary
Modifier and TypeMethodDescriptionstatic PasswordTextFormattercreate(javafx.scene.control.TextField textField) Creates a new password text formatter with the default mask character and applies itself to the specified text field.static PasswordTextFormattercreate(javafx.scene.control.TextField field, char bullet) Creates a new password text formatter with the provided mask character and applies itself to the specified text field.SeepasswordProperty().booleanjavafx.beans.property.ReadOnlyStringPropertyAlways returns the unmasked password text regardless of therevealPasswordProperty()state.javafx.beans.property.BooleanPropertySpecifies whether the unmasked password text is revealed or not.voidsetRevealPassword(boolean reveal) Methods inherited from class javafx.scene.control.TextFormatter
getFilter, getValue, getValueConverter, setValue, valueProperty
-
Property Details
-
password
public javafx.beans.property.ReadOnlyStringProperty passwordPropertyAlways returns the unmasked password text regardless of therevealPasswordProperty()state.- See Also:
-
revealPassword
public javafx.beans.property.BooleanProperty revealPasswordPropertySpecifies whether the unmasked password text is revealed or not.- See Also:
-
-
Field Details
-
BULLET
public static final char BULLET- See Also:
-
-
Constructor Details
-
PasswordTextFormatter
protected PasswordTextFormatter(javafx.util.StringConverter<String> valueConverter, UnaryOperator<javafx.scene.control.TextFormatter.Change> filter, javafx.scene.control.TextField field, char bullet)
-
-
Method Details
-
passwordProperty
public javafx.beans.property.ReadOnlyStringProperty passwordProperty()Always returns the unmasked password text regardless of therevealPasswordProperty()state.- Returns:
- the
passwordproperty - See Also:
-
getPassword
SeepasswordProperty(). -
revealPasswordProperty
public javafx.beans.property.BooleanProperty revealPasswordProperty()Specifies whether the unmasked password text is revealed or not.- Returns:
- the
revealPasswordproperty - See Also:
-
getRevealPassword
public boolean getRevealPassword() -
setRevealPassword
public void setRevealPassword(boolean reveal) -
create
Creates a new password text formatter with the provided mask character and applies itself to the specified text field. -
create
Creates a new password text formatter with the default mask character and applies itself to the specified text field.
-