Package org.daisy.braille.embosser
Class AbstractEmbosser
java.lang.Object
org.daisy.factory.AbstractFactory
org.daisy.braille.embosser.AbstractEmbosser
- All Implemented Interfaces:
Serializable,Comparable<Factory>,Embosser,EmbosserProperties,Factory
Provides an abstract base for Embossers, implementing basic features
such as the ability to set page format, table, and cell height and width.
- Author:
- Joel HÃ¥kansson
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.daisy.braille.embosser.EmbosserProperties
EmbosserProperties.PrintMode -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractEmbosser(String name, String desc, Enum<? extends Enum<?>> identifier) Creates a new AbstractEmbosser with the supplied name, description and identifier -
Method Summary
Modifier and TypeMethodDescriptiondoubleGets cell height, in millimetersdoubleGets cell width, in millimetersgetFeature(String key) Gets the value of a feature used by this FactoryintgetMaxHeight(PageFormat pageFormat) Gets the max height for the specified page formatintgetMaxWidth(PageFormat pageFormat) Gets the max width for the specified page formatprotected PageFormatGets the page formatgetPrintableArea(PageFormat pageFormat) Gets the printable area for the specified page formatgetProperty(String key) Gets the value of a read-only property that applies to all objects returned by this Factory.protected voidsetCellHeight(double val) Set cell height, in millimetersprotected voidsetCellWidth(double val) Set cell width, in millimetersvoidsetFeature(String key, Object value) Associates the specified value with the specified key in this map.booleansupportsTable(Table table) Returns true if table is supportedtoString()Methods inherited from class org.daisy.factory.AbstractFactory
compareTo, getDescription, getDisplayName, getIdentifierMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.daisy.braille.embosser.Embosser
getPrintPage, getTableFilter, newEmbosserWriter, newEmbosserWriter, supportsPageFormat, supportsPaper, supportsPrintPageMethods inherited from interface org.daisy.braille.embosser.EmbosserProperties
supports8dot, supportsAligning, supportsDuplex, supportsPrintMode, supportsVolumes, supportsZFoldingMethods inherited from interface org.daisy.factory.Factory
getDescription, getDisplayName, getIdentifier
-
Field Details
-
defaultTable
-
setTable
-
-
Constructor Details
-
AbstractEmbosser
Creates a new AbstractEmbosser with the supplied name, description and identifier- Parameters:
name- the embosser namedesc- the embosser descriptionidentifier- an identifier
-
-
Method Details
-
setCellWidth
protected void setCellWidth(double val) Set cell width, in millimeters- Parameters:
val- the width, in millimeters
-
setCellHeight
protected void setCellHeight(double val) Set cell height, in millimeters- Parameters:
val- the height, in millimeters
-
getPageFormat
Gets the page format- Returns:
- returns the page format
-
getCellWidth
public double getCellWidth()Gets cell width, in millimeters- Returns:
- returns cell width, in millimeters
-
getCellHeight
public double getCellHeight()Gets cell height, in millimeters- Returns:
- returns cell height, in millimeters
-
getMaxHeight
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
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
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
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
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
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
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
- Overrides:
toStringin classAbstractFactory
-