Skip to main content

DataBarType Enum

Lists symbol types of the GS1 DataBar family.

Declaration

public enum DataBarType extends Enum<DataBarType> implements IIntEnum

Members

Name Description
EXPANDED

GS1 Databar Expanded

BarCode-DataBar-Expanded

EXPANDED_STACKED

GS1 Databar Expanded Stacked

BarCode-DataBar-ExpandedStacked

LIMITED

GS1 Databar Limited

BarCode-DataBar-Limited

OMNIDIRECTIONAL

GS1 Databar Omnidirectional

BarCode-DataBar-Omnidirectional

STACKED

GS1 Databar Stacked

BarCode-DataBar-Stacked

STACKED_OMNIDIRECTIONAL

GS1 Databar Stacked Omnidirectional

BarCode-DataBar-StackedOmnidirectional

TRUNCATED

GS1 Databar Truncated

BarCode-DataBar-Truncated

fromValue(int value)

Returns the DataBarType enumeration constant with the specified integer value.

getName()

Returns the name of the DataBarType enumeration constant.

getValue()

Returns the integer value associated with the DataBarType enumeration constant.

toString()

Returns the string representation of the DataBarType enumeration constant.

valueOf(String name)

Returns the DataBarType enumeration constant with the specified name.

values()

Returns an array of all DataBarType enumeration constants.

Remarks

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

        DataBarOptions options = DataBarOptionsBuilder.create()
            .withType(DataBarType.EXPANDED_STACKED)
            .withSegmentsInRow(4)
            .withPadding(new Padding(10))
            .withShowText(false)
            .build();

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

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

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

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
DataBarType