Class ImageBackedFilterableRadianceIcon
java.lang.Object
org.pushingpixels.radiance.common.api.icon.ImageBackedFilterableRadianceIcon
- All Implemented Interfaces:
Icon, AsynchronousLoading, RadianceIcon
public class ImageBackedFilterableRadianceIcon
extends Object
implements RadianceIcon, AsynchronousLoading
Implementation of the
RadianceIcon interface that supports color filtering of content
by drawing it into offscreen images and applying the requested
RadianceIcon.ColorFilter. Note that this is a heavy
operation that consumes additional memory resources. If your original icon returns
true from its RadianceIcon.supportsColorFilter(), do not use this class.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classNested classes/interfaces inherited from interface RadianceIcon
RadianceIcon.ColorFilter, RadianceIcon.Factory -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate RadianceIcon.ColorFilterprivate BufferedImageprivate RadianceIconprivate intprivate EventListenerListprivate RadianceIcon.Factoryprivate int -
Constructor Summary
ConstructorsConstructorDescriptionImageBackedFilterableRadianceIcon(RadianceIcon.Factory sourceFactory, RadianceIcon.ColorFilter colorFilter) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds listener on the asynchronous loading events.intintbooleanReturns indication whether the content is still loading.private voidvoidvoidRemoves listener on the asynchronous loading events.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
-
sourceFactory
-
width
private int width -
height
private int height -
currDelegate
-
listenerList
-
colorFilter
-
currColorized
-
-
Constructor Details
-
ImageBackedFilterableRadianceIcon
public ImageBackedFilterableRadianceIcon(RadianceIcon.Factory sourceFactory, RadianceIcon.ColorFilter colorFilter)
-
-
Method Details
-
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
-
makeColorized
private void makeColorized() -
paintIcon
-
getIconWidth
public int getIconWidth()- Specified by:
getIconWidthin interfaceIcon
-
getIconHeight
public int getIconHeight()- Specified by:
getIconHeightin interfaceIcon
-
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.
-