[OpenJDK 2D-Dev] [9] RFR 4885375: Page Ranges 'To Page' field must be populated based on Pageable

Philip Race philip.race at oracle.com
Wed Aug 24 16:56:02 UTC 2016


Why does the test look like this ?

  157     @Override
  158     public int getNumberOfPages() {
  159         return 0;
  160     }

-phil.


On 8/23/16, 5:05 AM, Prasanta Sadhukhan wrote:
> Hi All,
>
> Please review a fix whereby it is seen that Page Ranges fields in the 
> "cross-platform" dialog does not get populated based on what 
> pageable's getNumberOfPages() returns. "To" field is always 1.
> However, for native dialog it shows the "To" field correctly based on 
> what getNumberOfPages() returns.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-4885375
> webrev: http://cr.openjdk.java.net/~psadhukhan/4885375/webrev.00/
>
> This is because in cross platform ServiceDialog, for the ToPage to get 
> populated, PageRanges should be present in the attribute set. In this 
> case, there is no PageRanges so it defaults to "from 1 to 1" pages.
> Proposed fix is to set a PageRange attribute to be from 1 to 
> getNumberOfPages.
>
> The 2nd issue of disabling PageRange fields if getNumberOfPages() 
> returns 0 is not handled as there is no provision of passing 
> PageRanges 0 to ServiceDialog (it resuls in IAE).
>
> Regards
> Prasanta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20160824/2bbdcc1c/attachment.html>


More information about the 2d-dev mailing list