UPCSupplemental5OptionsBuilder Class
Builds an UPCSupplemental5Options object. Chain builder methods to configure barcode settings, then call the build() method to create the options object.
Declaration
public class UPCSupplemental5OptionsBuilder extends BarcodeOptionsBuilder<UPCSupplemental5Options,UPCSupplemental5OptionsBuilder>
Remarks
Refer to the following help topic for additional information: UPC Supplemental 5.
The following code snippet creates a UPC Supplemental 5 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 {
UPCSupplemental5Options options = UPCSupplemental5OptionsBuilder.create()
.withPadding(new Padding(10))
.withShowText(false)
.withWidth(150)
.withHeight(150)
.build();
Path outputDir = Path.of("output");
Files.createDirectories(outputDir);
try (FileOutputStream fileStream = new FileOutputStream(
outputDir.resolve("upc5.png").toFile());
BarcodeGenerator barcodeGenerator = new BarcodeGenerator(options)) {
barcodeGenerator.export(
"4210000526",
fileStream,
DXImageFormat.getPng());
}
}
}
Inherited Members
com.devexpress.system.JavaObject.clone()
com.devexpress.system.JavaObject.equals(java.lang.Object)
com.devexpress.system.JavaObject.hashCode()
com.devexpress.system.JavaObject.initFields()
com.devexpress.system.JavaObject.memberwiseClone()
com.devexpress.system.JavaObject.toString()
java.lang.Object.finalize()
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
JavaObject
BarcodeOptionsBuilder<TOptions,TBuilder>
UPCSupplemental5OptionsBuilder
UPCSupplemental5OptionsBuilder()
Initializes a new instance of the UPCSupplemental5OptionsBuilder class.
Declaration
public UPCSupplemental5OptionsBuilder()
Methods
create() Method
Creates a new UPCSupplemental5OptionsBuilder instance.
Declaration
public static UPCSupplemental5OptionsBuilder create()
Returns
| Type | Description |
|---|---|
UPCSupplemental5OptionsBuilder |
The current |