|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.framework.AbstractFactory
org.extex.font.FontFactoryImpl
public class FontFactoryImpl
Factory to load a font. The factory uses a cache (a weak map) to increase the speed.
| Field Summary |
|---|
| Fields inherited from class org.extex.framework.AbstractFactory |
|---|
CLASS_ATTRIBUTE, DEFAULT_ATTRIBUTE, SELECT_ATTRIBUTE |
| Constructor Summary | |
|---|---|
FontFactoryImpl()
Creates a new object. |
|
| Method Summary | |
|---|---|
void |
configure(Configuration configuration)
Configure an object according to a given Configuration. |
BackendFontManager |
createManager(java.util.List<java.lang.String> fontTypes)
Create a manager for the back-end font. |
void |
enableTracing(boolean flag)
Enable or disable the tracing. |
NamedInputStream |
findResource(java.lang.String name,
java.lang.String type)
Find a resource which can be used for reading. |
BackendFont |
getBackendFont(FontKey key)
Return the font for the backend. |
FontKey |
getFontKey(FontKey fontKey,
FixedDimen size)
Returns a font key for the font. |
FontKey |
getFontKey(java.lang.String fontName)
Returns a font key for the font. |
FontKey |
getFontKey(java.lang.String fontName,
FixedDimen size)
Returns a font key for the font. |
FontKey |
getFontKey(java.lang.String fontName,
FixedDimen size,
java.util.Map<java.lang.String,?> map)
Returns a font key for the font. |
FontKey |
getFontKey(java.lang.String fontName,
FixedDimen size,
java.util.Map<java.lang.String,?> map,
java.util.List<java.lang.String> feature)
Returns a font key for the font. |
ExtexFont |
getInstance(FontKey key)
Return a new instance. |
java.util.Properties |
getProp()
Getter for prop. |
void |
setProperties(java.util.Properties properties)
Setter for the properties. |
void |
setResourceFinder(ResourceFinder finder)
Setter for the resource finder. |
| Methods inherited from class org.extex.framework.AbstractFactory |
|---|
configure, createInstance, createInstance, createInstance, createInstance, createInstanceForConfiguration, createInstanceForConfiguration, createInstanceForConfiguration, enableLogging, enableLogging, getConfiguration, getLogger, getResourceFinder, reconnect, selectConfiguration |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.extex.framework.logger.LogEnabled |
|---|
enableLogging |
| Constructor Detail |
|---|
public FontFactoryImpl()
| Method Detail |
|---|
public void configure(Configuration configuration)
throws ConfigurationException
configure in interface Configurableconfigure in class AbstractFactoryconfiguration - the configuration object to consider
ConfigurationException - in case that something went wrongConfigurable.configure(
org.extex.framework.configuration.Configuration)
public BackendFontManager createManager(java.util.List<java.lang.String> fontTypes)
throws ConfigurationException
createManager in interface CoreFontFactoryfontTypes - the font types, which the back-end can use. The order of
the entries in the list determine the preference for the font
format. This should be taken into account when several
alternatives are possible.
ConfigurationException - from the configuration system.CoreFontFactory.createManager(java.util.List)public void enableTracing(boolean flag)
ResourceFinder
enableTracing in interface ResourceFinderflag - indicator whether tracing should be turned on or off.ResourceFinder.enableTracing(boolean)
public NamedInputStream findResource(java.lang.String name,
java.lang.String type)
throws ConfigurationException
ResourceFindernull is returned.
findResource in interface ResourceFindername - the base name of the resourcetype - the type, i.e. the extension
null if none could be found
ConfigurationException - in case of an exceptionResourceFinder.findResource(java.lang.String,
java.lang.String)
public BackendFont getBackendFont(FontKey key)
throws FontException
null is returned.
getBackendFont in interface BackendFontFactorykey - the fount key
FontException - if a font error occurred.BackendFontFactory.getBackendFont(org.extex.font.FontKey)
public FontKey getFontKey(FontKey fontKey,
FixedDimen size)
CoreFontFactory
getFontKey in interface CoreFontFactoryfontKey - the key of the font.size - the size of the font.
CoreFontFactory.getFontKey(org.extex.font.FontKey,
org.extex.core.dimen.FixedDimen)public FontKey getFontKey(java.lang.String fontName)
getFontKey in interface CoreFontFactoryfontName - the name of the font.
CoreFontFactory.getFontKey(java.lang.String)
public FontKey getFontKey(java.lang.String fontName,
FixedDimen size)
getFontKey in interface CoreFontFactoryfontName - the name of the font.size - the size of the font.
CoreFontFactory.getFontKey(java.lang.String,
org.extex.core.dimen.FixedDimen)
public FontKey getFontKey(java.lang.String fontName,
FixedDimen size,
java.util.Map<java.lang.String,?> map)
getFontKey in interface CoreFontFactoryfontName - the name of the font.size - the size of the font.map - the map for the key.
CoreFontFactory.getFontKey(java.lang.String,
org.extex.core.dimen.FixedDimen, java.util.Map)
public FontKey getFontKey(java.lang.String fontName,
FixedDimen size,
java.util.Map<java.lang.String,?> map,
java.util.List<java.lang.String> feature)
getFontKey in interface CoreFontFactoryfontName - the name of the font.size - the size of the font.map - the map for the key.feature - the list of features.
CoreFontFactory.getFontKey(java.lang.String,
org.extex.core.dimen.FixedDimen, java.util.Map, java.util.List)
public ExtexFont getInstance(FontKey key)
throws ConfigurationException,
FontException
NullFont are
returned.
If the font is found in the cache, the cached object is returned,
otherwise, the font is loaded from a file.
getInstance in interface CoreFontFactorykey - the fount key
ConfigurationException - from the resource finder.
FontException - if a font-error occurred.public java.util.Properties getProp()
public void setProperties(java.util.Properties properties)
PropertyAware
setProperties in interface PropertyAwareproperties - the properties to use for configurationPropertyAware.setProperties(java.util.Properties)public void setResourceFinder(ResourceFinder finder)
AbstractFactory
setResourceFinder in interface ResourceAwaresetResourceFinder in class AbstractFactoryfinder - the resource finderResourceAware.setResourceFinder(
org.extex.resource.ResourceFinder)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||