com.jrefinery.report.ext.barcode
Class BarcodeEANSUPP
java.lang.Object
com.jrefinery.report.ext.barcode.Barcode
com.jrefinery.report.ext.barcode.BarcodeEANSUPP
- All Implemented Interfaces:
- java.lang.Cloneable
- public class BarcodeEANSUPP
- extends Barcode
This class takes 2 barcodes, an EAN/UPC and a supplemental
and creates a single barcode with both combined in the
expected layout. The UPC/EAN should have a positive text
baseline and the supplemental a negative one (in the supplemental
the text is on the top of the barcode.
The default parameters are:
n = 8; // horizontal distance between the two barcodes
- Author:
- Paulo Soares (psoares@consiste.pt)
Method Summary |
java.awt.Image |
createImageWithBarcode(java.awt.Color barColor,
java.awt.Color textColor)
Creates an Image with the barcode. |
float |
getBarcodeGap()
|
java.awt.geom.Dimension2D |
getBarcodeSize()
Gets the maximum area that the barcode and the text, if
any, will occupy. |
void |
setBarcodeGap(float barcodeGap)
|
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 |
BarcodeEANSUPP
public BarcodeEANSUPP(Barcode ean,
Barcode supp)
- Creates new combined barcode.
- Parameters:
ean
- the EAN/UPC barcodesupp
- the supplemental barcode
getBarcodeGap
public float getBarcodeGap()
setBarcodeGap
public void setBarcodeGap(float barcodeGap)
getBarcodeSize
public java.awt.geom.Dimension2D getBarcodeSize()
- Gets the maximum area that the barcode and the text, if
any, will occupy. The lower left corner is always (0, 0).
- Specified by:
getBarcodeSize
in class Barcode
- Returns:
- the size the barcode occupies.
createImageWithBarcode
public java.awt.Image createImageWithBarcode(java.awt.Color barColor,
java.awt.Color textColor)
- Creates an
Image
with the barcode.
- Specified by:
createImageWithBarcode
in class Barcode
- Parameters:
barColor
- the color of the bars. It can be null
textColor
- the color of the text. It can be null
- Returns:
- the
Image