Package resources.icons

# Class LazyImageIcon

java.lang.Object
javax.swing.ImageIcon
resources.icons.LazyImageIcon

All Implemented Interfaces:
  `Serializable`, `Accessible`, `Icon`, `FileBasedIcon`

Direct Known Subclasses:
  `BytesImageIcon`, `DerivedImageIcon`, `UrlImageIcon`

public abstract class LazyImageIcon extends ImageIcon implements FileBasedIcon
`LazyImageIcon` 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:
  - Serialized Form

- ## 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
  Modifier
  Constructor
  Description
  `protected`
  `LazyImageIcon(String name)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected abstract ImageIcon`
  `createImageIcon()`
  `AccessibleContext`
  `getAccessibleContext()`
  `String`
  `getDescription()`
  `String`
  `getFilename()`
  Get the name of the image which in most cases will be the associated data file path.
  `int`
  `getIconHeight()`
  `int`
  `getIconWidth()`
  `Image`
  `getImage()`
  `int`
  `getImageLoadStatus()`
  `ImageObserver`
  `getImageObserver()`
  `void`
  `paintIcon(Component c, Graphics g, int x, int y)`
  `void`
  `setDescription(String description)`
  `void`
  `setImage(Image image)`
  `protected boolean`
  `sourceIconChanged()`
  `String`
  `toString()`

  ### 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

  - ### LazyImageIcon

    protected LazyImageIcon(String name)

- ## Method Details

  - ### createImageIcon

    protected abstract ImageIcon createImageIcon()

  - ### sourceIconChanged

    protected boolean sourceIconChanged()

  - ### getFilename

    public String getFilename()
    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

  - ### getImage

    public Image getImage()
    Overrides:
      `getImage` in class `ImageIcon`

  - ### getAccessibleContext

    public AccessibleContext getAccessibleContext()
    Specified by:
      `getAccessibleContext` in interface `Accessible`
    Overrides:
      `getAccessibleContext` in class `ImageIcon`

  - ### getDescription

    public String getDescription()
    Overrides:
      `getDescription` in class `ImageIcon`

  - ### getIconHeight

    public int getIconHeight()
    Specified by:
      `getIconHeight` in interface `Icon`
    Overrides:
      `getIconHeight` in class `ImageIcon`

  - ### getIconWidth

    public int getIconWidth()
    Specified by:
      `getIconWidth` in interface `Icon`
    Overrides:
      `getIconWidth` in class `ImageIcon`

  - ### getImageLoadStatus

    public int getImageLoadStatus()
    Overrides:
      `getImageLoadStatus` in class `ImageIcon`

  - ### getImageObserver

    public ImageObserver getImageObserver()
    Overrides:
      `getImageObserver` in class `ImageIcon`

  - ### paintIcon

    public void paintIcon(Component c, Graphics g, int x, int y)
    Specified by:
      `paintIcon` in interface `Icon`
    Overrides:
      `paintIcon` in class `ImageIcon`

  - ### setDescription

    public void setDescription(String description)
    Overrides:
      `setDescription` in class `ImageIcon`

  - ### setImage

    public void setImage(Image image)
    Overrides:
      `setImage` in class `ImageIcon`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `ImageIcon`