Skip to main content

MicroQRCodeVersion Enum

Lists values that indicate the version of a Micro QR Code.

Declaration

public enum MicroQRCodeVersion extends Enum<MicroQRCodeVersion> implements IIntEnum

Members

Name Description
AUTO_VERSION

The version is selected automatically based on the encoded data length.

VERSION_M1

The M1 version. 11x11, up to 5 numeric symbols.

VERSION_M2

The M2 version. 13x13, up to 10 numeric or 6 alphanumeric symbols.

VERSION_M3

The M3 version. 15x15, up to 23 numeric or 14 alphanumeric symbols.

VERSION_M4

The M4 version. 17x17, up to 35 numeric or 21 alphanumeric symbols.

fromValue(int value)

Returns the MicroQRCodeVersion enumeration constant with the specified integer value.

getName()

Returns the name of the MicroQRCodeVersion enumeration constant.

getValue()

Returns the integer value associated with the MicroQRCodeVersion enumeration constant.

toString()

Returns the string representation of the MicroQRCodeVersion enumeration constant.

valueOf(String name)

Returns the MicroQRCodeVersion enumeration constant with the specified name.

values()

Returns an array of all MicroQRCodeVersion enumeration constants.

Remarks

The following code snippet creates a Micro 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 {

        MicroQRCodeOptions options = MicroQRCodeOptionsBuilder.create()
            .withCompactionMode(MicroQRCodeCompactionMode.BYTE)
            .withErrorCorrectionLevel(MicroQRCodeErrorCorrectionLevel.AUTO)
            .withPadding(new Padding(10))
            .withShowText(false)
            .build();

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

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

Refer to the following help topic for additional information: Micro 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
MicroQRCodeVersion