Class IcoWrapperResizableIcon

    • Field Detail

      • icoInputStream

        protected final InputStream icoInputStream
        The input stream of the original image.
      • width

        protected int width
        The width of the current image.
      • height

        protected int height
        The height of the current image.
    • Method Detail

      • getIcon

        public static IcoWrapperResizableIcon getIcon​(URL location,
                                                      Dimension initialDim)
        Returns the icon for the specified URL.
        Parameters:
        location - Icon URL.
        initialDim - Initial dimension of the icon.
        Returns:
        Icon instance.
      • getIcon

        public static IcoWrapperResizableIcon getIcon​(InputStream inputStream,
                                                      Dimension initialDim)
        Returns the icon for the specified input stream.
        Parameters:
        inputStream - Icon input stream.
        initialDim - Initial dimension of the icon.
        Returns:
        Icon instance.
      • setDimension

        public void setDimension​(Dimension dim)
        Description copied from interface: ResizableIcon
        Changes the dimension of this icon.
        Specified by:
        setDimension in interface ResizableIcon
        Parameters:
        dim - New dimension for this icon.
      • getIconWidth

        public int getIconWidth()
        Specified by:
        getIconWidth in interface Icon
      • getIconHeight

        public int getIconHeight()
        Specified by:
        getIconHeight in interface Icon
      • setPreferredSize

        public void setPreferredSize​(Dimension dim)
        Sets the preferred size for this icon. The rendering is scheduled automatically.
        Parameters:
        dim - Preferred size.
      • renderImage

        protected void renderImage​(int renderWidth,
                                   int renderHeight)
        Renders the image.
        Parameters:
        renderWidth - Requested rendering width.
        renderHeight - Requested rendering height.
      • fireAsyncCompleted

        protected void fireAsyncCompleted​(Boolean event)
        Fires the asynchronous load event.
        Parameters:
        event - Event object.
      • isLoading

        public boolean isLoading()
        Description copied from interface: AsynchronousLoading
        Returns indication whether the content is still loading.
        Specified by:
        isLoading in interface AsynchronousLoading
        Returns:
        true if the content is still loading, false otherwise.