|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jbars.Barcode | +--jbars.BarcodeInter25
Implements the code interleaved 2 of 5. The text can include non numeric characters that are printed but do not generate bars. The default parameters are:
x = 1f; n = 2; font=new Font("Helvetica", Font.PLAIN, 20) textAlignment = ALIGN_CENTER; generateChecksum = false; checksumText = false; transparent = true; shotText = trueThis class is based on iText "A Free Java-PDF library by Bruno Lowagie and Paulo Soares" using the Mozilla Public License(MPL)
Field Summary | |
(package private) static byte[][] |
BARS
The bars to generate the code. |
Fields inherited from class jbars.Barcode |
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, backgroundColor, barHeight, checksumText, CODABAR, code, CODE128, CODE128_RAW, CODE128_UCC, CODE93, codeType, EAN13, EAN8, extended, font, generateChecksum, guardBars, n, PLANET, POSTNET, quietZone, quietZoneX, ROTATE_0, ROTATE_180, ROTATE_270, ROTATE_90, showText, size, startStopText, SUPP2, SUPP5, textAlignment, transparent, TYPE_CODE128, TYPE_CODE93, TYPE_INTERLEAVED2OF5, UPCA, UPCE, x |
Constructor Summary | |
BarcodeInter25()
Creates new BarcodeInter25 |
Method Summary | |
float |
getBarcodeWidth()
Gets the maximum width that the barcode will occupy. |
static byte[] |
getBarsInter25(java.lang.String text)
Creates the bars for the barcode. |
static char |
getChecksum(java.lang.String text)
Calculates the checksum. |
static java.lang.String |
keepNumbers(java.lang.String text)
Deletes all the non numeric characters from text . |
void |
placeBarcode(java.awt.image.BufferedImage image,
java.awt.Color barColor,
java.awt.Color textColor)
Places the barcode in a BufferedImage. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static byte[][] BARS
Constructor Detail |
public BarcodeInter25()
Method Detail |
public float getBarcodeWidth()
getBarcodeWidth
in class Barcode
public static byte[] getBarsInter25(java.lang.String text)
text
- the text. It can contain non numeric characters
public static char getChecksum(java.lang.String text)
text
- the numeric text
public static java.lang.String keepNumbers(java.lang.String text)
text
.
text
- the text
String
with only numeric characterspublic void placeBarcode(java.awt.image.BufferedImage image, java.awt.Color barColor, java.awt.Color textColor)
|
|
Result |
---|---|---|
|
|
bars and text painted with current fill color |
|
|
bars and text painted with |
|
|
bars painted with current color |
|
|
bars painted with |
placeBarcode
in class Barcode
image
- the BufferedImage
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |