barcode4j 2.1.0

org.krysalis.barcode4j.impl.int2of5
Class ITF14Bean

java.lang.Object
  extended by org.krysalis.barcode4j.impl.AbstractBarcodeBean
      extended by org.krysalis.barcode4j.impl.int2of5.Interleaved2Of5Bean
          extended by org.krysalis.barcode4j.impl.int2of5.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 $

Field Summary
 
Fields inherited from class org.krysalis.barcode4j.impl.int2of5.Interleaved2Of5Bean
DEFAULT_WIDE_FACTOR
 
Fields inherited from class org.krysalis.barcode4j.impl.AbstractBarcodeBean
doQuietZone, fontName, fontSize, height, moduleWidth, msgPos, pattern, quietZone, quietZoneVertical
 
Constructor Summary
ITF14Bean()
          Default constructor.
 
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 doQuietZone(boolean value)
          Controls whether a quiet zone should be included or not.
 void generateBarcode(CanvasProvider canvas, java.lang.String msg)
          Generates a barcode using the given Canvas to render the barcode to its output format.
 double getBearerBarWidth()
          Returns the bearer bar width.
 boolean isBearerBox()
          Indicates whether a bearer box is generated or just horizontal bearer bars.
 void setBearerBarWidth(double width)
          Sets the bearer bar width.
 void setBearerBox(boolean value)
          Controls whether a bearer box is generated or just horizontal bearer bars.
protected  void validate()
          Validates the barcode bean's settings.
 
Methods inherited from class org.krysalis.barcode4j.impl.int2of5.Interleaved2Of5Bean
getBarWidth, getChecksumMode, getWideFactor, isDisplayChecksum, setChecksumMode, setDisplayChecksum, setWideFactor
 
Methods inherited from class org.krysalis.barcode4j.impl.AbstractBarcodeBean
getBarHeight, getFontName, getFontSize, getHeight, getHumanReadableHeight, getModuleWidth, getMsgPosition, getPattern, getQuietZone, getVerticalQuietZone, hasFontDescender, hasQuietZone, setBarHeight, setFontName, setFontSize, setHeight, setModuleWidth, setMsgPosition, setPattern, setQuietZone, setVerticalQuietZone
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ITF14Bean

public ITF14Bean()
Default constructor.

Method Detail

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,
                            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
Overrides:
generateBarcode in class Interleaved2Of5Bean
Parameters:
canvas - CanvasProvider that the barcode is to be rendered on.
msg - message to encode
See Also:
BarcodeGenerator.generateBarcode(CanvasProvider, String)

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 Interleaved2Of5Bean
Parameters:
msg - message to use for calculation.
Returns:
BarcodeDimension a BarcodeDimension object containing the barcode's dimensions
See Also:
BarcodeGenerator.calcDimensions(String)

barcode4j 2.1.0

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