flamingo
  1. flamingo
  2. FLAMINGO-75

Problem with 16 pixel icon on JRibbonFrame

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: milestone 1
    • Component/s: ribbon
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      75

      Description

      After setting a 16 pixel buffered image as the application icon, everything
      seems fine except for the icon on the windows task bar.

      I'm going to attach 3 filed that constitute the test case.

      I'm using windows Vista

        Activity

        Hide
        kirillcool added a comment -

        I am not going to add such a method since this would encourage further use of
        pixel-based image implementations of the ResizableIcon interface. Instead, i
        suggest that you create a correct implementation of the ResizableIcon from
        either a vector source or from a collection of pixel-based images (16*16, 32*32,
        64*64 and choosing the best one in paintIcon).

        Thanks
        Kirill

        Show
        kirillcool added a comment - I am not going to add such a method since this would encourage further use of pixel-based image implementations of the ResizableIcon interface. Instead, i suggest that you create a correct implementation of the ResizableIcon from either a vector source or from a collection of pixel-based images (16*16, 32*32, 64*64 and choosing the best one in paintIcon). Thanks Kirill
        Hide
        dukke added a comment -

        Created an attachment (id=33)
        End result image of current implementation on windows vista

        Show
        dukke added a comment - Created an attachment (id=33) End result image of current implementation on windows vista
        Hide
        dukke added a comment -

        Thanks for the answer. I'll comment your observations below:

        "I am not going to add such a method since this would encourage further use of
        pixel-based image implementations of the ResizableIcon interface"

        The problem is that all the methods on Flamingo take a ResizableIcon and there
        is no methods for taking in Buffered Images (raster images).
        On the debate of vector images vs raster images, I think raster images are best
        when dealing with reduced sized icons. The available size is so low that it is
        hard to work with at a vector level. Office 2007 uses raster images for icons
        rather than vector ones.

        "Instead, i
        suggest that you create a correct implementation of the ResizableIcon from
        either a vector source or from a collection of pixel-based images (16*16, 32*32,
        64*64 and choosing the best one in paintIcon)."

        This will work but the final result would be that on Vista, core swing would use
        the 64x64 image and than scale it back to 16x16 to put it on the task bar. So it
        would be more practical and visually better to just pass a 16x16 image for swing
        to use as the image to put on the windows taskbar.

        Alternatively there could be one more method on JRibbonFrame to pass in a list
        of BufferedImages - setApplicationIcon(BufferedImage[]). So you would end up
        having two choices: use the method that receives a ResizableIcon or the method
        that receives a list of BufferedImages.

        Show
        dukke added a comment - Thanks for the answer. I'll comment your observations below: "I am not going to add such a method since this would encourage further use of pixel-based image implementations of the ResizableIcon interface" The problem is that all the methods on Flamingo take a ResizableIcon and there is no methods for taking in Buffered Images (raster images). On the debate of vector images vs raster images, I think raster images are best when dealing with reduced sized icons. The available size is so low that it is hard to work with at a vector level. Office 2007 uses raster images for icons rather than vector ones. "Instead, i suggest that you create a correct implementation of the ResizableIcon from either a vector source or from a collection of pixel-based images (16*16, 32*32, 64*64 and choosing the best one in paintIcon)." This will work but the final result would be that on Vista, core swing would use the 64x64 image and than scale it back to 16x16 to put it on the task bar. So it would be more practical and visually better to just pass a 16x16 image for swing to use as the image to put on the windows taskbar. Alternatively there could be one more method on JRibbonFrame to pass in a list of BufferedImages - setApplicationIcon(BufferedImage[]). So you would end up having two choices: use the method that receives a ResizableIcon or the method that receives a list of BufferedImages.
        Hide
        kirillcool added a comment -

        You can now call setIconImages / setIconImage method in addition to
        setApplicationIcon. If the setIconImage* is called before setApplicationIcon,
        the resizable icon passed to setApplicationIcon will only be set on the
        application menu button.

        Thanks
        Kirill

        Show
        kirillcool added a comment - You can now call setIconImages / setIconImage method in addition to setApplicationIcon. If the setIconImage* is called before setApplicationIcon, the resizable icon passed to setApplicationIcon will only be set on the application menu button. Thanks Kirill
        Hide
        dukke added a comment -

        Thanks a lot, it worked!!

        Pedro DV

        Show
        dukke added a comment - Thanks a lot, it worked!! Pedro DV

          People

          • Assignee:
            kirillcool
            Reporter:
            dukke
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: