本文整理汇总了Java中org.krysalis.barcode4j.impl.postnet.POSTNETBean类的典型用法代码示例。如果您正苦于以下问题:Java POSTNETBean类的具体用法?Java POSTNETBean怎么用?Java POSTNETBean使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
POSTNETBean类属于org.krysalis.barcode4j.impl.postnet包,在下文中一共展示了POSTNETBean类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: testDefaultsInXML
import org.krysalis.barcode4j.impl.postnet.POSTNETBean; //导入依赖的package包/类
public void testDefaultsInXML() throws Exception {
POSTNETBean refBean = new POSTNETBean();
POSTNET gen = new POSTNET();
DefaultConfiguration cfg = new DefaultConfiguration("postnet");
gen.configure(cfg);
POSTNETBean xmlBean = gen.getPOSTNETBean();
assertEquals(refBean.getBarHeight(), xmlBean.getBarHeight(), 0.01);
assertEquals(refBean.getBaselinePosition(), xmlBean.getBaselinePosition());
assertEquals(refBean.getChecksumMode(), xmlBean.getChecksumMode());
assertEquals(refBean.isDisplayChecksum(), xmlBean.isDisplayChecksum());
assertEquals(refBean.getFontSize(), xmlBean.getFontSize(), 0.01);
assertEquals(refBean.getHeight(), xmlBean.getHeight(), 0.01);
assertEquals(refBean.getHumanReadableHeight(), xmlBean.getHumanReadableHeight(), 0.01);
assertEquals(refBean.getIntercharGapWidth(), xmlBean.getIntercharGapWidth(), 0.01);
assertEquals(refBean.getModuleWidth(), xmlBean.getModuleWidth(), 0.01);
assertEquals(refBean.getQuietZone(), xmlBean.getQuietZone(), 0.01);
assertEquals(refBean.getShortBarHeight(), xmlBean.getShortBarHeight(), 0.01);
assertEquals(refBean.getVerticalQuietZone(), xmlBean.getVerticalQuietZone(), 0.01);
assertEquals(refBean.hasQuietZone(), xmlBean.hasQuietZone());
assertEquals(refBean.getChecksumMode(), xmlBean.getChecksumMode());
assertEquals(refBean.getMsgPosition(), xmlBean.getMsgPosition());
assertEquals(refBean.getPattern(), xmlBean.getPattern());
}
开发者ID:thanakrit,项目名称:barcode4j,代码行数:25,代码来源:POSTNETTest.java
示例2: BarcodeRenderer
import org.krysalis.barcode4j.impl.postnet.POSTNETBean; //导入依赖的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: visitPostnet
import org.krysalis.barcode4j.impl.postnet.POSTNETBean; //导入依赖的package包/类
@Override
public void visitPostnet(POSTNETComponent postnet)
{
POSTNETBean postnetBean = new POSTNETBean();
barcodeBean = postnetBean;
evaluatePOSTNET(postnet);
setBaseAttributes(postnet);
if (postnet.getShortBarHeight() != null)
{
postnetBean.setShortBarHeight(
UnitConv.pt2mm(postnet.getShortBarHeight().doubleValue()));
}
if (postnet.getBaselinePosition() != null)
{
postnetBean.setBaselinePosition(
BaselineAlignment.byName(postnet.getBaselinePosition()));
}
if (postnet.getChecksumMode() != null)
{
postnetBean.setChecksumMode(
ChecksumMode.byName(postnet.getChecksumMode()));
}
if (postnet.getDisplayChecksum() != null)
{
postnetBean.setDisplayChecksum(
postnet.getDisplayChecksum().booleanValue());
}
if (postnet.getIntercharGapWidth() != null)
{
postnetBean.setIntercharGapWidth(
UnitConv.pt2mm(postnet.getIntercharGapWidth().doubleValue()));
}
evaluateBarcodeRenderable(postnet);
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:40,代码来源:AbstractBarcodeEvaluator.java
示例4: postnet
import org.krysalis.barcode4j.impl.postnet.POSTNETBean; //导入依赖的package包/类
public static AbstractBarcodeBean postnet(Checksum checksum,
boolean displayChecksum, TextPlacement placement) {
POSTNETBean result = new POSTNETBean();
result.setChecksumMode(getChecksum(checksum));
result.setDisplayChecksum(displayChecksum);
result.setMsgPosition(getPlacement(placement));
return result;
}
开发者ID:maxdelo77,项目名称:replyit-master-3.2-final,代码行数:10,代码来源:BarcodeFactory.java
示例5: getBarcodePOSTNET
import org.krysalis.barcode4j.impl.postnet.POSTNETBean; //导入依赖的package包/类
public static Image getBarcodePOSTNET(String value) {
AbstractBarcodeBean barcode = new POSTNETBean();
barcode.setMsgPosition(HumanReadablePlacement.HRP_BOTTOM);
return getBarcode(value, barcode);
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:6,代码来源:BarcodeImage.java
示例6: getBarcodePOSTNET
import org.krysalis.barcode4j.impl.postnet.POSTNETBean; //导入依赖的package包/类
/**
*
* @param value
* @return
*/
public static Image getBarcodePOSTNET(String value) {
AbstractBarcodeBean barcode = new POSTNETBean();
barcode.setMsgPosition(HumanReadablePlacement.HRP_BOTTOM);
return getBarcode(value, barcode);
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:11,代码来源:BarcodeImage.java
注:本文中的org.krysalis.barcode4j.impl.postnet.POSTNETBean类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论