org.extex.font.manager
Class BackendFontManagerList

java.lang.Object
  extended by org.extex.font.manager.BackendFontManagerList
All Implemented Interfaces:
BackendFontManager

public class BackendFontManagerList
extends java.lang.Object
implements BackendFontManager

A list of back-end managers.

Version:
$Revision: 6496 $
Author:
Michael Niedermair

Constructor Summary
BackendFontManagerList()
          Creates a new object.
 
Method Summary
 void add(BackendFontManager manager)
          Add a new back-end font manager.
 BackendFontManager get(int index)
          Returns the BackendFontManager.
 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.
 java.util.Iterator<ManagerInfo> iterateManagerInfo()
          TODO missing JavaDoc
 boolean recognize(FontKey fontKey, UnicodeChar uc)
          Take a character and a font and see if they can be managed by this manager.
 void reset()
          Rest the internal state to the initial state.
 void setBackendFontFactory(BackendFontFactory f)
          Setter for the back-end font factory.
 int size()
          Returns the size of the manager list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackendFontManagerList

public BackendFontManagerList()
Creates a new object.

Method Detail

add

public void add(BackendFontManager manager)
Add a new back-end font manager.

Parameters:
manager - the new manager.

get

public BackendFontManager get(int index)
Returns the BackendFontManager.

Parameters:
index - The index.
Returns:
Returns the BackendFontManager.
See Also:
List.get(int)

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()

iterateManagerInfo

public java.util.Iterator<ManagerInfo> iterateManagerInfo()
TODO missing JavaDoc

Returns:
TODO

recognize

public boolean recognize(FontKey fontKey,
                         UnicodeChar uc)
                  throws FontException
Take a character and a font and see if they can be managed by this manager. The internal state is adjusted to report the font and the character appropriately after the invocation has returned.

Specified by:
recognize in interface BackendFontManager
Parameters:
fontKey - the font key for the character at hand
uc - the Unicode character at hand
Returns:
true iff the character is defined in the font given and a font of a requested format can be delivered.
Throws:
FontException - if a font error occurred.
See Also:
BackendFontManager.recognize(org.extex.font.FontKey, org.extex.core.UnicodeChar)

reset

public void reset()
Description copied from interface: BackendFontManager
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)

size

public int size()
Returns the size of the manager list.

Returns:
Returns the size of the manager list.
See Also:
List.size()