de.intarsys.cwt.font
Class StandardFontRegistry

java.lang.Object
  extended by de.intarsys.cwt.font.StandardFontRegistry
All Implemented Interfaces:
IFontRegistry

public class StandardFontRegistry
extends java.lang.Object
implements IFontRegistry


Constructor Summary
StandardFontRegistry()
           
 
Method Summary
protected  IFont basicLookup(java.lang.String key, IFontQuery query)
           
protected  boolean basicMatchFamily(IFontQuery query, IFont font)
           
protected  boolean basicMatchFamilyStyle(IFontQuery query, IFont font)
           
protected  void basicRegister(java.lang.String key, IFont value)
           
 IFontFamily[] getFontFamilies()
          The IFontFamily instances formed by the IFont instances in this IFontRegistry.
 IFont[] getFonts()
          The IFont instances in this IFontRegistry.
protected  java.lang.Object getLookupKeyFontFamily(IFontQuery query)
           
protected  java.lang.String getLookupKeyFontName(IFontQuery query)
           
protected  java.lang.String getLookupKeyFontNameAsCanonical(IFontQuery query)
           
protected  java.lang.String getLookupKeyFontNameCanonical(IFontQuery query)
           
protected  java.lang.String getLookupKeyFontNamePostScript(IFontQuery query)
           
 IFont lookupFont(IFontQuery query)
          The IFont selected by the IFontQuery.
 IFontFamily lookupFontFamily(IFontQuery query)
          The IFontFamily selected by the IFontQuery.
 void registerFont(IFont font)
          Add a new IFont to the IFontRegistry.
protected  java.lang.String removeSpaces(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardFontRegistry

public StandardFontRegistry()
Method Detail

basicLookup

protected IFont basicLookup(java.lang.String key,
                            IFontQuery query)

basicMatchFamily

protected boolean basicMatchFamily(IFontQuery query,
                                   IFont font)

basicMatchFamilyStyle

protected boolean basicMatchFamilyStyle(IFontQuery query,
                                        IFont font)

basicRegister

protected void basicRegister(java.lang.String key,
                             IFont value)

getFontFamilies

public IFontFamily[] getFontFamilies()
Description copied from interface: IFontRegistry
The IFontFamily instances formed by the IFont instances in this IFontRegistry.

Specified by:
getFontFamilies in interface IFontRegistry
Returns:
The IFontFamily instances formed by the IFont instances in this IFontRegistry.

getFonts

public IFont[] getFonts()
Description copied from interface: IFontRegistry
The IFont instances in this IFontRegistry.

Specified by:
getFonts in interface IFontRegistry
Returns:
The IFont instances in this IFontRegistry.

getLookupKeyFontFamily

protected java.lang.Object getLookupKeyFontFamily(IFontQuery query)

getLookupKeyFontName

protected java.lang.String getLookupKeyFontName(IFontQuery query)

getLookupKeyFontNameAsCanonical

protected java.lang.String getLookupKeyFontNameAsCanonical(IFontQuery query)

getLookupKeyFontNameCanonical

protected java.lang.String getLookupKeyFontNameCanonical(IFontQuery query)

getLookupKeyFontNamePostScript

protected java.lang.String getLookupKeyFontNamePostScript(IFontQuery query)

lookupFont

public IFont lookupFont(IFontQuery query)
Description copied from interface: IFontRegistry
The IFont selected by the IFontQuery.

Specified by:
lookupFont in interface IFontRegistry
Parameters:
query - A IFontQuery describing a single IFont.
Returns:
The IFont selected by the IFontQuery.

lookupFontFamily

public IFontFamily lookupFontFamily(IFontQuery query)
Description copied from interface: IFontRegistry
The IFontFamily selected by the IFontQuery.

Specified by:
lookupFontFamily in interface IFontRegistry
Parameters:
query - A IFontQuery describing a single IFontFamily.
Returns:
The IFontFamily selected by the IFontQuery.

registerFont

public void registerFont(IFont font)
Description copied from interface: IFontRegistry
Add a new IFont to the IFontRegistry.

Specified by:
registerFont in interface IFontRegistry
Parameters:
font - The new IFont

removeSpaces

protected java.lang.String removeSpaces(java.lang.String name)