org.krysalis.barcode4j.impl.fourstate
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
public class RoyalMailCBCBean
- extends AbstractFourStateBean
Implements the Royal Mail Customer Barcode.
- Version:
- $Id: RoyalMailCBCBean.java,v 1.3 2008/05/13 13:00:43 jmaerki Exp $
- Author:
- Jeremias Maerki
Methods inherited from class org.krysalis.barcode4j.impl.fourstate.AbstractFourStateBean |
getAscenderHeight, getBarHeight, getBarWidth, getChecksumMode, getIntercharGapWidth, getTrackHeight, getVerticalQuietZone, setAscenderHeight, setChecksumMode, setIntercharGapWidth, setTrackHeight, updateHeight |
Methods 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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_MODULE_WIDTH
protected static final double DEFAULT_MODULE_WIDTH
- The default module width for RoyalMail.
- See Also:
- Constant Field Values
RoyalMailCBCBean
public RoyalMailCBCBean()
- Create a new instance.
setMsgPosition
public void setMsgPosition(HumanReadablePlacement placement)
- Sets the placement of the human-readable part.
- Overrides:
setMsgPosition
in class AbstractBarcodeBean
- Parameters:
placement
- the placement of the human-readable part
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
- Specified by:
generateBarcode
in class AbstractBarcodeBean
- Parameters:
canvas
- CanvasProvider that the barcode is to be rendered on.msg
- message to encode
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 AbstractBarcodeBean
- Parameters:
msg
- message to use for calculation.
- Returns:
- BarcodeDimension a BarcodeDimension object containing the
barcode's dimensions
Copyright © 2000-2010 Jeremias Maerki. All rights reserved.