|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.jbarcodebean.model.AbstractBarcodeStrategy
net.sourceforge.jbarcodebean.model.Ean13
public class Ean13
EAN-13 barcode implementation. If less than 12 digits are supplied, the symbol is invalid Only the first 12 digits are considered: the checksum (13th digit) is always generated (MANDATORY_CHECKSUM).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.sourceforge.jbarcodebean.model.AbstractBarcodeStrategy |
|---|
AbstractBarcodeStrategy.CharacterCode |
| Field Summary | |
|---|---|
protected java.lang.String |
checkSum
|
| Fields inherited from interface net.sourceforge.jbarcodebean.model.BarcodeStrategy |
|---|
MANDATORY_CHECKSUM, NO_CHECKSUM, OPTIONAL_CHECKSUM |
| Constructor Summary | |
|---|---|
Ean13()
|
|
| Method Summary | |
|---|---|
protected java.lang.String |
augmentWithChecksum(java.lang.String text)
Subclasses implement this method to calculate the checksum from the text to encode, and return a String containing the text with the checksum included. |
protected void |
computeChecksum(java.lang.String text,
int len)
|
protected java.lang.String |
getBarcodeLabelText(java.lang.String text)
Subclasses implement this method to return the text which appears below the barcode. |
protected AbstractBarcodeStrategy.CharacterCode[] |
getCodes()
Subclasses implement this method to return an array of CharacterCode
objects, representing all possible encodings of bars and spaces for
every encodable character. |
protected byte |
getMarginWidth()
Always returns 11 (eleven). |
protected char |
getStartSentinel()
Subclasses implement this method to return the start sentinel character. |
protected char |
getStopSentinel()
Subclasses implement this method to return the stop sentinel character. |
protected boolean |
isInterleaved()
Subclasses must implement this method to return true or false depending on whether the barcode type is interleaved. |
protected java.lang.String |
postprocess(java.lang.String text)
Subclasses implement this method to perform any postprocessing required to the text after including the checksum. |
protected java.lang.String |
preprocess(java.lang.String text)
Subclasses implement this method to perform any preprocessing necessary on the original text to encode. |
int |
requiresChecksum()
Subclasses implement this method to determine whether this type of barcode has a mandatory, optional or no checksum. |
| 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 |
| Field Detail |
|---|
protected java.lang.String checkSum
| Constructor Detail |
|---|
public Ean13()
| Method Detail |
|---|
public int requiresChecksum()
BarcodeStrategy
requiresChecksum in interface BarcodeStrategyprotected AbstractBarcodeStrategy.CharacterCode[] getCodes()
AbstractBarcodeStrategyCharacterCode
objects, representing all possible encodings of bars and spaces for
every encodable character.
getCodes in class AbstractBarcodeStrategyCharacterCode
objects, one for each possible character
that can be encoded using this strategy.
protected void computeChecksum(java.lang.String text,
int len)
protected java.lang.String augmentWithChecksum(java.lang.String text)
throws BarcodeException
AbstractBarcodeStrategy
augmentWithChecksum in class AbstractBarcodeStrategytext - The text to encode (after preprocessing - see
AbstractBarcodeStrategy.preprocess(java.lang.String)).
BarcodeExceptionprotected java.lang.String postprocess(java.lang.String text)
AbstractBarcodeStrategy
postprocess in class AbstractBarcodeStrategytext - String to process (returned by
AbstractBarcodeStrategy.augmentWithChecksum(java.lang.String)).
protected java.lang.String preprocess(java.lang.String text)
AbstractBarcodeStrategyAbstractBarcodeStrategy.augmentWithChecksum(java.lang.String) method.
preprocess in class AbstractBarcodeStrategytext - The raw text to encode.
protected boolean isInterleaved()
AbstractBarcodeStrategy
isInterleaved in class AbstractBarcodeStrategyprotected char getStartSentinel()
AbstractBarcodeStrategy
getStartSentinel in class AbstractBarcodeStrategyprotected char getStopSentinel()
AbstractBarcodeStrategy
getStopSentinel in class AbstractBarcodeStrategyprotected byte getMarginWidth()
getMarginWidth in class AbstractBarcodeStrategyprotected java.lang.String getBarcodeLabelText(java.lang.String text)
AbstractBarcodeStrategy
getBarcodeLabelText in class AbstractBarcodeStrategytext - The raw text to encode.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||