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
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.ImageIcon
ImageIcon.AccessibleImageIcon
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ImageIcon
Get the name of the image which in most cases will be the associated data file path.int
int
getImage()
int
void
void
setDescription
(String description) void
protected boolean
toString()
Methods inherited from class javax.swing.ImageIcon
loadImage, setImageObserver
-
Constructor Details
-
LazyImageIcon
-
-
Method Details
-
createImageIcon
-
sourceIconChanged
protected boolean sourceIconChanged() -
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 interfaceFileBasedIcon
- Returns:
- icon name/path
-
getImage
-
getAccessibleContext
- Specified by:
getAccessibleContext
in interfaceAccessible
- Overrides:
getAccessibleContext
in classImageIcon
-
getDescription
- Overrides:
getDescription
in classImageIcon
-
getIconHeight
public int getIconHeight()- Specified by:
getIconHeight
in interfaceIcon
- Overrides:
getIconHeight
in classImageIcon
-
getIconWidth
public int getIconWidth()- Specified by:
getIconWidth
in interfaceIcon
- Overrides:
getIconWidth
in classImageIcon
-
getImageLoadStatus
public int getImageLoadStatus()- Overrides:
getImageLoadStatus
in classImageIcon
-
getImageObserver
- Overrides:
getImageObserver
in classImageIcon
-
paintIcon
-
setDescription
- Overrides:
setDescription
in classImageIcon
-
setImage
-
toString
-