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.-
Property Summary
TypePropertyDescriptionjavafx.beans.property.ReadOnlyStringProperty
Always returns the unmasked password text regardless of therevealPasswordProperty()
state.javafx.beans.property.BooleanProperty
Specifies whether the unmasked password text is revealed or not.Properties inherited from class javafx.scene.control.TextFormatter
value
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
protected static class
Nested classes/interfaces inherited from class javafx.scene.control.TextFormatter
javafx.scene.control.TextFormatter.Change
-
Field Summary
Fields inherited from class javafx.scene.control.TextFormatter
IDENTITY_STRING_CONVERTER
-
Constructor Summary
ModifierConstructorDescriptionprotected
PasswordTextFormatter
(javafx.util.StringConverter<String> valueConverter, UnaryOperator<javafx.scene.control.TextFormatter.Change> filter, javafx.scene.control.TextField field, char bullet) -
Method Summary
Modifier and TypeMethodDescriptionstatic PasswordTextFormatter
create
(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 PasswordTextFormatter
create
(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()
.boolean
javafx.beans.property.ReadOnlyStringProperty
Always returns the unmasked password text regardless of therevealPasswordProperty()
state.javafx.beans.property.BooleanProperty
Specifies whether the unmasked password text is revealed or not.void
setRevealPassword
(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.
-
-
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.- See Also:
-
getPassword
SeepasswordProperty()
. -
revealPasswordProperty
public javafx.beans.property.BooleanProperty revealPasswordProperty()Specifies whether the unmasked password text is revealed or not. -
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.
-