BorderSide Class
Lists values that define which barcode borders are displayed.
Declaration
public final class BorderSide extends IntEnum<BorderSide>
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());
}
}
}
Inherited Members
Inheritance
Fields
_ALL Field
Applies borders to all sides of a barcode.
Declaration
public static final int _ALL
Field Value
| Type | Description |
|---|---|
| int | Specifies that borders are applied to all sides of a barcode. |
_BOTTOM Field
Applies a bottom border to a barcode.
Declaration
public static final int _BOTTOM
Field Value
| Type | Description |
|---|---|
| int | Specifies that a bottom border is applied to a barcode. |
_LEFT Field
Applies a left border to a barcode.
Declaration
public static final int _LEFT
Field Value
| Type | Description |
|---|---|
| int | Specifies that a left border is applied to a barcode. |
_NONE Field
No borders are applied to a border.
Declaration
public static final int _NONE
Field Value
| Type | Description |
|---|---|
| int | Specifies that no borders are applied to a barcode. |
_RIGHT Field
Applies a right border to a barcode.
Declaration
public static final int _RIGHT
Field Value
| Type | Description |
|---|---|
| int | Specifies that a right border is applied to a barcode. |
_TOP Field
Applies a top border to a barcode.
Declaration
public static final int _TOP
Field Value
| Type | Description |
|---|---|
| int | Specifies that a top border is applied to a barcode. |
ALL Field
Applies borders to all sides of a barcode.
Declaration
public static final BorderSide ALL
Field Value
| Type | Description |
|---|---|
BorderSide |
A BorderSide value that specifies borders are applied to all sides of a barcode. |
BOTTOM Field
Applies a bottom border to a barcode.
Declaration
public static final BorderSide BOTTOM
Field Value
| Type | Description |
|---|---|
BorderSide |
A BorderSide value that specifies a bottom border is applied to a barcode. |
LEFT Field
Applies a left border to a barcode.
Declaration
public static final BorderSide LEFT
Field Value
| Type | Description |
|---|---|
BorderSide |
A BorderSide value that specifies a left border is applied to a barcode. |
NONE Field
No borders are applied to a border.
Declaration
public static final BorderSide NONE
Field Value
| Type | Description |
|---|---|
BorderSide |
A BorderSide value that specifies no borders are applied to a barcode. |
RIGHT Field
Applies a right border to a barcode.
Declaration
public static final BorderSide RIGHT
Field Value
| Type | Description |
|---|---|
BorderSide |
A BorderSide value that specifies a right border is applied to a barcode. |
TOP Field
Applies a top border to a barcode.
Declaration
public static final BorderSide TOP
Field Value
| Type | Description |
|---|---|
BorderSide |
A BorderSide value that specifies a top border is applied to a barcode. |
Methods
fromValue(int value) Method
Returns the BorderSide enumeration constant with the specified integer value.
Declaration
public static BorderSide fromValue(int value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | int | An integer value of the |
Returns
| Type | Description |
|---|---|
BorderSide |
The |
values() Method
Returns an array of all BorderSide enumeration constants.
Declaration
public static BorderSide[] values()
Returns
| Type | Description |
|---|---|
| BorderSide[] | An array containing all |