Class ITF14CanvasLogicHandler
java.lang.Object
org.krysalis.barcode4j.impl.DefaultCanvasLogicHandler
org.krysalis.barcode4j.impl.int2of5.ITF14CanvasLogicHandler
- All Implemented Interfaces:
BarcodeLogicHandler,ClassicBarcodeLogicHandler
Specialized logic handler for ITF-14 (to paint the bearer bar).
- Version:
- $Id: ITF14CanvasLogicHandler.java,v 1.2 2009-03-11 10:42:15 jmaerki Exp $
-
Field Summary
Fields inherited from class org.krysalis.barcode4j.impl.DefaultCanvasLogicHandler
bcBean, canvas, dimensions -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected doubleReturns the start X position of the bars.protected doubleReturns the start Y position of the bars.protected doubleReturns the vertical text baseline position.voidstartBarcode(String msg, String formattedMsg) This is always the first method called.Methods inherited from class org.krysalis.barcode4j.impl.DefaultCanvasLogicHandler
addBar, endBarcode, endBarGroup, startBarGroup
-
Constructor Details
-
ITF14CanvasLogicHandler
Main constructor.- Parameters:
bcBean- the barcode beancanvas- the canvas to paint on
-
-
Method Details
-
getStartX
protected double getStartX()Returns the start X position of the bars.- Overrides:
getStartXin classDefaultCanvasLogicHandler- Returns:
- the start X position of the bars.
-
getStartY
protected double getStartY()Returns the start Y position of the bars.- Overrides:
getStartYin classDefaultCanvasLogicHandler- Returns:
- the start Y position of the bars.
-
startBarcode
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:
startBarcodein interfaceBarcodeLogicHandler- Overrides:
startBarcodein classDefaultCanvasLogicHandler- Parameters:
msg- full message to be encodedformattedMsg- message as it is to be presented in the human-readable part
-
getTextBaselinePosition
protected double getTextBaselinePosition()Returns the vertical text baseline position.- Overrides:
getTextBaselinePositionin classDefaultCanvasLogicHandler- Returns:
- the vertical text baseline position
-