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
|
EXPANDED_STACKED
|
GS1 Databar Expanded Stacked
|
LIMITED
|
GS1 Databar Limited
|
OMNIDIRECTIONAL
|
GS1 Databar Omnidirectional
|
STACKED
|
GS1 Databar Stacked
|
STACKED_OMNIDIRECTIONAL
|
GS1 Databar Stacked Omnidirectional
|
TRUNCATED
|
GS1 Databar Truncated
|
fromValue(int value)
|
Returns the |
getName()
|
Returns the name of the |
getValue()
|
Returns the integer value associated with the |
toString()
|
Returns the string representation of the |
valueOf(String name)
|
Returns the |
values()
|
Returns an array of all |
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.






