Class AbstractEmbosser
- java.lang.Object
-
- org.daisy.dotify.api.factory.AbstractFactory
-
- org.daisy.braille.utils.impl.tools.embosser.AbstractEmbosser
-
- All Implemented Interfaces:
Serializable,Embosser,EmbosserFactoryProperties,EmbosserProperties,Factory,FactoryProperties
- Direct Known Subclasses:
BrailloEmbosser,CidatEmbosser,EnablingTechnologiesEmbosser,GenericEmbosser,IndexEmbosser,Interpoint55Embosser,MountbattenEmbosser,TigerEmbosser
public abstract class AbstractEmbosser extends AbstractFactory implements Embosser
Provides an abstract base for Embossers, implementing basic features such as the ability to set page format, table, and cell height and width.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.daisy.dotify.api.embosser.EmbosserProperties
EmbosserProperties.PrintMode
-
Nested classes/interfaces inherited from interface org.daisy.dotify.api.factory.FactoryProperties
FactoryProperties.ComparatorBuilder
-
-
Field Summary
Fields Modifier and Type Field Description protected TabledefaultTableprotected TablesetTableprotected TableCatalogServicetableCatalogService
-
Constructor Summary
Constructors Constructor Description AbstractEmbosser(TableCatalogService service, EmbosserFactoryProperties emProps)Creates a new AbstractEmbosser with the supplied name, description and identifier.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract doublegetCellHeight()Gets cell height (4 x the vertical dot-to-dot distance), in millimeters.protected abstract doublegetCellWidth()Gets cell width (2 x the horizontal dot-to-dot distance), in millimeters.ObjectgetFeature(String key)Gets the value of a feature used by this Factory.StringgetMake()Gets the make for this embosser.intgetMaxHeight(PageFormat pageFormat)Gets the max height for the specified page format.intgetMaxWidth(PageFormat pageFormat)Gets the max width for the specified page format.StringgetModel()Gets the model for this embosser.protected PageFormatgetPageFormat()Gets the page format.AreagetPrintableArea(PageFormat pageFormat)Gets the printable area for the specified page format.ObjectgetProperty(String key)Gets the value of a read-only property that applies to all objects returned by this Factory.voidsetFeature(String key, Object value)Associates the specified value with the specified key in this map.booleansupportsTable(Table table)Returns true if table is supported.StringtoString()-
Methods inherited from class org.daisy.dotify.api.factory.AbstractFactory
getDescription, getDisplayName, getIdentifier
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.daisy.dotify.api.embosser.Embosser
getPrintPage, getTableFilter, newEmbosserWriter, newEmbosserWriter, supportsPageFormat, supportsPaper, supportsPrintPage
-
Methods inherited from interface org.daisy.dotify.api.embosser.EmbosserProperties
supports8dot, supportsAligning, supportsDuplex, supportsPrintMode, supportsVolumes, supportsZFolding
-
Methods inherited from interface org.daisy.dotify.api.factory.FactoryProperties
getDescription, getDisplayName, getIdentifier
-
-
-
-
Field Detail
-
tableCatalogService
protected final TableCatalogService tableCatalogService
-
defaultTable
protected final Table defaultTable
-
setTable
protected Table setTable
-
-
Constructor Detail
-
AbstractEmbosser
public AbstractEmbosser(TableCatalogService service, EmbosserFactoryProperties emProps)
Creates a new AbstractEmbosser with the supplied name, description and identifier.- Parameters:
service- the table catalogemProps- the properties
-
-
Method Detail
-
getMake
public String getMake()
Description copied from interface:EmbosserFactoryPropertiesGets the make for this embosser.- Specified by:
getMakein interfaceEmbosserFactoryProperties- Returns:
- returns the make
-
getModel
public String getModel()
Description copied from interface:EmbosserFactoryPropertiesGets the model for this embosser.- Specified by:
getModelin interfaceEmbosserFactoryProperties- Returns:
- returns the model
-
getPageFormat
protected PageFormat getPageFormat()
Gets the page format.- Returns:
- returns the page format
-
getCellWidth
protected abstract double getCellWidth()
Gets cell width (2 x the horizontal dot-to-dot distance), in millimeters.- Returns:
- returns cell width, in millimeters
-
getCellHeight
protected abstract double getCellHeight()
Gets cell height (4 x the vertical dot-to-dot distance), in millimeters. This value should not include any line spacing.- Returns:
- returns cell height, in millimeters
-
getMaxHeight
public int getMaxHeight(PageFormat pageFormat)
Description copied from interface:EmbosserGets the max height for the specified page format.- Specified by:
getMaxHeightin interfaceEmbosser- Parameters:
pageFormat- the page format- Returns:
- returns the max height for the specified page format
-
getMaxWidth
public int getMaxWidth(PageFormat pageFormat)
Description copied from interface:EmbosserGets the max width for the specified page format.- Specified by:
getMaxWidthin interfaceEmbosser- Parameters:
pageFormat- the page format- Returns:
- returns the max width for the specified page format
-
getPrintableArea
public Area getPrintableArea(PageFormat pageFormat)
Description copied from interface:EmbosserGets the printable area for the specified page format.- Specified by:
getPrintableAreain interfaceEmbosser- Parameters:
pageFormat- the page format- Returns:
- returns the printable area for the specified page format
-
getFeature
public Object getFeature(String key)
Description copied from interface:FactoryGets the value of a feature used by this Factory.- Specified by:
getFeaturein interfaceFactory- Parameters:
key- the key for the feature- Returns:
- returns the current value of the feature
-
getProperty
public Object getProperty(String key)
Description copied from interface:FactoryGets the value of a read-only property that applies to all objects returned by this Factory.- Specified by:
getPropertyin interfaceFactory- Parameters:
key- the name of the property to get- Returns:
- returns the value associated with this property or null if none is found
-
setFeature
public void setFeature(String key, Object value)
Associates the specified value with the specified key in this map. If the map previously contained a mapping for this key, the old value is replaced.- Specified by:
setFeaturein interfaceFactory- Parameters:
key- key with which the specified value is to be associated.value- value to be associated with the specified key.
-
supportsTable
public boolean supportsTable(Table table)
Description copied from interface:EmbosserReturns true if table is supported.- Specified by:
supportsTablein interfaceEmbosser- Parameters:
table- the table to test- Returns:
- returns true if table is supported
-
toString
public String toString()
- Overrides:
toStringin classAbstractFactory
-
-