com.jrefinery.report.ext.barcode
Class BarcodeInter25

java.lang.Object
  |
  +--com.jrefinery.report.ext.barcode.Barcode
        |
        +--com.jrefinery.report.ext.barcode.BarcodeInter25
All Implemented Interfaces:
java.lang.Cloneable

public class BarcodeInter25
extends Barcode

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 = 0.8f;
n = 2;
font = BaseFont.createFont("Helvetica", "winansi", false);
size = 8;
baseline = size;
barHeight = size * 3;
textAlignment = Element.ALIGN_CENTER;
generateChecksum = false;
checksumText = false;
 

Author:
Paulo Soares (psoares@consiste.pt)

Field Summary
 
Fields inherited from class com.jrefinery.report.ext.barcode.Barcode
DEFAULT_FONT
 
Constructor Summary
BarcodeInter25()
          Creates new BarcodeInter25
 
Method Summary
 java.awt.Image createImageWithBarcode(java.awt.Color barColor, java.awt.Color textColor)
          Creates an Image with the barcode.
 java.awt.geom.Dimension2D getBarcodeSize()
          Gets the maximum area that the barcode and the text, if any, will occupy.
 float getMultiplier()
           
 void setMultiplier(float multiplier)
           
 
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
 

Constructor Detail

BarcodeInter25

public BarcodeInter25()
Creates new BarcodeInter25

Method Detail

getMultiplier

public float getMultiplier()

setMultiplier

public void setMultiplier(float multiplier)

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