|
||||||||||
| 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.Code128
public class Code128
Code 128 barcode strategy implementation. This format can encode the full 128 character ASCII character set (from 0 to 127 decimal), plus four special Code 128 function codes. These four codes are defined as constant class members for convenience: FNC_1 through FNC_4.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.sourceforge.jbarcodebean.model.AbstractBarcodeStrategy |
|---|
AbstractBarcodeStrategy.CharacterCode |
| Field Summary | |
|---|---|
protected static AbstractBarcodeStrategy.CharacterCode[] |
codes
A static array of CharacterCode objects
for Code 128. |
static char |
FNC_1
Code 128 FUNCTION CODE 1 |
static char |
FNC_2
Code 128 FUNCTION CODE 2 |
static char |
FNC_3
Code 128 FUNCTION CODE 3 |
static char |
FNC_4
Code 128 FUNCTION CODE 4 |
| Fields inherited from interface net.sourceforge.jbarcodebean.model.BarcodeStrategy |
|---|
MANDATORY_CHECKSUM, NO_CHECKSUM, OPTIONAL_CHECKSUM |
| Constructor Summary | |
|---|---|
Code128()
|
|
| Method Summary | |
|---|---|
protected java.lang.String |
augmentWithChecksum(java.lang.String text)
Returns a String containing the checksum-encoded version of the text passed to the method. |
protected java.lang.String |
getBarcodeLabelText(java.lang.String text)
Returns the text parameter with function characters and control codes stripped out. |
protected AbstractBarcodeStrategy.CharacterCode[] |
getCodes()
This implementation of getCodes returns an array of CharacterCode objects
for the Code 128 format. |
protected byte |
getMarginWidth()
Always returns 11 (eleven). |
protected char |
getStartSentinel()
Always returns 0xffff, signalling to AbstractBarcodeStrategy superclass that it should not prefix a standard start character. |
protected char |
getStopSentinel()
Always returns the Code 128 STOP character. |
protected boolean |
isInterleaved()
Always returns false. |
protected java.lang.String |
postprocess(java.lang.String text)
Does nothing except return the String passed to the method. |
protected java.lang.String |
preprocess(java.lang.String text)
Inserts start character and code change characters. |
int |
requiresChecksum()
Always returns BarcodeStrategy.MANDATORY_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 |
|---|
public static final char FNC_1
public static final char FNC_2
public static final char FNC_3
public static final char FNC_4
protected static AbstractBarcodeStrategy.CharacterCode[] codes
CharacterCode objects
for Code 128. The
getCodes() method
returns this array.
The character member of the elements in this array corresponds to the
MODE B version of the character.
| Constructor Detail |
|---|
public Code128()
| Method Detail |
|---|
public int requiresChecksum()
BarcodeStrategy.MANDATORY_CHECKSUM.
protected AbstractBarcodeStrategy.CharacterCode[] getCodes()
CharacterCode objects
for the Code 128 format.
getCodes in class AbstractBarcodeStrategyCharacterCode
objects, one for each possible character
that can be encoded using this strategy.protected java.lang.String getBarcodeLabelText(java.lang.String text)
getBarcodeLabelText in class AbstractBarcodeStrategytext - The raw text to encode.
protected byte getMarginWidth()
getMarginWidth in class AbstractBarcodeStrategyprotected char getStartSentinel()
getStartSentinel in class AbstractBarcodeStrategyprotected char getStopSentinel()
getStopSentinel in class AbstractBarcodeStrategyprotected boolean isInterleaved()
isInterleaved in class AbstractBarcodeStrategy
protected java.lang.String preprocess(java.lang.String text)
throws BarcodeException
preprocess in class AbstractBarcodeStrategytext - The raw text to encode.
BarcodeException - Typically caused by passing in
a String containing illegal characters (characters that cannot be encoded in
this type of barcode).protected java.lang.String postprocess(java.lang.String text)
postprocess in class AbstractBarcodeStrategytext - String to process (returned by
AbstractBarcodeStrategy.augmentWithChecksum(java.lang.String)).
protected java.lang.String augmentWithChecksum(java.lang.String text)
throws BarcodeException
augmentWithChecksum in class AbstractBarcodeStrategytext - The text to encode (after preprocessing - see
AbstractBarcodeStrategy.preprocess(java.lang.String)).
BarcodeException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||