Skip to main content

EPCVersion Enum

Lists values that indicate the EPC QR code version.

Declaration

public enum EPCVersion extends Enum<EPCVersion> implements IIntEnum

Members

Name Description
VERSION_1

The EPC QR code version 1.

VERSION_2

The EPC QR code version 2.

fromValue(int value)

Returns the EPCVersion enumeration constant with the specified integer value.

getName()

Returns the name of the EPCVersion enumeration constant.

getValue()

Returns the integer value associated with the EPCVersion enumeration constant.

toString()

Returns the string representation of the EPCVersion enumeration constant.

valueOf(String name)

Returns the EPCVersion enumeration constant with the specified name.

values()

Returns an array of all EPCVersion enumeration constants.

Remarks

The following code snippet creates an EPC QR Code barcode and customizes its encoding parameters with the Fluent API:

import com.devexpress.drawing.*;
import com.devexpress.docs.barcode.*;
import com.devexpress.system.drawing.*;
import com.devexpress.docs.Padding;

import java.io.*;
import java.nio.file.*;

public class Main {
    public static void main(String[] args) throws Exception {

        QRCodeEPCOptions options = QRCodeEPCOptionsBuilder.create()
            .withTransferAmount(100.50)
            .withEPCVersion(EPCVersion.VERSION_1)
            .withEPCEncoding(EPCEncoding.UTF_8)
            .withBackColor(Color.getLightGray())
            .withBIC("BFSWDE33MUC")
            .withBeneficiaryName("John Doe")
            .withIBAN("DE89370400440532013000")
            .withPaymentReference("RF18539007547034")
            .withTransferPurpose("CHAR")
            .withPadding(new Padding(10))
            .withShowText(true)
            .withWidth(400)
            .build();

        Path outputDir = Path.of("output");
        Files.createDirectories(outputDir);

        try (FileOutputStream fileStream = new FileOutputStream(
                outputDir.resolve("qrcodeEPC.png").toFile());
                BarcodeGenerator barcodeGenerator = new BarcodeGenerator(options)) {
                    barcodeGenerator.export(
                            options.getStringData(),
                            fileStream,
                            DXImageFormat.getPng());
        }
    }
}

Refer to the following help topic for additional information: EPC QR Code.

Implements

com.devexpress.java.enums.IIntEnum

Inherited Members

java.lang.Enum.<T>valueOf(java.lang.Class<T>,java.lang.String)
java.lang.Enum.clone()
java.lang.Enum.compareTo(E)
java.lang.Enum.describeConstable()
java.lang.Enum.equals(java.lang.Object)
java.lang.Enum.finalize()
java.lang.Enum.getDeclaringClass()
java.lang.Enum.hashCode()
java.lang.Enum.name()
java.lang.Enum.ordinal()
java.lang.Enum.toString()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)

Inheritance

Object
java.lang.Enum
EPCVersion