|
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.code128.Code128Bean
public class Code128Bean
This class is an implementation of the Code 128 barcode.
| Field Summary | |
|---|---|
protected static int |
DEFAULT_CODESET
Default codeset. |
protected static double |
DEFAULT_MODULE_WIDTH
The default module width for Code 128. |
| Fields inherited from class org.krysalis.barcode4j.impl.AbstractBarcodeBean |
|---|
doQuietZone, fontName, fontSize, height, moduleWidth, msgPos, pattern, quietZone, quietZoneVertical |
| Constructor Summary | |
|---|---|
Code128Bean()
Create a new instance. |
|
| Method Summary | |
|---|---|
BarcodeDimension |
calcDimensions(java.lang.String msg)
Calculates the dimension of a barcode with the given message. The dimensions are dependant on the configuration of the barcode generator. |
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 |
getCodeset()
Returns the codeset to be used. |
protected boolean |
hasFontDescender()
Indicates whether the barcode height calculation should take a font descender into account. |
void |
setCodeset(int codeset)
Sets the codesets to use. |
| Methods inherited from class org.krysalis.barcode4j.impl.AbstractBarcodeBean |
|---|
doQuietZone, getBarHeight, getFontName, getFontSize, getHeight, getHumanReadableHeight, getModuleWidth, getMsgPosition, getPattern, getQuietZone, getVerticalQuietZone, 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_CODESET
| Constructor Detail |
|---|
public Code128Bean()
| Method Detail |
|---|
public void setCodeset(int codeset)
codeset - the codesets to use (see Code128Constants.CODESET_*)public int getCodeset()
Code128Constants.CODESET_*)protected boolean hasFontDescender()
hasFontDescender in class AbstractBarcodeBeanpublic double getBarWidth(int width)
getBarWidth in class AbstractBarcodeBeanwidth - the logical width (1=narrow, 2=wide)
public BarcodeDimension calcDimensions(java.lang.String msg)
calcDimensions in interface BarcodeGeneratorcalcDimensions in class AbstractBarcodeBeanmsg - message to use for calculation.
public void generateBarcode(CanvasProvider canvas,
java.lang.String msg)
generateBarcode in interface BarcodeGeneratorgenerateBarcode in class AbstractBarcodeBeancanvas - CanvasProvider that the barcode is to be rendered on.msg - message to encode
|
barcode4j 2.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||