Class DelegateLoggingFontFactory
- java.lang.Object
-
- com.levigo.jadice.appbase.font.factory.log.DelegateLoggingFontFactory
-
- All Implemented Interfaces:
LoggingFontFactory,FontFactory
- Direct Known Subclasses:
ActivateLoggingFontFactory
public class DelegateLoggingFontFactory extends Object implements LoggingFontFactory
Wraps anotherFontFactory, adding basic log output if necessary.
-
-
Constructor Summary
Constructors Constructor Description DelegateLoggingFontFactory(FontFactory delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Fontcreate(FontAttributeSet fontAttributeSet, Map<String,Object> scope)Supply aFontwhich fits well for the requested parameters.FontcreateAndLog(FontAttributeSet fontAttributeSet, Map<String,Object> scope, Log log)Perform theFontFactory's usual duties, but also create log output.
-
-
-
Constructor Detail
-
DelegateLoggingFontFactory
public DelegateLoggingFontFactory(FontFactory delegate)
-
-
Method Detail
-
createAndLog
public Font createAndLog(FontAttributeSet fontAttributeSet, Map<String,Object> scope, Log log)
Description copied from interface:LoggingFontFactoryPerform theFontFactory's usual duties, but also create log output. Typically this method would delegate toFontFactory.create(FontAttributeSet, Map).- Specified by:
createAndLogin interfaceLoggingFontFactory- Parameters:
fontAttributeSet- seeFontFactory.create(FontAttributeSet, Map)scope- seeFontFactory.create(FontAttributeSet, Map)log- Receives the log output created during this invocation- Returns:
- see
FontFactory.create(FontAttributeSet, Map)
-
create
public Font create(FontAttributeSet fontAttributeSet, Map<String,Object> scope)
Description copied from interface:FontFactorySupply aFontwhich fits well for the requested parameters. Care should be taken to provide a fast implementation. This method might be called frequently and from various Threads at the same time. Blocking should be avoided.- Specified by:
createin interfaceFontFactory- Parameters:
fontAttributeSet- TheAttributes the requested font should have. Characteristics like its name or styles.scope- Information about this request's scope. This could encompass things like its intent, target, purpose or source.- Returns:
- a
Fontdeemed appropriate, ornullif no suchFontis available. Some implementations might be able to return aFontwhich fits all requested characteristics. Others might have several to choose from or none at all. TheFontwhich is returned doesn't have to fit all of the requested characteristics, or even any at all. It must only be appropriate in the given situation. - See Also:
Scopes
-
-