Record Class FixedDocument.Barcode
java.lang.Object
java.lang.Record
io.leandev.appfuse.pdf.FixedDocument.Barcode
- All Implemented Interfaces:
FixedDocument.Element
- Enclosing class:
FixedDocument
public static record FixedDocument.Barcode(String id, FixedDocument.Layer layer, double x, double y, FixedDocument.BarcodeType type, String payload, double moduleMm, double heightMm, int quietModules)
extends Record
implements FixedDocument.Element
黑白向量條碼。moduleMm 不縮放;一維碼 heightMm 為條高,QR 高度由模組數決定。
quietModules 為每側靜區,QR 至少 4、一維碼至少 10。payload 的業務檢查碼由應用提供。
不自動加入人眼可讀文字,需另建 Text。
- Since:
- 4.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionBarcode(String id, FixedDocument.Layer layer, double x, double y, FixedDocument.BarcodeType type, String payload, double moduleMm, double heightMm, int quietModules) Creates an instance of aBarcoderecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleheightMm()Returns the value of theheightMmrecord component.id()Returns the value of theidrecord component.layer()Returns the value of thelayerrecord component.doublemoduleMm()Returns the value of themoduleMmrecord component.payload()Returns the value of thepayloadrecord component.intReturns the value of thequietModulesrecord component.toString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.doublex()Returns the value of thexrecord component.doubley()Returns the value of theyrecord component.
-
Constructor Details
-
Barcode
public Barcode(String id, FixedDocument.Layer layer, double x, double y, FixedDocument.BarcodeType type, String payload, double moduleMm, double heightMm, int quietModules) Creates an instance of aBarcoderecord class.- Parameters:
id- the value for theidrecord componentlayer- the value for thelayerrecord componentx- the value for thexrecord componenty- the value for theyrecord componenttype- the value for thetyperecord componentpayload- the value for thepayloadrecord componentmoduleMm- the value for themoduleMmrecord componentheightMm- the value for theheightMmrecord componentquietModules- the value for thequietModulesrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
Returns the value of theidrecord component.- Specified by:
idin interfaceFixedDocument.Element- Returns:
- the value of the
idrecord component
-
layer
Returns the value of thelayerrecord component.- Specified by:
layerin interfaceFixedDocument.Element- Returns:
- the value of the
layerrecord component
-
x
public double x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public double y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
payload
Returns the value of thepayloadrecord component.- Returns:
- the value of the
payloadrecord component
-
moduleMm
public double moduleMm()Returns the value of themoduleMmrecord component.- Returns:
- the value of the
moduleMmrecord component
-
heightMm
public double heightMm()Returns the value of theheightMmrecord component.- Returns:
- the value of the
heightMmrecord component
-
quietModules
public int quietModules()Returns the value of thequietModulesrecord component.- Returns:
- the value of the
quietModulesrecord component
-