|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pushingpixels.flamingo.api.common.icon.DecoratedResizableIcon
public class DecoratedResizableIcon
Implementation of ResizableIcon
that adds decorations to a main icon.
Nested Class Summary | |
---|---|
static interface |
DecoratedResizableIcon.IconDecorator
Icon decorator interface. |
Field Summary | |
---|---|
protected java.util.List<DecoratedResizableIcon.IconDecorator> |
decorators
List of icon decorators. |
protected ResizableIcon |
delegate
The main delegate icon. |
Constructor Summary | |
---|---|
DecoratedResizableIcon(ResizableIcon delegate)
Creates a new decorated icon with no decorators. |
|
DecoratedResizableIcon(ResizableIcon delegate,
DecoratedResizableIcon.IconDecorator... decorators)
Creates a new decorated icon. |
Method Summary | |
---|---|
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(java.awt.Component c,
java.awt.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(java.awt.Dimension newDimension)
Changes the dimension of this icon. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ResizableIcon delegate
protected java.util.List<DecoratedResizableIcon.IconDecorator> decorators
Constructor Detail |
---|
public DecoratedResizableIcon(ResizableIcon delegate, DecoratedResizableIcon.IconDecorator... decorators)
delegate
- The main icon.decorators
- Icon decorators.public DecoratedResizableIcon(ResizableIcon delegate)
addIconDecorator(IconDecorator)
.
delegate
- Main icon.Method Detail |
---|
public int getIconHeight()
getIconHeight
in interface javax.swing.Icon
public int getIconWidth()
getIconWidth
in interface javax.swing.Icon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
paintIcon
in interface javax.swing.Icon
public void setDimension(java.awt.Dimension newDimension)
ResizableIcon
this
icon.
setDimension
in interface ResizableIcon
newDimension
- 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)
AsynchronousLoading
addAsynchronousLoadListener
in interface AsynchronousLoading
l
- Listener to add.public void removeAsynchronousLoadListener(AsynchronousLoadListener l)
AsynchronousLoading
removeAsynchronousLoadListener
in interface AsynchronousLoading
l
- Listener to remove.public boolean isLoading()
AsynchronousLoading
isLoading
in interface AsynchronousLoading
true
if the content is still loading,
false
otherwise.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |