javax.swing.Icon, org.pushingpixels.neon.AsynchronousLoading, org.pushingpixels.neon.icon.ResizableIconpublic class DecoratedResizableIcon
extends java.lang.Object
implements org.pushingpixels.neon.icon.ResizableIcon, org.pushingpixels.neon.AsynchronousLoading
ResizableIcon that adds decorations to a main icon.| Modifier and Type | Class | Description |
|---|---|---|
static interface |
DecoratedResizableIcon.IconDecorator |
Icon decorator interface.
|
| Modifier and Type | Field | Description |
|---|---|---|
protected java.util.List<DecoratedResizableIcon.IconDecorator> |
decorators |
List of icon decorators.
|
protected org.pushingpixels.neon.icon.ResizableIcon |
delegate |
The main delegate icon.
|
| Constructor | Description |
|---|---|
DecoratedResizableIcon(org.pushingpixels.neon.icon.ResizableIcon delegate) |
Creates a new decorated icon with no decorators.
|
DecoratedResizableIcon(org.pushingpixels.neon.icon.ResizableIcon delegate,
DecoratedResizableIcon.IconDecorator... decorators) |
Creates a new decorated icon.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addAsynchronousLoadListener(org.pushingpixels.neon.AsynchronousLoadListener l) |
|
void |
addIconDecorator(DecoratedResizableIcon.IconDecorator decorator) |
Adds the specified decorator to the end of the decorator sequence.
|
int |
getIconHeight() |
|
int |
getIconWidth() |
|
boolean |
isLoading() |
|
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y) |
|
void |
removeAsynchronousLoadListener(org.pushingpixels.neon.AsynchronousLoadListener l) |
|
void |
removeIconDecorator(DecoratedResizableIcon.IconDecorator decorator) |
Removes the specified decorator.
|
void |
setDimension(java.awt.Dimension newDimension) |
protected org.pushingpixels.neon.icon.ResizableIcon delegate
protected java.util.List<DecoratedResizableIcon.IconDecorator> decorators
public DecoratedResizableIcon(org.pushingpixels.neon.icon.ResizableIcon delegate,
DecoratedResizableIcon.IconDecorator... decorators)
delegate - The main icon.decorators - Icon decorators.public DecoratedResizableIcon(org.pushingpixels.neon.icon.ResizableIcon delegate)
addIconDecorator(IconDecorator).delegate - Main icon.public int getIconHeight()
getIconHeight in interface javax.swing.Iconpublic int getIconWidth()
getIconWidth in interface javax.swing.Iconpublic void paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
paintIcon in interface javax.swing.Iconpublic void setDimension(java.awt.Dimension newDimension)
setDimension in interface org.pushingpixels.neon.icon.ResizableIconpublic void addIconDecorator(DecoratedResizableIcon.IconDecorator decorator)
decorator - Decorator to add.public void removeIconDecorator(DecoratedResizableIcon.IconDecorator decorator)
decorator - Decorator to remove.public void addAsynchronousLoadListener(org.pushingpixels.neon.AsynchronousLoadListener l)
addAsynchronousLoadListener in interface org.pushingpixels.neon.AsynchronousLoadingpublic void removeAsynchronousLoadListener(org.pushingpixels.neon.AsynchronousLoadListener l)
removeAsynchronousLoadListener in interface org.pushingpixels.neon.AsynchronousLoadingpublic boolean isLoading()
isLoading in interface org.pushingpixels.neon.AsynchronousLoading