public abstract class UPCEANBean extends AbstractBarcodeBean
| Modifier and Type | Field and Description |
|---|---|
protected static double |
DEFAULT_MODULE_WIDTH
The default module width for UPC and EAN.
|
doQuietZone, fontName, fontSize, height, moduleWidth, msgPos, pattern, quietZone, quietZoneVertical| Constructor and Description |
|---|
UPCEANBean()
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
BarcodeDimension |
calcDimensions(String msg)
Calculates the dimension of a barcode with the given message.
|
abstract UPCEANLogicImpl |
createLogicImpl()
Factory method for the logic implementation.
|
void |
generateBarcode(CanvasProvider canvas,
String msg)
Generates a barcode using the given Canvas to render the barcode to its
output format.
|
double |
getBarWidth(int width)
Returns the effective width of a bar with a given logical width.
|
ChecksumMode |
getChecksumMode()
Returns the current checksum mode.
|
void |
setChecksumMode(ChecksumMode mode)
Sets the checksum mode
|
protected double |
supplementalWidth(String msg)
Calculates the width for the optional supplemental part.
|
doQuietZone, getBarHeight, getFontName, getFontSize, getHeight, getHumanReadableHeight, getModuleWidth, getMsgPosition, getPattern, getQuietZone, getVerticalQuietZone, hasFontDescender, hasQuietZone, setBarHeight, setFontName, setFontSize, setHeight, setModuleWidth, setMsgPosition, setPattern, setQuietZone, setVerticalQuietZoneprotected static final double DEFAULT_MODULE_WIDTH
public void setChecksumMode(ChecksumMode mode)
mode - the checksum modepublic ChecksumMode getChecksumMode()
public double getBarWidth(int width)
AbstractBarcodeBeangetBarWidth in class AbstractBarcodeBeanwidth - the logical width (1=narrow, 2=wide)AbstractBarcodeBean.getBarWidth(int)public abstract UPCEANLogicImpl createLogicImpl()
public void generateBarcode(CanvasProvider canvas, String msg)
AbstractBarcodeBeangenerateBarcode in interface BarcodeGeneratorgenerateBarcode in class AbstractBarcodeBeancanvas - CanvasProvider that the barcode is to be rendered on.msg - message to encodeBarcodeGenerator.generateBarcode(CanvasProvider, String)protected double supplementalWidth(String msg)
msg - the full messagepublic BarcodeDimension calcDimensions(String msg)
AbstractBarcodeBeancalcDimensions in interface BarcodeGeneratorcalcDimensions in class AbstractBarcodeBeanmsg - message to use for calculation.BarcodeGenerator.calcDimensions(String)Copyright © 2003–2023. All rights reserved.