On Fri, 23 Sep 2022 19:05:53 GMT, Phil Race <p...@openjdk.org> wrote:

>> API specification says about BasicTextAreaUI.create "Returns a 
>> WrappedPlainView or PlainView". 
>> But for 
>> [bidi](https://github.com/openjdk/jdk/blob/d14e96d9701dae951aa365029f58afb6687a646a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextAreaUI.java#L168)
>>  text, this method returns BoxView and other views , so the documentation 
>> needs to be updated.
>
> src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextAreaUI.java 
> line 143:
> 
>> 141:      * PlainView if non-bidi text is handled
>> 142:      * else returns PlainParagraph or BoxView if bidi text is being 
>> handled.
>> 143:      *
> 
> So .. what if the text wasn't bidi but then some one adds bidi text ?
> 
> And can we change the summary of the BUG and PR to something grammatically 
> correct, and perhaps even
> descriptive such as
> "BasicTextAreaUI:create incompletely documents the possible returned View 
> types"

In that case BasicTextUI#insertUpdate() will change the model which will again 
call BasicTextAreaUI#create to change the view to i18n to either of BoxView or 
PlainParagraph.

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

PR: https://git.openjdk.org/jdk/pull/10376

Reply via email to