Package org.daisy.dotify.api.translator
Class TextBorderFactoryMaker
- java.lang.Object
-
- org.daisy.dotify.api.translator.TextBorderFactoryMaker
-
- All Implemented Interfaces:
TextBorderFactoryMakerService
public class TextBorderFactoryMaker extends Object implements TextBorderFactoryMakerService
Provides a text border factory maker. This class will look for implementations of the TextBorderFactory interface using the services API. It will return the first implementation that matches the requested specification.This class can be overridden by extending it and adding a reference to the new implementation to the services API. This class will then choose the new implementation when a new instance is requested.
-
-
Constructor Summary
Constructors Constructor Description TextBorderFactoryMaker()
Creates a new text border factory maker.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFactory(TextBorderFactoryService factory)
Adds a factory (intended for use by the OSGi framework)static TextBorderFactoryMakerService
newInstance()
Creates a new TextBorderFactoryMaker and populates it using the SPI (java service provider interface).TextBorderStyle
newTextBorderStyle(Map<String,Object> features)
Creates a new text border style with the suppled specificationsvoid
removeFactory(TextBorderFactoryService factory)
Removes a factory (intended for use by the OSGi framework)
-
-
-
Method Detail
-
newInstance
public static TextBorderFactoryMakerService newInstance()
Creates a new TextBorderFactoryMaker and populates it using the SPI (java service provider interface).
In an OSGi context, an instance should be retrieved using the service registry. It will be registered under the TextBorderFactoryMakerService interface.
- Returns:
- returns a new marker processor factory maker.
-
addFactory
public void addFactory(TextBorderFactoryService factory)
Adds a factory (intended for use by the OSGi framework)- Parameters:
factory
- the factory to add
-
removeFactory
public void removeFactory(TextBorderFactoryService factory)
Removes a factory (intended for use by the OSGi framework)- Parameters:
factory
- the factory to remove
-
newTextBorderStyle
public TextBorderStyle newTextBorderStyle(Map<String,Object> features) throws TextBorderConfigurationException
Description copied from interface:TextBorderFactoryMakerService
Creates a new text border style with the suppled specifications- Specified by:
newTextBorderStyle
in interfaceTextBorderFactoryMakerService
- Parameters:
features
- the features to use- Returns:
- returns a new text border style
- Throws:
TextBorderConfigurationException
- if an instance cannot be created
-
-