public class FwkIcon extends java.lang.Object implements FwkIconInterface
,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
description |
protected FwkIconInterface |
greyImage |
protected java.awt.Image |
image |
static java.lang.String |
version |
| Constructor and Description |
|---|
FwkIcon()
Creates an uninitialized image icon.
|
FwkIcon(byte[] imageData)
Creates an ImageIcon from an array of bytes which were
read from an image file containing a supported image format,
such as GIF or JPEG.
|
FwkIcon(byte[] imageData,
java.lang.String description)
Creates an ImageIcon from an array of bytes which were
read from an image file containing a supported image format,
such as GIF or JPEG.
|
FwkIcon(java.awt.Image image)
Creates an ImageIcon from an image object.
|
FwkIcon(java.awt.Image image,
java.lang.String description)
Creates an ImageIcon from the image.
|
FwkIcon(java.lang.String filename)
Creates an ImageIcon from the specified file.
|
FwkIcon(java.lang.String filename,
java.lang.String description)
Creates an ImageIcon from the specified file.
|
FwkIcon(java.net.URL location)
Creates an ImageIcon from the specified URL.
|
FwkIcon(java.net.URL location,
java.lang.String description)
Creates an ImageIcon from the specified URL.
|
| Modifier and Type | Method and Description |
|---|---|
FwkArrayInterface |
getFwkMimeTypes() |
int |
getIconHeight()
Returns the icon's height.
|
int |
getIconWidth()
Returns the icon's width.
|
java.awt.Image |
getImage()
Returns the Icon's Image
|
java.lang.String |
getPresentationString()
Retrieves the representation string.
|
java.lang.String |
getPresentationString(java.util.Locale l)
Retrieves the representation string.
|
java.lang.String |
getVersion()
Return the version string of the FWK component.
|
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
Draw the icon at the specified location.
|
void |
release()
Release the object.
|
FwkIconInterface |
scaleGrey()
Get a grey scaled version of the icon.
|
java.lang.String |
toString()
Returns a string presentation of the object.
|
public static final java.lang.String version
protected java.awt.Image image
protected FwkIconInterface greyImage
protected java.lang.String description
public FwkIcon(java.lang.String filename,
java.lang.String description)
filename - the name of the file containing the imagedescription - a brief textual description of the image#ImageIcon(String)public FwkIcon(java.lang.String filename)
new ImageIcon("images/myImage.gif")
(The string is converted to an URL, so the forward-slash works
on all systems.)filename - a String specifying a filename or pathpublic FwkIcon(java.net.URL location,
java.lang.String description)
URL - the URL for the imagedescription - a brief textual description of the image#ImageIcon(String)public FwkIcon(java.net.URL location)
public FwkIcon(java.awt.Image image,
java.lang.String description)
image - the imagedescription - a brief textual description of the imagepublic FwkIcon(java.awt.Image image)
public FwkIcon(byte[] imageData,
java.lang.String description)
imageData - an array of pixels in an image format supported
by the AWT Toolkit, such as GIF or JPEG.description - a brief textual description of the imageToolkit.createImage(java.lang.String)public FwkIcon(byte[] imageData)
an - array of pixels in an image format supported by
the AWT Toolkit, such as GIF or JPEG.Toolkit.createImage(java.lang.String)public FwkIcon()
public java.lang.String getVersion()
FwkInterfacegetVersion in interface FwkInterfacepublic FwkArrayInterface getFwkMimeTypes()
public FwkIconInterface scaleGrey()
scaleGrey in interface FwkIconInterfacepublic java.lang.String toString()
toString in class java.lang.Objectpublic java.awt.Image getImage()
getImage in interface FwkIconInterfacepublic void paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
paintIcon in interface javax.swing.Iconpublic int getIconHeight()
getIconHeight in interface javax.swing.Iconpublic int getIconWidth()
getIconWidth in interface javax.swing.Iconpublic void release()
release in interface FwkInterfacepublic java.lang.String getPresentationString(java.util.Locale l)
l - The Locale object or null.public java.lang.String getPresentationString()