|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jbars.Barcode | +--jbars.Barcode93
Implements the code 93. The default parameters are:
x = 1f; n = 2; font = new Font("Helvetica",Font.PLAIN,20)); textAlignment = ALIGN_CENTER; generateChecksum = false; checksumText = false; startStopText = true; extended = false; codeType = CODE93; transparent = true; shotText = true generateChecksum = true; checksumText = false;This class is based on iText "A Free Java-PDF library by Bruno Lowagie and Paulo Soares" using the Mozilla Public License(MPL)
Field Summary | |
static java.lang.String |
ASCII_CHARS
ASCII chars representation in Code 93 using escape chars. |
(package private) static byte[][] |
BARS
The bars to generate the code. |
static java.lang.String |
CHARS
Code 93 chars ordered by code93 value |
(package private) static byte[][] |
ESCAPE_BARS
Bars to represent escape chars index 0 = First escape char used in ASCII_CHARS array index 1 = Second escape char used in ASCII_CHARS array index 2 = Thirth escape char used in ASCII_CHARS array index 3 = Fourth escape char used in ASCII_CHARS array |
(package private) static byte[] |
START_BAR
The Start bar |
(package private) static byte[] |
STOP_BAR
The Stop bar |
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 | |
Barcode93()
Creates a new Barcode39. |
Method Summary | |
float |
getBarcodeWidth()
Gets the maximum width that the barcode will occupy. |
(package private) static byte[] |
getBarsCode93(java.lang.String text)
Creates the bars. |
static java.lang.String |
getChecksum(java.lang.String text)
Calculates the checksum. |
(package private) static java.lang.String |
getCode93ASCII(java.lang.String text)
Converts the ASCII text into a normal, escaped text, ready to generate bars. |
void |
placeBarcode(java.awt.image.BufferedImage i,
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[] START_BAR
static byte[] STOP_BAR
static byte[][] ESCAPE_BARS
static byte[][] BARS
public static java.lang.String CHARS
public static java.lang.String ASCII_CHARS
Constructor Detail |
public Barcode93()
Method Detail |
public float getBarcodeWidth()
getBarcodeWidth
in class Barcode
static byte[] getBarsCode93(java.lang.String text)
text
- the text to create the bars. This text does not include the start and
stop characters
static java.lang.String getCode93ASCII(java.lang.String text)
text
- the extended text
public static java.lang.String getChecksum(java.lang.String text)
text
- the text
public void placeBarcode(java.awt.image.BufferedImage i, 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
barColor
- 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 |