Class USPSIntelligentMailBean
java.lang.Object
org.krysalis.barcode4j.impl.AbstractBarcodeBean
org.krysalis.barcode4j.impl.HeightVariableBarcodeBean
org.krysalis.barcode4j.impl.fourstate.AbstractFourStateBean
org.krysalis.barcode4j.impl.fourstate.USPSIntelligentMailBean
- All Implemented Interfaces:
BarcodeGenerator
Implements the USPS Intelligent Mail Barcode (Four State Customer Barcode).
- Version:
- $Id: USPSIntelligentMailBean.java,v 1.1 2008-05-13 13:00:43 jmaerki Exp $
- Author:
- Jeremias Maerki
-
Field Summary
Fields inherited from class org.krysalis.barcode4j.impl.AbstractBarcodeBean
doQuietZone, fontName, fontSize, height, moduleWidth, msgPos, pattern, quietZone -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalcDimensions(String msg) Calculates the dimension of a barcode with the given message.voidgenerateBarcode(CanvasProvider canvas, String msg) Generates a barcode using the given Canvas to render the barcode to its output format.doubleReturns the vertical quiet zone.voidsetVerticalQuietZone(double height) Sets the height of the vertical quiet zone.voidVerifies whether the current settings of the bean are within the limits given by the USPS Intelligent Mail specification.Methods inherited from class org.krysalis.barcode4j.impl.fourstate.AbstractFourStateBean
getAscenderHeight, getBarHeight, getBarWidth, getChecksumMode, getIntercharGapWidth, getTrackHeight, setAscenderHeight, setChecksumMode, setIntercharGapWidth, setTrackHeight, updateHeightMethods inherited from class org.krysalis.barcode4j.impl.AbstractBarcodeBean
doQuietZone, getBarHeight, getFontName, getFontSize, getHeight, getHumanReadableHeight, getModuleWidth, getMsgPosition, getPattern, getQuietZone, hasFontDescender, hasQuietZone, setBarHeight, setFontName, setFontSize, setHeight, setModuleWidth, setMsgPosition, setPattern, setQuietZone
-
Constructor Details
-
USPSIntelligentMailBean
public USPSIntelligentMailBean()Create a new instance.
-
-
Method Details
-
getVerticalQuietZone
public double getVerticalQuietZone()Returns the vertical quiet zone. If no vertical quiet zone is set explicitely, the value ifAbstractBarcodeBean.getQuietZone()is returned.- Overrides:
getVerticalQuietZonein classAbstractFourStateBean- Returns:
- the height of the vertical quiet zone (in mm)
-
setVerticalQuietZone
public void setVerticalQuietZone(double height) Sets the height of the vertical quiet zone. If this value is not explicitely set the vertical quiet zone has the same width as the horizontal quiet zone.- Overrides:
setVerticalQuietZonein classAbstractBarcodeBean- Parameters:
height- the height of the vertical quiet zone (in mm)
-
generateBarcode
Generates a barcode using the given Canvas to render the barcode to its output format.- Specified by:
generateBarcodein interfaceBarcodeGenerator- Specified by:
generateBarcodein classAbstractBarcodeBean- Parameters:
canvas- CanvasProvider that the barcode is to be rendered on.msg- message to encode
-
calcDimensions
Calculates the dimension of a barcode with the given message. The dimensions are dependant on the configuration of the barcode generator.- Specified by:
calcDimensionsin interfaceBarcodeGenerator- Overrides:
calcDimensionsin classAbstractBarcodeBean- Parameters:
msg- message to use for calculation.- Returns:
- BarcodeDimension a BarcodeDimension object containing the barcode's dimensions
-
verifySettings
public void verifySettings()Verifies whether the current settings of the bean are within the limits given by the USPS Intelligent Mail specification.
-