Skip to main content

MicroQRCodeErrorCorrectionLevel Class

Lists values that indicate the error correction level for a Micro QR Code.

Declaration

public final class MicroQRCodeErrorCorrectionLevel extends IntEnum<MicroQRCodeErrorCorrectionLevel>

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.

Inherited Members

com.devexpress.java.enums.IntEnum.clone()
com.devexpress.java.enums.IntEnum.equals(java.lang.Object)
com.devexpress.java.enums.IntEnum.getName()
com.devexpress.java.enums.IntEnum.getValue()
com.devexpress.java.enums.IntEnum.hasFlag(T)
com.devexpress.java.enums.IntEnum.hasFlag(int)
com.devexpress.java.enums.IntEnum.hashCode()
com.devexpress.java.enums.IntEnum.readResolve()
com.devexpress.java.enums.IntEnum.resolve(int)
com.devexpress.java.enums.IntEnum.toString()
java.lang.Object.finalize()
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
com.devexpress.java.enums.IntEnum
MicroQRCodeErrorCorrectionLevel

Fields

_AUTO Field

Gets the integer value of the automatic error correction level.

Declaration

public static final int _AUTO

Field Value

Type Description
int

The integer value of the automatic error correction level.

_L Field

Gets the low error correction level.

Declaration

public static final int _L

Field Value

Type Description
int

The low error correction level.

_M Field

Gets the medium error correction level.

Declaration

public static final int _M

Field Value

Type Description
int

The medium error correction level.

_Q Field

Gets the integer value of the quartile error correction level.

Declaration

public static final int _Q

Field Value

Type Description
int

The integer value of the quartile error correction level.

AUTO Field

The error correction level is determined automatically.

Declaration

public static final MicroQRCodeErrorCorrectionLevel AUTO

Field Value

Type Description
MicroQRCodeErrorCorrectionLevel

The automatic error correction level.

L Field

(Low): Restores up to 7% of encoded data. This level is available for M2-M4 barcode sizes.

Declaration

public static final MicroQRCodeErrorCorrectionLevel L

Field Value

Type Description
MicroQRCodeErrorCorrectionLevel

The low error correction level.

M Field

(Medium): Restores up to 15% of encoded data. This level is available for M2-M4 barcode sizes.

Declaration

public static final MicroQRCodeErrorCorrectionLevel M

Field Value

Type Description
MicroQRCodeErrorCorrectionLevel

The medium error correction level.

Q Field

(Quartile): Restores up to 25% of encoded data. This level is available only for the largest barcode size (M4).

Declaration

public static final MicroQRCodeErrorCorrectionLevel Q

Field Value

Type Description
MicroQRCodeErrorCorrectionLevel

The quartile error correction level.

Methods

fromValue(int value) Method

Returns the MicroQRCodeErrorCorrectionLevel enumeration constant with the specified integer value.

Declaration

public static MicroQRCodeErrorCorrectionLevel fromValue(int value)

Parameters

Name Type Description
value int

An integer value of the MicroQRCodeErrorCorrectionLevel enumeration constant.

Returns

Type Description
MicroQRCodeErrorCorrectionLevel

The MicroQRCodeErrorCorrectionLevel enumeration constant with the specified integer value.

values() Method

Returns an array of all MicroQRCodeErrorCorrectionLevel enumeration constants.

Declaration

public static MicroQRCodeErrorCorrectionLevel[] values()

Returns

Type Description
MicroQRCodeErrorCorrectionLevel[]

An array of all MicroQRCodeErrorCorrectionLevel enumeration constants.