Package org.daisy.braille.embosser
Class SimpleEmbosserProperties
java.lang.Object
org.daisy.braille.embosser.SimpleEmbosserProperties
- All Implemented Interfaces:
EmbosserProperties
,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
ConstructorDescriptionSimpleEmbosserProperties
(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
Modifier and TypeMethodDescriptioncellHeight
(double val) Sets the value of cell heightcellWidth
(double val) Sets the value of cell widthdouble
Gets the cell height, in millimetersdouble
Gets the cell width, in millimetersint
Gets the maximum page height in the current configurationint
Gets the maximum row width in the current configurationboolean
Returns true if this embosser supports 8 dot braillesupports8dot
(boolean val) Sets the value of eight dot supportboolean
Returns true if this embosser supports aligning.supportsAligning
(boolean val) Sets the value of aligning supportboolean
Returns true if this embosser supports duplex printingsupportsDuplex
(boolean val) Sets the value of duplex supportsupportsMagazineLayout
(boolean val) Sets the value of magazine layout supportboolean
Returns true if this embosser supports magazine layout.boolean
Returns true if this embosser has some method for volume handlingsupportsVolumes
(boolean val) Sets the value of volumes supportboolean
Returns true if this embosser supports z-folding.supportsZFolding
(boolean val) Sets the value of z-folding support
-
Constructor Details
-
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 Details
-
supports8dot
Sets the value of eight dot support- Parameters:
val
- the new value- Returns:
- returns this object
-
supportsDuplex
Sets the value of duplex support- Parameters:
val
- the new value- Returns:
- returns this object
-
supportsAligning
Sets the value of aligning support- Parameters:
val
- the new value- Returns:
- returns this object
-
supportsVolumes
Sets the value of volumes support- Parameters:
val
- the new value- Returns:
- returns this object
-
supportsZFolding
Sets the value of z-folding support- Parameters:
val
- the new value- Returns:
- returns this object
-
supportsMagazineLayout
Sets the value of magazine layout support- Parameters:
val
- the new value- Returns:
- returns this object
-
cellWidth
Sets the value of cell width- Parameters:
val
- the new value- Returns:
- returns this object
-
cellHeight
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
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
-