[ 
https://issues.apache.org/jira/browse/NETBEANS-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eirik Bakke updated NETBEANS-1583:
----------------------------------
    Description: 
To look good on HiDPI/Retina displays, the NetBeans IDE, and NetBeans Platform 
(RCP), applications will eventually need to provide high-resolution versions of 
various image asset (typically icons). In Swing, multi-resolution image assets 
are supported via the 
[MultiResolutionImage|https://docs.oracle.com/javase/10/docs/api/java/awt/image/MultiResolutionImage.html]
 class; such images are automatically loaded by methods such as 
Toolkit.getImage based on a standard naming convention. For instance, on MacOS, 
Toolkit.getImage("myicon.png") will also load the file "myi...@2x.png" if 
present, returning a MultiResolutionImage (see 
[https://bugs.openjdk.java.net/browse/JDK-8011059] ). NetBeans' 
ImageUtilities.loadImage and friends should do the same.

The same naming convention for multi-resolution image assets should be used as 
in the JDK. See Philip Race's comment on 
[https://bugs.openjdk.java.net/browse/JDK-8151787] :

{quote}The proposed name convention for splash screens *and* other multi-res 
images is @125pct @150pct @200pct @2x @250pct @300pct @3x 
ie @2x and @3x are supported as synonyms for @200pct and @300pct respectively 
and also because we already supported @2x on retina Mac.
{quote}
 
(On the naming convention, see also 
https://bugs.openjdk.java.net/browse/JDK-8090575 )

As far as I know, only MacOS currently supports the automatic loading of such 
assets via Toolkit.getImage, but both Windows and MacOS (and Linux?) support 
the underlying MultiResolutionImage. So it's already possible to implement this 
on the latest JDK. Note, however, that we should probably wait for 
https://bugs.openjdk.java.net/browse/JDK-8212226 to be fixed before enabling 
this on Windows.

  was:
To look good on HiDPI/Retina displays, the NetBeans IDE, and NetBeans Platform 
(RCP), applications will eventually need to provide high-resolution versions of 
various image asset (typically icons). In Swing, multi-resolution image assets 
are supported via the 
[MultiResolutionImage|https://docs.oracle.com/javase/9/docs/api/java/awt/image/MultiResolutionImage.html]
 class; such images are automatically loaded by methods such as 
Toolkit.getImage based on a standard naming convention. For instance, on MacOS, 
Toolkit.getImage("myicon.png") will also load the file "myi...@2x.png" if 
present, returning a MultiResolutionImage (see 
[https://bugs.openjdk.java.net/browse/JDK-8011059] ). NetBeans' 
ImageUtilities.loadImage and friends should do the same.

The same naming convention for multi-resolution image assets should be used as 
in the JDK. See Philip Race's comment on 
[https://bugs.openjdk.java.net/browse/JDK-8151787] :

{quote}The proposed name convention for splash screens *and* other multi-res 
images is @125pct @150pct @200pct @2x @250pct @300pct @3x 
ie @2x and @3x are supported as synonyms for @200pct and @300pct respectively 
and also because we already supported @2x on retina Mac.
{quote}
 
(On the naming convention, see also 
https://bugs.openjdk.java.net/browse/JDK-8090575 )

As far as I know, only MacOS currently supports the automatic loading of such 
assets via Toolkit.getImage, but both Windows and MacOS (and Linux?) support 
the underlying MultiResolutionImage. So it's already possible to implement this 
on the latest JDK. Note, however, that we should probably wait for 
https://bugs.openjdk.java.net/browse/JDK-8212226 to be fixed before enabling 
this on Windows.


> Support MultiResolutionImage loading from ImageUtilities 
> ---------------------------------------------------------
>
>                 Key: NETBEANS-1583
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-1583
>             Project: NetBeans
>          Issue Type: Improvement
>          Components: platform - Other
>    Affects Versions: 10.0
>         Environment: Windows, Linux, and MacOS
>            Reporter: Eirik Bakke
>            Priority: Major
>              Labels: HiDPI
>
> To look good on HiDPI/Retina displays, the NetBeans IDE, and NetBeans 
> Platform (RCP), applications will eventually need to provide high-resolution 
> versions of various image asset (typically icons). In Swing, multi-resolution 
> image assets are supported via the 
> [MultiResolutionImage|https://docs.oracle.com/javase/10/docs/api/java/awt/image/MultiResolutionImage.html]
>  class; such images are automatically loaded by methods such as 
> Toolkit.getImage based on a standard naming convention. For instance, on 
> MacOS, Toolkit.getImage("myicon.png") will also load the file "myi...@2x.png" 
> if present, returning a MultiResolutionImage (see 
> [https://bugs.openjdk.java.net/browse/JDK-8011059] ). NetBeans' 
> ImageUtilities.loadImage and friends should do the same.
> The same naming convention for multi-resolution image assets should be used 
> as in the JDK. See Philip Race's comment on 
> [https://bugs.openjdk.java.net/browse/JDK-8151787] :
> {quote}The proposed name convention for splash screens *and* other multi-res 
> images is @125pct @150pct @200pct @2x @250pct @300pct @3x 
> ie @2x and @3x are supported as synonyms for @200pct and @300pct respectively 
> and also because we already supported @2x on retina Mac.
> {quote}
>  
> (On the naming convention, see also 
> https://bugs.openjdk.java.net/browse/JDK-8090575 )
> As far as I know, only MacOS currently supports the automatic loading of such 
> assets via Toolkit.getImage, but both Windows and MacOS (and Linux?) support 
> the underlying MultiResolutionImage. So it's already possible to implement 
> this on the latest JDK. Note, however, that we should probably wait for 
> https://bugs.openjdk.java.net/browse/JDK-8212226 to be fixed before enabling 
> this on Windows.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to