|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pushingpixels.flamingo.api.common.icon.IcoWrapperResizableIcon
public class IcoWrapperResizableIcon
Implementation of ResizableIcon interface that wraps ICO files.
| Field Summary | |
|---|---|
protected Map<String,BufferedImage> |
cachedImages
Contains all precomputed images. |
protected int |
height
The height of the current image. |
protected InputStream |
icoInputStream
The input stream of the original image. |
protected Map<Integer,BufferedImage> |
icoPlaneMap
Image planes of the original ICO image. |
protected EventListenerList |
listenerList
The listeners. |
protected int |
width
The width of the current image. |
| Method Summary | |
|---|---|
void |
addAsynchronousLoadListener(AsynchronousLoadListener l)
Adds listener on the asynchronous loading events. |
protected void |
fireAsyncCompleted(Boolean event)
Fires the asynchronous load event. |
static IcoWrapperResizableIcon |
getIcon(InputStream inputStream,
Dimension initialDim)
Returns the icon for the specified input stream. |
static IcoWrapperResizableIcon |
getIcon(URL location,
Dimension initialDim)
Returns the icon for the specified URL. |
int |
getIconHeight()
|
int |
getIconWidth()
|
boolean |
isLoading()
Returns indication whether the content is still loading. |
void |
paintIcon(Component c,
Graphics g,
int x,
int y)
|
void |
removeAsynchronousLoadListener(AsynchronousLoadListener l)
Removes listener on the asynchronous loading events. |
protected void |
renderImage(int renderWidth,
int renderHeight)
Renders the image. |
void |
setDimension(Dimension dim)
Changes the dimension of this icon. |
void |
setPreferredSize(Dimension dim)
Sets the preferred size for this icon. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.swing.Icon |
|---|
getIconHeight, getIconWidth, paintIcon |
| Field Detail |
|---|
protected InputStream icoInputStream
protected Map<Integer,BufferedImage> icoPlaneMap
protected Map<String,BufferedImage> cachedImages
protected int width
protected int height
protected EventListenerList listenerList
| Method Detail |
|---|
public static IcoWrapperResizableIcon getIcon(URL location,
Dimension initialDim)
location - Icon URL.initialDim - Initial dimension of the icon.
public static IcoWrapperResizableIcon getIcon(InputStream inputStream,
Dimension initialDim)
inputStream - Icon input stream.initialDim - Initial dimension of the icon.
public void setDimension(Dimension dim)
ResizableIconthis icon.
setDimension in interface ResizableIcondim - New dimension for this icon.public void addAsynchronousLoadListener(AsynchronousLoadListener l)
AsynchronousLoading
addAsynchronousLoadListener in interface AsynchronousLoadingl - Listener to add.public void removeAsynchronousLoadListener(AsynchronousLoadListener l)
AsynchronousLoading
removeAsynchronousLoadListener in interface AsynchronousLoadingl - Listener to remove.public int getIconWidth()
getIconWidth in interface Iconpublic int getIconHeight()
getIconHeight in interface Icon
public void paintIcon(Component c,
Graphics g,
int x,
int y)
paintIcon in interface Iconpublic void setPreferredSize(Dimension dim)
this icon. The rendering is
scheduled automatically.
dim - Preferred size.
protected void renderImage(int renderWidth,
int renderHeight)
renderWidth - Requested rendering width.renderHeight - Requested rendering height.protected void fireAsyncCompleted(Boolean event)
event - Event object.public boolean isLoading()
AsynchronousLoading
isLoading in interface AsynchronousLoadingtrue if the content is still loading,
false otherwise.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||