Class IconDeckResizableIcon<T>
java.lang.Object
org.pushingpixels.flamingo.api.common.icon.IconDeckResizableIcon<T>
- Type Parameters:
T- enumeration key into the deck
- All Implemented Interfaces:
Icon,AsynchronousLoading,ResizableIcon
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
ConstructorsConstructorDescriptionIconDeckResizableIcon(Map<T, ? extends ResizableIcon> iconDeck) Creates the icon deck. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds listener on the asynchronous loading events.intintbooleanReturns indication whether the content is still loading.voidvoidRemoves listener on the asynchronous loading events.voidsetDimension(Dimension dim) Changes the dimension ofthisicon.voidSets the currently shown icon.
-
Constructor Details
-
IconDeckResizableIcon
Creates the icon deck.- Parameters:
iconDeck- Icon deck.
-
-
Method Details
-
setIcon
Sets the currently shown icon.- Parameters:
key- Icon key.
-
setDimension
Description copied from interface:ResizableIconChanges the dimension ofthisicon.- Specified by:
setDimensionin interfaceResizableIcon- Parameters:
dim- New dimension forthisicon.
-
getIconHeight
public int getIconHeight()- Specified by:
getIconHeightin interfaceIcon
-
getIconWidth
public int getIconWidth()- Specified by:
getIconWidthin interfaceIcon
-
paintIcon
-
addAsynchronousLoadListener
Description copied from interface:AsynchronousLoadingAdds listener on the asynchronous loading events.- Specified by:
addAsynchronousLoadListenerin interfaceAsynchronousLoading- Parameters:
l- Listener to add.
-
isLoading
public boolean isLoading()Description copied from interface:AsynchronousLoadingReturns indication whether the content is still loading.- Specified by:
isLoadingin interfaceAsynchronousLoading- Returns:
trueif the content is still loading,falseotherwise.
-
removeAsynchronousLoadListener
Description copied from interface:AsynchronousLoadingRemoves listener on the asynchronous loading events.- Specified by:
removeAsynchronousLoadListenerin interfaceAsynchronousLoading- Parameters:
l- Listener to remove.
-