Barcode-Lib4J requires Java 9+
Package de.vwsoft.barcodelib4j.oned
Java Class «ImplEAN128» – Generate GS1-128 Barcode
java.lang.Object
de.vwsoft.barcodelib4j.oned.Barcode
de.vwsoft.barcodelib4j.oned.ImplCode128
de.vwsoft.barcodelib4j.oned.ImplEAN128
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
ImplEAN14
,ImplSSCC18
Implementation of GS1-128 (also known as EAN-128 or UCC-128). To generate instances, please use one of the
newInstance
static methods in the Barcode
class.-
Field Summary
Fields inherited from class de.vwsoft.barcodelib4j.oned.ImplCode128
FNC1, FNC2, FNC3, FNC4
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setContent
(String content, boolean autoComplete, boolean appendOptionalChecksum) Sets the GS1 data to be encoded in the barcode.Methods inherited from class de.vwsoft.barcodelib4j.oned.Barcode
clone, draw, draw, draw, getAddOn, getContent, getFont, getRatio, getText, getTextOffset, isFontSizeAdjusted, isOptionalChecksumVisible, isTextOnTop, isTextVisible, newInstance, newInstance, setAddOn, setCustomText, setFont, setFontSizeAdjusted, setOptionalChecksumVisible, setRatio, setTextOffset, setTextOnTop, setTextVisible, supportsAddOn, supportsCustomText, supportsOptionalChecksum, supportsRatio, supportsTextOnTop
-
Method Details
-
setContent
public void setContent(String content, boolean autoComplete, boolean appendOptionalChecksum) throws BarcodeException Sets the GS1 data to be encoded in the barcode.For guidance on how to properly provide GS1 structured data, refer to the
GS1Validator
class documentation. This method uses an internal instance ofGS1Validator
to validate the provided data, so you do not need to instantiate it yourself.To include FNC1 separators, the value of
ImplCode128.FNC1
should be used for GS1-128.- Overrides:
setContent
in classImplCode128
- Parameters:
content
- the GS1 data to be encoded in the barcodeautoComplete
- has no function in this method implementationappendOptionalChecksum
- has no function in this method implementation- Throws:
BarcodeException
- if the provided content is empty, or does not comply with the GS1 standard
-