On Tue, 30 Jan 2024 07:28:43 GMT, Tejesh R <[email protected]> wrote:
>> The issue is w.r.t to way that Synth prints the table. In Synth, the
>> printing of Table happens column wise by painting blocks of columns which is
>> due to the fact that Graphics used which is `ProxyGrpahics2D` (which get
>> selected in `RasterPrinterJob `class, otherwise it would be `WPathGraphics`
>> for other Look and feel). Since the printing happens in block wise and the
>> columns where the x position is greater than the `table.bounds` doesn't gets
>> painted because of the intersection check condition
>> `!bounds.intersects(clip)`. Hence only droplines are painted instead of
>> cells and gridlines. I couldn't find any reason for adding the intersection
>> check here and when removed it didn't cause any regression too, rather it
>> solves the issue and actually made sense too. In other Look and Feel its not
>> required to apply the fix (in `BasicTableUI `class) because its not
>> affecting anything yet since the painting happens for whole table. Hence
>> proposing the fix for only SynthTableUI class.
>> ([PrintManualTest_FitWidthMultiple.java](https://github.com/openjdk/jdk/blob/master/test/jdk/javax/swing/JTable/PrintManualTest_FitWidthMultiple.java))
>> test is been used for testing.
>
> Tejesh R has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Test file updated w.r.t indentations and line spacing
Minor comments else test is verified on windows and linux platform.
test/jdk/javax/swing/JTable/PrintManualTest_FitWidthMultiple.java line 30:
> 28: * printed for PrintMode.FIT_WIDTH
> 29: * @run main/othervm/manual
> -Dswing.defaultlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel
> PrintManualTest_FitWidthMultiple
> 30: Merg
Looks like some typo mistake.
test/jdk/javax/swing/JTable/PrintManualTest_FitWidthMultiple.java line 148:
> 146: JPanel btnpanel = new JPanel();
> 147: btnpanel.add(printButton);
> 148: fr.getContentPane().add(btnpanel,BorderLayout.SOUTH);
Suggestion:
fr.getContentPane().add(btnpanel, BorderLayout.SOUTH);
May be you can fix this here and other places as well. space after `,`.
-------------
Marked as reviewed by abhiscxk (Committer).
PR Review: https://git.openjdk.org/jdk/pull/17053#pullrequestreview-1850616137
PR Review Comment: https://git.openjdk.org/jdk/pull/17053#discussion_r1470834957
PR Review Comment: https://git.openjdk.org/jdk/pull/17053#discussion_r1470837624