本文整理匯總了Java中org.krysalis.barcode4j.impl.code128.EAN128Bean類的典型用法代碼示例。如果您正苦於以下問題:Java EAN128Bean類的具體用法?Java EAN128Bean怎麽用?Java EAN128Bean使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
EAN128Bean類屬於org.krysalis.barcode4j.impl.code128包,在下文中一共展示了EAN128Bean類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: BarcodeRenderer
import org.krysalis.barcode4j.impl.code128.EAN128Bean; //導入依賴的package包/類
public BarcodeRenderer(BarcodeType barcodeType, String code) {
switch (barcodeType) {
case CODE128 : this.barcode = new Code128Bean(); break;
case CODABAR : this.barcode = new CodabarBean(); break;
case CODE39 : this.barcode = new Code39Bean(); break;
case EAN128 : this.barcode = new EAN128Bean(); break;
case DATAMATRIX : this.barcode = new DataMatrixBean(); break;
case INT2OF5 : this.barcode = new Interleaved2Of5Bean(); break;
case PDF417 : this.barcode = new PDF417Bean(); break;
case POSTNET : this.barcode = new POSTNETBean(); break;
case EAN13 : this.barcode = new EAN13Bean(); break;
case EAN8 : this.barcode = new EAN8Bean(); break;
case UPCA : this.barcode = new UPCABean(); break;
case UPCE : this.barcode = new UPCEBean(); break;
case ROYAL_MAIL_CBC : this.barcode = new RoyalMailCBCBean(); break;
case USPS_INTELLIGENT_MAIL : this.barcode = new USPSIntelligentMailBean(); break;
}
this.code = code;
}
示例2: evaluateEANCode128
import org.krysalis.barcode4j.impl.code128.EAN128Bean; //導入依賴的package包/類
@Override
protected void evaluateEANCode128(EAN128Component ean128)
{
evaluateBaseBarcode(ean128, "0101234567890128");
String template = evaluateStringExpression(
ean128.getTemplateExpression(), null);
if (template != null)
{
((EAN128Bean)barcodeBean).setTemplate(template);
}
}
示例3: evaluateEANCode128
import org.krysalis.barcode4j.impl.code128.EAN128Bean; //導入依賴的package包/類
@Override
protected void evaluateEANCode128(EAN128Component ean128)
{
evaluateBaseBarcode(ean128);
String template = JRStringUtil.getString(evaluateExpression(ean128.getTemplateExpression()));
if (template != null)
{
((EAN128Bean)barcodeBean).setTemplate(template);
}
}
示例4: visitEANCode128
import org.krysalis.barcode4j.impl.code128.EAN128Bean; //導入依賴的package包/類
@Override
public void visitEANCode128(EAN128Component ean128)
{
EAN128Bean ean128Bean = new EAN128Bean();
barcodeBean = ean128Bean;
evaluateEANCode128(ean128);
setBaseAttributes(ean128);
if (ean128.getChecksumMode() != null)
{
ean128Bean.setChecksumMode(ChecksumMode.byName(ean128.getChecksumMode()));
}
evaluateBarcodeRenderable(ean128);
}
示例5: ean128
import org.krysalis.barcode4j.impl.code128.EAN128Bean; //導入依賴的package包/類
public static AbstractBarcodeBean ean128(Checksum checksum, TextPlacement placement) {
EAN128Bean result = new EAN128Bean();
result.setChecksumMode(getChecksum(checksum));
result.setMsgPosition(getPlacement(placement));
result.setFontSize(5);
return result;
}
示例6: parseEscapes
import org.krysalis.barcode4j.impl.code128.EAN128Bean; //導入依賴的package包/類
public static String parseEscapes(String msg) {
if (msg == null || msg.indexOf('\\') < 0)
return msg;
int len = msg.length();
StringBuffer ret = new StringBuffer(len);
char c;
for (int i = 0; i < len; ) {
c = msg.charAt(i++);
if (c != '\\' || i >= len) { //if no Escape, or if Escape is the last char!
ret.append(c);
} else {
c = msg.charAt(i++);
switch (c) {
case '\\': ret.append('\\'); break;
case '0': ret.append('\0'); break;
case 'b': ret.append('\b'); break;
case 'c':
if (i >= len || (c = msg.charAt(i++)) != 'd') {
ret.append("\\c");
} else {
ret.append(EAN128Bean.DEFAULT_CHECK_DIGIT_MARKER);
}
break;
case 'f': ret.append('\f'); break;
case 'g':
if (i >= len || (c = msg.charAt(i++)) != 's') {
ret.append("\\g");
} else {
ret.append(EAN128Bean.DEFAULT_GROUP_SEPARATOR);
}
break;
case 'n': ret.append('\n'); break;
case 'r': ret.append('\r'); break;
case 't': ret.append('\t'); break;
case 'o': ret.append(decodeChar(msg, i, i += 3, 8)); break;
case 'd': ret.append(decodeChar(msg, i, i += 3, 10)); break;
case 'x': ret.append(decodeChar(msg, i, i += 2, 16)); break;
case 'u': ret.append(decodeChar(msg, i, i += 4, 16)); break;
default: ret.append('\\').append(c); break;
}
}
}
return ret.toString();
}