Class ITF14Bean

All Implemented Interfaces:
BarcodeGenerator

public class ITF14Bean extends Interleaved2Of5Bean
This class is an implementation of ITF-14 (as defined by the GS1 standards organization). ITF-14 is basically an Interleaved 2 of 5 barcode with an added, so-called bearer bar.
Version:
$Id: ITF14Bean.java,v 1.1 2009-02-19 10:14:54 jmaerki Exp $
  • Constructor Details

    • ITF14Bean

      public ITF14Bean()
      Default constructor.
  • Method Details

    • isBearerBox

      public boolean isBearerBox()
      Indicates whether a bearer box is generated or just horizontal bearer bars.
      Returns:
      true if a bearer box is generated, false if horizontal bearer bars are generated.
    • setBearerBox

      public void setBearerBox(boolean value)
      Controls whether a bearer box is generated or just horizontal bearer bars.
      Parameters:
      value - true for a bearer box, false for horizontal bearer bars.
    • getBearerBarWidth

      public double getBearerBarWidth()
      Returns the bearer bar width.
      Returns:
      the bearer bar width (in millimeters)
    • setBearerBarWidth

      public void setBearerBarWidth(double width)
      Sets the bearer bar width. The nominal value is 4.8mm (0.19in).
      Parameters:
      width - the bearer bar width (in millimeters)
    • doQuietZone

      public void doQuietZone(boolean value)
      Controls whether a quiet zone should be included or not.
      Overrides:
      doQuietZone in class AbstractBarcodeBean
      Parameters:
      value - true if a quiet zone should be included
    • validate

      protected void validate()
      Validates the barcode bean's settings.
    • 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
      Overrides:
      generateBarcode in class Interleaved2Of5Bean
      Parameters:
      canvas - CanvasProvider that the barcode is to be rendered on.
      msg - message to encode
      See Also:
    • 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 Interleaved2Of5Bean
      Parameters:
      msg - message to use for calculation.
      Returns:
      BarcodeDimension a BarcodeDimension object containing the barcode's dimensions
      See Also: