net.sourceforge.jbarcodebean.model
Class Code39

java.lang.Object
  extended by net.sourceforge.jbarcodebean.model.AbstractBarcodeStrategy
      extended by net.sourceforge.jbarcodebean.model.BaseCode39
          extended by net.sourceforge.jbarcodebean.model.Code39
All Implemented Interfaces:
java.io.Serializable, BarcodeStrategy
Direct Known Subclasses:
Code39_2to1

public class Code39
extends BaseCode39
implements java.io.Serializable

This class, which implements the BarcodeStrategy interface, knows how to encode the 3:1 (wide) variant of the Code 3 of 9 barcode type.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sourceforge.jbarcodebean.model.AbstractBarcodeStrategy
AbstractBarcodeStrategy.CharacterCode
 
Field Summary
 
Fields inherited from class net.sourceforge.jbarcodebean.model.BaseCode39
codes, codes2to1
 
Fields inherited from interface net.sourceforge.jbarcodebean.model.BarcodeStrategy
MANDATORY_CHECKSUM, NO_CHECKSUM, OPTIONAL_CHECKSUM
 
Constructor Summary
Code39()
           
 
Method Summary
protected  java.lang.String getBarcodeLabelText(java.lang.String text)
          Returns an UPPER CASE version of the text parameter.
protected  AbstractBarcodeStrategy.CharacterCode[] getCodes()
          This implementation of getCodes returns BaseCode39.codes.
protected  java.lang.String preprocess(java.lang.String text)
          Returns an UPPER CASE version of the text parameter.
 
Methods inherited from class net.sourceforge.jbarcodebean.model.BaseCode39
augmentWithChecksum, getMarginWidth, getStartSentinel, getStopSentinel, isInterleaved, postprocess, requiresChecksum
 
Methods inherited from class net.sourceforge.jbarcodebean.model.AbstractBarcodeStrategy
computeSize, encode, getCharacterCode, getCharacterCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Code39

public Code39()
Method Detail

getCodes

protected AbstractBarcodeStrategy.CharacterCode[] getCodes()
This implementation of getCodes returns BaseCode39.codes.

Specified by:
getCodes in class AbstractBarcodeStrategy
Returns:
An array of CharacterCode objects, one for each possible character that can be encoded using this strategy.

preprocess

protected java.lang.String preprocess(java.lang.String text)
Returns an UPPER CASE version of the text parameter.

Specified by:
preprocess in class AbstractBarcodeStrategy
Parameters:
text - The raw text to encode.
Returns:
The string after preprocessing. If no preprocessing is required, the String passed to the method is returned.

getBarcodeLabelText

protected java.lang.String getBarcodeLabelText(java.lang.String text)
Returns an UPPER CASE version of the text parameter.

Specified by:
getBarcodeLabelText in class AbstractBarcodeStrategy
Parameters:
text - The raw text to encode.
Returns:
A String containing the text that will appear beneath the barcode.


Copyright © 2004-2009 The JBarcodeBean project. All Rights Reserved.