[jfx20] RFR: 8293587: Fix mistakes in FX API docs [v3]

Nir Lisker nlisker at openjdk.org
Tue Feb 7 17:16:52 UTC 2023


On Tue, 7 Feb 2023 12:25:14 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:

>> Nir Lisker has updated the pull request incrementally with three additional commits since the last revision:
>> 
>>  - Update modules/javafx.graphics/src/main/java/javafx/scene/text/TextFlow.java
>>    
>>    Co-authored-by: John Hendrikx <john.hendrikx+github at gmail.com>
>>  - Update modules/javafx.graphics/src/main/java/javafx/scene/text/TextFlow.java
>>    
>>    Co-authored-by: John Hendrikx <john.hendrikx+github at gmail.com>
>>  - Update modules/javafx.graphics/src/main/java/javafx/scene/text/TextFlow.java
>>    
>>    Co-authored-by: John Hendrikx <john.hendrikx+github at gmail.com>
>
> modules/javafx.graphics/src/main/java/javafx/scene/text/TextFlow.java line 62:
> 
>> 60: 
>> 61: /**
>> 62:  * A special layout designed to lay out rich text.
> 
> What's "special" about it? :-)
> Suggestion:
> 
>  * A layout designed to lay out rich text.

Maybe it's special in the sense that it's specialized towards displaying text, unlike other `Pane`s that are multi-purpose for all nodes. "designed to" already points to that. Maybe "A specialized layout for rich text."?

> modules/javafx.graphics/src/main/java/javafx/scene/text/TextFlow.java line 90:
> 
>> 88:  * It can be specified by the application by setting the {@code TextFlow}'s preferred
>> 89:  * width. If no wrapping is desired, the application can either set the preferred
>> 90:  * with to {@code Double.MAX_VALUE} or {@code Region.USE_COMPUTED_SIZE}.
> 
> Should these be links?  They're the first mention in this doc.

I don't think that linking to `Double.MAX_VALUE` is helpful, but maybe to `Region.USE_COMPUTED_SIZE` is.

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

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


More information about the openjfx-dev mailing list