|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pushingpixels.flamingo.api.common.icon.IconDeckResizableIcon<T>
T
- enumeration key into the deckpublic class IconDeckResizableIcon<T>
Implementation of the ResizableIcon
that allows switching the icon
painting at runtime. This class can be used as a delegate in the
DecoratedResizableIcon
where the "base" icon is changed at runtime
without the need to recompute all the decorators.
Constructor Summary | |
---|---|
IconDeckResizableIcon(java.util.Map<T,? extends ResizableIcon> iconDeck)
Creates the icon deck. |
Method Summary | |
---|---|
void |
addAsynchronousLoadListener(AsynchronousLoadListener l)
Adds listener on the asynchronous loading events. |
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 |
setDimension(java.awt.Dimension dim)
Changes the dimension of this icon. |
void |
setIcon(T key)
Sets the currently shown icon. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IconDeckResizableIcon(java.util.Map<T,? extends ResizableIcon> iconDeck)
iconDeck
- Icon deck.Method Detail |
---|
public void setIcon(T key)
key
- Icon key.public void setDimension(java.awt.Dimension dim)
ResizableIcon
this
icon.
setDimension
in interface ResizableIcon
dim
- New dimension for this
icon.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 addAsynchronousLoadListener(AsynchronousLoadListener l)
AsynchronousLoading
addAsynchronousLoadListener
in interface AsynchronousLoading
l
- Listener to add.public boolean isLoading()
AsynchronousLoading
isLoading
in interface AsynchronousLoading
true
if the content is still loading,
false
otherwise.public void removeAsynchronousLoadListener(AsynchronousLoadListener l)
AsynchronousLoading
removeAsynchronousLoadListener
in interface AsynchronousLoading
l
- Listener to remove.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |