Skip to content

Commit c60e07d

Browse files
authored
StyledTextField alignmentProperty API fix (#897)
1 parent 705eca4 commit c60e07d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

richtextfx/src/main/java/org/fxmisc/richtext/StyledTextField.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public abstract class StyledTextField<PS, S> extends StyledTextArea<PS, S>
4949

5050
private final static CssMetaData<StyledTextField,TextAlignment> TEXT_ALIGNMENT = new CustomCssMetaData<>(
5151
"-fx-alignment", (StyleConverter<?,TextAlignment>) StyleConverter.getEnumConverter(TextAlignment.class),
52-
TextAlignment.LEFT, s -> (StyleableObjectProperty) s.textAlignmentProperty()
52+
TextAlignment.LEFT, s -> (StyleableObjectProperty) s.alignmentProperty()
5353
);
5454
private final static Pattern VERTICAL_WHITESPACE = Pattern.compile( "\\v+" );
5555
private final static String STYLE_SHEET;
@@ -159,15 +159,15 @@ else if ( target.isVisible() && ! target.isDisabled() && target.isFocusTraversab
159159
* Specifies how the text should be aligned when there is empty space within the TextField.
160160
* To configure via CSS use {@code -fx-alignment:} and values from {@link javafx.scene.text.TextAlignment}.
161161
*/
162-
public final ObjectProperty<TextAlignment> textAlignmentProperty() {
162+
public final ObjectProperty<TextAlignment> alignmentProperty() {
163163
if (textAlignment == null) {
164164
textAlignment = new CustomStyleableProperty<>( TextAlignment.LEFT, "textAlignment", this, TEXT_ALIGNMENT );
165165
textAlignment.addListener( (ob,ov,alignment) -> changeAlignment( alignment ) );
166166
}
167167
return textAlignment;
168168
}
169169
public final TextAlignment getAlignment() { return textAlignment == null ? TextAlignment.LEFT : textAlignment.getValue(); }
170-
public final void setAlignment( TextAlignment value ) { textAlignmentProperty().setValue( value ); }
170+
public final void setAlignment( TextAlignment value ) { alignmentProperty().setValue( value ); }
171171
protected abstract void changeAlignment( TextAlignment txtAlign );
172172

173173
/**

0 commit comments

Comments
 (0)