Package org.krysalis.barcode4j.impl.code128

Examples of org.krysalis.barcode4j.impl.code128.EAN128Bean


  protected abstract void evaluateCodabar(CodabarComponent codabar);

  public void visitCode128(Code128Component code128)
  {
    barcode = new Code128Bean();
    evaluateCode128(code128);
    setBaseAttributes(code128);
  }
View Full Code Here


        m_sCode = code;
        this.scale = scale;

        if (DevicePrinter.BARCODE_CODE128.equals(type)) {
            m_barcode = new Code128Bean();
        } else {
            m_barcode = new EAN13Bean();
        }

        if (m_barcode != null) {
View Full Code Here

import org.krysalis.barcode4j.output.CanvasProvider;

public class Code128Generator implements BarcodeGenerator {

    public void generate(CanvasProvider canvasProvider, String value) throws IOException {
        Code128Bean bean = new Code128Bean();
        bean.generateBarcode(canvasProvider, value);
    }
View Full Code Here

        m_sCode = code;
        this.scale = scale;

        if (DevicePrinter.BARCODE_CODE128.equals(type)) {
            m_barcode = new Code128Bean();
        } else {
            m_barcode = new EAN13Bean();
        }

        if (m_barcode != null) {
View Full Code Here

        barcode.setMsgPosition(HumanReadablePlacement.HRP_BOTTOM);
        return getBarcode(value, barcode);
    }
   
    public static Image getBarcode128(String value) {
        AbstractBarcodeBean barcode = new Code128Bean();
        barcode.setMsgPosition(HumanReadablePlacement.HRP_NONE);
        return getBarcode(value, barcode);
    }
View Full Code Here

      return dataMatrix;
    }

    if (BARCODE_EAN128.equals(type))
    {
      final EAN128 dataMatrix = new EAN128();
      if (showText == false)
      {
        dataMatrix.getEAN128Bean().setMsgPosition(HumanReadablePlacement.HRP_NONE);
      }
      if (barHeight != null)
      {
        dataMatrix.getEAN128Bean().setBarHeight(UnitConv.pt2mm(barHeight.doubleValue()));
      }
      dataMatrix.getEAN128Bean().setChecksumMode(checksum ? ChecksumMode.CP_AUTO : ChecksumMode.CP_IGNORE);
      return dataMatrix;
    }

    if (BARCODE_UPCE.equals(type))
    {
      final UPCE dataMatrix = new UPCE();
      if (showText == false)
      {
        dataMatrix.getUPCEANBean().setMsgPosition(HumanReadablePlacement.HRP_NONE);
      }
      if (barHeight != null)
      {
        dataMatrix.getUPCEANBean().setBarHeight(UnitConv.pt2mm(barHeight.doubleValue()));
      }
      dataMatrix.getUPCEANBean().setChecksumMode(checksum ? ChecksumMode.CP_AUTO : ChecksumMode.CP_IGNORE);
      return dataMatrix;
    }

    if (BARCODE_ROYALMAIL.equals(type))
    {
      final RoyalMailCBC dataMatrix = new RoyalMailCBC();
      if (showText == false)
      {
        dataMatrix.getRoyalMailCBCBean().setMsgPosition(HumanReadablePlacement.HRP_NONE);
      }
      if (barHeight != null)
      {
        dataMatrix.getRoyalMailCBCBean().setBarHeight(UnitConv.pt2mm(barHeight.doubleValue()));
      }
      dataMatrix.getRoyalMailCBCBean().setChecksumMode(checksum ? ChecksumMode.CP_AUTO : ChecksumMode.CP_IGNORE);
      return dataMatrix;
    }

    if (BARCODE_USPSINTELLIGENTMAIL.equals(type))
    {
      final USPSIntelligentMail dataMatrix = new USPSIntelligentMail();
      if (showText == false)
      {
        dataMatrix.getUSPSIntelligentMailBean().setMsgPosition(HumanReadablePlacement.HRP_NONE);
      }
      if (barHeight != null)
      {
        dataMatrix.getUSPSIntelligentMailBean().setBarHeight(UnitConv.pt2mm(barHeight.doubleValue()));
      }
      dataMatrix.getUSPSIntelligentMailBean().setChecksumMode(checksum ? ChecksumMode.CP_AUTO : ChecksumMode.CP_IGNORE);
      return dataMatrix;
    }
    return null;
  }
View Full Code Here

  protected abstract void evaluateDataMatrix(DataMatrixComponent dataMatrix);

  public void visitEANCode128(EAN128Component ean128)
  {
    EAN128Bean ean128Bean = new EAN128Bean();
    barcode = ean128Bean;
    evaluateEANCode128(ean128);
    setBaseAttributes(ean128);
    if (ean128.getChecksumMode() != null)
    {
      ean128Bean.setChecksumMode(ChecksumMode.byName(ean128.getChecksumMode()));
    }
  }
View Full Code Here

TOP

Related Classes of org.krysalis.barcode4j.impl.code128.EAN128Bean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.