<AWT Dev> RFR: 8182043: Access to Windows Large Icons [v10]
serb at openjdk.java.net
Thu May 20 16:17:36 UTC 2021
On Thu, 20 May 2021 16:01:32 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>>> The @implSpec is part of the specification, it is different from the @implNote, no?
>>> If we will specify this method in a way that will require support on all platforms we will get tck-red immediately after this push.
>> Not exactly. The implNote is a note for future maintainers or people who will extend the functionality of the method. There will be no tck-red because the method is working and we did noted that we are taking into consideration the icon size and whenever technical possible we should return the multiresolution icon. So, for example, on Linux code
>> ` FileSystemView fsv = FileSystemView.getFileSystemView();
>> Icon icon = fsv.getSystemIcon(new File("."));
>> Icon icon2 = fsv.getSystemIcon(new File("."), 16);
>> System.out.println("icon = " + icon);
>> System.out.println("icon2 = " + icon2);
>> will get icon and icon2 as the same single-resolution icon - but that will change when underlying implementation will be fixed. Right now it is not technical possible to return multi-resolution icon - we do not do it on Linux. Implementing the underlaying code for different system, as i said, is outside of the scope of this change.
> My point was that the implspec is a normative specification and we cannot refer to non-public classes in that documentation.
As for the example on Linux, how it will work for different sizes?
Icon icon1 = fsv.getSystemIcon(new File("."), 16);
Icon icon2 = fsv.getSystemIcon(new File("."), 32);
Will the resulted icons have proper size 16 and 32?
More information about the awt-dev