barcode4j 2.1.0

org.krysalis.barcode4j.impl.fourstate
Class RoyalMailCBCBean

java.lang.Object
  extended by org.krysalis.barcode4j.impl.AbstractBarcodeBean
      extended by org.krysalis.barcode4j.impl.HeightVariableBarcodeBean
          extended by org.krysalis.barcode4j.impl.fourstate.AbstractFourStateBean
              extended by 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

Field Summary
protected static double DEFAULT_MODULE_WIDTH
          The 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
RoyalMailCBCBean()
          Create a new instance.
 
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 generateBarcode(CanvasProvider canvas, java.lang.String msg)
          Generates a barcode using the given Canvas to render the barcode to its output format.
 void setMsgPosition(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, 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
 

Field Detail

DEFAULT_MODULE_WIDTH

protected static final double DEFAULT_MODULE_WIDTH
The default module width for RoyalMail.

See Also:
Constant Field Values
Constructor Detail

RoyalMailCBCBean

public RoyalMailCBCBean()
Create a new instance.

Method Detail

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

barcode4j 2.1.0

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