|
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.code39.Code39Bean
public class Code39Bean
This class is an implementation of the Code39 barcode.
| Field Summary | |
|---|---|
protected static double |
DEFAULT_MODULE_WIDTH
The default module width for Code 39. |
protected static double |
DEFAULT_WIDE_FACTOR
The default wide factor for Code 39 |
| Fields inherited from class org.krysalis.barcode4j.impl.AbstractBarcodeBean |
|---|
doQuietZone, fontName, fontSize, height, moduleWidth, msgPos, pattern, quietZone, quietZoneVertical |
| Constructor Summary | |
|---|---|
Code39Bean()
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. |
ChecksumMode |
getChecksumMode()
Returns the current checksum mode. |
double |
getIntercharGapWidth()
Returns the width between encoded characters. |
double |
getWideFactor()
Returns the factor by which wide bars are broader than narrow bars. |
boolean |
isDisplayChecksum()
Indicates whether the checksum will be displayed as part of the human-readable message. |
boolean |
isDisplayStartStop()
Indicates whether the start and stop character will be displayed as part of the human-readable message. |
boolean |
isExtendedCharSetEnabled()
Indicates whether the extended character set is enabled. |
void |
setChecksumMode(ChecksumMode mode)
Sets the checksum mode |
void |
setDisplayChecksum(boolean value)
Enables or disables the use of the checksum in the human-readable message. |
void |
setDisplayStartStop(boolean value)
Enables or disables the use of the start and stop characters in the human-readable message. |
void |
setExtendedCharSetEnabled(boolean value)
Enables or disables the extended character set. |
void |
setIntercharGapWidth(double width)
Sets the width between encoded characters. |
void |
setWideFactor(double value)
Sets the factor by which wide bars are broader than narrow bars. |
| 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 double DEFAULT_WIDE_FACTOR
| Constructor Detail |
|---|
public Code39Bean()
| Method Detail |
|---|
public void setChecksumMode(ChecksumMode mode)
mode - the checksum modepublic ChecksumMode getChecksumMode()
public double getIntercharGapWidth()
public void setIntercharGapWidth(double width)
width - the interchar gap widthpublic double getWideFactor()
public void setWideFactor(double value)
value - the wide factory (should be > 1.0)public boolean isDisplayStartStop()
public void setDisplayStartStop(boolean value)
value - true to enable the start/stop character, false to disablepublic boolean isDisplayChecksum()
public void setDisplayChecksum(boolean value)
value - true to include the checksum in the human-readable message,
false to ignorepublic boolean isExtendedCharSetEnabled()
public void setExtendedCharSetEnabled(boolean value)
value - true to enable the extended character setpublic double getBarWidth(int width)
getBarWidth in class AbstractBarcodeBeanwidth - the logical width (1=narrow, 2=wide)
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 encodepublic BarcodeDimension calcDimensions(java.lang.String msg)
calcDimensions in interface BarcodeGeneratorcalcDimensions in class AbstractBarcodeBeanmsg - message to use for calculation.
|
barcode4j 2.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||