Barcode-Lib4J requires Java 11+
Package de.vwsoft.barcodelib4j.oned
Java Class «ImplEAN128» – Barcode «GS1-128»
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 create instances, 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.Note: This method performs validation automatically using an internal
GS1Validator
instance. Therefore, there is no need to create your ownGS1Validator
instance or to manually validate the provided content beforehand.- 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
-