On Mon, 3 Aug 2026 20:21:07 GMT, Andy Goryachev <[email protected]> wrote:
>> 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 incrementally with one additional
> commit since the last revision:
>
> spelling
@azuev-java @kevinrushforth could you review this PR please?
-------------
PR Comment: https://git.openjdk.org/jfx/pull/2237#issuecomment-5270008605