barcode4j 2.0

org.krysalis.barcode4j
Interface ClassicBarcodeLogicHandler

All Superinterfaces:
BarcodeLogicHandler
All Known Subinterfaces:
TwoDimBarcodeLogicHandler
All Known Implementing Classes:
AbstractVariableHeightLogicHandler, DefaultCanvasLogicHandler, DefaultTwoDimCanvasLogicHandler, LoggingLogicHandlerProxy, UPCEANCanvasLogicHandler

public interface ClassicBarcodeLogicHandler
extends BarcodeLogicHandler

This interface defines methods to build classic 1D barcodes.

Version:
$Id: ClassicBarcodeLogicHandler.java,v 1.2 2004/09/04 20:25:54 jmaerki Exp $
Author:
Jeremias Maerki

Method Summary
 void addBar(boolean black, int weight)
          This method indicates a new bar to be painted.
 void endBarGroup()
          This method indicates the end of a previously started bar group.
 void startBarGroup(BarGroup type, java.lang.String submsg)
          This method is called when a new group of bars is about to start.
 
Methods inherited from interface org.krysalis.barcode4j.BarcodeLogicHandler
endBarcode, startBarcode
 

Method Detail

startBarGroup

public void startBarGroup(BarGroup type,
                          java.lang.String submsg)
This method is called when a new group of bars is about to start. A group of bars may be generated by a character (or group of characters) of the message to be encoded or by a start/end control group.

Parameters:
type - a constant indicating the type of group. The meaning of the integer values is implementation-dependant.
submsg - In case of parts of the message to be encoded this parameter holds the character or characters being encoded.

addBar

public void addBar(boolean black,
                   int weight)
This method indicates a new bar to be painted.

Parameters:
black - True if the bar is to be painted black, False if white/transparent
weight - 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.

endBarGroup

public void endBarGroup()
This method indicates the end of a previously started bar group. The method calls to startBarGroup and endBarGroup form a stack.


barcode4j 2.0

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