Class SimpleEmbosserProperties
- java.lang.Object
- 
- org.daisy.braille.utils.impl.tools.embosser.SimpleEmbosserProperties
 
- 
- All Implemented Interfaces:
- InternalEmbosserWriterProperties,- EmbosserWriterProperties
 
 public final class SimpleEmbosserProperties extends Object implements InternalEmbosserWriterProperties Provides an immutable implementation ofEmbosserWriterProperties.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classSimpleEmbosserProperties.BuilderProvides a builder for simple embosser properties.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetCellHeight()Gets the cell height (4 x the vertical dot-to-dot distance), in millimeters.doublegetCellWidth()Gets the cell width, in millimeters.intgetMaxRowCount()Gets the maximum page height in the current configuration.intgetMaxWidth()Gets the maximum row width in the current configuration.booleansupportsAligning()Returns true if this embosser supports aligning.booleansupportsDuplex()Returns true if this embosser supports duplex printing.static SimpleEmbosserProperties.Builderwith(int maxWidth, int maxHeight)Creates a new SimpleEmbosserProperties builder with all "supports" properties set to false and cell width = 6 and cell height = 10.
 
- 
- 
- 
Method Detail- 
withpublic static SimpleEmbosserProperties.Builder with(int maxWidth, int maxHeight) Creates a new SimpleEmbosserProperties builder 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
- Returns:
- returns a new builder
 
 - 
getMaxWidthpublic int getMaxWidth() Description copied from interface:EmbosserWriterPropertiesGets the maximum row width in the current configuration.- Specified by:
- getMaxWidthin interface- EmbosserWriterProperties
- Returns:
- returns the maximum row width, in characters
 
 - 
supportsAligningpublic boolean supportsAligning() Description copied from interface:EmbosserWriterPropertiesReturns 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 interface- EmbosserWriterProperties
- Returns:
- returns true if this embosser supports aligning, false otherwise.
 
 - 
supportsDuplexpublic boolean supportsDuplex() Description copied from interface:InternalEmbosserWriterPropertiesReturns true if this embosser supports duplex printing.- Specified by:
- supportsDuplexin interface- InternalEmbosserWriterProperties
- Returns:
- returns true if this embosser supports duplex printing
 
 - 
getCellWidthpublic double getCellWidth() Gets the cell width, in millimeters.- Returns:
- returns the cell width, in millimeters
 
 - 
getCellHeightpublic double getCellHeight() Gets the cell height (4 x the vertical dot-to-dot distance), in millimeters.- Returns:
- returns the cell height, in millimeters
 
 - 
getMaxRowCountpublic int getMaxRowCount() Description copied from interface:InternalEmbosserWriterPropertiesGets the maximum page height in the current configuration.- Specified by:
- getMaxRowCountin interface- InternalEmbosserWriterProperties
- Returns:
- returns the maximum page height, in rows
 
 
- 
 
-