public class Code128Bean extends AbstractBarcodeBean
| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFAULT_CODESET
Default codeset.
|
protected static double |
DEFAULT_MODULE_WIDTH
The default module width for Code 128.
|
doQuietZone, fontName, fontSize, height, moduleWidth, msgPos, pattern, quietZone, quietZoneVertical| Constructor and Description |
|---|
Code128Bean()
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 |
getBarWidth(int width)
Returns the effective width of a bar with a given logical width.
|
int |
getCodeset()
Returns the codeset to be used.
|
protected boolean |
hasFontDescender()
Indicates whether the barcode height calculation should take a font descender
into account.
|
void |
setCodeset(int codeset)
Sets the codesets to use.
|
doQuietZone, getBarHeight, getFontName, getFontSize, getHeight, getHumanReadableHeight, getModuleWidth, getMsgPosition, getPattern, getQuietZone, getVerticalQuietZone, hasQuietZone, setBarHeight, setFontName, setFontSize, setHeight, setModuleWidth, setMsgPosition, setPattern, setQuietZone, setVerticalQuietZoneprotected static final double DEFAULT_MODULE_WIDTH
protected static final int DEFAULT_CODESET
public void setCodeset(int codeset)
codeset - the codesets to use (see Code128Constants.CODESET_*)public int getCodeset()
Code128Constants.CODESET_*)protected boolean hasFontDescender()
hasFontDescender in class AbstractBarcodeBeanpublic double getBarWidth(int width)
getBarWidth in class AbstractBarcodeBeanwidth - the logical width (1=narrow, 2=wide)public BarcodeDimension calcDimensions(String msg)
calcDimensions in interface BarcodeGeneratorcalcDimensions in class AbstractBarcodeBeanmsg - message to use for calculation.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 encodeCopyright © 2003–2023. All rights reserved.