Class SimpleEmbosserProperties

java.lang.Object
org.daisy.braille.embosser.SimpleEmbosserProperties
All Implemented Interfaces:
EmbosserProperties, EmbosserWriterProperties

public class SimpleEmbosserProperties extends Object implements EmbosserWriterProperties
Provides a simple way to implement EmbosserProperties
Author:
Joel HÃ¥kansson
  • 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 characters
      maxHeight - the maximum height, in rows
  • Method Details

    • 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 interface EmbosserWriterProperties
      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 interface EmbosserWriterProperties
      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 interface EmbosserProperties
      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 by getMaxWidth. Should return true for all physical embossers, since they all have a finite row length.
      Specified by:
      supportsAligning in interface EmbosserProperties
      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 interface EmbosserProperties
      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 interface EmbosserProperties
      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 interface EmbosserProperties
      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 interface EmbosserProperties
      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