org.extex.font.manager
Class AbstractBackendFontManager

java.lang.Object
  extended by org.extex.font.manager.AbstractBackendFontManager
All Implemented Interfaces:
BackendFontManager
Direct Known Subclasses:
AfmBackendFontManager, TfmBackendFontManager, XtfBackendFontManager

public abstract class AbstractBackendFontManager
extends java.lang.Object
implements BackendFontManager

Abstract Backend font manager.

Version:
$Revision: 5890 $
Author:
Michael Niedermair

Field Summary
protected  BackendFontFactory factory
          The back-end font factory.
protected  java.util.Map<FontKey,ManagerInfo> fontList
          The font list.
protected  boolean newRecongnizedFont
          Is it a recognized font?
protected  BackendCharacter recognizedCharcterId
          The back-end character.
protected  BackendFont recognizedFont
          The recognized font.
 
Constructor Summary
AbstractBackendFontManager()
          Creates a new object.
 
Method Summary
 BackendCharacter getRecognizedCharId()
          Get the char info for the most recently recognized pair of font and character.
 BackendFont getRecognizedFont()
          Get the font info for the most recently recognized pair of font and character.
 boolean isNewRecongnizedFont()
          Get the new font indicator for the most recently recognized pair of font and character.
 java.util.Iterator<ManagerInfo> iterate()
          Return the iterator for all recognized back-end fonts as ManagerInfo.
 void reset()
          Rest the internal state to the initial state.
 void setBackendFontFactory(BackendFontFactory f)
          Setter for the back-end font factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.extex.font.BackendFontManager
recognize
 

Field Detail

factory

protected BackendFontFactory factory
The back-end font factory.


fontList

protected java.util.Map<FontKey,ManagerInfo> fontList
The font list.


newRecongnizedFont

protected boolean newRecongnizedFont
Is it a recognized font?


recognizedCharcterId

protected BackendCharacter recognizedCharcterId
The back-end character.


recognizedFont

protected BackendFont recognizedFont
The recognized font.

Constructor Detail

AbstractBackendFontManager

public AbstractBackendFontManager()
Creates a new object.

Method Detail

getRecognizedCharId

public BackendCharacter getRecognizedCharId()
Get the char info for the most recently recognized pair of font and character. If invoked before any character has been recognized successfully then null is returned.

Specified by:
getRecognizedCharId in interface BackendFontManager
Returns:
the char info for the most recently recognized font/character pair
See Also:
BackendFontManager.getRecognizedCharId()

getRecognizedFont

public BackendFont getRecognizedFont()
Get the font info for the most recently recognized pair of font and character. If invoked before any character has been recognized successfully then null is returned.

Specified by:
getRecognizedFont in interface BackendFontManager
Returns:
the font info for the most recently recognized font/character pair
See Also:
BackendFontManager.getRecognizedFont()

isNewRecongnizedFont

public boolean isNewRecongnizedFont()
Get the new font indicator for the most recently recognized pair of font and character. If the font has never been recognized before then true is returned. The font compared for this test is the back-end font – not the font passed in. This means that each time getRecognizedFont() returns a new font info this method returns true.

If invoked before any character has been recognized successfully then null is returned.

Specified by:
isNewRecongnizedFont in interface BackendFontManager
Returns:
the font info for the most recently recognized font/character pair
See Also:
BackendFontManager.isNewRecongnizedFont()

iterate

public java.util.Iterator<ManagerInfo> iterate()
Return the iterator for all recognized back-end fonts as ManagerInfo. The fonts are sorted by the name.

Specified by:
iterate in interface BackendFontManager
Returns:
the iterator for all recognized back-end font as ManagerInfo.
See Also:
BackendFontManager.iterate()

reset

public void reset()
Rest the internal state to the initial state. Afterwards the instance does not know anything about recognized fonts and can be used like a newly created instance.

Specified by:
reset in interface BackendFontManager
See Also:
BackendFontManager.reset()

setBackendFontFactory

public void setBackendFontFactory(BackendFontFactory f)
Setter for the back-end font factory.

Specified by:
setBackendFontFactory in interface BackendFontManager
Parameters:
f - the back-end font factory to set
See Also:
BackendFontManager.setBackendFontFactory(org.extex.font.BackendFontFactory)