Class DecoratedRadianceIcon
java.lang.Object
org.pushingpixels.radiance.component.api.common.icon.DecoratedRadianceIcon
- All Implemented Interfaces:
Icon, AsynchronousLoading, RadianceIcon
Implementation of
RadianceIcon that adds decorations to a main icon.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceIcon decorator interface.Nested classes/interfaces inherited from interface RadianceIcon
RadianceIcon.ColorFilter, RadianceIcon.Factory -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List<DecoratedRadianceIcon.IconDecorator> List of icon decorators.private RadianceIconThe main delegate icon. -
Constructor Summary
ConstructorsConstructorDescriptionDecoratedRadianceIcon(RadianceIcon delegate) Creates a new decorated icon with no decorators.DecoratedRadianceIcon(RadianceIcon delegate, DecoratedRadianceIcon.IconDecorator... decorators) Creates a new decorated icon. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds listener on the asynchronous loading events.voidAdds the specified decorator to the end of the decorator sequence.static RadianceIcon.Factoryfactory(RadianceIcon.Factory original, DecoratedRadianceIcon.IconDecorator... decorators) intintbooleanReturns indication whether the content is still loading.voidvoidRemoves listener on the asynchronous loading events.voidRemoves the specified decorator.voidsetColorFilter(RadianceIcon.ColorFilter colorFilter) voidsetDimension(Dimension newDimension) Changes the dimension ofthisicon.booleanMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface RadianceIcon
toImage
-
Field Details
-
delegate
The main delegate icon. -
decorators
List of icon decorators.
-
-
Constructor Details
-
DecoratedRadianceIcon
public DecoratedRadianceIcon(RadianceIcon delegate, DecoratedRadianceIcon.IconDecorator... decorators) Creates a new decorated icon.- Parameters:
delegate- The main icon.decorators- Icon decorators.
-
DecoratedRadianceIcon
Creates a new decorated icon with no decorators. Decorators can be added later withaddIconDecorator(IconDecorator).- Parameters:
delegate- Main icon.
-
-
Method Details
-
getIconHeight
public int getIconHeight()- Specified by:
getIconHeightin interfaceIcon
-
getIconWidth
public int getIconWidth()- Specified by:
getIconWidthin interfaceIcon
-
paintIcon
-
setDimension
Description copied from interface:RadianceIconChanges the dimension ofthisicon.- Specified by:
setDimensionin interfaceRadianceIcon- Parameters:
newDimension- New dimension forthisicon.
-
supportsColorFilter
public boolean supportsColorFilter()- Specified by:
supportsColorFilterin interfaceRadianceIcon
-
setColorFilter
- Specified by:
setColorFilterin interfaceRadianceIcon
-
addIconDecorator
Adds the specified decorator to the end of the decorator sequence. If the specified decorator already exists, it is not moved to the end of the sequence.- Parameters:
decorator- Decorator to add.
-
removeIconDecorator
Removes the specified decorator.- Parameters:
decorator- Decorator to remove.
-
addAsynchronousLoadListener
Description copied from interface:AsynchronousLoadingAdds listener on the asynchronous loading events.- Specified by:
addAsynchronousLoadListenerin interfaceAsynchronousLoading- Parameters:
l- Listener to add.
-
removeAsynchronousLoadListener
Description copied from interface:AsynchronousLoadingRemoves listener on the asynchronous loading events.- Specified by:
removeAsynchronousLoadListenerin interfaceAsynchronousLoading- Parameters:
l- Listener to remove.
-
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.
-
factory
public static RadianceIcon.Factory factory(RadianceIcon.Factory original, DecoratedRadianceIcon.IconDecorator... decorators)
-