Re: Swing Dev RFR: [9] [JDK-8081491] The case print incomplete.
On 8/25/2015 1:51 PM, prasanta sadhukhan wrote: On 8/25/2015 3:53 PM, Alexander Scherbatiy wrote: On 8/24/2015 2:23 PM, prasanta sadhukhan wrote: Hi All, Bug: https://bugs.openjdk.java.net/browse/JDK-8081491 webrev: http://cr.openjdk.java.net/~psadhukhan/8081491/webrev.00/ This seems to be a hidden JTable bug in which if the user does not call pack() or set a ScrollPane() for JTable and rather use JFrame.setSize() smaller than table size then it was found that some of the rows which cannot be fitted in 1st page cannot get printed on 2nd and subsequent pages resulting in blank cells to be printed after 1st page. It was found that BasicTableUI checks for table bounds to fall within the clip and if they do not intersect, it bails out from painting the table cells. What is the reason that the graphics clip does not intersect the table bounds during printing in the provided test case? The testcase does table.setSize(600,800) whereas frame setSize is 400,600 . For 1st page, the clip was 0,0,384,752 and bounds was 0,0,384,562 so they intersect and there's no problem in printing the rows in 1st page. After the 1st page is printed, the clip is set to 0,752,384,48 since we have printed the rows that we can fit in 1st page and the next set of rows are to be printed while bounds remains at 0,0,384,562 because JComponent getBounds is returning the visible frame bounds which did not change. The !bounds.intersects(clip) check prevents printing of table rows which are not visible on the frame. It seems that the issue is that extra rows which are not shown in the frame are printed on the first page. It means that the printed rows and columns should be calculated for the table bounds and clip intersection. The test can be updated to mention that only visible part of the table should be printed. Thanks, Alexandr. Please, also mention in the email title JDK version for which the fix is provided. Done Regards Prasanta Thanks, Alexandr. I devised a solution whereby it will not bail out till either rows or columns are still left to be printed on subsequent pages . Please review and let me know if it's ok. Regards Prasanta
Swing Dev Bug : JDK-8078831 Mismatch of getPreferredSize() and getPreferredScrollableViewportSize() values in WindowsClassicLookAndFeel
Hi, Please review the following fix for jdk9: Bug: https://bugs.openjdk.java.net/browse/JDK-8078831 Webrev : http://cr.openjdk.java.net/~psadhukhan/rajeev/5042886/webrev.00/ getPreferredScrollableViewportSize() must not return the same as getPreferredSize() but it should return equal or less size. Test condition was checking for inequality and throwing Runtime exception. Regards, Rajeev Chamyal
Re: Swing Dev RFR: [JDK-8025082] The behaviour of the highlight will be lost after clicking the set button
On 8/26/2015 10:20 AM, Rajeev Chamyal wrote: Hello All, Please review the updated fix for bug JDK-8025082. Bug: https://bugs.openjdk.java.net/browse/JDK-8025082 Webrev : http://cr.openjdk.java.net/~psadhukhan/rajeev/8025082/webrev.01/ - the updateOwnsSelection method should be properly formatted See the Java Code Conventions: http://www.oracle.com/technetwork/java/codeconventions-150003.pdf and new discussed Java Style Guidelines: http://cr.openjdk.java.net/~alundblad/styleguide - lines which are longer than 80 characters should be split Thanks, Alexandr. Regards, Rajeev Chamyal -Original Message- From: Alexander Scherbatiy Sent: Tuesday, August 25, 2015 2:28 PM To: Rajeev Chamyal Cc: swing-dev@openjdk.java.net Subject: Re: Swing Dev RFR: [JDK-8025082] The behaviour of the highlight will be lost after clicking the set button On 8/21/2015 3:10 PM, Rajeev Chamyal wrote: Hi, Please review the following fix for jdk9: Bug:https://bugs.openjdk.java.net/browse/JDK-8025082 webrev: http://cr.openjdk.java.net/~psadhukhan/rajeev/8025082/webrev.00/ http://cr.openjdk.java.net/%7Epsadhukhan/rajeev/8025082/webrev.00/ The highlight of selected text in JTextPane/JTextArea is lost if some other component (e.g. button clicked) gains focus. Added a method to update the selection ownership for caret when text is selected/unselected in the JTextPane/JTextArea. - The updateOwnsSelection() method can be shorter if use the conditional operator '?' https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.25 - SwingUtilities.invokeAndWait() should be used instead of invokeLater. In other case the system can suspend the EDT thread and robot will start its actions before the createUI() execution. - button.getLocationOnScreen() should be called on EDT in the test - The actionPerformed() method is not properly formatted - What is the reason to use double colons in the error messages? - System.out.println calls are not really necessary for the automated test. It also pollute the logs for SQE team when all tests are running. The only exception throwing can be left in the actionPerformed() method. - line 30 '* **/' - small formatting issue Thanks, Alexandr. Regards, Rajeev Chamyal
Re: Swing Dev Bug : JDK-8078831 Mismatch of getPreferredSize() and getPreferredScrollableViewportSize() values in WindowsClassicLookAndFeel
On 8/26/2015 12:13 PM, Rajeev Chamyal wrote: Hi, Please review the following fix for jdk9: Bug:https://bugs.openjdk.java.net/browse/JDK-8078831 Webrev : http://cr.openjdk.java.net/~psadhukhan/rajeev/5042886/webrev.00/ http://cr.openjdk.java.net/%7Epsadhukhan/rajeev/5042886/webrev.00/ getPreferredScrollableViewportSize() must not return the same as getPreferredSize() but it should return equal or less size. Test condition was checking for inequality and throwing Runtime exception. Please, split lines which are longer than 80 characters. Thanks, Alexandr. Regards, Rajeev Chamyal