Package org.daisy.braille.embosser
Class SimpleEmbosserProperties
- java.lang.Object
-
- org.daisy.braille.embosser.SimpleEmbosserProperties
-
- All Implemented Interfaces:
EmbosserProperties,EmbosserWriterProperties
public class SimpleEmbosserProperties extends java.lang.Object implements EmbosserWriterProperties
Provides a simple way to implement EmbosserProperties- Author:
- Joel HÃ¥kansson
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.daisy.braille.embosser.EmbosserProperties
EmbosserProperties.PrintMode
-
-
Constructor Summary
Constructors Constructor Description SimpleEmbosserProperties(int maxWidth, int maxHeight)Creates a new SimpleEmbosserProperties with all "supports" properties set to false and cell width = 6 and cell height = 10
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimpleEmbosserPropertiescellHeight(double val)Sets the value of cell heightSimpleEmbosserPropertiescellWidth(double val)Sets the value of cell widthdoublegetCellHeight()Gets the cell height, in millimetersdoublegetCellWidth()Gets the cell width, in millimetersintgetMaxHeight()Gets the maximum page height in the current configurationintgetMaxWidth()Gets the maximum row width in the current configurationbooleansupports8dot()Returns true if this embosser supports 8 dot brailleSimpleEmbosserPropertiessupports8dot(boolean val)Sets the value of eight dot supportbooleansupportsAligning()Returns true if this embosser supports aligning.SimpleEmbosserPropertiessupportsAligning(boolean val)Sets the value of aligning supportbooleansupportsDuplex()Returns true if this embosser supports duplex printingSimpleEmbosserPropertiessupportsDuplex(boolean val)Sets the value of duplex supportSimpleEmbosserPropertiessupportsMagazineLayout(boolean val)Sets the value of magazine layout supportbooleansupportsPrintMode(EmbosserProperties.PrintMode mode)Returns true if this embosser supports magazine layout.booleansupportsVolumes()Returns true if this embosser has some method for volume handlingSimpleEmbosserPropertiessupportsVolumes(boolean val)Sets the value of volumes supportbooleansupportsZFolding()Returns true if this embosser supports z-folding.SimpleEmbosserPropertiessupportsZFolding(boolean val)Sets the value of z-folding support
-
-
-
Constructor Detail
-
SimpleEmbosserProperties
public SimpleEmbosserProperties(int maxWidth, int maxHeight)Creates a new SimpleEmbosserProperties with all "supports" properties set to false and cell width = 6 and cell height = 10- Parameters:
maxWidth- the maximum width, in charactersmaxHeight- the maximum height, in rows
-
-
Method Detail
-
supports8dot
public SimpleEmbosserProperties supports8dot(boolean val)
Sets the value of eight dot support- Parameters:
val- the new value- Returns:
- returns this object
-
supportsDuplex
public SimpleEmbosserProperties supportsDuplex(boolean val)
Sets the value of duplex support- Parameters:
val- the new value- Returns:
- returns this object
-
supportsAligning
public SimpleEmbosserProperties supportsAligning(boolean val)
Sets the value of aligning support- Parameters:
val- the new value- Returns:
- returns this object
-
supportsVolumes
public SimpleEmbosserProperties supportsVolumes(boolean val)
Sets the value of volumes support- Parameters:
val- the new value- Returns:
- returns this object
-
supportsZFolding
public SimpleEmbosserProperties supportsZFolding(boolean val)
Sets the value of z-folding support- Parameters:
val- the new value- Returns:
- returns this object
-
supportsMagazineLayout
public SimpleEmbosserProperties supportsMagazineLayout(boolean val)
Sets the value of magazine layout support- Parameters:
val- the new value- Returns:
- returns this object
-
cellWidth
public SimpleEmbosserProperties cellWidth(double val)
Sets the value of cell width- Parameters:
val- the new value- Returns:
- returns this object
-
cellHeight
public SimpleEmbosserProperties cellHeight(double val)
Sets the value of cell height- Parameters:
val- the new value- Returns:
- returns this object
-
getMaxHeight
public int getMaxHeight()
Description copied from interface:EmbosserWriterPropertiesGets the maximum page height in the current configuration- Specified by:
getMaxHeightin interfaceEmbosserWriterProperties- Returns:
- returns the maximum page height, in rows
-
getMaxWidth
public int getMaxWidth()
Description copied from interface:EmbosserWriterPropertiesGets the maximum row width in the current configuration- Specified by:
getMaxWidthin interfaceEmbosserWriterProperties- Returns:
- returns the maximum row width, in characters
-
supports8dot
public boolean supports8dot()
Description copied from interface:EmbosserPropertiesReturns true if this embosser supports 8 dot braille- Specified by:
supports8dotin interfaceEmbosserProperties- Returns:
- returns true if this embosser supports 8 dot braille
-
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.- Specified by:
supportsAligningin interfaceEmbosserProperties- Returns:
- returns true if this embosser supports aligning, false otherwise.
-
supportsDuplex
public boolean supportsDuplex()
Description copied from interface:EmbosserPropertiesReturns true if this embosser supports duplex printing- Specified by:
supportsDuplexin interfaceEmbosserProperties- Returns:
- returns true if this embosser supports duplex printing
-
supportsVolumes
public boolean supportsVolumes()
Description copied from interface:EmbosserPropertiesReturns true if this embosser has some method for volume handling- Specified by:
supportsVolumesin interfaceEmbosserProperties- Returns:
- returns true if this embosser supports volumes
-
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.- Specified by:
supportsZFoldingin interfaceEmbosserProperties- 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.- Specified by:
supportsPrintModein interfaceEmbosserProperties- Returns:
- returns true if this embosser supports magazine layout, false otherwise.
-
getCellWidth
public double getCellWidth()
Gets the cell width, in millimeters- Returns:
- returns the cell width, in millimeters
-
getCellHeight
public double getCellHeight()
Gets the cell height, in millimeters- Returns:
- returns the cell height, in millimeters
-
-