Class IndexEmbosser
- java.lang.Object
-
- org.daisy.dotify.api.factory.AbstractFactory
-
- org.daisy.braille.utils.impl.tools.embosser.AbstractEmbosser
-
- org.daisy.braille.utils.impl.provider.indexbraille.IndexEmbosser
-
- All Implemented Interfaces:
Serializable,Embosser,EmbosserFactoryProperties,EmbosserProperties,Factory,FactoryProperties
- Direct Known Subclasses:
BlueBarEmbosser,IndexV2Embosser,IndexV3Embosser,IndexV4Embosser
public abstract class IndexEmbosser extends AbstractEmbosser
TODO: write java doc.- 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 booleanduplexEnabledprotected intmarginBottomprotected intmarginInnerprotected intmarginOuterprotected intmarginTopprotected intmaxCellsInWidthprotected intmaxLinesInHeightprotected intmaxMarginBottomprotected intmaxMarginInnerprotected intmaxMarginOuterprotected intmaxMarginTopprotected intmaxNumberOfCopiesprotected intminCellsInWidthprotected intminLinesInHeightprotected intminMarginBottomprotected intminMarginInnerprotected intminMarginOuterprotected intminMarginTopprotected intnumberOfCopiesprotected booleansaddleStitchEnabledprotected IndexEmbosserProvider.EmbosserTypetypeprotected booleanzFoldingEnabled-
Fields inherited from class org.daisy.braille.utils.impl.tools.embosser.AbstractEmbosser
defaultTable, setTable, tableCatalogService
-
-
Constructor Summary
Constructors Constructor Description IndexEmbosser(TableCatalogService service, IndexEmbosserProvider.EmbosserType props)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected doublegetCellHeight()Gets cell height (4 x the vertical dot-to-dot distance), in millimeters.protected 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.AreagetPrintableArea(PageFormat pageFormat)Gets the printable area for the specified page format.protected AreagetPrintArea(PageFormat pageFormat)PrintPagegetPrintPage(PageFormat pageFormat)Gets the dimensions of one print page for the specified page format.EmbosserWriternewEmbosserWriter(Device device)Gets a new EmbosserWriter that writes to the supplied Device.voidsetFeature(String key, Object value)Associates the specified value with the specified key in this map.booleansupports8dot()Returns true if this embosser supports 8 dot braille.booleansupportsAligning()Returns true if this embosser supports aligning.booleansupportsPageFormat(PageFormat format)Returns true if the page format is supported.booleansupportsPaper(Paper paper)Returns thue if the paper is supported.booleansupportsPrintMode(EmbosserProperties.PrintMode mode)Returns true if this embosser supports magazine layout.booleansupportsPrintPage(PrintPage dim)Returns true if dimension is supported.booleansupportsVolumes()Returns true if this embosser has some method for volume handling.booleansupportsZFolding()Returns true if this embosser supports z-folding.-
Methods inherited from class org.daisy.braille.utils.impl.tools.embosser.AbstractEmbosser
getMake, getMaxHeight, getMaxWidth, getModel, getPageFormat, getProperty, supportsTable, toString
-
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
getTableFilter, newEmbosserWriter
-
Methods inherited from interface org.daisy.dotify.api.embosser.EmbosserProperties
supportsDuplex
-
Methods inherited from interface org.daisy.dotify.api.factory.FactoryProperties
getDescription, getDisplayName, getIdentifier
-
-
-
-
Field Detail
-
type
protected IndexEmbosserProvider.EmbosserType type
-
numberOfCopies
protected int numberOfCopies
-
zFoldingEnabled
protected boolean zFoldingEnabled
-
saddleStitchEnabled
protected boolean saddleStitchEnabled
-
duplexEnabled
protected boolean duplexEnabled
-
maxNumberOfCopies
protected int maxNumberOfCopies
-
marginInner
protected int marginInner
-
marginOuter
protected final int marginOuter
- See Also:
- Constant Field Values
-
marginTop
protected final int marginTop
- See Also:
- Constant Field Values
-
marginBottom
protected final int marginBottom
- See Also:
- Constant Field Values
-
minMarginInner
protected int minMarginInner
-
minMarginOuter
protected final int minMarginOuter
- See Also:
- Constant Field Values
-
minMarginTop
protected final int minMarginTop
- See Also:
- Constant Field Values
-
minMarginBottom
protected final int minMarginBottom
- See Also:
- Constant Field Values
-
maxMarginInner
protected int maxMarginInner
-
maxMarginOuter
protected int maxMarginOuter
-
maxMarginTop
protected int maxMarginTop
-
maxMarginBottom
protected int maxMarginBottom
-
minCellsInWidth
protected int minCellsInWidth
-
minLinesInHeight
protected int minLinesInHeight
-
maxCellsInWidth
protected int maxCellsInWidth
-
maxLinesInHeight
protected int maxLinesInHeight
-
-
Constructor Detail
-
IndexEmbosser
public IndexEmbosser(TableCatalogService service, IndexEmbosserProvider.EmbosserType props)
-
-
Method Detail
-
getCellWidth
protected double getCellWidth()
Description copied from class:AbstractEmbosserGets cell width (2 x the horizontal dot-to-dot distance), in millimeters.- Specified by:
getCellWidthin classAbstractEmbosser- Returns:
- returns cell width, in millimeters
-
getCellHeight
protected double getCellHeight()
Description copied from class:AbstractEmbosserGets cell height (4 x the vertical dot-to-dot distance), in millimeters. This value should not include any line spacing.- Specified by:
getCellHeightin classAbstractEmbosser- Returns:
- returns cell height, in millimeters
-
supportsPaper
public boolean supportsPaper(Paper paper)
Description copied from interface:EmbosserReturns thue if the paper is supported.- Parameters:
paper- the paper- Returns:
- returns true if the paper is supported, false otherwise
-
supportsPageFormat
public boolean supportsPageFormat(PageFormat format)
Description copied from interface:EmbosserReturns true if the page format is supported.- Parameters:
format- the page format- Returns:
- returns true if the page format is supported, false otherwise
-
supportsPrintPage
public boolean supportsPrintPage(PrintPage dim)
Description copied from interface:EmbosserReturns true if dimension is supported.- Parameters:
dim- the dimension to test- Returns:
- returns true if dimension is supported
-
supportsVolumes
public boolean supportsVolumes()
Description copied from interface:EmbosserPropertiesReturns true if this embosser has some method for volume handling.- Returns:
- returns true if this embosser supports volumes
-
supportsAligning
public boolean supportsAligning()
Description copied from interface:EmbosserPropertiesReturns true if this embosser supports aligning. This indicates that rows can be padded with whitespace to move the text block horizontally using the value returned bygetMaxWidth. Should return true for all physical embossers, since they all have a finite row length.- Returns:
- returns true if this embosser supports aligning, false otherwise.
-
supports8dot
public boolean supports8dot()
Description copied from interface:EmbosserPropertiesReturns true if this embosser supports 8 dot braille.- Returns:
- returns true if this embosser supports 8 dot braille
-
supportsZFolding
public boolean supportsZFolding()
Description copied from interface:EmbosserPropertiesReturns true if this embosser supports z-folding. This indicates that, if tractor paper is used, the embosser can emboss every other paper upside down with the rear side up so that pages are ordered face up as they fold naturally in the output stack.- Returns:
- returns true if this embosser supports z-folding, false otherwise.
-
supportsPrintMode
public boolean supportsPrintMode(EmbosserProperties.PrintMode mode)
Description copied from interface:EmbosserPropertiesReturns true if this embosser supports magazine layout. This indicates that the embosser can reorder pages and emboss two pages side-by-side on the same side of the paper (and two more on the other side), so that a readable document is created by stapling and folding the output stack in the middle.- Parameters:
mode- the print mode- Returns:
- returns true if this embosser supports magazine layout, false otherwise.
-
newEmbosserWriter
public EmbosserWriter newEmbosserWriter(Device device)
Description copied from interface:EmbosserGets a new EmbosserWriter that writes to the supplied Device.- Parameters:
device- the device that the EmbosserWriter should use- Returns:
- returns a new EmbosserWriter
-
setFeature
public void setFeature(String key, Object value)
Description copied from class:AbstractEmbosserAssociates 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- Overrides:
setFeaturein classAbstractEmbosser- Parameters:
key- key with which the specified value is to be associated.value- value to be associated with the specified key.
-
getFeature
public Object getFeature(String key)
Description copied from interface:FactoryGets the value of a feature used by this Factory.- Specified by:
getFeaturein interfaceFactory- Overrides:
getFeaturein classAbstractEmbosser- Parameters:
key- the key for the feature- Returns:
- returns the current value of the feature
-
getPrintPage
public PrintPage getPrintPage(PageFormat pageFormat)
Description copied from interface:EmbosserGets the dimensions of one print page for the specified page format.- Parameters:
pageFormat- the page format- Returns:
- returns the dimensions of one print page 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- Overrides:
getPrintableAreain classAbstractEmbosser- Parameters:
pageFormat- the page format- Returns:
- returns the printable area for the specified page format
-
getPrintArea
protected Area getPrintArea(PageFormat pageFormat)
-
-