> 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);
> 
> 
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Andy Goryachev has updated the pull request with a new target base due to a 
merge or a rebase. The pull request now contains nine commits:

 - Merge branch 'master' into 8359862.prompt
 - Merge branch 'master' into 8359862.prompt
 - Merge branch 'master' into 8359862.prompt
 - Merge branch 'master' into 8359862.prompt
 - Merge branch 'master' into 8359862.prompt
 - spelling
 - tests
 - Merge branch 'master' into 8359862.prompt
 - rich text area prompt

-------------

Changes: https://git.openjdk.org/jfx/pull/2237/files
  Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=2237&range=06
  Stats: 266 lines in 6 files changed: 263 ins; 1 del; 2 mod
  Patch: https://git.openjdk.org/jfx/pull/2237.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/2237/head:pull/2237

PR: https://git.openjdk.org/jfx/pull/2237

Reply via email to