public class TemplateImageLoaderAwt extends Object implements TemplateImageLoader
| Modifier and Type | Field and Description |
|---|---|
protected MediaTracker |
mt |
| Constructor and Description |
|---|
TemplateImageLoaderAwt(IsisConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
TemplateImage |
getTemplateImage(String name)
Returns an image template for the specified image (as specified by a path
to a file or resource).
|
void |
init()
Indicates to the component that it is to initialise itself.
|
protected Image |
loadAsResource(String path)
Get an Image object from the jar/zip file that this class was loaded
from.
|
void |
shutdown()
Indicates to the component that it will no longer be used and should shut
itself down cleanly.
|
protected final MediaTracker mt
public TemplateImageLoaderAwt(IsisConfiguration configuration)
public void init()
ApplicationScopedComponentinit in interface ApplicationScopedComponentpublic void shutdown()
ApplicationScopedComponentshutdown in interface ApplicationScopedComponentpublic TemplateImage getTemplateImage(String name)
If the path has no extension (.gif, .png etc) then all
valid extensions are searched for.
This method attempts to load the image from the jar/zip file this class was loaded from ie, your application, and then from the file system as a file if can't be found as a resource. If neither method works the default image is returned.
getTemplateImage in interface TemplateImageLoaderTemplateImage for the specified image file, or
null if none found.protected Image loadAsResource(String path)
Copyright © 2010–2014 The Apache Software Foundation. All rights reserved.