com.dynamicpdf.api.elements.StackedGs1DataBarBarcodeElement Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dynamicpdf-api Show documentation
Show all versions of dynamicpdf-api Show documentation
A Java Client API that uses the DynamicPDF API to create, merge, split, form fill, stamp, secure/encrypt PDF documents.
package com.dynamicpdf.api.elements;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
/**
* Represents a StackedGS1DataBar barcode element.
*
* This class can be used to place a StackedGS1DataBar barcode on a page.
*/
@JsonInclude(Include.NON_DEFAULT)
@JsonAutoDetect(fieldVisibility = Visibility.NON_PRIVATE)
public class StackedGs1DataBarBarcodeElement extends TextBarcodeElement {
private StackedGs1DataBarType stackedGs1DataBarType;
private int expandedStackedSegmentCount;
private float rowHeight;
/**
* Initializes a new instance of the StackedGs1DataBarBarcodeElement
class
*
* @param value The value of the barcode.
* @param placement The placement of the barcode on the page.
* @param stackedGs1DataBarType The StackedGS1DataBarType of the barcode.
* @param rowHeight The row height of the barcode.
* @param xOffset The X coordinate of the barcode.
* @param yOffset The Y coordinate of the barcode.
*/
public StackedGs1DataBarBarcodeElement(String value, ElementPlacement placement, StackedGs1DataBarType stackedGs1DataBarType, float rowHeight, float xOffset, float yOffset) {
super(value, placement, xOffset, yOffset);
this.stackedGs1DataBarType = stackedGs1DataBarType;
this.rowHeight = rowHeight;
}
/**
* Initializes a new instance of the StackedGs1DataBarBarcodeElement
class
*
* @param value The value of the barcode.
* @param placement The placement of the barcode on the page.
* @param stackedGs1DataBarType The StackedGS1DataBarType of the barcode.
* @param rowHeight The row height of the barcode.
*/
public StackedGs1DataBarBarcodeElement(String value, ElementPlacement placement, StackedGs1DataBarType stackedGs1DataBarType, float rowHeight) {
this(value, placement, stackedGs1DataBarType, rowHeight, 0, 0);
}
@JsonProperty("type")
ElementType getType() {
return ElementType.STACKEDGS1DATABARBARCODE;
}
@JsonProperty("stackedGs1DataBarType")
StackedGs1DataBarType getStackedGs1DataBarType() {
return stackedGs1DataBarType;
}
/**
* Gets the segment count of the Expanded Stacked barcode.
*
* This is used only for the ExpandedStacked Gs1DataBar type.
* @return The segment count of the Expanded Stacked barcode.
*/
public int getExpandedStackedSegmentCount() {
return expandedStackedSegmentCount;
}
/**
* Sets the segment count of the Expanded Stacked barcode.
*
* This is used only for the ExpandedStacked Gs1DataBar type.
* @param value The segment count of the Expanded Stacked barcode.
*/
public void setExpandedStackedSegmentCount(int value) {
expandedStackedSegmentCount = value;
}
/**
* Gets the row height of the barcode.
* @return The row height of the barcode.
*/
public float getRowHeight() {
return rowHeight;
}
/**
* Sets the row height of the barcode.
* @param value The row height of the barcode.
*/
public void setRowHeight(float value) {
rowHeight = value;
}
}