barcode4j 2.1.0

org.krysalis.barcode4j.impl.postnet
Class POSTNETLogicHandler

java.lang.Object
  extended by org.krysalis.barcode4j.impl.AbstractVariableHeightLogicHandler
      extended by org.krysalis.barcode4j.impl.postnet.POSTNETLogicHandler
All Implemented Interfaces:
BarcodeLogicHandler, ClassicBarcodeLogicHandler

public class POSTNETLogicHandler
extends AbstractVariableHeightLogicHandler

Logic Handler for POSTNET.

Version:
$Id: POSTNETLogicHandler.java,v 1.4 2008/05/13 13:00:44 jmaerki Exp $
Author:
Chris Dolphy

Field Summary
 
Fields inherited from class org.krysalis.barcode4j.impl.AbstractVariableHeightLogicHandler
bcBean, canvas, x, y
 
Constructor Summary
POSTNETLogicHandler(HeightVariableBarcodeBean bcBean, Canvas canvas)
          Constructor
 
Method Summary
 void addBar(boolean black, int height)
          This method indicates a new bar to be painted.
 void startBarcode(java.lang.String msg, java.lang.String formattedMsg)
          This is always the first method called.
 
Methods inherited from class org.krysalis.barcode4j.impl.AbstractVariableHeightLogicHandler
endBarcode, endBarGroup, getTextY, setTextAlignment, startBarGroup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

POSTNETLogicHandler

public POSTNETLogicHandler(HeightVariableBarcodeBean bcBean,
                           Canvas canvas)
Constructor

Parameters:
bcBean - the barcode implementation class
canvas - the canvas to paint to
Method Detail

startBarcode

public void startBarcode(java.lang.String msg,
                         java.lang.String formattedMsg)
Description copied from class: AbstractVariableHeightLogicHandler
This is always the first method called. It is called to inform the logic handler that a new barcode is about to be painted.

Specified by:
startBarcode in interface BarcodeLogicHandler
Overrides:
startBarcode in class AbstractVariableHeightLogicHandler
Parameters:
msg - full message to be encoded
formattedMsg - message as it is to be presented in the human-readable part
See Also:
ClassicBarcodeLogicHandler

addBar

public void addBar(boolean black,
                   int height)
Description copied from interface: ClassicBarcodeLogicHandler
This method indicates a new bar to be painted.

Parameters:
black - True if the bar is to be painted black, False if white/transparent
height - logical weight of the bar. Concrete implementations are free to define this to be height or width. For example, 1 may be interpreted as "narrow bar", 2 as "wide bar" for certain barcodes. While other barcodes might define 1 to be "short bar", 2 as "tall bar". Also, this should not be confused with the effective painting width, or the actual physical size of the bar.
See Also:
ClassicBarcodeLogicHandler.addBar(boolean, int)

barcode4j 2.1.0

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