Skip to main content

BorderDashStyle Enum

Lists values used to specify the barcode border’s dash style.

Declaration

public enum BorderDashStyle extends Enum<BorderDashStyle> implements IIntEnum

Members

Name Description
DASH

A line of dashes.

DASH_DOT

A line of a repeating dash-dot pattern.

DASH_DOT_DOT

A line of a repeating dash-dot-dot pattern.

DOT

A dotted line.

DOUBLE

A double solid line.

SOLID

A solid line.

fromValue(int value)

Returns the BorderDashStyle enumeration constant with the specified integer value.

getName()

Returns the name of the BorderDashStyle enumeration constant.

getValue()

Returns the integer value associated with the BorderDashStyle enumeration constant.

toString()

Returns the string representation of the BorderDashStyle enumeration constant.

valueOf(String name)

Returns the BorderDashStyle enumeration constant with the specified name.

values()

Returns an array of all BorderDashStyle enumeration constants.

Remarks

The following code snippet creates a Data Matrix (ECC200) barcode, customizes its encoding parameters, and adds the border:

package barcodes;

import com.devexpress.drawing.*;
import com.devexpress.docs.barcode.*;
import com.devexpress.system.drawing.*;

import java.io.*;
import java.nio.file.*;

public class Main {
    public static void main(String[] args) throws Exception {
        DataMatrixOptions options =  DataMatrixOptionsBuilder.create()
            .withCompactionMode(DataMatrixCompactionMode.C40)
            .withMatrixSize(DataMatrixSize.MATRIX_12X12)
            .withBorderDashStyle(BorderDashStyle.SOLID)
            .withBorderStyle(BorderStyle.INSET)
            .withBorderColor(Color.getOrange())
            .withSides(BorderSide.ALL)
            .withBorderWidth(10)
            .withModuleSize(5)
            .build();

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

        try (FileOutputStream fileStream = new FileOutputStream(
                outputDir.resolve("datamatrix.png").toFile());
             BarcodeGenerator barcodeGenerator = new BarcodeGenerator(options)) {
            barcodeGenerator.export(
                    "SN:DX-987654321",
                    fileStream,
                    DXImageFormat.getPng());
        }
    }
}

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
BorderDashStyle