On Oct 23, 2013, at 5:38 PM, Alexander Scherbatiy wrote:
>>
>> may I ask through which API you intend to make the icons available?
>
> There is a way to load system images and icons on MacOS X in Java by using:
> Toolkit.getDefaultToolkit().getImage("NSImage://NSImageName") method:
> https://developer.apple.com/library/mac/documentation/java/conceptual/java14development/04-JavaUIToolkits/JavaUIToolkits.html
> This method calls [NSImage imageNamed: "NSImageName"] and we are going to
> reuse it for the system icons loading.
>
>> Also, will there be a way to create custom HiDPI images/icons?
>> If so, how?
>
> There is the fix that has been recently sent to review:
> http://mail.openjdk.java.net/pipermail/awt-dev/2013-October/006133.html
> A user needs to override the getScaledInstance(width, height, hints)
> method in Image class and returns images with necessary resolution according
> to
> the given width and height. Images with @2x postfix should be
> automatically loaded into the ToolkitImage on MacOS X.
Very nice!
Any idea whether this will be backported to Java7 (assuming this is for 8)?
-hendrik