Class ActivateLoggingFontFactory
- java.lang.Object
-
- com.levigo.jadice.appbase.font.factory.log.DelegateLoggingFontFactory
-
- com.levigo.jadice.appbase.font.factory.log.ActivateLoggingFontFactory
-
- All Implemented Interfaces:
LoggingFontFactory,FontFactory
public class ActivateLoggingFontFactory extends DelegateLoggingFontFactory
Wraps anotherFontFactoryand initializes the creation of log messages for every request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceActivateLoggingFontFactory.LogSinkReceives the log message that has been produced.
-
Constructor Summary
Constructors Constructor Description ActivateLoggingFontFactory(FontFactory delegate, ActivateLoggingFontFactory.LogSink logSink)ActivateLoggingFontFactory(FontFactory delegate, ActivateLoggingFontFactory.LogSink logSink, String id)ActivateLoggingFontFactory(FontFactory delegate, Logger logger)
-
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.-
Methods inherited from class com.levigo.jadice.appbase.font.factory.log.DelegateLoggingFontFactory
createAndLog
-
-
-
-
Constructor Detail
-
ActivateLoggingFontFactory
public ActivateLoggingFontFactory(FontFactory delegate, Logger logger)
- Parameters:
delegate- performs the actual worklogger- used to log the output at log levelLevel.DEBUG
-
ActivateLoggingFontFactory
public ActivateLoggingFontFactory(FontFactory delegate, ActivateLoggingFontFactory.LogSink logSink)
- Parameters:
delegate- performs the actual worklogSink- receives the log output
-
ActivateLoggingFontFactory
public ActivateLoggingFontFactory(FontFactory delegate, ActivateLoggingFontFactory.LogSink logSink, String id)
- Parameters:
delegate- performs the actual worklogSink- receives the log outputid- identifies this instance
-
-
Method Detail
-
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- Overrides:
createin classDelegateLoggingFontFactory- 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
-
-