Class IconDeckRadianceIcon<T>
java.lang.Object
org.pushingpixels.radiance.component.api.common.icon.IconDeckRadianceIcon<T>
- Type Parameters:
T- enumeration key into the deck
- All Implemented Interfaces:
Icon, AsynchronousLoading, RadianceIcon
Implementation of the
RadianceIcon that allows switching the icon
painting at runtime. This class can be used as a delegate in the
DecoratedRadianceIcon where the "base" icon is changed at runtime
without the need to recompute all the decorators.-
Nested Class Summary
Nested classes/interfaces inherited from interface RadianceIcon
RadianceIcon.ColorFilter, RadianceIcon.Factory -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate RadianceIconCurrently shown icon.private final Map<T, ? extends RadianceIcon> The icon deck. -
Constructor Summary
ConstructorsConstructorDescriptionIconDeckRadianceIcon(Map<T, ? extends RadianceIcon> 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.voidsetColorFilter(RadianceIcon.ColorFilter colorFilter) voidsetDimension(Dimension dim) Changes the dimension ofthisicon.voidSets the currently shown icon.booleanMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface RadianceIcon
toImage
-
Field Details
-
currentIcon
Currently shown icon. -
iconDeck
The icon deck.
-
-
Constructor Details
-
IconDeckRadianceIcon
Creates the icon deck.- Parameters:
iconDeck- Icon deck.
-
-
Method Details
-
setIcon
-
setDimension
Description copied from interface:RadianceIconChanges the dimension ofthisicon.- Specified by:
setDimensionin interfaceRadianceIcon- Parameters:
dim- New dimension forthisicon.
-
supportsColorFilter
public boolean supportsColorFilter()- Specified by:
supportsColorFilterin interfaceRadianceIcon
-
setColorFilter
- Specified by:
setColorFilterin interfaceRadianceIcon
-
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.
-