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 class
SimpleEmbosserProperties.Builder
Provides a builder for simple embosser properties.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getCellHeight()
Gets the cell height (4 x the vertical dot-to-dot distance), in millimeters.double
getCellWidth()
Gets the cell width, in millimeters.int
getMaxRowCount()
Gets the maximum page height in the current configuration.int
getMaxWidth()
Gets the maximum row width in the current configuration.boolean
supportsAligning()
Returns true if this embosser supports aligning.boolean
supportsDuplex()
Returns true if this embosser supports duplex printing.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.
-
-
-
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:EmbosserWriterProperties
Gets the maximum row width in the current configuration.- Specified by:
getMaxWidth
in interfaceEmbosserWriterProperties
- Returns:
- returns the maximum row width, in characters
-
supportsAligning
public boolean supportsAligning()
Description copied from interface:EmbosserWriterProperties
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 interfaceEmbosserWriterProperties
- Returns:
- returns true if this embosser supports aligning, false otherwise.
-
supportsDuplex
public boolean supportsDuplex()
Description copied from interface:InternalEmbosserWriterProperties
Returns true if this embosser supports duplex printing.- Specified by:
supportsDuplex
in 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:InternalEmbosserWriterProperties
Gets the maximum page height in the current configuration.- Specified by:
getMaxRowCount
in interfaceInternalEmbosserWriterProperties
- Returns:
- returns the maximum page height, in rows
-
-