public class CodabarBean extends AbstractBarcodeBean
| Modifier and Type | Field and Description |
|---|---|
protected static boolean |
DEFAULT_DISPLAY_START_STOP
The default display start/stop value for Codabar.
|
protected static double |
DEFAULT_MODULE_WIDTH
The default module width for Codabar.
|
protected static double |
DEFAULT_WIDE_FACTOR
The default wide factor for Codabar.
|
doQuietZone, fontName, fontSize, height, moduleWidth, msgPos, pattern, quietZone, quietZoneVertical| Constructor and Description |
|---|
CodabarBean()
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.
|
ChecksumMode |
getChecksumMode()
Returns the current checksum mode.
|
double |
getWideFactor()
Returns the factor by which wide bars are broader than narrow bars.
|
boolean |
isDisplayStartStop()
Indicates whether the start and stop character will be displayed as
part of the human-readable message.
|
void |
setChecksumMode(ChecksumMode mode)
Sets the checksum mode
|
void |
setDisplayStartStop(boolean value)
Enables or disables the use of the start and stop characters in the
human-readable message.
|
void |
setWideFactor(double value)
Sets the factor by which wide bars are broader than narrow bars.
|
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
protected static final double DEFAULT_WIDE_FACTOR
protected static final boolean DEFAULT_DISPLAY_START_STOP
public ChecksumMode getChecksumMode()
public void setChecksumMode(ChecksumMode mode)
mode - the checksum modepublic double getWideFactor()
public void setWideFactor(double value)
value - the wide factory (should be > 1.0)public double getBarWidth(int width)
getBarWidth in class AbstractBarcodeBeanwidth - the logical width (1=narrow, 2=wide)public boolean isDisplayStartStop()
public void setDisplayStartStop(boolean value)
value - true to enable the start/stop character, false to disablepublic 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.Copyright © 2003–2023. All rights reserved.