[OpenJDK 2D-Dev] [9] RFR: JDK-8151590, , "ALL" radio button is not selected in printDialog when we call DefaultSelectionType.ALL in windows

Jayathirth D V jayathirth.d.v at oracle.com
Thu Mar 24 08:00:30 UTC 2016

Hi Prasanta,


Here we are giving priority to setDefaultSelection() over setXXXPage() and since we are following the same rule among all platforms changes are fine. 

Before and after change test is working fine. But test case needs little changes:


1)      There are unused imports :

Line 31                  import java.awt.Component;

Line 40                  import javax.swing.JOptionPane;


2)      There are places in test case where we have changes over 80 character length :

Line 81                  PrintJob pj = tk.getPrintJob(new JFrame(), "testing the attribute setting ", job, page);

Line 102                + " If ALL radio button is selected, press PASS else press FAIL";


Apart from this test and code changes are fine.




From: Philip Race 
Sent: Wednesday, March 23, 2016 9:07 PM
To: prasanta sadhukhan
Cc: 2d-dev at openjdk.java.net
Subject: Re: [OpenJDK 2D-Dev] [9] RFR: JDK-8151590, , "ALL" radio button is not selected in printDialog when we call DefaultSelectionType.ALL in windows



There are three typos which you need to fix before you push
No need for another webrev.

  79         // seeting this dialog to native pritdialog
 100                 + " A print dialog wil lbe shown.\n "


On 3/17/16, 1:35 AM, prasanta sadhukhan wrote: 

Hi Phil, 

Please find the updated webrev: 

On 3/17/2016 12:20 AM, Philip Race wrote: 

As I mentioned off-line please remove the extraneous stuff 
from the test. And why is the (c) 2015 ? 


On 3/11/16, 4:06 AM, prasanta sadhukhan wrote: 

Please find modified webrev with updated testcase. 

On 3/10/2016 4:04 PM, prasanta sadhukhan wrote: 

Hi Phil, 

Bug: https://bugs.openjdk.java.net/browse/JDK-8151590 
webrev: http://cr.openjdk.java.net/~psadhukhan/8151590/webrev.00/ 

The issue is if application calls 
along with 

then "Page" radio button is selected in windows. In linux and mac, "All" radio button is selected. 
Although the spec is not very clear as to what should get preference, it seems logically DefaultSelection should hold preference. 

This is a regression from 8061267 where PD_PAGENUMS was added to the flags resulting in "Page" radio button getting selected. 
I added a fix to add PD_PAGENUMS to the flags only if the selection attribute is not "PD_ALLPAGES" [which gets selected when JobAttributes.setDefaultSelection(JobAttributes.DefaultSelectionType.ALL); is called] 

I tested 8061267 testcase behaviour is same with this fix. 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20160324/4fa51e6c/attachment.html>

More information about the 2d-dev mailing list