barcode4j 2.1.0

org.krysalis.barcode4j.impl.fourstate
Class USPSIntelligentMailBean

java.lang.Object
  extended by org.krysalis.barcode4j.impl.AbstractBarcodeBean
      extended by org.krysalis.barcode4j.impl.HeightVariableBarcodeBean
          extended by org.krysalis.barcode4j.impl.fourstate.AbstractFourStateBean
              extended by org.krysalis.barcode4j.impl.fourstate.USPSIntelligentMailBean
All Implemented Interfaces:
BarcodeGenerator

public class USPSIntelligentMailBean
extends AbstractFourStateBean

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
USPSIntelligentMailBean()
          Create a new instance.
 
Method Summary
 BarcodeDimension calcDimensions(java.lang.String msg)
          Calculates the dimension of a barcode with the given message. The dimensions are dependant on the configuration of the barcode generator.
 void generateBarcode(CanvasProvider canvas, java.lang.String msg)
          Generates a barcode using the given Canvas to render the barcode to its output format.
 double getVerticalQuietZone()
          Returns the vertical quiet zone.
 void setVerticalQuietZone(double height)
          Sets the height of the vertical quiet zone.
 void verifySettings()
          Verifies 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, updateHeight
 
Methods 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

USPSIntelligentMailBean

public USPSIntelligentMailBean()
Create a new instance.

Method Detail

getVerticalQuietZone

public double getVerticalQuietZone()
Returns the vertical quiet zone. If no vertical quiet zone is set explicitely, the value if AbstractBarcodeBean.getQuietZone() is returned.

Overrides:
getVerticalQuietZone in class AbstractFourStateBean
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:
setVerticalQuietZone in class AbstractBarcodeBean
Parameters:
height - the height of the vertical quiet zone (in mm)

generateBarcode

public void generateBarcode(CanvasProvider canvas,
                            java.lang.String msg)
Generates a barcode using the given Canvas to render the barcode to its output format.

Specified by:
generateBarcode in interface BarcodeGenerator
Specified by:
generateBarcode in class AbstractBarcodeBean
Parameters:
canvas - CanvasProvider that the barcode is to be rendered on.
msg - message to encode

calcDimensions

public BarcodeDimension calcDimensions(java.lang.String msg)
Calculates the dimension of a barcode with the given message. The dimensions are dependant on the configuration of the barcode generator.

Specified by:
calcDimensions in interface BarcodeGenerator
Overrides:
calcDimensions in class AbstractBarcodeBean
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.


barcode4j 2.1.0

Copyright © 2000-2010 Jeremias Maerki. All rights reserved.