Class 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
  • 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 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, 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(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.