Barcode-Lib4J requires Java 9+
Package de.vwsoft.barcodelib4j.oned
Java Class «ImplCode39» – Generate Code 39 Barcode
java.lang.Object
de.vwsoft.barcodelib4j.oned.Barcode
de.vwsoft.barcodelib4j.oned.LineageTwoWidth
de.vwsoft.barcodelib4j.oned.ImplCode39
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
ImplCode39E
,ImplPZN
,ImplPZN8
Implementation of Code 39 (also known as Code 3 of 9). To generate instances, please use one of the
newInstance
static methods in the Barcode
class.
Code 39 is an alphanumeric barcode format that is widely used in applications such as inventory management and tracking. It is capable of encoding:
- Upper case letters (A-Z)
- Digits (0-9)
- Space character
- Special characters: plus (+), minus (-), dollar ($), slash (/), period (.), percent (%)
LineageTwoWidth
, as Code 39 is a type of
two-width barcode. See the linked class description for more information.-
Field Summary
Fields inherited from class de.vwsoft.barcodelib4j.oned.LineageTwoWidth
DEFAULT_RATIO
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setContent
(String content, boolean autoComplete, boolean appendOptionalChecksum) Sets the content to be encoded in the barcode.Methods inherited from class de.vwsoft.barcodelib4j.oned.LineageTwoWidth
getRatio, setRatio
Methods inherited from class de.vwsoft.barcodelib4j.oned.Barcode
clone, draw, draw, draw, getAddOn, getContent, getFont, getText, getTextOffset, isFontSizeAdjusted, isTextOnTop, isTextVisible, newInstance, newInstance, setAddOn, setCustomText, setFont, setFontSizeAdjusted, setTextOffset, setTextOnTop, setTextVisible, supportsAddOn, supportsAutoCompletion, supportsCustomText, supportsTextOnTop
-
Method Details
-
setContent
public void setContent(String content, boolean autoComplete, boolean appendOptionalChecksum) throws BarcodeException Sets the content to be encoded in the barcode.- Specified by:
setContent
in classBarcode
- Parameters:
content
- the content to be encoded in the Code 39 barcodeautoComplete
- whether to automatically convert lowercase letters in the content to uppercase lettersappendOptionalChecksum
- whether to append an optional checksum to the content- Throws:
BarcodeException
- if the content is empty or contains invalid characters
-