Class AbstractFourStateBean
java.lang.Object
org.krysalis.barcode4j.impl.AbstractBarcodeBean
org.krysalis.barcode4j.impl.HeightVariableBarcodeBean
org.krysalis.barcode4j.impl.fourstate.AbstractFourStateBean
- All Implemented Interfaces:
BarcodeGenerator
- Direct Known Subclasses:
RoyalMailCBCBean,USPSIntelligentMailBean
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
-
Field Summary
Fields inherited from class org.krysalis.barcode4j.impl.AbstractBarcodeBean
doQuietZone, fontName, fontSize, height, moduleWidth, msgPos, pattern, quietZone, quietZoneVertical -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the height of the ascender/descender.doublegetBarHeight(int height) Returns the effective height of a bar with a given logical height.doublegetBarWidth(int width) Returns the effective width of a bar with a given logical width.Returns the current checksum mode.doubleReturns the width between encoded characters.doubleReturns the height of the track.doubleReturns the vertical quiet zone.voidsetAscenderHeight(double height) Sets the height of the ascender/descender.voidsetChecksumMode(ChecksumMode mode) Sets the checksum modevoidsetIntercharGapWidth(double width) Sets the width between encoded characters.voidsetTrackHeight(double height) Sets the height of the track.protected voidUpdates the height variable of the barcode.Methods inherited from class org.krysalis.barcode4j.impl.AbstractBarcodeBean
calcDimensions, doQuietZone, generateBarcode, getBarHeight, getFontName, getFontSize, getHeight, getHumanReadableHeight, getModuleWidth, getMsgPosition, getPattern, getQuietZone, hasFontDescender, hasQuietZone, setBarHeight, setFontName, setFontSize, setHeight, setModuleWidth, setMsgPosition, setPattern, setQuietZone, setVerticalQuietZone
-
Constructor Details
-
AbstractFourStateBean
public AbstractFourStateBean()Create a new instance.
-
-
Method Details
-
getChecksumMode
Returns the current checksum mode.- Returns:
- ChecksumMode the checksum mode
-
setChecksumMode
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:
getBarWidthin classAbstractBarcodeBean- 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:AbstractBarcodeBeanReturns the vertical quiet zone. If no vertical quiet zone is set explicitely, the value ifAbstractBarcodeBean.getQuietZone()is returned.- Overrides:
getVerticalQuietZonein classAbstractBarcodeBean- 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:
getBarHeightin classHeightVariableBarcodeBean- Parameters:
height- the logical height (1=short, 2=tall)- Returns:
- double
-