|
barcode4j 2.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.krysalis.barcode4j.impl.AbstractBarcodeBean
org.krysalis.barcode4j.impl.upcean.UPCEANBean
public abstract class UPCEANBean
This is an abstract base class for UPC and EAN barcodes.
| Field Summary | |
|---|---|
protected static double |
DEFAULT_MODULE_WIDTH
The default module width for UPC and EAN. |
| Fields inherited from class org.krysalis.barcode4j.impl.AbstractBarcodeBean |
|---|
doQuietZone, fontName, fontSize, height, moduleWidth, msgPos, pattern, quietZone, quietZoneVertical |
| Constructor Summary | |
|---|---|
UPCEANBean()
Create a new instance. |
|
| Method Summary | |
|---|---|
BarcodeDimension |
calcDimensions(java.lang.String msg)
Calculates the dimension of a barcode with the given message. |
abstract UPCEANLogicImpl |
createLogicImpl()
Factory method for the logic implementation. |
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. |
ChecksumMode |
getChecksumMode()
Returns the current checksum mode. |
void |
setChecksumMode(ChecksumMode mode)
Sets the checksum mode |
protected double |
supplementalWidth(java.lang.String msg)
Calculates the width for the optional supplemental part. |
| 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
| Constructor Detail |
|---|
public UPCEANBean()
| Method Detail |
|---|
public void setChecksumMode(ChecksumMode mode)
mode - the checksum modepublic ChecksumMode getChecksumMode()
public double getBarWidth(int width)
AbstractBarcodeBean
getBarWidth in class AbstractBarcodeBeanwidth - the logical width (1=narrow, 2=wide)
AbstractBarcodeBean.getBarWidth(int)public abstract UPCEANLogicImpl createLogicImpl()
public void generateBarcode(CanvasProvider canvas,
java.lang.String msg)
AbstractBarcodeBean
generateBarcode in interface BarcodeGeneratorgenerateBarcode in class AbstractBarcodeBeancanvas - CanvasProvider that the barcode is to be rendered on.msg - message to encodeBarcodeGenerator.generateBarcode(CanvasProvider, String)protected double supplementalWidth(java.lang.String msg)
msg - the full message
public BarcodeDimension calcDimensions(java.lang.String msg)
AbstractBarcodeBean
calcDimensions in interface BarcodeGeneratorcalcDimensions in class AbstractBarcodeBeanmsg - message to use for calculation.
BarcodeGenerator.calcDimensions(String)
|
barcode4j 2.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||