Class GifResource

    • Constructor Detail

      • GifResource

        public GifResource()
    • Method Detail

      • getIcon

        public static ImageIcon getIcon​(Class<? extends GifResource> res)
        Converts a GifResource class into the corresponding icon. This is done in the following steps: If the image is cached in GIFS, take this one. Else load it into GIFSas described below before taking it from GIFS.

        Loading an image consists in loading the class-file associated with the image, determining the according gif-file and creating the according ImageIcon.

        Parameters:
        res - a subclass of GifResource.
        Returns:
        the icon determined by the given class.

        CAUTION: Note that an icon is returned even if there is no according gif-image. This image can be identified by width -1 which is an undocumented property.

      • main

        public static final void main​(String[] args)