|
barcode4j 2.1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.krysalis.barcode4j.impl.AbstractBarcodeBean org.krysalis.barcode4j.impl.pdf417.PDF417Bean
public class PDF417Bean
This class is an implementation of the PDF417 barcode.
Field Summary | |
---|---|
protected static int |
DEFAULT_COLUMN_COUNT
The default column count for PDF417. |
protected static int |
DEFAULT_ERROR_CORRECTION_LEVEL
The default error correction level for PDF417 |
protected static double |
DEFAULT_MODULE_WIDTH
The default module width for PDF417. |
protected static int |
DEFAULT_X_TO_Y_FACTOR
The default wide factor for PDF417. |
Fields inherited from class org.krysalis.barcode4j.impl.AbstractBarcodeBean |
---|
doQuietZone, fontName, fontSize, height, moduleWidth, msgPos, pattern, quietZone, quietZoneVertical |
Constructor Summary | |
---|---|
PDF417Bean()
Create a new instance. |
Method Summary | |
---|---|
BarcodeDimension |
calcDimensions(java.lang.String msg)
Calculates the dimension of a barcode with the given message. |
void |
generateBarcode(CanvasProvider canvas,
java.lang.String msg)
Generates a barcode using the given Canvas to render the barcode to its output format. |
double |
getBarWidth(int width)
Returns the effective width of a bar with a given logical width. |
int |
getColumns()
|
int |
getErrorCorrectionLevel()
|
int |
getMaxCols()
Gets the maxCols. |
int |
getMaxRows()
Gets the maximum number of columns. |
int |
getMinCols()
Gets the minimum number of columns. |
int |
getMinRows()
Gets the minimum number of rows. |
double |
getRowHeight()
Returns the height of the rows. |
double |
getWidthToHeightRatio()
Gets the ratio of the barcode width to the height. |
void |
setColumns(int cols)
Sets the number of data columns for the barcode. |
void |
setErrorCorrectionLevel(int level)
Sets the error correction level for the barcode. |
void |
setMaxCols(int maxCols)
Sets the maximum number of columns. |
void |
setMaxRows(int maxRows)
Sets the maximum number of rows. |
void |
setMinCols(int minCols)
Sets the minimum number of columns. |
void |
setMinRows(int minRows)
Sets the minimum of rows. |
void |
setRowHeight(double height)
Sets the height of the rows. |
void |
setWidthToHeightRatio(double widthToHeightRatio)
Sets the ratio of the barcode width to the height. |
Methods inherited from class org.krysalis.barcode4j.impl.AbstractBarcodeBean |
---|
doQuietZone, getBarHeight, getFontName, getFontSize, getHeight, getHumanReadableHeight, getModuleWidth, getMsgPosition, getPattern, getQuietZone, getVerticalQuietZone, hasFontDescender, hasQuietZone, setBarHeight, setFontName, setFontSize, setHeight, setModuleWidth, setMsgPosition, setPattern, setQuietZone, setVerticalQuietZone |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final double DEFAULT_MODULE_WIDTH
protected static final int DEFAULT_X_TO_Y_FACTOR
protected static final int DEFAULT_COLUMN_COUNT
protected static final int DEFAULT_ERROR_CORRECTION_LEVEL
Constructor Detail |
---|
public PDF417Bean()
Method Detail |
---|
public void generateBarcode(CanvasProvider canvas, java.lang.String msg)
AbstractBarcodeBean
generateBarcode
in interface BarcodeGenerator
generateBarcode
in class AbstractBarcodeBean
canvas
- CanvasProvider that the barcode is to be rendered on.msg
- message to encodeBarcodeGenerator.generateBarcode(CanvasProvider, String)
public BarcodeDimension calcDimensions(java.lang.String msg)
AbstractBarcodeBean
calcDimensions
in interface BarcodeGenerator
calcDimensions
in class AbstractBarcodeBean
msg
- message to use for calculation.
BarcodeGenerator.calcDimensions(String)
public double getBarWidth(int width)
AbstractBarcodeBean
getBarWidth
in class AbstractBarcodeBean
width
- the logical width (1=narrow, 2=wide)
AbstractBarcodeBean.getBarWidth(int)
public int getColumns()
public int getErrorCorrectionLevel()
public int getMaxCols()
public int getMaxRows()
public int getMinCols()
public int getMinRows()
public double getRowHeight()
public double getWidthToHeightRatio()
public void setColumns(int cols)
cols
- the number of columnspublic void setErrorCorrectionLevel(int level)
level
- the error correction level (a value between 0 and 8)public void setMaxCols(int maxCols)
maxCols
- the maximum number of columns..public void setMaxRows(int maxRows)
maxRows
- the maximum number of rows.public void setMinCols(int minCols)
minCols
- The minimum number of columns.public void setMinRows(int minRows)
minRows
- the minimum of rows to set.public void setRowHeight(double height)
height
- the height of the rows (in mm)public void setWidthToHeightRatio(double widthToHeightRatio)
widthToHeightRatio
- the ratio of the barcode width to the height
|
barcode4j 2.1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |