public class DataMatrixBean extends AbstractBarcodeBean
| Modifier and Type | Field and Description |
|---|---|
protected static double |
DEFAULT_MODULE_WIDTH
The default module width (dot size) for DataMatrix.
|
doQuietZone, fontName, fontSize, height, moduleWidth, msgPos, pattern, quietZone, quietZoneVertical| Constructor and Description |
|---|
DataMatrixBean()
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
BarcodeDimension |
calcDimensions(String msg)
Calculates the dimension of a barcode with the given message.
|
void |
generateBarcode(CanvasProvider canvas,
String msg)
Generates a barcode using the given Canvas to render the barcode to its
output format.
|
double |
getBarHeight()
Returns the height of the bars.
|
double |
getBarWidth(int width)
Returns the effective width of a bar with a given logical width.
|
Dimension |
getMaxSize()
Returns the maximum symbol size that is to be produced.
|
Dimension |
getMinSize()
Returns the minimum symbol size that is to be produced.
|
SymbolShapeHint |
getShape()
Gets the requested shape for the generated barcodes.
|
double |
getVerticalQuietZone()
Returns the vertical quiet zone.
|
void |
setMaxSize(Dimension maxSize)
Sets the maximum symbol size that is to be produced.
|
void |
setMinSize(Dimension minSize)
Sets the minimum symbol size that is to be produced.
|
void |
setShape(SymbolShapeHint shape)
Sets the requested shape for the generated barcodes.
|
doQuietZone, getFontName, getFontSize, getHeight, getHumanReadableHeight, getModuleWidth, getMsgPosition, getPattern, getQuietZone, hasFontDescender, hasQuietZone, setBarHeight, setFontName, setFontSize, setHeight, setModuleWidth, setMsgPosition, setPattern, setQuietZone, setVerticalQuietZoneprotected static final double DEFAULT_MODULE_WIDTH
public void setShape(SymbolShapeHint shape)
shape - requested shape. May be SymbolShapeHint.FORCE_NONE,
SymbolShapeHint.FORCE_SQUARE or SymbolShapeHint.FORCE_RECTANGLE.public SymbolShapeHint getShape()
public void setMinSize(Dimension minSize)
minSize - the minimum size (in pixels), or null for no constraintpublic Dimension getMinSize()
public void setMaxSize(Dimension maxSize)
maxSize - the maximum size (in pixels), or null for no constraintpublic Dimension getMaxSize()
public void generateBarcode(CanvasProvider canvas, String msg)
generateBarcode in interface BarcodeGeneratorgenerateBarcode in class AbstractBarcodeBeancanvas - CanvasProvider that the barcode is to be rendered on.msg - message to encodepublic BarcodeDimension calcDimensions(String msg)
calcDimensions in interface BarcodeGeneratorcalcDimensions in class AbstractBarcodeBeanmsg - message to use for calculation.public double getVerticalQuietZone()
AbstractBarcodeBean.getQuietZone() is returned.getVerticalQuietZone in class AbstractBarcodeBeanpublic double getBarWidth(int width)
getBarWidth in class AbstractBarcodeBeanwidth - the logical width (1=narrow, 2=wide)public double getBarHeight()
getBarHeight in class AbstractBarcodeBeanCopyright © 2003–2023. All rights reserved.