|
barcode4j 2.1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.krysalis.barcode4j.impl.code128.Code128LogicImpl
public class Code128LogicImpl
This class is an implementation of the Code 128 barcode.
Field Summary | |
---|---|
static char |
FNC_1
The function 1 command. |
static char |
FNC_2
The function 2 command. |
static char |
FNC_3
The function 3 command. |
static char |
FNC_4
The function 4 command. |
Constructor Summary | |
---|---|
Code128LogicImpl()
Default constructor. |
|
Code128LogicImpl(int codeset)
Main constructor. |
Method Summary | |
---|---|
static boolean |
canBeInCodeSetC(char ch,
boolean second)
Determines whether a character is a digit or a function 1 command. |
protected void |
encodeChar(ClassicBarcodeLogicHandler logic,
int index)
Encodes a character. |
protected void |
encodeStop(ClassicBarcodeLogicHandler logic)
Encodes the special stop character. |
void |
generateBarcodeLogic(ClassicBarcodeLogicHandler logic,
java.lang.String msg)
Generates the barcode logic |
protected Code128Encoder |
getEncoder()
Returns the encoder to be used. |
static boolean |
isInCodeSetA(char ch)
Determines whether a character is defined in codeset A. |
static boolean |
isInCodeSetB(char ch)
Determines whether a character is defined in codeset B. |
static boolean |
isValidChar(char ch)
Determines whether a character can be encoded in Code 128. |
static java.lang.String |
symbolCharToString(int index)
Converts a character set index to a String representation. |
static java.lang.String |
toString(int[] encodedMsg)
Converts an encoded Code 128 message into a String for debugging purposes. |
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
Constructor Detail |
---|
public Code128LogicImpl()
public Code128LogicImpl(int codeset)
codeset
- the enabled codesetMethod Detail |
---|
public static boolean isValidChar(char ch)
ch
- the character to check
public static boolean isInCodeSetA(char ch)
ch
- the character to check
public static boolean isInCodeSetB(char ch)
ch
- the character to check
public static boolean canBeInCodeSetC(char ch, boolean second)
ch
- the character to checksecond
- true if checking the character for the second position in
a duo.
public static java.lang.String symbolCharToString(int index)
index
- the character set index
public static java.lang.String toString(int[] encodedMsg)
encodedMsg
- the encoded message
protected void encodeChar(ClassicBarcodeLogicHandler logic, int index)
logic
- LogicHandler to send the barcode events toindex
- index withing the character set of the character to encodeprotected void encodeStop(ClassicBarcodeLogicHandler logic)
logic
- LogicHandler to send the barcode events toprotected Code128Encoder getEncoder()
Override this method to supply your own implementation.
public void generateBarcodeLogic(ClassicBarcodeLogicHandler logic, java.lang.String msg)
logic
- the logic handler to receive the generated eventsmsg
- the message to encode
|
barcode4j 2.1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |