public class EAN128Bean extends Code128Bean
| Modifier and Type | Field and Description |
|---|---|
static char |
DEFAULT_CHECK_DIGIT_MARKER
Defines the default character for the check digit marker
|
static char |
DEFAULT_GROUP_SEPARATOR
Defines the default group separator character
|
DEFAULT_CODESET, DEFAULT_MODULE_WIDTHdoQuietZone, fontName, fontSize, height, moduleWidth, msgPos, pattern, quietZone, quietZoneVertical| Constructor and Description |
|---|
EAN128Bean()
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.
|
char |
getCheckDigitMarker() |
ChecksumMode |
getChecksumMode()
Returns the current checksum mode.
|
char |
getGroupSeparator() |
String |
getTemplate() |
boolean |
isOmitBrackets() |
void |
setCheckDigitMarker(char c)
Sets the character that will be used as the check digit marker.
|
void |
setChecksumMode(ChecksumMode mode)
Sets the checksum mode
|
void |
setGroupSeparator(char c)
Sets the group separator character.
|
void |
setOmitBrackets(boolean b)
Indicates whether brackets should be used in the human-readable part around the AIs.
|
void |
setTemplate(String string)
Sets the message template with the fields for the EAN message.
|
getBarWidth, getCodeset, hasFontDescender, setCodesetdoQuietZone, getBarHeight, getFontName, getFontSize, getHeight, getHumanReadableHeight, getModuleWidth, getMsgPosition, getPattern, getQuietZone, getVerticalQuietZone, hasQuietZone, setBarHeight, setFontName, setFontSize, setHeight, setModuleWidth, setMsgPosition, setPattern, setQuietZone, setVerticalQuietZonepublic static final char DEFAULT_GROUP_SEPARATOR
public static final char DEFAULT_CHECK_DIGIT_MARKER
public BarcodeDimension calcDimensions(String msg)
Code128BeancalcDimensions in interface BarcodeGeneratorcalcDimensions in class Code128Beanmsg - message to use for calculation.BarcodeGenerator.calcDimensions(String)public void generateBarcode(CanvasProvider canvas, String msg)
Code128BeangenerateBarcode in interface BarcodeGeneratorgenerateBarcode in class Code128Beancanvas - CanvasProvider that the barcode is to be rendered on.msg - message to encodeBarcodeGenerator.generateBarcode(CanvasProvider, String)public void setChecksumMode(ChecksumMode mode)
mode - the checksum modepublic ChecksumMode getChecksumMode()
public char getGroupSeparator()
public void setGroupSeparator(char c)
c - the group separator character.public String getTemplate()
public void setTemplate(String string)
The format of the templates here is a repeating set of AI number (in brackets) followed by a field description. The allowed data types are "n" (numeric), "an" (alpha-numeric), "d" (date) and "cd" (check digit). Examples: "n13" defines a numeric field with exactly 13 digits. "n13+cd" defines a numeric field with exactly 13 digits plus a check digit. "an1-9" defines an alpha-numeric field with 1 to 9 characters.
string - a template like "(01)n13+cd(421)n3+an1-9(10)an1-20"public char getCheckDigitMarker()
public void setCheckDigitMarker(char c)
c - the character for the check digit markerpublic boolean isOmitBrackets()
public void setOmitBrackets(boolean b)
b - true if the brackets in the human-readable part should be omittedCopyright © 2003–2023. All rights reserved.