Skip to content

8359862: RichTextArea: prompt - #2237

Open
andy-goryachev-oracle wants to merge 4 commits into
openjdk:masterfrom
andy-goryachev-oracle:8359862.prompt
Open

8359862: RichTextArea: prompt#2237
andy-goryachev-oracle wants to merge 4 commits into
openjdk:masterfrom
andy-goryachev-oracle:8359862.prompt

Conversation

@andy-goryachev-oracle

@andy-goryachev-oracle andy-goryachev-oracle commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Adds the prompt attribute to the RichTextArea, to be shown when the model is null or empty.

To allow for greater flexibility, the type of this property is Object, and there is an additional setter that accepts Supplier<Object>. The value of the property, or the value provided by the Supplier<Object> is interpreted as follows:

  • null: the prompt is disabled
  • Node: the node to be shown
  • String: the text will be shown inside a Label with style .prompt
  • Object: the toString() value will be shown similarly to the String value

The main idea is to have only one property and allow complex graphics to be shown.

Example:

        setPrompt("a");
        setPrompt(this::getPrompt);
        setPrompt(() -> new Object());
        setPrompt(new Object());
        setPrompt(null);
        setPrompt((String)null);
        setPrompt((Supplier)null);

/csr



Progress

  • Change must not contain extraneous whitespace
  • Change requires CSR request JDK-8389649 to be approved
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issues

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/2237/head:pull/2237
$ git checkout pull/2237

Update a local copy of the PR:
$ git checkout pull/2237
$ git pull https://git.openjdk.org/jfx.git pull/2237/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2237

View PR using the GUI difftool:
$ git pr show -t 2237

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/2237.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper

bridgekeeper Bot commented Jul 31, 2026

Copy link
Copy Markdown

👋 Welcome back angorya! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk

openjdk Bot commented Jul 31, 2026

Copy link
Copy Markdown

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk Bot added the csr Need approved CSR to integrate pull request label Aug 3, 2026
@andy-goryachev-oracle
andy-goryachev-oracle marked this pull request as ready for review August 3, 2026 20:13
@openjdk

openjdk Bot commented Aug 3, 2026

Copy link
Copy Markdown

@andy-goryachev-oracle an approved CSR request is already required for this pull request.

@openjdk openjdk Bot added the rfr Ready for review label Aug 3, 2026
@openjdk

openjdk Bot commented Aug 3, 2026

Copy link
Copy Markdown

The total number of required reviews for this PR has been set to 2 based on the presence of this label: rfr. This can be overridden with the /reviewers command.

@mlbridge

mlbridge Bot commented Aug 3, 2026

Copy link
Copy Markdown

Webrevs

@andy-goryachev-oracle

Copy link
Copy Markdown
Contributor Author

@azuev-java @kevinrushforth could you review this PR please?

@kevinrushforth
kevinrushforth self-requested a review August 15, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

csr Need approved CSR to integrate pull request rfr Ready for review

Development

Successfully merging this pull request may close these issues.

1 participant