On Thu, 9 Jul 2026 18:22:22 GMT, Kevin Rushforth <[email protected]> wrote:

>> Andy Goryachev has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   demos
>
> modules/jfx.incubator.richtext/src/main/java/jfx/incubator/scene/control/richtext/model/StyledSegment.java
>  line 291:
> 
>> 289:      * Creates a StyledSegment which consists of a single inline Node.
>> 290:      * @param generator the code to create a Node instance
>> 291:      * @param a the segment styles, can be null
> 
> What does "null" do? Is it different from an empty style attribute map?

yes: `getStyleAttributeMap()` is allowed to return `null`.

> modules/jfx.incubator.richtext/src/main/java/jfx/incubator/scene/control/richtext/model/StyledTextModel.java
>  line 262:
> 
>> 260:      * @since 27
>> 261:      */
>> 262:     public abstract StyleAttributeMap 
>> getStyleAttributeMap(StyleResolver resolver, TextPos pos, boolean forInsert);
> 
> Rather than removing the existing method, would it be better to leave it and 
> have it call the new method with a default value of forInsert (probably 
> false, unless you think true is more common)?

no, I'd rather change the method signature during incubating period.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2196#discussion_r3555140357
PR Review Comment: https://git.openjdk.org/jfx/pull/2196#discussion_r3555156287

Reply via email to