Skip to main content

DataMatrixCompactionMode Enum

Lists compaction modes used in DataMatrix barcode symbology.

Declaration

public enum DataMatrixCompactionMode extends Enum<DataMatrixCompactionMode> implements IIntEnum

Members

Name Description
ASCII

Encoding mode used to store double digit numerics, ASCII values 0 - 127, and Extended ASCII values 128 - 255.

BINARY

Encoding mode used to store binary data. They are encoded using 8 bits per symbol.

C40

Encoding mode for upper-case alphanumeric, lower case, and special characters.

EDIFACT

Encoding mode for ASCII values from 32 to 94.

TEXT

Encoding mode for lower-case alphanumeric, upper case, and special characters.

X12

Encoding mode for ANSI X12 EDI data set.

fromValue(int value)

Returns the DataMatrixCompactionMode enumeration constant with the specified integer value.

getName()

Returns the name of the DataMatrixCompactionMode enumeration constant.

getValue()

Returns the integer value associated with the DataMatrixCompactionMode enumeration constant.

toString()

Returns the string representation of the DataMatrixCompactionMode enumeration constant.

valueOf(String name)

Returns the DataMatrixCompactionMode enumeration constant with the specified name.

values()

Returns an array of all DataMatrixCompactionMode enumeration constants.

Remarks

The following code snippet creates a GS1 Data Matrix 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 {

        DataMatrixGS1Options options = DataMatrixGS1OptionsBuilder.create()
            .withCompactionMode(DataMatrixCompactionMode.C40)
            .withMatrixSize(DataMatrixSize.MATRIX_12X12)
            .withModuleSize(5)
            .withPadding(new Padding(10))
            .withShowText(true)
            .withWidth(600)
            .build();

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

        try (FileOutputStream fileStream = new FileOutputStream(
                outputDir.resolve("datamatrixGS1.png").toFile());
                BarcodeGenerator barcodeGenerator = new BarcodeGenerator(options)) {
                    barcodeGenerator.export(
                            "(01)09521234543213(10)ABC123(17)280101",
                            fileStream,
                            DXImageFormat.getPng());
        }
    }
}

Refer to the following help topic for additional information: GS1 Data Matrix.

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
DataMatrixCompactionMode