com.jrefinery.report.ext.barcode
Class BarcodeUPCA
java.lang.Object
|
+--com.jrefinery.report.ext.barcode.Barcode
|
+--com.jrefinery.report.ext.barcode.BarcodeEAN
|
+--com.jrefinery.report.ext.barcode.BarcodeEAN13
|
+--com.jrefinery.report.ext.barcode.BarcodeUPCA
- All Implemented Interfaces:
- java.lang.Cloneable
- public class BarcodeUPCA
- extends BarcodeEAN13
Method Summary |
static java.lang.String |
convertUPCAtoUPCE(java.lang.String text)
Converts an UPCA code into an UPCE code. |
protected void |
drawCode(java.awt.Graphics2D g2,
float keepBarX,
float textStartY)
|
protected java.lang.String |
getBarCode()
Creates the bars for the barcode EAN13 and UPCA. |
protected int[] |
getGuardBarPositions()
|
protected float |
getWidth()
|
Methods inherited from class com.jrefinery.report.ext.barcode.Barcode |
clone, getBarHeight, getBaseline, getCode, getFont, getFontAscent, getFontDescent, getMinWidth, getTextAlignment, isDisplayChecksumText, isGenerateChecksum, setBarHeight, setBaseline, setCode, setDisplayChecksumText, setFont, setGenerateChecksum, setMinWidth, setTextAlignment |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BarcodeUPCA
public BarcodeUPCA()
getWidth
protected float getWidth()
- Overrides:
getWidth
in class BarcodeEAN13
getGuardBarPositions
protected int[] getGuardBarPositions()
- Overrides:
getGuardBarPositions
in class BarcodeEAN13
convertUPCAtoUPCE
public static java.lang.String convertUPCAtoUPCE(java.lang.String text)
- Converts an UPCA code into an UPCE code. If the code can not
be converted a IllegalArgumentException is thrown
- Parameters:
text
- the code to convert. It must have 12 numeric characters
- Returns:
- the 8 converted digits or
null
if the
code could not be converted
getBarCode
protected java.lang.String getBarCode()
- Creates the bars for the barcode EAN13 and UPCA.
- Overrides:
getBarCode
in class BarcodeEAN13
- Returns:
- the barcode
drawCode
protected void drawCode(java.awt.Graphics2D g2,
float keepBarX,
float textStartY)
- Overrides:
drawCode
in class BarcodeEAN13