Class AbstractFourStateBean

All Implemented Interfaces:
BarcodeGenerator
Direct Known Subclasses:
RoyalMailCBCBean, USPSIntelligentMailBean

public abstract class AbstractFourStateBean extends HeightVariableBarcodeBean
Abstract base class for four state barcode beans.
Version:
$Id: AbstractFourStateBean.java,v 1.1 2008-05-13 13:00:43 jmaerki Exp $
Author:
Jeremias Maerki
  • Constructor Details

    • AbstractFourStateBean

      public AbstractFourStateBean()
      Create a new instance.
  • Method Details

    • getChecksumMode

      public ChecksumMode getChecksumMode()
      Returns the current checksum mode.
      Returns:
      ChecksumMode the checksum mode
    • setChecksumMode

      public void setChecksumMode(ChecksumMode mode)
      Sets the checksum mode
      Parameters:
      mode - the checksum mode
    • getIntercharGapWidth

      public double getIntercharGapWidth()
      Returns the width between encoded characters.
      Returns:
      the interchar gap width
    • setIntercharGapWidth

      public void setIntercharGapWidth(double width)
      Sets the width between encoded characters.
      Parameters:
      width - the interchar gap width
    • getTrackHeight

      public double getTrackHeight()
      Returns the height of the track.
      Returns:
      the height of the track
    • setTrackHeight

      public void setTrackHeight(double height)
      Sets the height of the track.
      Parameters:
      height - the height of the track
    • getAscenderHeight

      public double getAscenderHeight()
      Returns the height of the ascender/descender.
      Returns:
      the height of the ascender/descender
    • setAscenderHeight

      public void setAscenderHeight(double height)
      Sets the height of the ascender/descender.
      Parameters:
      height - the height of the ascender/descender
    • updateHeight

      protected void updateHeight()
      Updates the height variable of the barcode.
    • getBarWidth

      public double getBarWidth(int width)
      Returns the effective width of a bar with a given logical width.
      Specified by:
      getBarWidth in class AbstractBarcodeBean
      Parameters:
      width - the logical width (1=narrow, 2=wide)
      Returns:
      the effective width of a bar (in mm)
    • getVerticalQuietZone

      public double getVerticalQuietZone()
      Description copied from class: AbstractBarcodeBean
      Returns the vertical quiet zone. If no vertical quiet zone is set explicitely, the value if AbstractBarcodeBean.getQuietZone() is returned.
      Overrides:
      getVerticalQuietZone in class AbstractBarcodeBean
      Returns:
      the height of the vertical quiet zone (in mm)
    • getBarHeight

      public double getBarHeight(int height)
      Returns the effective height of a bar with a given logical height.
      Specified by:
      getBarHeight in class HeightVariableBarcodeBean
      Parameters:
      height - the logical height (1=short, 2=tall)
      Returns:
      double