Skip to content

Commit 17bdba2

Browse files
committed
Updated placeholder docs
Updated placeholder docs ref
1 parent cd55c59 commit 17bdba2

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,10 +392,11 @@ public Node getParagraphGraphic( int parNdx ) {
392392

393393
/**
394394
* This Node is shown to the user, centered over the area, when the area has no text content.
395+
* <br>To customize the placeholder's layout override {@link #configurePlaceholder( Node )}
395396
*/
397+
public final void setPlaceholder(Node value) { placeHolderProp.set(value); }
396398
private ObjectProperty<Node> placeHolderProp = new SimpleObjectProperty<>(this, "placeHolder", null);
397399
public final ObjectProperty<Node> placeholderProperty() { return placeHolderProp; }
398-
public final void setPlaceholder(Node value) { placeHolderProp.set(value); }
399400
public final Node getPlaceholder() { return placeHolderProp.get(); }
400401

401402
private ObjectProperty<ContextMenu> contextMenu = new SimpleObjectProperty<>(null);
@@ -922,6 +923,10 @@ private void displayPlaceHolder( boolean show, Node newNode )
922923
}
923924
}
924925

926+
/**
927+
* Override this to customize the placeholder's layout.
928+
* <br>The default position is centered over the area.
929+
*/
925930
protected void configurePlaceholder( Node placeholder )
926931
{
927932
placeholder.layoutYProperty().bind( Bindings.createDoubleBinding( () ->

0 commit comments

Comments
 (0)