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 Summary
Nested Classes Modifier and Type Class Description static classSimpleEmbosserProperties.BuilderProvides a builder for simple embosser properties.
-
Method Summary
All 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
-
with
public 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 charactersmaxHeight- the maximum height, in rows- Returns:
- returns a new builder
-
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
-
supportsAligning
public 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 interfaceEmbosserWriterProperties- Returns:
- returns true if this embosser supports aligning, false otherwise.
-
supportsDuplex
public boolean supportsDuplex()
Description copied from interface:InternalEmbosserWriterPropertiesReturns true if this embosser supports duplex printing.- Specified by:
supportsDuplexin interfaceInternalEmbosserWriterProperties- Returns:
- returns true if this embosser supports duplex printing
-
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 (4 x the vertical dot-to-dot distance), in millimeters.- Returns:
- returns the cell height, in millimeters
-
getMaxRowCount
public int getMaxRowCount()
Description copied from interface:InternalEmbosserWriterPropertiesGets the maximum page height in the current configuration.- Specified by:
getMaxRowCountin interfaceInternalEmbosserWriterProperties- Returns:
- returns the maximum page height, in rows
-
-