public class IconElementFactory
extends java.lang.Object
IconElementFactory
class creates
IconElement
objects from either a user-specified file
or from built in images.Constructor and Description |
---|
IconElementFactory() |
Modifier and Type | Method and Description |
---|---|
static IconElement |
create(java.lang.String icon)
Creates a new
IconElement from the specified icon. |
public static IconElement create(java.lang.String icon) throws java.io.IOException
IconElement
from the specified icon.
If the named icon is from the predefined icon resources, it is
used as such. Otherwise, it is assumed that the icon is a file
name that should be read.icon
- the icon resource or file name.java.io.IOException
- if the icon could not be created from the
icon resources or from a file.