|
barcode4j 2.1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.krysalis.barcode4j.impl.AbstractBarcodeBean org.krysalis.barcode4j.impl.code128.Code128Bean org.krysalis.barcode4j.impl.code128.EAN128Bean
public class EAN128Bean
This class is an implementation of the Code 128 barcode.
Field Summary | |
---|---|
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 |
Fields inherited from class org.krysalis.barcode4j.impl.code128.Code128Bean |
---|
DEFAULT_CODESET, DEFAULT_MODULE_WIDTH |
Fields inherited from class org.krysalis.barcode4j.impl.AbstractBarcodeBean |
---|
doQuietZone, fontName, fontSize, height, moduleWidth, msgPos, pattern, quietZone, quietZoneVertical |
Constructor Summary | |
---|---|
EAN128Bean()
Create a new instance. |
Method Summary | |
---|---|
BarcodeDimension |
calcDimensions(java.lang.String msg)
Calculates the dimension of a barcode with the given message. The dimensions are dependant on the configuration of the barcode generator. |
void |
generateBarcode(CanvasProvider canvas,
java.lang.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()
|
java.lang.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(java.lang.String string)
Sets the message template with the fields for the EAN message. |
Methods inherited from class org.krysalis.barcode4j.impl.code128.Code128Bean |
---|
getBarWidth, getCodeset, hasFontDescender, setCodeset |
Methods inherited from class org.krysalis.barcode4j.impl.AbstractBarcodeBean |
---|
doQuietZone, getBarHeight, getFontName, getFontSize, getHeight, getHumanReadableHeight, getModuleWidth, getMsgPosition, getPattern, getQuietZone, getVerticalQuietZone, hasQuietZone, setBarHeight, setFontName, setFontSize, setHeight, setModuleWidth, setMsgPosition, setPattern, setQuietZone, setVerticalQuietZone |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final char DEFAULT_GROUP_SEPARATOR
public static final char DEFAULT_CHECK_DIGIT_MARKER
Constructor Detail |
---|
public EAN128Bean()
Method Detail |
---|
public BarcodeDimension calcDimensions(java.lang.String msg)
Code128Bean
calcDimensions
in interface BarcodeGenerator
calcDimensions
in class Code128Bean
msg
- message to use for calculation.
BarcodeGenerator.calcDimensions(String)
public void generateBarcode(CanvasProvider canvas, java.lang.String msg)
Code128Bean
generateBarcode
in interface BarcodeGenerator
generateBarcode
in class Code128Bean
canvas
- 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 java.lang.String getTemplate()
public void setTemplate(java.lang.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 omitted
|
barcode4j 2.1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |