本文整理汇总了Java中org.krysalis.barcode4j.impl.upcean.EAN13Bean类的典型用法代码示例。如果您正苦于以下问题:Java EAN13Bean类的具体用法?Java EAN13Bean怎么用?Java EAN13Bean使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EAN13Bean类属于org.krysalis.barcode4j.impl.upcean包,在下文中一共展示了EAN13Bean类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getBarcodeEAN13
import org.krysalis.barcode4j.impl.upcean.EAN13Bean; //导入依赖的package包/类
public static Image getBarcodeEAN13(String value) {
AbstractBarcodeBean barcode = new EAN13Bean();
value = BarcodeString.getBarcodeStringEAN13(value);
barcode.setMsgPosition(HumanReadablePlacement.HRP_BOTTOM);
barcode.setModuleWidth(1.0);
barcode.setBarHeight(40.0);
barcode.setFontSize(10.0);
barcode.setQuietZone(10.0);
barcode.doQuietZone(true);
return getBarcode(value, barcode);
}
开发者ID:nordpos,项目名称:nordpos,代码行数:12,代码来源:BarcodeImage.java
示例2: BarcodeRenderer
import org.krysalis.barcode4j.impl.upcean.EAN13Bean; //导入依赖的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;
}
开发者ID:maxdelo77,项目名称:replyit-master-3.2-final,代码行数:21,代码来源:BarcodeRenderer.java
示例3: visitEAN13
import org.krysalis.barcode4j.impl.upcean.EAN13Bean; //导入依赖的package包/类
@Override
public void visitEAN13(EAN13Component ean13)
{
EAN13Bean ean13Bean = new EAN13Bean();
barcodeBean = ean13Bean;
evaluateEAN13(ean13);
setBaseAttributes(ean13);
if (ean13.getChecksumMode() != null)
{
ean13Bean.setChecksumMode(ChecksumMode.byName(ean13.getChecksumMode()));
}
evaluateBarcodeRenderable(ean13);
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:14,代码来源:AbstractBarcodeEvaluator.java
示例4: createBarcode
import org.krysalis.barcode4j.impl.upcean.EAN13Bean; //导入依赖的package包/类
private BufferedImage createBarcode() throws IOException
{
String data = (volume.getIsbn().equals("") ? volume.getBarcode() : volume.getIsbn().replace("-", "")) + "+" + (volume.getNumber().length() == 1 ? "0" + volume.getNumber() : volume.getNumber());
EAN13Bean bean = new EAN13Bean();
bean.setHeight(12d);
bean.setModuleWidth(UnitConv.in2mm(1.0f / 100));
bean.setFontSize(2);
BitmapCanvasProvider provider = new BitmapCanvasProvider(100, BufferedImage.TYPE_INT_RGB, true, 0);
bean.generateBarcode(provider, data);
provider.finish();
BufferedImage barcodeImage = provider.getBufferedImage();
BufferedImage result = new BufferedImage(barcodeImage.getWidth() + 4, barcodeImage.getHeight() + 9, BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = result.createGraphics();
g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
g2d.setPaint(Utilities.deriveColorAlpha(BorderUtils.DEFAULT_LINE_COLOR, 255));
g2d.fillRect(0, 0, result.getWidth(), result.getHeight());
g2d.setPaint(Color.WHITE);
g2d.fillRect(2, 2, result.getWidth() - 4, result.getHeight() - 4);
g2d.drawImage(barcodeImage, 2, 5, barcodeImage.getWidth(), barcodeImage.getHeight(), null);
g2d.dispose();
return result;
}
开发者ID:alessandrojean,项目名称:manga-no-keiei,代码行数:28,代码来源:VolumeCard.java
示例5: getBarcodeEAN13
import org.krysalis.barcode4j.impl.upcean.EAN13Bean; //导入依赖的package包/类
public static Image getBarcodeEAN13(String value) {
AbstractBarcodeBean barcode = new EAN13Bean();
barcode.setMsgPosition(HumanReadablePlacement.HRP_BOTTOM);
return getBarcode(value, barcode);
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:6,代码来源:BarcodeImage.java
示例6: getBarcodeEAN13
import org.krysalis.barcode4j.impl.upcean.EAN13Bean; //导入依赖的package包/类
/**
*
* @param value
* @return
*/
public static Image getBarcodeEAN13(String value) {
AbstractBarcodeBean barcode = new EAN13Bean();
barcode.setMsgPosition(HumanReadablePlacement.HRP_BOTTOM);
return getBarcode(value, barcode);
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:11,代码来源:BarcodeImage.java
示例7: ean13
import org.krysalis.barcode4j.impl.upcean.EAN13Bean; //导入依赖的package包/类
public static AbstractBarcodeBean ean13(Checksum checksum, TextPlacement placement) {
EAN13Bean result = new EAN13Bean();
result.setChecksumMode(getChecksum(checksum));
result.setMsgPosition(getPlacement(placement));
return result;
}
开发者ID:maxdelo77,项目名称:replyit-master-3.2-final,代码行数:7,代码来源:BarcodeFactory.java
注:本文中的org.krysalis.barcode4j.impl.upcean.EAN13Bean类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论