RFR: 8259550: The content of the print out displayed incomplete with the NimbusLAF

Tejesh R tr at openjdk.org
Wed Jan 17 05:11:51 UTC 2024


On Mon, 11 Dec 2023 11:25:34 GMT, Tejesh R <tr at openjdk.org> 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.

> This was my output without the fix: <img alt="Screenshot 2024-01-16 at 3 32 33 PM" width="681" src="https://private-user-images.githubusercontent.com/96267980/297216735-92cbfe1b-fcf0-4651-bece-abf0ee25f5bd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDU0NjYxODYsIm5iZiI6MTcwNTQ2NTg4NiwicGF0aCI6Ii85NjI2Nzk4MC8yOTcyMTY3MzUtOTJjYmZlMWItZmNmMC00NjUxLWJlY2UtYWJmMGVlMjVmNWJkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAxMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMTE3VDA0MzEyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY0ZTE0NGM2NzBhYTEyMzMxNmIzYjFlZTZjMjc3ZWY3YzJmZjRhOGViOGI1ZTgyNWRmYWEyZTAzODY1NjU1ODImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Y8wFUoXT-uxbo4P-cE5xboHfyzAy4qSgSJy6vMS5nIg">
> 
> This was my output with the fix: <img alt="Screenshot 2024-01-16 at 3 33 13 PM" width="680" src="https://private-user-images.githubusercontent.com/96267980/297216821-a4ddc2d5-f413-474a-824d-943c0adc8169.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDU0NjYxODYsIm5iZiI6MTcwNTQ2NTg4NiwicGF0aCI6Ii85NjI2Nzk4MC8yOTcyMTY4MjEtYTRkZGMyZDUtZjQxMy00NzRhLTgyNGQtOTQzYzBhZGM4MTY5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAxMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMTE3VDA0MzEyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ3NzQzOWNmZjU5OTlkY2FlMGFmODIyOGJjMjg0ZjE3M2Q1NzIzNmVmNjFjZjViNWUyN2I3ODkyMmQ0ZWE1ZjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.LZkUb9rrRRPZiuTap2-hLuG2gpoABxohy97QntXmAiA">
> 
> Comparing it to the description/example you gave on the difference, I can't seem to recreate that change. These screenshots were generated by using the `Print` option on the test and outputting to a PDF file. Any insights for why I'm not seeing the same thing?



> This was my output without the fix: <img alt="Screenshot 2024-01-16 at 3 32 33 PM" width="681" src="https://private-user-images.githubusercontent.com/96267980/297216735-92cbfe1b-fcf0-4651-bece-abf0ee25f5bd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDU0NjYxODYsIm5iZiI6MTcwNTQ2NTg4NiwicGF0aCI6Ii85NjI2Nzk4MC8yOTcyMTY3MzUtOTJjYmZlMWItZmNmMC00NjUxLWJlY2UtYWJmMGVlMjVmNWJkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAxMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMTE3VDA0MzEyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY0ZTE0NGM2NzBhYTEyMzMxNmIzYjFlZTZjMjc3ZWY3YzJmZjRhOGViOGI1ZTgyNWRmYWEyZTAzODY1NjU1ODImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Y8wFUoXT-uxbo4P-cE5xboHfyzAy4qSgSJy6vMS5nIg">
> 
> This was my output with the fix: <img alt="Screenshot 2024-01-16 at 3 33 13 PM" width="680" src="https://private-user-images.githubusercontent.com/96267980/297216821-a4ddc2d5-f413-474a-824d-943c0adc8169.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDU0NjYxODYsIm5iZiI6MTcwNTQ2NTg4NiwicGF0aCI6Ii85NjI2Nzk4MC8yOTcyMTY4MjEtYTRkZGMyZDUtZjQxMy00NzRhLTgyNGQtOTQzYzBhZGM4MTY5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAxMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMTE3VDA0MzEyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ3NzQzOWNmZjU5OTlkY2FlMGFmODIyOGJjMjg0ZjE3M2Q1NzIzNmVmNjFjZjViNWUyN2I3ODkyMmQ0ZWE1ZjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.LZkUb9rrRRPZiuTap2-hLuG2gpoABxohy97QntXmAiA">
> 
> Comparing it to the description/example you gave on the difference, I can't seem to recreate that change. These screenshots were generated by using the `Print` option on the test and outputting to a PDF file. Any insights for why I'm not seeing the same thing?

I guess the frame size when you give to print is quite more enough for it to print all of the columns. The size of frame where the issue can be reproduced is around 720x730 px. Can you check the frame size before giving it to print.

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

PR Comment: https://git.openjdk.org/jdk/pull/17053#issuecomment-1894951054


More information about the client-libs-dev mailing list