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 SimpleEmbosserProperties
cellHeight(double val)
Sets the value of cell heightSimpleEmbosserProperties
cellWidth(double val)
Sets the value of cell widthdouble
getCellHeight()
Gets the cell height, in millimetersdouble
getCellWidth()
Gets the cell width, in millimetersint
getMaxHeight()
Gets the maximum page height in the current configurationint
getMaxWidth()
Gets the maximum row width in the current configurationboolean
supports8dot()
Returns true if this embosser supports 8 dot brailleSimpleEmbosserProperties
supports8dot(boolean val)
Sets the value of eight dot supportboolean
supportsAligning()
Returns true if this embosser supports aligning.SimpleEmbosserProperties
supportsAligning(boolean val)
Sets the value of aligning supportboolean
supportsDuplex()
Returns true if this embosser supports duplex printingSimpleEmbosserProperties
supportsDuplex(boolean val)
Sets the value of duplex supportSimpleEmbosserProperties
supportsMagazineLayout(boolean val)
Sets the value of magazine layout supportboolean
supportsPrintMode(EmbosserProperties.PrintMode mode)
Returns true if this embosser supports magazine layout.boolean
supportsVolumes()
Returns true if this embosser has some method for volume handlingSimpleEmbosserProperties
supportsVolumes(boolean val)
Sets the value of volumes supportboolean
supportsZFolding()
Returns true if this embosser supports z-folding.SimpleEmbosserProperties
supportsZFolding(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:EmbosserWriterProperties
Gets the maximum page height in the current configuration- Specified by:
getMaxHeight
in interfaceEmbosserWriterProperties
- Returns:
- returns the maximum page height, in rows
-
getMaxWidth
public int getMaxWidth()
Description copied from interface:EmbosserWriterProperties
Gets the maximum row width in the current configuration- Specified by:
getMaxWidth
in interfaceEmbosserWriterProperties
- Returns:
- returns the maximum row width, in characters
-
supports8dot
public boolean supports8dot()
Description copied from interface:EmbosserProperties
Returns true if this embosser supports 8 dot braille- Specified by:
supports8dot
in interfaceEmbosserProperties
- Returns:
- returns true if this embosser supports 8 dot braille
-
supportsAligning
public boolean supportsAligning()
Description copied from interface:EmbosserProperties
Returns 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:
supportsAligning
in interfaceEmbosserProperties
- Returns:
- returns true if this embosser supports aligning, false otherwise.
-
supportsDuplex
public boolean supportsDuplex()
Description copied from interface:EmbosserProperties
Returns true if this embosser supports duplex printing- Specified by:
supportsDuplex
in interfaceEmbosserProperties
- Returns:
- returns true if this embosser supports duplex printing
-
supportsVolumes
public boolean supportsVolumes()
Description copied from interface:EmbosserProperties
Returns true if this embosser has some method for volume handling- Specified by:
supportsVolumes
in interfaceEmbosserProperties
- Returns:
- returns true if this embosser supports volumes
-
supportsZFolding
public boolean supportsZFolding()
Description copied from interface:EmbosserProperties
Returns 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:
supportsZFolding
in interfaceEmbosserProperties
- Returns:
- returns true if this embosser supports z-folding, false otherwise.
-
supportsPrintMode
public boolean supportsPrintMode(EmbosserProperties.PrintMode mode)
Description copied from interface:EmbosserProperties
Returns 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:
supportsPrintMode
in 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
-
-