[ 
https://issues.apache.org/jira/browse/PIVOT-477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13092419#comment-13092419
 ] 

Andrei Pozolotin commented on PIVOT-477:
----------------------------------------

this is how it can be used:

                                Display display = hostApp.getDisplay();

                                java.awt.Window host = display.getHostWindow();

                                List<Image> icons = new LinkedList<Image>();

                                BufferedImage image = ImageIO.read(getClass()
                                                
.getResourceAsStream("/image/crystal/logo-32.png"));

                                icons.add(image);

                                host.setIconImages(icons);

> Window and DesktopApplicationContext should support 
> java.awt.Window.setIconImages() to display multi-resolution icons
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-477
>                 URL: https://issues.apache.org/jira/browse/PIVOT-477
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>            Reporter: Dirk Moebius
>            Assignee: Noel Grandin
>            Priority: Minor
>             Fix For: 2.0
>
>
> DesktopApplicationContext currently sets the Window icon into the host frame 
> using java.awt.Window.setIconImage(Image). However, since Java6 there's a new 
> method called setIconImages(List<Image> icons) to set multi-resolution icons, 
> e.g. you can set a 16x16 icon for the window title bar, a 48x48 icon to be 
> shown in Microsoft Windows' task switcher, or a 64x64 icon to be shown in 
> Windows Vista/7 Aero task list. (It is up to the runtime implementation to 
> choose an appropriate icon from the list provided by setIconImages().)
> Without the possibility to set multi-resolution icons the OS scales the image 
> either up or down to fit the current environment. This might lead to poor 
> results.
> Suggestion: add a new method setIconImages(List<Image>) method to 
> pivot.wtk.Window and, if set, use it in DesktopApplicationContext. Or maybe 
> add setIconPictures(List<Picture>) to get around the issue of downcasting to 
> Picture in updateFrameTitleBar().
> Thanks,
> Dirk.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to