Class ITF14Bean
java.lang.Object
org.krysalis.barcode4j.impl.AbstractBarcodeBean
org.krysalis.barcode4j.impl.int2of5.Interleaved2Of5Bean
org.krysalis.barcode4j.impl.int2of5.ITF14Bean
- All Implemented Interfaces:
BarcodeGenerator
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_FACTORFields inherited from class org.krysalis.barcode4j.impl.AbstractBarcodeBean
doQuietZone, fontName, fontSize, height, moduleWidth, msgPos, pattern, quietZone, quietZoneVertical -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalcDimensions(String msg) Calculates the dimension of a barcode with the given message.voiddoQuietZone(boolean value) Controls whether a quiet zone should be included or not.voidgenerateBarcode(CanvasProvider canvas, String msg) Generates a barcode using the given Canvas to render the barcode to its output format.doubleReturns the bearer bar width.booleanIndicates whether a bearer box is generated or just horizontal bearer bars.voidsetBearerBarWidth(double width) Sets the bearer bar width.voidsetBearerBox(boolean value) Controls whether a bearer box is generated or just horizontal bearer bars.protected voidvalidate()Validates the barcode bean's settings.Methods inherited from class org.krysalis.barcode4j.impl.int2of5.Interleaved2Of5Bean
getBarWidth, getChecksumMode, getWideFactor, isDisplayChecksum, setChecksumMode, setDisplayChecksum, setWideFactorMethods 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
-
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:
doQuietZonein classAbstractBarcodeBean- Parameters:
value- true if a quiet zone should be included
-
validate
protected void validate()Validates the barcode bean's settings. -
generateBarcode
Generates a barcode using the given Canvas to render the barcode to its output format.- Specified by:
generateBarcodein interfaceBarcodeGenerator- Overrides:
generateBarcodein classInterleaved2Of5Bean- Parameters:
canvas- CanvasProvider that the barcode is to be rendered on.msg- message to encode- See Also:
-
calcDimensions
Calculates the dimension of a barcode with the given message. The dimensions are dependant on the configuration of the barcode generator.- Specified by:
calcDimensionsin interfaceBarcodeGenerator- Overrides:
calcDimensionsin classInterleaved2Of5Bean- Parameters:
msg- message to use for calculation.- Returns:
- BarcodeDimension a BarcodeDimension object containing the barcode's dimensions
- See Also:
-