<AWT Dev> Review request for 8145284: [Documentation] [TextField] Missing new line character handling
ambarish.rapte at oracle.com
Fri May 13 15:50:02 UTC 2016
Please review the updated the webrev, made changes by adding a comment to 2 Text Field constructors & setText API.
I shall raise CCC after technical review.
From: prasanta sadhukhan
Sent: Thursday, May 12, 2016 12:44 PM
To: Ambarish Rapte; Sergey Bylokhov; Semyon Sadetsky; awt-dev at openjdk.java.net
Subject: Re: Review request for 8145284: [Documentation] [TextField] Missing new line character handling
Should we put the doc change at the top or at TextField constructor where you actually made the change for 8055197? My take it should be done in the latter.
Also, I think you need a ccc for this.
On 5/12/2016 12:33 PM, Ambarish Rapte wrote:
Please review this documentation change for awt.TextField,
What is the change:
After fix of 8055197, TextField replaces all new line characters from input string with space characters.
This behavior is not documented, hence this change to document the behavior.
AWT does not use the native NSTextField, but instead delegates to JPasswordField, which replaces new line character with space character.
On native Mac platform, NSTextField, is not a one line text component.
If input string contains new line character then NSTextField displays multiline text.
Hence we cannot consider / replicate native platform behavior here.
AWT delegates to peer side JPasswordField, which replaces new line character with space character.
The TextField terminates string after the new line character and was reported as 8055197.
Considering the above behavior of Linux and mac, 8055197 was fixed on windows by replicating the same behavior of mac and linux.
After the fix of 8055197, All the platforms uniformly replace new line character with space character.
Hence the behavior should be documented.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the awt-dev