<Swing Dev> [PATCH] JDK-7169915 : Wrong display, when the document I18n properties is true.

Sergey Bylokhov sergey.bylokhov at oracle.com
Mon Feb 27 17:18:40 UTC 2017


Hi.

Your evaluation and the fix seems reasonable.
If you already signed the OCA[1] then I can place your webrev to the cr.openjdk for official review request..

[1] http://www.oracle.com/technetwork/community/oca-486395.html


> 26 февр. 2017 г., в 13:03, Abossolo Foh Guy <guy.abossolo.foh at scientificware.com> написал(а):
> 
> Hello,
> I insist.
> I know there will be hard stress and busy days until next release but could someone examins my patch and its test ?
> Please.
> Best regards.
> 
> With JDK9 build 158 :
> When i18n enable, TableView layout wrong : Table width change when inserts and removes caracters, see JDK-8158209 and JDK-7169915. Before Table dx=0.0 After Table dx=28.0
> When i18n disable, TableView layout wrong : Table width change when inserts and removes caracters, see JDK-8158209 and JDK-7169915. Before Table dx=0.0 After Table dx=28.0
> 
> -------- Message original --------
> Objet: Re: <Swing Dev> [PATCH] JDK-7169915 : Swing Table Layout bad repaint of the row [REGRESSION] JDK-8133864 : Wrong display, when the document I18n properties is true.
> Date: 2016-11-05 6:59
> De: Abossolo Foh Guy <guy.abossolo.foh at scientificware.com>
> À: Semyon Sadetsky
> 
> Hello,
> 
> I modified your test(test/javax/swing/text/TableView/I18nLayoutTest.java) to simulate user entries and removals as discribed in my bug reports JDK-7169915 and  JDK-7072926.
> 
> Rather than test the frame, I used four caret positions : one before, one after the table, one in the first and one in the last line of the table.
> I also test i18n enable and i18n disable.
> 
> I think this test could replace the previous test I18nLayoutTest.java.
> 
> The test fails before and passes after my fix :
> 
> With JDK 8 current release (111) :
> When i18n enable, test can't be completed : TableView layout wrong, lines overlap, see JDK-8133864.
> When i18n disable, TableView layout wrong : Table width change when inserts and removes caracters, see JDK-8158209 and JDK-7169915. Before Table dx=0.0 After Table dx=28.0
> 
> With JDK9 build 142 :
> When i18n enable, TableView layout wrong : Table width change when inserts and removes caracters, see JDK-8158209 and JDK-7169915. Before Table dx=0.0 After Table dx=28.0
> When i18n disable, TableView layout wrong : Table width change when inserts and removes caracters, see JDK-8158209 and JDK-7169915. Before Table dx=0.0 After Table dx=28.0
> 
> With JDK9 + fix :
> ok
> 
> I used the latest JDK forest to build the fix and produce webrev.
> 
> This bug occurs only for user keyboard entries, if I use JEditorPane.replaceSelection(...) the table layout is correct.
> 
> Best regards.
> Guy.
> 
> ---------------------------------------------------------------------------------------------------
> 
> Le 2016-09-12 15:39, Semyon Sadetsky a écrit :
>> Hello,
>> The JDK-8133864 seems has no a regression. I found that your test
>> works well after it (with corrections I described in JIRA for the
>> table frame).
>> If TableView layout is still an incorrect for you, please, attach a
>> test that fails before and passes after your fix. Test is required for
>> any JDK fixes and I didn't find in your webrev.
>> --Semyon
>> On 9/11/2016 11:34 AM, Abossolo Foh Guy wrote:
>>> Hi,
>>> Thank you very much for your great work.
>>> But I'm agree and not agree with your conclusion about JDK-8158209 : "Not an Issue".
>>> I'm agree :
>>> I understand your recommendations about the height and the width for the frame of the trView.
>>> I never talked about this problem because frame painting hasn't being a problem for me.
>>> I'm not agree :
>>> I made a mistake in writing the bug JDK-8158209 report : two problems in the same report.
>>> But JDK-7169915 and  JDK-7072926 are really a different problem you solve in JDK-8158209.
>>> In 2012, codebug.java was designed first for these bugs.
>>> It is just an update problem, if you follow the steps discribe in JDK-7169915 and JDK-7072926 and if you read the text\html\tableView code you can understand my fix.
>>> text\html\tableView works (not public) fine and \text\tableView (public) works bad ? ? ? ?
>>> As Victor, don't worry about this fix, I'd just compare the two codes to built my fix.
>>> In attachment the documents asked by Alexandr about my fix.
>>> Yours faithfully.
>>> ---------------------------------------
>>> Hello,
>>>> Could you apply the fix to JDK 9 client repository ...
>>> I applied the fix to JDK 9 client repository http://hg.openjdk.java.net/jdk9/client :
>>> openjdk version "9-internal"
>>> OpenJDK Runtime Environment (build 9-internal+0-2016-05-28-142420.scientificware2016.9devClient)
>>> OpenJDK 64-Bit Server VM (build 9-internal+0-2016-05-28-142420.scientificware2016.9devClient, mixed mode)
>>> The webrev and JTreport/JTWork are in attachment. All works fine, except what is mentioned below.
>>>> You mentioned that there are artifacts with a table displaying in JDK 9.
>>> I can't say when it appeared because before your fix, the table size didn't changed when we insert text and all the text stay on the same line.
>>> But, I have just notice that if, in the I18nLayoutTest.java, you
>>> - change the line setUndecorated(true) to setUndecorated(false),
>>> - run the program and enlarge the window 2 times larger than the text size,
>>> - all the text come back on the same line.
>>> There no such artifacts when i18n is false.
>>> Thanks for your help.
>>> Guy.
>>> --------------------------------------------------------------------------------------------- Le 2016-05-27 16:53, Alexandr Scherbatiy a écrit :
>>>> The fix should be prepared for the JDK 9 first and only after that be
>>>> backported to JDK 8u.
>>>> Could you apply the fix to JDK 9 client repository
>>>> http://hg.openjdk.java.net/jdk9/client
>>>> and send the webrev of the fix  plus the test (see
>>>> http://openjdk.java.net/guide/webrevHelp.html).
>>>> The fix shouldn't contain comments with the old code lines. I believe
>>>> that references to the bug number are also unnecessary for this case.
>>>> You mentioned that there are artifacts with a table displaying in JDK
>>>> 9. Do they appear only after fix of they also present even without the
>>>> fix?
>>>> Thanks,
>>>> Alexandr.
>>>> On 5/27/2016 9:23 AM, Abossolo Foh Guy wrote:
>>>>> Hello,
>>>>> Please, please ... could someone examine the patch for JDK-8133864 that I suggested ? I really need it to implement matrix display in my application. I've spent long time in 2012 to find what was wrong in tableview. I know Victor's comment was not good but you could compare with the tableview implementation in the swing/text/html package which works fine.
>>>>> Beware, the display (with java 9 119) for I18nLayoutTest.java is not the same with i18n true (bad) or i18n false (good). With i18n true the table go down.
>>>>> Best regards.
>>>>> ---------------------------------------------------------------------------------------------------------------------- Hello,
>>>>> I built the recent OpenJDK8u and OpenJDK9 sources (openjdk_versions.txt) with the patch shown in the output_diff.txt attachment.
>>>>> I applied your patch for JDK-8133864 : Wrong display, when the document I18n properties is true.
>>>>> And I applied my patch for JDK-7169915 : Swing Table Layout bad repaint of the row.
>>>>> All works fine in OpenJDK8u and the document is well displayed. The table appears as I expected with all its lines and columns (JDK-8133864 solved), size and borders included even if we write some text inside (JDK-7169915 solved). I can modify it as I want.
>>>>> But with OpenJDK9, the display of the document is wrong. The table appears as I expected with all its lines and columns (JDK-8133864 solved), size and borders included (JDK-7169915 solved) but the entire document display is modified, the table is displayed on a new line. And the document became unuseable, I can't modify it as I want.
>>>>> This morning, I ran the same test programme (CodeBug.java in attachment) with the Oracle JDK9 b114 (i.e. OpenJDK9 only with your patch  for JDK-8133864) : The table appears as I expected with all its lines and columns (JDK-8133864 solved) but the size and borders are bad repainted when we write some text inside (JDK-7169915 solved). And the document became unuseable too, I can't modify it as I want.
>>>>> My conclusion :
>>>>> 1- JDK-8133864 is solved with your PATCH.
>>>>> 2- JDK-7169915 could be solved with my PATCH.
>>>>> 3- There is regression between JDK8 and JDK9 may be in the Views arrangement.
>>>>> Best regards.
>>>>> ---------------------------------------------------------------------------------------------------------------------- Hello,
>>>>> Could you apply the modification I suggested 4 years ago about the Bug : JDK-7169915 : Swing Table Layout bad repaint of the row.
>>>>> The test case I had sent in 2012 is the same I used in : JDK-8133864 Wrong display, when the document I18n properties is true.
>>>>> A version of this test (called I18nLayoutTest.java) is now candidate as part of tests for JDK 9 (/test/javax/swing/text/TableView/)
>>>>> Yours faithfully.
> 
> -- 
> Abossolo Foh Guy
> 71 rue Guy de Maupassant
> 69500 Bron
> 
> 06 87 01 82 27
> 04 72 81 89 46
> <tableview_webrev.zip><TableViewLayoutTest.java.zip>




More information about the swing-dev mailing list