public class FilterFaceProvider extends AbstractFaceProvider
Constructor and Description |
---|
FilterFaceProvider(@Nullable FaceProvider parent,
@NotNull java.awt.image.ImageFilter filter)
Creates a new instance.
|
FilterFaceProvider(@NotNull java.awt.image.ImageFilter filter)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected @Nullable javax.swing.ImageIcon |
createImage(@NotNull java.lang.String faceName,
long stretch)
Creates an image not found in the cache.
|
void |
setParent(@Nullable FaceProvider parent)
Sets a new provider as parent.
|
getImageIconForFacename, reload
public FilterFaceProvider(@NotNull @NotNull java.awt.image.ImageFilter filter)
setParent(FaceProvider)
before invoking AbstractFaceProvider.getImageIconForFacename(String, long)
or createImage(String,
long)
or getting a face resp. creating an image will throw an IllegalStateException
.filter
- ImageFilter to apply for creating the imagespublic FilterFaceProvider(@Nullable @Nullable FaceProvider parent, @NotNull @NotNull java.awt.image.ImageFilter filter)
parent
- parent provider to get unfiltered images fromfilter
- ImageFilter to apply for creating the imagespublic void setParent(@Nullable @Nullable FaceProvider parent)
parent
- parent provider to get unfiltered images from@Nullable protected @Nullable javax.swing.ImageIcon createImage(@NotNull @NotNull java.lang.String faceName, long stretch)
AbstractFaceProvider
createImage
in class AbstractFaceProvider
faceName
- face name to get image for, excluding path and endingstretch
- stretch factor