|
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.qr.QRCodeBean
public class QRCodeBean
This class is an implementation of QR Code (ISO 18004:2006(E)).
Field Summary | |
---|---|
protected static double |
DEFAULT_MODULE_WIDTH
The default module width (dot size) for DataMatrix. |
Fields inherited from class org.krysalis.barcode4j.impl.AbstractBarcodeBean |
---|
doQuietZone, fontName, fontSize, height, moduleWidth, msgPos, pattern, quietZone, quietZoneVertical |
Constructor Summary | |
---|---|
QRCodeBean()
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 |
getBarHeight()
Returns the height of the bars. |
double |
getBarWidth(int width)
Returns the effective width of a bar with a given logical width. |
java.lang.String |
getEncoding()
Returns the message encoding. |
char |
getErrorCorrectionLevel()
Returns the selected error correction level. |
java.awt.Dimension |
getMaxSize()
Returns the maximum symbol size that is to be produced. |
java.awt.Dimension |
getMinSize()
Returns the minimum symbol size that is to be produced. |
double |
getVerticalQuietZone()
Returns the vertical quiet zone. |
void |
setEncoding(java.lang.String encoding)
Sets the message encoding. |
void |
setErrorCorrectionLevel(char level)
Sets the error correction level. |
void |
setMaxSize(java.awt.Dimension maxSize)
Sets the maximum symbol size that is to be produced. |
void |
setMinSize(java.awt.Dimension minSize)
Sets the minimum symbol size that is to be produced. |
Methods inherited from class org.krysalis.barcode4j.impl.AbstractBarcodeBean |
---|
doQuietZone, getFontName, getFontSize, getHeight, getHumanReadableHeight, getModuleWidth, getMsgPosition, getPattern, getQuietZone, 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 QRCodeBean()
Method Detail |
---|
public void setErrorCorrectionLevel(char level)
level
- the error correction level (one of L, M, Q and H)public char getErrorCorrectionLevel()
public void setEncoding(java.lang.String encoding)
encoding
- the message encodingpublic java.lang.String getEncoding()
public void setMinSize(java.awt.Dimension minSize)
minSize
- the minimum size (in pixels), or null for no constraintpublic java.awt.Dimension getMinSize()
public void setMaxSize(java.awt.Dimension maxSize)
maxSize
- the maximum size (in pixels), or null for no constraintpublic java.awt.Dimension getMaxSize()
public void generateBarcode(CanvasProvider canvas, java.lang.String msg)
generateBarcode
in interface BarcodeGenerator
generateBarcode
in class AbstractBarcodeBean
canvas
- CanvasProvider that the barcode is to be rendered on.msg
- message to encodepublic BarcodeDimension calcDimensions(java.lang.String msg)
calcDimensions
in interface BarcodeGenerator
calcDimensions
in class AbstractBarcodeBean
msg
- message to use for calculation.
public double getVerticalQuietZone()
AbstractBarcodeBean.getQuietZone()
is returned.
getVerticalQuietZone
in class AbstractBarcodeBean
public double getBarWidth(int width)
getBarWidth
in class AbstractBarcodeBean
width
- the logical width (1=narrow, 2=wide)
public double getBarHeight()
getBarHeight
in class AbstractBarcodeBean
|
barcode4j 2.1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |