From 809ae591fbee21a976f1acb8eb306505c6a3ad4b Mon Sep 17 00:00:00 2001 From: Jurgen Date: Mon, 13 Jan 2020 14:19:05 +0200 Subject: [PATCH] StyledTextField alignmentProperty API fix --- .../src/main/java/org/fxmisc/richtext/StyledTextField.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/richtextfx/src/main/java/org/fxmisc/richtext/StyledTextField.java b/richtextfx/src/main/java/org/fxmisc/richtext/StyledTextField.java index ad4ad41c5..915eac2b7 100644 --- a/richtextfx/src/main/java/org/fxmisc/richtext/StyledTextField.java +++ b/richtextfx/src/main/java/org/fxmisc/richtext/StyledTextField.java @@ -49,7 +49,7 @@ public abstract class StyledTextField extends StyledTextArea private final static CssMetaData TEXT_ALIGNMENT = new CustomCssMetaData<>( "-fx-alignment", (StyleConverter) StyleConverter.getEnumConverter(TextAlignment.class), - TextAlignment.LEFT, s -> (StyleableObjectProperty) s.textAlignmentProperty() + TextAlignment.LEFT, s -> (StyleableObjectProperty) s.alignmentProperty() ); private final static Pattern VERTICAL_WHITESPACE = Pattern.compile( "\\v+" ); private final static String STYLE_SHEET; @@ -159,7 +159,7 @@ else if ( target.isVisible() && ! target.isDisabled() && target.isFocusTraversab * Specifies how the text should be aligned when there is empty space within the TextField. * To configure via CSS use {@code -fx-alignment:} and values from {@link javafx.scene.text.TextAlignment}. */ - public final ObjectProperty textAlignmentProperty() { + public final ObjectProperty alignmentProperty() { if (textAlignment == null) { textAlignment = new CustomStyleableProperty<>( TextAlignment.LEFT, "textAlignment", this, TEXT_ALIGNMENT ); textAlignment.addListener( (ob,ov,alignment) -> changeAlignment( alignment ) ); @@ -167,7 +167,7 @@ public final ObjectProperty textAlignmentProperty() { return textAlignment; } public final TextAlignment getAlignment() { return textAlignment == null ? TextAlignment.LEFT : textAlignment.getValue(); } - public final void setAlignment( TextAlignment value ) { textAlignmentProperty().setValue( value ); } + public final void setAlignment( TextAlignment value ) { alignmentProperty().setValue( value ); } protected abstract void changeAlignment( TextAlignment txtAlign ); /**