|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jmage.resource.FontFactory
public class FontFactory
FontFactory loads and creates fonts as resources from system environment.
Field Summary | |
---|---|
protected ApplicationContext |
applicationContext
|
protected static FontFactory |
fontFactory
|
protected java.util.List |
fontTypes
|
protected static org.apache.log4j.Logger |
log
|
protected java.util.List |
schemeTypes
|
protected javax.servlet.ServletContext |
servletContext
|
Constructor Summary | |
---|---|
FontFactory()
|
Method Summary | |
---|---|
boolean |
canHandle(java.net.URI resource)
Determines whether a ResourceFactory can handle a resource for a given URI. |
void |
configure(ApplicationContext context)
|
void |
configureRequestProperties(java.util.Properties properties)
Initialize the ResourceFactory with extra Properties needed |
java.lang.Object |
createFrom(java.net.URI resource)
Creates a resource object to use from a given URI. |
protected java.awt.Font |
getAbsoluteFile(java.io.File file)
|
protected java.awt.Font |
getClassPathResource(java.io.File file)
|
protected java.awt.Font |
getCurrentDirFile(java.io.File file)
|
protected java.awt.Font |
getFile(java.io.File file)
|
protected java.awt.Font |
getJMAGEResourceDirFile(java.io.File file)
|
protected java.awt.Font |
getServletContainerResource(java.io.File file)
Get the file from the ServletContainer as a system resource. |
protected java.awt.Font |
getURL(java.net.URL url)
|
protected java.io.InputStream |
loadFile(java.io.File file)
|
protected java.io.InputStream |
loadUrl(java.net.URL url)
|
void |
removeRequestProperties(java.util.Properties properties)
Lifecycle method for removing per request properties |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static FontFactory fontFactory
protected static org.apache.log4j.Logger log
protected java.util.List fontTypes
protected java.util.List schemeTypes
protected ApplicationContext applicationContext
protected javax.servlet.ServletContext servletContext
Constructor Detail |
---|
public FontFactory()
Method Detail |
---|
public void configureRequestProperties(java.util.Properties properties)
ResourceFactory
configureRequestProperties
in interface ResourceFactory
public void removeRequestProperties(java.util.Properties properties)
ResourceFactory
removeRequestProperties
in interface ResourceFactory
public void configure(ApplicationContext context)
configure
in interface Configurable
public boolean canHandle(java.net.URI resource)
ResourceFactory
canHandle
in interface ResourceFactory
resource
- the URI of the resource.
public java.lang.Object createFrom(java.net.URI resource) throws ResourceException
ResourceFactory
createFrom
in interface ResourceFactory
ResourceException
- if the object cannot be found or an error occurs during creation.protected java.awt.Font getFile(java.io.File file) throws ResourceException
ResourceException
protected java.awt.Font getClassPathResource(java.io.File file) throws ResourceException
ResourceException
protected java.awt.Font getCurrentDirFile(java.io.File file)
protected java.awt.Font getJMAGEResourceDirFile(java.io.File file)
protected java.awt.Font getAbsoluteFile(java.io.File file)
protected java.awt.Font getURL(java.net.URL url) throws ResourceException
ResourceException
protected java.awt.Font getServletContainerResource(java.io.File file)
file
- the file
protected java.io.InputStream loadFile(java.io.File file) throws java.io.IOException
java.io.IOException
protected java.io.InputStream loadUrl(java.net.URL url) throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |