Icon, AsynchronousLoading, ResizableIconpublic class DecoratedResizableIcon extends Object implements ResizableIcon, 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 List<DecoratedResizableIcon.IconDecorator> |
decorators |
List of icon decorators.
|
protected ResizableIcon |
delegate |
The main delegate icon.
|
| Constructor | Description |
|---|---|
DecoratedResizableIcon(ResizableIcon delegate) |
Creates a new decorated icon with no decorators.
|
DecoratedResizableIcon(ResizableIcon delegate,
DecoratedResizableIcon.IconDecorator... decorators) |
Creates a new decorated icon.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addAsynchronousLoadListener(AsynchronousLoadListener l) |
Adds listener on the asynchronous loading events.
|
void |
addIconDecorator(DecoratedResizableIcon.IconDecorator decorator) |
Adds the specified decorator to the end of the decorator sequence.
|
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.
|
void |
removeIconDecorator(DecoratedResizableIcon.IconDecorator decorator) |
Removes the specified decorator.
|
void |
setDimension(Dimension newDimension) |
Changes the dimension of
this icon. |
protected ResizableIcon delegate
protected List<DecoratedResizableIcon.IconDecorator> decorators
public DecoratedResizableIcon(ResizableIcon delegate, DecoratedResizableIcon.IconDecorator... decorators)
delegate - The main icon.decorators - Icon decorators.public DecoratedResizableIcon(ResizableIcon delegate)
addIconDecorator(IconDecorator).delegate - Main icon.public int getIconHeight()
getIconHeight in interface Iconpublic int getIconWidth()
getIconWidth in interface Iconpublic void setDimension(Dimension newDimension)
ResizableIconthis icon.setDimension in interface ResizableIconnewDimension - New dimension for this icon.public void addIconDecorator(DecoratedResizableIcon.IconDecorator decorator)
decorator - Decorator to add.public void removeIconDecorator(DecoratedResizableIcon.IconDecorator decorator)
decorator - Decorator to remove.public void addAsynchronousLoadListener(AsynchronousLoadListener l)
AsynchronousLoadingaddAsynchronousLoadListener in interface AsynchronousLoadingl - Listener to add.public void removeAsynchronousLoadListener(AsynchronousLoadListener l)
AsynchronousLoadingremoveAsynchronousLoadListener in interface AsynchronousLoadingl - Listener to remove.public boolean isLoading()
AsynchronousLoadingisLoading in interface AsynchronousLoadingtrue if the content is still loading,
false otherwise.