Class ImageIconWrapper

java.lang.Object
javax.swing.ImageIcon
resources.icons.ImageIconWrapper
All Implemented Interfaces:
Serializable, Accessible, Icon, FileBasedIcon
Direct Known Subclasses:
DisabledImageIconWrapper, ScaledImageIconWrapper

@Deprecated(forRemoval=true, since="11") public class ImageIconWrapper extends ImageIcon implements FileBasedIcon
Deprecated, for removal: This API element is subject to removal in a future version.
This class has been replaced by a series of classes that extend LazyImageIcon: UrlImageIcon, DerivedImageIcon, BytesImageIcon, DisabledImageIcon, and ScaledImageIcon. Pick the one that matches the constructor that was being used to create an ImageIconWrapper
ImageIconWrapper provides the ability to instantiate an ImageIcon with delayed loading. In addition to delayed loading it has the added benefit of allowing the use of static initialization of ImageIcons without starting the Swing thread which can cause problems when running headless.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class javax.swing.ImageIcon

    ImageIcon.AccessibleImageIcon
  • Field Summary

    Fields inherited from class javax.swing.ImageIcon

    component, tracker
  • Constructor Summary

    Constructors
    Constructor
    Description
    ImageIconWrapper(byte[] imageBytes, String imageName)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Construct wrapped ImageIcon based upon specified image byte array (see Toolkit.createImage(byte[]))
    ImageIconWrapper(Image image, String imageName)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Construct wrapped ImageIcon based upon specified image
    Deprecated, for removal: This API element is subject to removal in a future version.
    Construct wrapped ImageIcon based upon specified resource URL
    Deprecated, for removal: This API element is subject to removal in a future version.
    Construct wrapped ImageIcon based upon specified icon which may require transformation into ImageIcon
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final Image
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get the base icon image to be transformed in ImageIcon
    protected ImageIcon
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get the name of the image which in most cases will be the associated data file path.
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get icon reference name
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    paintIcon(Component c, Graphics g, int x, int y)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    setDescription(String description)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    setImage(Image image)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class javax.swing.ImageIcon

    loadImage, setImageObserver

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ImageIconWrapper

      public ImageIconWrapper(byte[] imageBytes, String imageName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Construct wrapped ImageIcon based upon specified image byte array (see Toolkit.createImage(byte[]))
      Parameters:
      imageBytes - image bytes
      imageName - image reference name
    • ImageIconWrapper

      public ImageIconWrapper(Image image, String imageName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Construct wrapped ImageIcon based upon specified image
      Parameters:
      image - icon image
      imageName - image reference name
    • ImageIconWrapper

      public ImageIconWrapper(Icon icon)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Construct wrapped ImageIcon based upon specified icon which may require transformation into ImageIcon
      Parameters:
      icon - the icon
    • ImageIconWrapper

      public ImageIconWrapper(URL url)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Construct wrapped ImageIcon based upon specified resource URL
      Parameters:
      url - icon image resource URL
  • Method Details

    • getFilename

      public String getFilename()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: FileBasedIcon
      Get the name of the image which in most cases will be the associated data file path.
      Specified by:
      getFilename in interface FileBasedIcon
      Returns:
      icon name/path
    • getImageName

      public String getImageName()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get icon reference name
      Returns:
      icon name
    • getImage

      public Image getImage()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      getImage in class ImageIcon
    • getAccessibleContext

      public AccessibleContext getAccessibleContext()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getAccessibleContext in interface Accessible
      Overrides:
      getAccessibleContext in class ImageIcon
    • getDescription

      public String getDescription()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      getDescription in class ImageIcon
    • getIconHeight

      public int getIconHeight()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getIconHeight in interface Icon
      Overrides:
      getIconHeight in class ImageIcon
    • getIconWidth

      public int getIconWidth()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getIconWidth in interface Icon
      Overrides:
      getIconWidth in class ImageIcon
    • getImageLoadStatus

      public int getImageLoadStatus()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      getImageLoadStatus in class ImageIcon
    • getImageObserver

      public ImageObserver getImageObserver()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      getImageObserver in class ImageIcon
    • paintIcon

      public void paintIcon(Component c, Graphics g, int x, int y)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      paintIcon in interface Icon
      Overrides:
      paintIcon in class ImageIcon
    • setDescription

      public void setDescription(String description)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      setDescription in class ImageIcon
    • setImage

      public void setImage(Image image)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      setImage in class ImageIcon
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class ImageIcon
    • createIconBaseImage

      protected final Image createIconBaseImage()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the base icon image to be transformed in ImageIcon
      Returns:
      the base icon image to be transformed in ImageIcon
    • createImageIcon

      protected ImageIcon createImageIcon()
      Deprecated, for removal: This API element is subject to removal in a future version.