Class RoyalMailCBCBean
java.lang.Object
org.krysalis.barcode4j.impl.AbstractBarcodeBean
org.krysalis.barcode4j.impl.HeightVariableBarcodeBean
org.krysalis.barcode4j.impl.fourstate.AbstractFourStateBean
org.krysalis.barcode4j.impl.fourstate.RoyalMailCBCBean
- All Implemented Interfaces:
BarcodeGenerator
Implements the Royal Mail Customer Barcode.
- Version:
- $Id: RoyalMailCBCBean.java,v 1.3 2008-05-13 13:00:43 jmaerki Exp $
- Author:
- Jeremias Maerki
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final doubleThe default module width for RoyalMail.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 TypeMethodDescriptioncalcDimensions(String msg) Calculates the dimension of a barcode with the given message.voidgenerateBarcode(CanvasProvider canvas, String msg) Generates a barcode using the given Canvas to render the barcode to its output format.voidsetMsgPosition(HumanReadablePlacement placement) Sets the placement of the human-readable part.Methods inherited from class org.krysalis.barcode4j.impl.fourstate.AbstractFourStateBean
getAscenderHeight, getBarHeight, getBarWidth, getChecksumMode, getIntercharGapWidth, getTrackHeight, getVerticalQuietZone, setAscenderHeight, setChecksumMode, setIntercharGapWidth, setTrackHeight, updateHeightMethods inherited from class org.krysalis.barcode4j.impl.AbstractBarcodeBean
doQuietZone, getBarHeight, getFontName, getFontSize, getHeight, getHumanReadableHeight, getModuleWidth, getMsgPosition, getPattern, getQuietZone, hasFontDescender, hasQuietZone, setBarHeight, setFontName, setFontSize, setHeight, setModuleWidth, setPattern, setQuietZone, setVerticalQuietZone
-
Field Details
-
DEFAULT_MODULE_WIDTH
protected static final double DEFAULT_MODULE_WIDTHThe default module width for RoyalMail.- See Also:
-
-
Constructor Details
-
RoyalMailCBCBean
public RoyalMailCBCBean()Create a new instance.
-
-
Method Details
-
setMsgPosition
Sets the placement of the human-readable part.- Overrides:
setMsgPositionin classAbstractBarcodeBean- Parameters:
placement- the placement of the human-readable part
-
generateBarcode
Generates a barcode using the given Canvas to render the barcode to its output format.- Specified by:
generateBarcodein interfaceBarcodeGenerator- Specified by:
generateBarcodein classAbstractBarcodeBean- Parameters:
canvas- CanvasProvider that the barcode is to be rendered on.msg- message to encode
-
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 classAbstractBarcodeBean- Parameters:
msg- message to use for calculation.- Returns:
- BarcodeDimension a BarcodeDimension object containing the barcode's dimensions
-