public class BarcodeInter25 extends Barcode
x = 1f;
n = 2;
font=new Font("Helvetica", Font.PLAIN, 20)
textAlignment = ALIGN_CENTER;
generateChecksum = false;
checksumText = false;
transparent = true;
shotText = true
This class is based on iText "A Free Java-PDF library by Bruno Lowagie and Paulo Soares" using the Mozilla Public License(MPL)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, showText, size, startStopText, SUPP2, SUPP5, textAlignment, transparent, TYPE_CODE128, TYPE_CODE93, TYPE_INTERLEAVED2OF5, UPCA, UPCE, x| Constructor and Description |
|---|
BarcodeInter25()
Creates new BarcodeInter25
|
| Modifier and Type | Method and Description |
|---|---|
int |
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(Image image,
int barColor,
int textColor)
Places the barcode in a Image.
|
createImage, createImage, getBackgroundColor, getBarHeight, getCode, getCodeType, getFont, getFontName, getFontSize, getN, getQuietZoneX, getSize, getTextAlignment, getX, isChecksumText, isExtended, isGenerateChecksum, isGuardBars, isQuietZone, isShowText, isStartStopText, isTransparent, scale, setBackgroundColor, setBarHeight, setChecksumText, setCode, setCodeType, setExtended, setFont, setFontName, setFontSize, setFontStyle, setGenerateChecksum, setGuardBars, setN, setQuietZone, setQuietZoneX, setShowText, setSize, setStartStopText, setTextAlignment, setTransparent, setXpublic int getBarcodeWidth()
getBarcodeWidth in class Barcodepublic static byte[] getBarsInter25(java.lang.String text)
text - the text. It can contain non numeric characterspublic static char getChecksum(java.lang.String text)
text - the numeric textpublic static java.lang.String keepNumbers(java.lang.String text)
text.text - the textString with only numeric characterspublic void placeBarcode(Image image, int barColor, int 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 Barcodeimage - the Image where the barcode will be placedbarColor - the color of the bars. It can be -1textColor - the color of the text. It can be -1