Class AbstractFontFactory
- java.lang.Object
-
- com.levigo.jadice.appbase.font.factory.AbstractFontFactory
-
- All Implemented Interfaces:
FontFactory
- Direct Known Subclasses:
FamilyNameFontFactory,FontNameFontFactory,LogicalFontFactory,NameFontFactory,PostScriptNameFontFactory,Standard14FontFactory,WellKnownNameFontFactory
public abstract class AbstractFontFactory extends Object implements FontFactory
Base functionality useful for many implementations.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractFontFactory(FontManagerFuture fontManagerFuture)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Optional<Font>getFontFor(Attribute<? extends Serializable>... fontAttributes)Resolves aFontbased on the given fontAttributes.protected FontgetFontFor(FontSource fontSource)protected FontResolvergetFontResolver(FontManager fontManager)Returns use case specificFontResolverimplementation.protected FontSourcegetFontSourceFor(Attribute<? extends Serializable>... fontAttributes)protected FontSourcegetFontSourceForFontAttributeSet(FontAttributeSet fontAttributeSet)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.levigo.jadice.document.font.factory.FontFactory
create
-
-
-
-
Constructor Detail
-
AbstractFontFactory
protected AbstractFontFactory(FontManagerFuture fontManagerFuture)
-
-
Method Detail
-
getFontSourceForFontAttributeSet
protected FontSource getFontSourceForFontAttributeSet(FontAttributeSet fontAttributeSet)
-
getFontSourceFor
@SafeVarargs protected final FontSource getFontSourceFor(Attribute<? extends Serializable>... fontAttributes)
-
getFontFor
@SafeVarargs protected final Optional<Font> getFontFor(Attribute<? extends Serializable>... fontAttributes)
Resolves aFontbased on the given fontAttributes.- Parameters:
fontAttributes- The attributes which shall be used to create aFontAttributeSet- Returns:
- The font wrapped in an optional or an empty optional if the font couldn't be resolved
-
getFontFor
protected final Font getFontFor(FontSource fontSource)
- Parameters:
fontSource- The fontSource for which the loading shall be performed- Returns:
- The loaded font or
nullif the loading failed.
-
getFontResolver
protected FontResolver getFontResolver(FontManager fontManager)
Returns use case specificFontResolverimplementation.- Parameters:
fontManager-FontManagerinstance to use- Returns:
- Use case specific
FontResolverimplementation
-
-