<AWT Dev> <Swing Dev> [10] Review request for 8182043: Access to Windows Large Icons

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Wed Sep 20 21:41:29 UTC 2017

Hi, Semyon
I have some initial comments which are based on the two bugs: 
JDK-8182043 and JDK-8156183.

getSystemIcon(File file, int size):
     - How the user will know what values/sizes should be passed, what 
values are supported? It is unlikely that he will pass all values in 
between 8-256?

"For any positive size value the exact file icon size is queried":
     - This should be double checked because our implementation can 
return MultiResolutionIconImage if the system returns the icon which 
size is different from requested.

     - What these parameters mean? Is it the smallest(biggest) supported 
size or is it a default size? Can it be different if different dpi are 
used on the screen? For example 16(32) by default and 32(64) on HiDPI?

    - It seems that this value duplicate functionality of the old 
getSystemIcon(File) method?

Probably it will be better to provide to the user the 
set(list/mri/array/etc) of supported images, or if it is really slow the 
set(list/mri/array/etc) of supported sizes, and the user will be able to 
pass some meaningful sizes.

On 9/13/17 11:01, Semyon Sadetsky wrote:
> Hello,
> Please review fix for JDK10 (the changes involve AWT and Swing):
> bug: https://bugs.openjdk.java.net/browse/JDK-8182043
> webrev: http://cr.openjdk.java.net/~ssadetsky/8182043/webrev.00/
> The fix  opens the part of the ShellFolder API for getting system icons 
> which was decided to be left closed during the 8081722 enhancement 
> review in 9.
> Also the fix extends the API by adding possibility to query file icons 
> of arbitrary size and implements this extension for Windows platform.
> --Semyon

Best regards, Sergey.

More information about the awt-dev mailing list