|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lowagie.text.pdf.Barcode
com.lowagie.text.pdf.Barcode128
com.lowagie.text.pdf.BarcodeEAN128
Implements the UCC/EAN-128 in C mode with multiple parts in code.
The code is numeric only (which is correct in C) with FNC1 char to separate data if the Application Identifier supports variable data. The default parameters are:
x = 0.8f; font = BaseFont.createFont("Helvetica", "winansi", false); size = 8; baseline = size; barHeight = size * 3; textAlignment = Element.ALIGN_CENTER; codeType = CODE128_UCC; (not used)
Nested Class Summary | |
static class |
BarcodeEAN128.IdentifierEAN
|
Field Summary | |
private StringBuffer |
bCode
|
private int |
checksum
|
static IntHashtable |
codesB
|
private String |
codeText
|
static HashMap |
ids
|
private int |
ponderation
|
Fields inherited from class com.lowagie.text.pdf.Barcode128 |
BARS, BARS_STOP, CODE_A, CODE_AB_TO_C, CODE_AC_TO_B, CODE_BC_TO_A, CODE_C, DEL, FNC1, FNC1_INDEX, FNC2, FNC3, FNC4, SHIFT, START_A, START_B, START_C, STARTA, STARTB, STARTC |
Fields inherited from class com.lowagie.text.pdf.Barcode |
barHeight, baseline, checksumText, CODABAR, code, CODE128, CODE128_RAW, CODE128_UCC, codeType, EAN13, EAN8, extended, font, generateChecksum, guardBars, inkSpreading, n, PLANET, POSTNET, size, startStopText, SUPP2, SUPP5, textAlignment, UPCA, UPCE, x |
Constructor Summary | |
BarcodeEAN128()
Creates a new instance of BarcodeEAN128 |
Method Summary | |
Rectangle |
getBarcodeSize()
Gets the maximum area that the barcode and the text, if any, will occupy. |
Rectangle |
getBarcodeSize(float fullWidth)
Gets the maximum area that the barcode and the text, if any, will occupy. |
private byte[] |
getBarsArray(LinkedList barres)
Put the bytes describing the bars of the barcode in a single array. |
protected byte[] |
getBarsCode(String bloc)
Compute the bars corresponding to a bloc of data. |
byte[] |
getBarsEAN128(String text)
DOCUMENT ME! |
protected String |
getBloc(String texte,
int index)
Find the next bloc of data to be encoded. |
Rectangle |
placeBarcode(PdfContentByte cb,
Color barColor,
Color textColor)
Places the barcode in a PdfContentByte . |
Methods inherited from class com.lowagie.text.pdf.Barcode128 |
createAwtImage, getBarsCode128Raw, getPackedRawDigits, getRawText, isNextDigits |
Methods inherited from class com.lowagie.text.pdf.Barcode |
createImageWithBarcode, createTemplateWithBarcode, getBarHeight, getBaseline, getCode, getCodeType, getFont, getInkSpreading, getN, getSize, getTextAlignment, getX, isChecksumText, isExtended, isGenerateChecksum, isGuardBars, isStartStopText, setBarHeight, setBaseline, setChecksumText, setCode, setCodeType, setExtended, setFont, setGenerateChecksum, setGuardBars, setInkSpreading, setN, setSize, setStartStopText, setTextAlignment, setX |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static HashMap ids
public static IntHashtable codesB
private String codeText
private StringBuffer bCode
private int checksum
private int ponderation
Constructor Detail |
public BarcodeEAN128()
ExceptionConverter
- when the conversion is not possible.Method Detail |
public Rectangle getBarcodeSize(float fullWidth)
public byte[] getBarsEAN128(String text)
text
- DOCUMENT ME!
public Rectangle placeBarcode(PdfContentByte cb, Color barColor, Color textColor)
PdfContentByte
. The barcode is always
placed at coodinates (0, 0). Use the translation matrix to move it
elsewhere.
The bars and text are written in the following colors:
placeBarcode
in class Barcode128
cb
- the PdfContentByte
where the barcode will be placedbarColor
- the color of the bars. It can be null
textColor
- the color of the text. It can be null
protected byte[] getBarsCode(String bloc)
bloc
- : A bloc of data with its A.I. and its separator if there's
one.
protected String getBloc(String texte, int index)
texte
- the Data
to be encoded.index
- the Index
where the bloc starts.
private byte[] getBarsArray(LinkedList barres)
barres
- The list of bars which compose the barcode.
public Rectangle getBarcodeSize()
getBarcodeSize
in class Barcode128
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |